Jump to content

Nuclear

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by Nuclear

  1. Try passing the airline: StatsData::TotalPaxCarried('MER') That's how I tested it, see if it makes a difference. According to the documentation, passing the airline is optional, so I assume by not passing anything it returns the total for all airlines (which should be the same value if you only have one airline), but either I'm wrong or there's a bug in the method.
  2. This was just an example. I don't know what your existing code is, so I can't tell you exactly what you need to do, but once you get $dist, you need to 'echo' the value where you want it. Using the above example: </php $flightinfo=SchedulesData::findFlight($flightno); $dist=$flightinfo->distance; echo 'Distance: '.$dist;?>
  3. By flight number: SchedulesData::findFlight($flightnum) By flight id: SchedulesData::getSchedule($flightid) Example: $flightinfo=SchedulesData::findFlight($flightno); $dist=$flightinfo->distance;
  4. I just tested it and it returned a reasonable value for me (2945 pax for 38 flights). Can you post the actual code you're using? As for the total cargo, I don't see any built-in methods for that. You'd have to write an SQL query to sum the 'load' field for all filed PIREPs.
  5. Well, one way to do it would be this: Make a copy of the frontpage_main.tpl from /core/templates/ Edit the new copy and replace this: <?php MainController::Run('Pilots', 'RecentFrontPage', 5); ?> With this: <?php $query='SELECT * FROM phpvms_pilots ORDER BY joindate DESC LIMIT 5'; $pilots=DB::get_results($query); foreach($pilots as $pilot) { echo '<a href='.SITE_URL.'/index.php/profile/view/'.$pilot->pilotid.'>'; echo PilotData::getPilotCode($pilot->code,$pilot->pilotid).' '.$pilot->firstname.' '.$pilot->lastname.'</a><br><br>'; }?> Now place the edited file into your skins directory (/lib/skins/crystal/ if you're using the default crystal skin). That will show the 5 most recent pilots sorted by date starting with the most recent.
  6. Looking at line 92 of pilots_details.tpl it appears that OperationsData::GetAllHubs() is returning an empty array. Do you have any airports set up as hubs? If not, this is most likely the problem.
  7. You can use: SchedulesData::findFlight(string $flightnum) For example: $flight=SchedulesData::findFlight($flightnum); echo $flight->price;
  8. How are you currently getting the recent pilots? The default template retrieves the records by descending pilotid. Since pilotid is an auto-increment field, it should return the latest pilots. You certainly can list them by date, but I'd have to see how you're retrieving the records first.
  9. To delete an airport, you need to delete it directly from the database - there is no option in the Admin section. After you delete it from the database, you'll probably need to clear the cache from the Admin panel also. Note: I'm not sure what this might do to any existing PIREPS to or from a deleted airport. I've deleted airports before, but there had not been any PIREPS filed for these airports.
  10. I've never used this before and the documentation doesn't really explain it, but I screwed around with it and found out this: StatsData::PilotAircraftFlownCounts returns an array of aircraft,counts and hours for the given PilotID (I don't know what else it returns). So, you'll need to loop through the array and echo the results, something like this: $stats=StatsData::PilotAircraftFlownCounts($pilotid); foreach($stats as $stat) { echo $stat->aircraft.' '.$stat->count.' '.$stat->hours.'<br>'; } Obviously, you want to put the data in your table, but this is an example.
  11. Forgot the semicolon at the end. Should be: <?php echo StatsData::PilotAircraftFlownCounts($pilotid);
  12. The correct usage would be: <?php echo StatsData::PilotAircraftFlownCounts($pilotid) I didn't bother to look this up though, so I don't know what it returns.
  13. The only limit would be your server and database limits. You would only possibly see a decline in performance if you had a huge number of pages. But MySQL can easily handle tables with thousands of records, so I wouldn't worry about it.
  14. They're in frontpage_recentpilots.tpl and frontpage_reports.tpl
  15. The { and } (curly brackets) are used to contain statement blocks. You don't need to put one after every statement. They are used for blocks of statements which are grouped together. For example: if ($x==1) { statement 1; statement 2; statement 3; } statement 4; In this example, if $x=1, then statements 1-3 will be executed, otherwise it will skip that block and continue with statement 4.
  16. Midway Virtual Airlines - http://mdwva.org
  17. I don't think he was so much concerned that the sites looked alike, but that the content was apparently copied almost verbatim.
  18. Here, try this... Top_Flights_Module.zip
  19. In the styles.css, add the background color (note the last item in the #sidebar entry). #sidebar { float: left; width: 210px; border: 1px solid; padding-left: 10px; padding-bottom: 16px; margin-top: 15px; padding-right: 10px; background: #C7DCF2} Then copy it to your skins folder (/lib/skins/crystal).
  20. Very carefully Actually, it's the default Crystal skin - I just changed the backround color.
  21. Midway Virtual Airlines is based on the real-world Midway Airlines. There were actually two Midway Airlines, both now defunct. The original Midway operated from 1976-1991 and was based out of Chicago Midway Airport. The second airline, based out of Raleigh-Durham Airport, was in operation from 1993-2003. Currently, Midway Virtual uses routes from the original Midway Airlines, although we use aircraft from both airlines. Routes vary from extreme short-hops to trans-continental and everything in between. Our ACARS application allows pilots to automatically record their flights and send a PIREP directly to our system. Although not required, we encourage pilots to fly online on VATSIM. If you've never flown on VATSIM, we are more than happy to get you started. Midway Virtual also incorporates a financial model: flights incur expenses and generate revenue, and hopefully pilots and the company make a profit. We are very newbie-friendly and are more than willing to help anyone out new to virtual airlines or VATSIM. Check us out at: http://www.mdwva.org
  22. Yes. If you're having fun, so will everyone else. It's so easy to turn it into a business, and that's no fun for anyone.
  23. If anyone is interested, I've managed to compile a current Navdata file ready for import to your database. NOTE: although it contains all navaids and waypoints, it does not have any airway information, therefore phpVMS will not expand any airways in the route (tbh, I'm not sure if it does this anyway). Since the files are too large to attach, they are available here: Gzipped CVS file Gzipped SQL file It would probably be a good idea to back up your database first - I assume no resposibility for loss off data
×
×
  • Create New...