Jump to content

skylineVirtual

Members
  • Posts

    59
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by skylineVirtual

  1. No problem. It's probably not the best solution as I mixed some stuff that should be in the classes into my modules because I couldn't get it work that way. But I will post the code as soon as I'm at the PC.
  2. Thanks but I think I found my error. The //added comment shouldn't be there EDIT: Everything is working now
  3. Thanks, I'm going to try that one. Is there any way to test those functions instead of risking even more lost pireps?
  4. I changed that but now it looks like the pireps that we're sent after this change weren't reported. So they are not in our database...
  5. Thanks to everyone Got the map part to work as it should. Now I have to hope that the transfer of these values into the pirep will work. The only thing I did so far was to edit this query (from the PIREPData.class.php; function is fileReport; around line 748): $sql = "INSERT INTO ".TABLE_PREFIX."pireps( `pilotid`, `code`, `flightnum`, `depicao`, `arricao`, `route`, `route_details`, `distance`, `aircraft`, `flighttime`, `flighttime_stamp`, `landingrate`, `submitdate`, `accepted`, `log`, `load`, `fuelused`, `expenselist`, `source`, `exported`, `rawdata`, `network` //added ) VALUES ( {$pirepdata['pilotid']}, '{$pirepdata['code']}', '{$pirepdata['flightnum']}', '{$pirepdata['depicao']}', '{$pirepdata['arricao']}', '{$pirepdata['route']}', '{$pirepdata['route_details']}', '{$pirepdata['distance']}', '{$pirepdata['aircraft']}', '{$pirepdata['flighttime']}', '{$flighttime_stamp}', '{$pirepdata['landingrate']}', NOW(), ".PIREP_PENDING.", '{$pirepdata['log']}', '{$pirepdata['load']}', '{$pirepdata['fuelused']}', '0', '{$pirepdata['source']}', {$pirepdata['exported']}, '{$pirepdata['rawdata']}', '{$pirepdata['network']}' //added )"; Is this enough? Or are there other things to do for this to work? EDIT: it didn't work
  6. My aim is to somehow get it to work that the online status is displayed in the map and then the value of acarsdata is changed so that when the pirep get's filed, the online status will be entered as well. If the query part you wrote works, then the whole thing would probably work
  7. I want to transfer this value into the pirep so that we can create online statistics or give rewards according to the online flights/hours. I've already changed the code for that and I hope it works but I couldn't test it because the other stuff wasn't working so far. I'm going to try your code later as soon as I get home.
  8. Using the Vatsim and IVAO ID sounds good. The thing is the Id's of our pilots are stored in a different database. But using the flight number shouldn't be a problem because we are a fictional VA and have customized our phpvms so that a flight can only be booked once.
  9. Wow thanks. Wouldn't it be possible to run this function in the ACARS.php module and then change the function that get's the acarsdata so that it will get the network variable from the table. After you run it is the variable then available in the template like the other ones (in the format <=flight.network=> or how the format is, don't have it here right now)? You could then check if that variable is 1 and display IVAO or 2 for Vatsim, 0 for offline.
  10. Or can someone tell me which framework phpvms uses? This way I could look for some documentation on the Internet concerning mysql queries as I was unable to find something here in the forums.
  11. I'm moving forward I started to understand the logic and made some first tries. This code seems to do the job except for the queries. They aren't working yet. $results = ACARSData::GetACARSData(); foreach($results as $result) { if (strpos($ivaowhazz,$result->flightnum) !== false) { $sql = 'UPDATE '.TABLE_PREFIX."acarsdata SET network='1' WHERE flightnum='".$result->flightnum."'"; DB::query($query); } else if (strpos($vatwhazz,$result->flightnum) !== false) { $sql = 'UPDATE '.TABLE_PREFIX."acarsdata SET network='2'"; DB::query($query); }; }; Could someone maybe help me out on this? Thanks in advance
  12. Ok, thanks for your answer. I'm going to have a look around the Forum to see if I can get the problem solved. I've already looked around the phpvms files a bit. Is it possible to add a query to the acarsmap part of the ACARS module which first get's all the entries in the acarsdata table, then checks whether the pilot is flying online or not and enters this back into the table? Then the second question would be how I can work with the variables I defined in the modules file in the tpl file. Because there is no need to download the TXT files twice if I can use those from the modules file. As for the IVAO and VATSIM data thanks for the information. I'm going to change that as well. Thanks in advance! -Lauritz
  13. Hello I'm trying to add whether a pilot is flying online on Vatsim or IVAO to the acarsdata table. To figure out if he is logged into a network I'm reading out the whazzup files with this code inside the acarsmap.tpl To download the txt files: $cws = new CodonWebService(); $ivaowhazz = $cws->get('http://de1.www.ivao.aero/whazzup.txt'); $cws = new CodonWebService(); $vatwhazz = $cws->get('http://www.pcflyer.net/DataFeed/vatsim-data.txt'); Then to check if this file contains the right callsign, I'm using this code (in the acarsmap.tpl as well and working as it shood): if (strpos($ivaowhazz,'<%=flight.flightnum%>') !== false) { echo '<div style="align: center"><img style="height: 18px;" src="http://www.skyline-va.de/phpvms/core/lib/skins/crystal/images/ivao.jpg"></div>'; } else if (strpos($vatwhazz,'<%=flight.flightnum%>') !== false) { echo '<div style="align: center"><img style="height: 18px;" src="http://www.skyline-va.de/phpvms/lib/skins/crystal/images/vatsim.png"></div>'; } else { echo "Offline";}; Now I'd like to insert this data into the phpvms_acarsdata table. I've added an extra column which is titled network but I couldn't figure out a code how to change the value of that column according to which network the pilot's currently flying on. I've tried several things like: $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $mysqlnet = "UPDATE phpvms_acarsdata SET network = '2' WHERE flightnum='<%=flight.flightnum%>'"; $a1 = mysql_query($mysqlnet); or I tried to use stuff that phpvms already uses like this: $mysqlnet = "UPDATE phpvms_acarsdata SET network = '1' WHERE flightnum='<%=flight.flightnum%>'"; DB::query($mysqlnet); But nothing worked yet. I didn't really understand the phpvms framework logic yet as well, which is probably the reason for my error. Is there any documentation for it? Thanks in advance! -Lauritz
  14. Somehow the Diagram showing the average pireps isn't working on our profile at vaCentral. http://www.vacentral.net/airline/sln_skylinevirtual Is there something we're doing wrong or is it an issue with vaCentral? Thanks in advance. Lauritz
  15. Ok, this one is solved now as well. Seems as if the data was cached somewhere or had to be recalculated. Everything is working fine now.
  16. Thanks that worked for me Now the labels are left and I couldn't find an option that influences those in the js file. Or did I miss something. All the code snippets I found until now resulted in the acarsmap disappearing. EDIT: I just figured out that the Satellite map doesn't have any labels so that would be solved as well
  17. I didn't change the template file. This code is in the acarsmap.js file located in phpvms/lib/js
  18. I tried many things to change the appearance of the acarsmap by googling but I can't find a working solution. What I am trying to do is to remove the layers and change the map type. Unfortunately changing this: var defaultOptions = { autozoom: true, zoom: 4, center: new google.maps.LatLng(-25.363882,131.044922), mapTypeId: google.maps.MapTypeId.TERRAIN, refreshTime: 12000, autorefresh: true }; to this: var defaultOptions = { autozoom: true, zoom: 4, center: new google.maps.LatLng(-25.363882,131.044922), mapTypeId: google.maps.MapTypeId.HYBRID, refreshTime: 12000, autorefresh: true }; doesn't do anything. The weird thing is almost no changes result in a change of the map. I tried to add the cloud layers as well, without any positive results. I found a couple of code snippets to hide the labels but none of them worked in combination with phpvms. Thanks in advance
  19. I'm having a problem with our VA's finances at the moment. I forgot to enter ticket prices into our schedules and wanted to do that now. What I did was I wrote a script that calculated the price by multiplying an average price for one nm with the distance. This worked great and I did that for our already filed pireps as well and calculated the gross revenue hoping to correct our decent financial situation caused by this error. The table of the Balancesheet is showing the monthly revenue correctly but there is an error in the calculation of the total revenue. As it seems the total just contains the pilot pay and the fuel price (I didn't play around with expenses yet) but leaves out our income completely. http://skyline-va.de...mit=View Report (don't wonder about the template were only using parts of phpvms, like the flash charts and some tables) Does someone know where the issue is or am I doing something wrong? Would be great if someone could help me out with this.
  20. I just added it as a column to the phpvms pilots database to add transferflights (not hours) to the profile. This way the pilots can transfer their flown flights as well
  21. Yeah I tried changing the functions this morning but I didn't have very much success with it so I'm going to go with the transfer method. But I did add a colum for transfer flights.
  22. Ok thanks. Something else has come to my mind, as our system uses the hours out of the column total hours pretty often and we'd have to change some things. Is there a function somewhere that calculates the value for total hours once the flights get sent (or accepted). If this is the case couldn't I just add the hours out of transfer hours in there? That would save us some work
×
×
  • Create New...