Jump to content

AFVA | Mitchell

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by AFVA | Mitchell

  1. how can I add this to Top navigation so that it opens a new site like the other Top Navigtion entries?

    thanks in advance

    Thomas

    SVA0001.png

    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. I have this working inside a lightbox. In the box, the dep/arr only shows dep/app. Doesn't display the airports. Any ideas? You can see here Click on the "Book your Alaska Adventure" banner.(Start Now)

    I am displaying this way

    <?php Template::Show('booking_form.tpl'); ?>

    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. 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)

  5. Missing argument 2 for ACARSData::FilePIREP(), called in /****/****/****/core/modules/wacars.php on line 42 and defined in core/common/AcarsData.class.php on line 268

    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

  6. (I did sent you a PM to help on this but did not get any reply)

    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 ;)

  7. 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...

    • Like 4
  8. 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

  9. 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

  10. 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 :o

    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

  11. FLEET TABLE 2.0 BETA - FINAL PUBLIC RELEASE

    Here is the BETA of Fleet Table 2.0

    NEW FEATURES:

    Added download link

    Image fixes

    SQL Updated

    and more!

    It is attached.

    NOTE: This is only a BETA release and many things may not work yet.

    NOTE2: I'm gonna be away from Monday 22nd to Friday 27th (i think).

    FleetTable2BETA.zip

    • Like 1
×
×
  • Create New...