Jump to content

AFVA | Mitchell

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by AFVA | Mitchell

  1. Open core_navigation.tpl (should be in your lib/skins/***/ folder or core/templates). Below this code: <li><a href="<?php echo url('/acars'); ?>">Live Map</a></li> Add: <li><a href="<?php echo url('/booking');?>">Book A Flight</a></li> Done! Hope this helped, Mitch
  2. Change the code from <?php Template::Show('booking_form.tpl'); ?> To <?php MainController::Run('booking', 'index'); ?> This way it shows the same thing though the airports are also shown. It also makes the search work.
  3. You can rename the folder Fleet to FleetInfo and rename Fleet.php to FleetInfo.php OR you can do some coding. Open your default fleet folder, open fleet.php. Add this code: /** Copyright Mitchell Williamson 2010 Fleet Table 2.0 */ public function info() { $fleet = self::FleetInfo(); Template::Set('fleet', $fleet); Template::Show('fleet_table.tpl'); } /** * Return all possible information about the fleet * Code by Mitchell W * Enhanced by Stu (stuartpb) * Fleet Table 2.0 */ public static function FleetInfo() { $sql = 'SELECT a.*, a.name AS aircraft, COUNT(p.pirepid) AS routesflown, SUM(p.distance) AS distance, SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime, AVG(p.distance) AS averagedistance, AVG(p.flighttime) as averagetime FROM '.TABLE_PREFIX.'aircraft a LEFT OUTER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id) GROUP BY a.registration'; return DB::get_results($sql); DB::debug(); return $ret; } Add it below public function index or whatever stuff u have in there. Rename 'info' to whatever u want then go to yourwebsite.com/index.php/fleet/info Also dont forgot to add fleet_table.tpl to core/templates
  4. jQuery UI is they way to go for nice looking stuff with little work involved. http://jqueryui.com/demos/ If you want a lot with little room, go with the tabs. They look nice and work perfect.
  5. How to reduce fuel costs: - Only use the amount of fuel you NEED! ?(Extra fuel is extra money down the drain) IFR Example: - Fuel to destination airport + fuel to alternate from destination airport + 10% more fuel = How much fuel you need - Use aircraft with non-fuel guzzling engines (Now we are getting realistic) - Use altitude! - Don't fly at 100% thrust for the whole flight! - Get information from your FMC (If your aircraft dosn't have an FMC you can use vasFMC 2)
  6. Thanks Nabeel! No error anymore. But the PIREP doesn't file...There is nothing in the SQL database and nothing in the admin panel. Would could cause this?
  7. Thats the response I get from the server when filing a pirep using my World ACARS program. wacars.php: /** * wacars.php * World Acars * * Copyright 2010 Mitchell Williamson * * Liscence: * The GNU General Public License (GPL) * Version 2, June 1991 */ class wacars extends CodonModule { /** * Receieves PIREP * index.php/wacars/pirep */ public function pirep() { $pirep_xml = $this->post->pirepxml; $xml = simplexml_load_string($pirep); $aircraft = OperationsData::getAircraftByReg($xml->reg); /** Fill the data array with data from XML */ $pirep_data = array( 'pilotid' => $xml->pilotid, 'flightnum' => $xml->flightnum, 'depicao' => $xml->depicao, 'arricao' => $xml->arricao, 'aircraft' => $aircraft->id, 'fuelused' => $xml->fuel, 'landingrate' => $xml->tdr, 'source' => 'WACARS', 'submitdate'=>'NOW()', ); /** Submit the pirep */ $submit = ACARSData::filePIREP($pirepdata); } Does anyone know the solution? Thanks, Mitch
  8. Hello all, As most of you know I am working on my ACARS program (World Acars) all coded in VB (in Visual Studio 08) but I am stuck at the moment. I am able to generate the XML its just that I dont know how to send that XML to phpVMS? Can anyone provide the code for this? Thanks, Mitch
  9. UPDATE: Main FSUIPC Work Complete Now to the XML and PHP Stuff
  10. Yeah, all done in Visual Studio 2008 Professional
  11. Sorry, been really busy last couple of days... Anyway, This is the FINAL license: The GNU General Public License (GPL) Version 2, June 1991 Now with that done, totalhours completed and the XML sending underway, it should be released within 2 weeks
  12. I am in the process of choosing a license to use with the SDK. I am thinking of: Attribution-NonCommercial-ShareAlike 3.0 Unported Any ideas?
  13. Total hours is done for my ACARS Program, now for Total Fuel...

  14. Anyone have the VB (visual studio 2008) code for a counter/stopwatch?
  15. WORLDACARS STATUS: FSUIPC and XML Development As some of you know I am currently working on a new ACARS program that fully integrates into phpVMS. Features: - XML provides quick and easy data transfer between phpVMS and WorldACARS - VA Flight Plan search - ***Software Development Kit*** - XML PIREP Saved when sent to server encase of failure. About the SDK: The WorldACARS SDK provides virtual airlines the choice to change the layout and design of WorldACARS through Visual Studio (2008 recommended). What the SDK Includes: - Original Project Files - Tutorials ACARS Requirements: - Microsoft Flight Simulator 2004 or X - FSUIPC - Latest Version of .NET Framework - Internet Access ACARS Technical Information: - Visual Basic Coded and Compiled - XML POST function to communicate with server - PHP Receives and Processes XML Data - Uses FSUIPC DLL Plus, everything including the SDK are 100% FREE! Images, videos and more posted here soon...
  16. FSUIPC reads the UTC time so it wouldn't make difference, plus i cant find the code to time stuff.
  17. Thanks nabeel, will have a play around to change stuff. Plus, anyone know how to subtract times in VB? e.g 12:30 - 12:20 = :20 (20 minutes total time) The way i use it is the when the log starts i capture the FS time and when the log ends it captures the time again. They are stored in blocka.Text and blockb.Text Once caculated it will move the answer to totalhours.text then when you hit send log it will read the data, convert it to XML then send it off. Thanks in advance, Mitch
  18. The php code so far: class WACARS extends CodonModule { // Receive the XML public function pirep() { $pirep_xml = $this->post->pirepxml; $xml = simplexml_load_string($pirep); // Process the data $pirep_data = array( 'pilotid' => $xml->pilotid, 'flightnum' => $xml->flightnum, 'depicao' => $xml->depicao, 'arricao' => $xml->arricao, 'aircraft' => $xml->reg, ); // Submit the data to the SQL $submit = ACARSData::filePIREP($pirepdata); } } That code above is just the basics of what I am working on. I have the basic XML being generated, just need to code the sending off part and finish the php stuff and then release it! Thanks, Mitch
  19. Anyone know the VB code to simply save a .xml file using data from a rich text box. Once thats done i can move onto the sending part And also would help ALOT if someone could provide code for the XML post function...cause all the links i go to always confuse me. Sorry if im asking for too much, Mitch
  20. I wonder if this works: The log is written in XML format, when the user ends then sends the log the program saves it as a temporary XML then sends it to the website. I think that will probably be the simplest way... What the log looks like pre-flight:
  21. Anybody happen to have any VB knowledge? I am getting really confused when it comes to: Creating the XML, Reading data from the rich text log and flight plan page, Sending to Server, Receiving at server Thanks, Mitch (tried to read that link Nabeel sent me though it confused the hell out of me...)
  22. Thanks everyone! I am now planning to release this program publicly so your VA can enjoy it too. But anyway, time to head back to Visual Studio...
  23. Hello all, I am coding an private ACARS program for our VA. I need to know what format phpVMS can receive pilot reports. The program is all in Visual Basic with the log stored in a Rich Text box. Maybe convert that to XML or something? Thanks, Mitch
  24. Over at our VA we have worked out how to use ATC clients with non-VATSIM servers (only euro scope so far).
  25. the local.config.php is made when you install phpVMS. After installation it is found in the core folder
×
×
  • Create New...