Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Timothee

Pages: 1 [2] 3 4 ... 6
I assume you corrected the entry in your VAM database. The problem is, SIMAcars doesn't care for this table.
SIMAcars comes with its own database, including a table with airports. For validating departure and arrival airports the data from the local database is used.

The local database has to be edited manually by each SIMAcars user, using a tool like DB Browser for SQLite.
You may wonder why SIMAcars is using a local database for this. The only benefit is, SIMAcars can be used offline without an Internet connection and is therefore able to validate your position.
From my point of view, there is too much logic implemented in SIMAcars, but thats another story.

To solve your problem you don't have many options.

a) Provide a corrected DB file for your VA pilots. But replacing the file will also delete all reports which are stored locally and the VA profile (username, password, URL, etc.)
b) Explain each VA pilot how they can edit the database manually
c) Wait for SIMAcars 1.X which hopefully will include an update function for this case or works completely different (validation of airports done by VAM)
d) Write your own tracker

QUESTION:  After creating a NEW VIRTUAL AIRLINE link in SIMACARS... having http://HTTPS://  will SIMACARS be able to connect to a HTTPS:?

Yes, without a doubt. We are using SSL. Just correct the script locations in vam_index_header.php and vam_header.php. IIRC one link leads to and the other to If you don't correct them you will get a certificate warning even if you are using a valid certificate.

For SIMAcars you don't need to change much, just create a new VA profile with HTTPS instead of HTTP (redirections will not work!).

So I will start with answering your questions first before I will start with my concerns.

a) Yes, the data you are looking for is in the table vam_live_flights and is updated every 60 seconds by SIMAcars
b) The table vam_track is "static" and only updated once a pilot sends his report
c) As stated in b) this is not the data you are looking for
d) Sure

SIMAcars is updating vam_live_flights and vam_live_acars every 60 seconds. vam_live_flights contains one row for every active flight. vam_live_acars contains multiple rows per flight, the data is used to display the flight track on the map.

As you already noticed, the map loads the departure airport of a flight. This is due to the SQL query, selecting the first coordinates in vam_live_acars. This will return always the departure aiport so its useless. It would make more sense to get the coordinates from vam_live_flights.

However, you want a tracking map. This is easy to achieve, just correct the SQL query. But, what you probably didn't thought about, what do you want to track if you have multiple active flights?

Because of this, I set the coordinates in our VA to 0, 0 to display more or less the whole world. Sure there is no fancy tracking but as I said, as soon you have more than one flight you don't know anymore what you want to track.

Code: [Select]
var var_location = new google.maps.LatLng(0, 0);
var var_mapoptions = {
center: var_location,
zoom: 2,

The error message "mail() has been disabled for security reasons" suggests that your hoster disabled the PHP mail() function which is used to send e-mails.
You probably have to discuss this issue with your hoster or find a different one who allows sending mails.

Support for VAM 2.4 - 2.6 / Re: New Maps issue
« on: July 19, 2018, 12:57:05 PM »
Yes as I wrote here already the quota for the provided API key has exceeded. Get your own Google Maps API key on or wait until the quota resets.

Bug reports / Re: Google Maps error just popped up
« on: July 19, 2018, 09:17:35 AM »
The error message is self explaining:

You have exceeded your request quota for this API. See

Everyone using the API key delivered with VAM is using the same quota. I highly recommend registering your own API key.
The quota is reset daily, until then your key won't work anymore.

Support for SIM ACARS / Re: Sim Acars SSL
« on: July 17, 2018, 12:39:20 AM »
SIM ACARS works fine with SSL but you have to enter the URL with https://
Redirects will work in the browser but not for SIM ACARS.

Support for VAM 2.4 - 2.6 / Re: Change register successful message
« on: July 01, 2018, 11:40:22 PM »

you will find the text in the language files /vam/languages
The item you are looking for is REGISTER_SUCCESSFUL_MSG


Bug reports / Re: Error Flight Validator
« on: May 29, 2018, 01:25:18 PM »
might be due to the problem reported here:
Try to add an index to the column report_id of the table va_finances.

Problem solved

Apparently the API query has been changed at Google.

All spaces must be removed in each php.





old :  key= AIzaSyAse6CjTQffTPy_k4oYaUj34d1A7py3rUQ &callback=initMap"   

new : key=AIzaSyAse6CjTQffTPy_k4oYaUj34d1A7py3rUQ&callback=initMap"


You missed two more:

Thanks for your contribution ;)

Support for VAM 2.4 - 2.6 / Re: Maintenance costs
« on: February 15, 2018, 03:36:23 PM »
If I remember correctly the maintenance costs are not calculated or inserted into the va_finances table. At least not for regular flights, I think they are for charter flights.

We adapted the receivevampirep.php for our needs. Inside the function check_regular_flight you will find the following lines somewhere (should be line 601 in the original file):
Code: [Select]
$query1 = "insert into vaprofits (value,date,gvauser_id,description) values (-$hangar_maintenance_value, now(),$pilot ,'Maintenance $matricula')";

if (!$result_sta = $db->query($query1)) {
die('There was an error running the query [' . $db->error . ']');

We just added another query below:
Code: [Select]
// Cost for the VA for the maintenance
$query1 = "insert into va_finances (amount,parameter_id,finance_date,gvauser_id,description,report_type,report_id) values (-$hangar_maintenance_value, '99997', now(),$pilot ,'Aircraft Maintenace $matricula','SIM ACARS', '')";

if (!$result_sta = $db->query($query1)) {
die('There was an error running the query [' . $db->error . ']');

As soon an aircraft enters in maintenance you will see the costs in the financial report.
Previous maintenance cost have been added to the table vaprofits but this table isn't used anywhere. You may copy the values to va_finances if you want to.

Bug reports / Re: Weclome Email, again and again, several times an hour
« on: February 06, 2018, 09:57:23 PM »
The check in pilot_insert.php looks like this per default:
Code: [Select]
if ($_POST["password"])
// Send mail to the pilot
$mail = new vam_mailer();

Put the lines for mailiing inside the if which starts on line 68:
Code: [Select]
if ($_POST["password"])

  // Send mail to the pilot
  $mail = new vam_mailer();

Bug reports / Re: Weclome Email, again and again, several times an hour
« on: February 02, 2018, 11:24:39 AM »

I'm not sure if I understand your problem correctly but we had a similiar issue but never as many e-mails like you do.

The problem is, a register e-mail is always sent when someone calls pilot_insert.php. Some bots follow every link on a website and will also call this file. This will generate an e-mail without actually someone register on the website.

pilot_insert.php inserts a user only if a password was set in the register form. To solve the problem I moved thet two lines of code for the e-mail inside this check.

Code: [Select]
if ($_POST["password"])
  $encryptpassword = md5($pass);
  echo '<br>';
  $sql1 = "insert into gvausers (register_date,activation,name,surname,callsign,email,password,ivaovid,hub_id,country,city,reg_comments,birth_date,vatsimid,language)
              values (now(),0,'$name','$surname','_NEW_','$email','$encryptpassword','$ivao','$hub_id','$country','$city','$notes','$birthday','$vatsim','$language');";
  if (!$result = $db->query($sql1)) {
    die('There was an error running the query [' . $db->error . ']');
  // Send mail to the pilot
  $mail = new vam_mailer();


We did the same multiple times without any problems. Usually I just use the database export/import function of phpMyAdmin. I have moved/cloned the database mulitple times this way. However some do experience some problems with views. Generally it is recommended to recreate views from scratch and importing only tables.


Bug reports / Re: METAR not available
« on: December 01, 2017, 10:05:20 PM »
Your hoster may have disabled allow_url_fopen, which is how the METAR data are shown.
You may check this setting by creating a new .php file with the following code:
Code: [Select]

Opening remote websites/files directly is considered insecure, which is why some hosters disabled it by default.

Pages: 1 [2] 3 4 ... 6