Jump to content

AFVA | Mitchell

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by AFVA | Mitchell

  1. For on of my pages that are separate from phpVMS I want to use data from phpVMS and put it into a table. I have put in this code in the <head> part:

    <?php
    require_once("VatsimPHPgenerator.php");
    $VatsimPHP=new VatsimPHP;
    include 'core/codon.config.php';
    ?> 
    

    And I get this error:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at F:\XAMPP\xampp\htdocs\deparr.php:14) in F:\XAMPP\xampp\htdocs\core\codon.config.php on line 40

    Anyone know whats wrong?

  2. I am building a website at the moment for my virtual airline. It will be all done in PHP but I need to be pointed in the right direction.

    1. What is the best 'framework' to build my site on (e.g Codon, CakePHP etc.)

    2. Can I pull data from multiple phpVMS databases and display them on a single page?

    3. Can I insert data into multiple phpVMS databases?

    You may say, why not just use phpVMS? Here is how my CEO wants it...

    - 'Australian Frontier' has three divisions: Pacific Frontier, Australian Frontier, Australian-Pacific Cargo all going to be separate sites (with the seperate sites powered by phpVMS).

    - There will be a main site which shows the user about the different VAs, stats for all three etc. and where the user can register to all 3 sites.

    Thanks in advance

  3. I want to modify:

               public static function getAircraftInfo($reg)
               {
                   $reg = DB::escape($reg);
    
                   return DB::get_row('SELECT * FROM '.TABLE_PREFIX.'aircraft 
                                       WHERE `registration` ='.$reg
                                       );
               }

    so it will return the hours as well..

    I have no idea how I am going to this so can someone please provide the code.

    Thanks,

    Mitch

  4. I am currently using Firefox 4.0 BETA and HTML 5 does work...mostly but google chrome i have found works best. Those are the 2 browsers that I have found compatible and IE9 should be compatible with it.

    The reason I want to use HTML 5 to built this new site is because my very fussy CEO wants a very high quality with a good UI, most of the features I need are in HTML 5.

  5. I was watching some stuff on the GoogleDevelopers channel and fell in love with HTML5. But I have a few questions because I have chosen to use HTML 5 to build my virtual airlines new site.

    1. What browser (and browser versions) support HTML 5 + CSS 3?

    2. Would it be hard to implement it into phpVMS?

    3. (Off Topic) When is IE 9 being released?

    Thanks,

    Mitch

  6. I have been asked by my CEO to create a function that allows the user to register to 3 different sites using ONLY one form.

    Is it possible to change the code of the default register_mainform.tpl (I re-written all the code from register.php and made it much simpler and also made a new registration form exactly the same as the register_mainform.tpl) to make it so that it posts the data contained in the form to many sites at once.

    Therefore you get the same data on all three sites without having to fill out 3 registration forms.

    Thanks in advance,

    Mitch

  7. I am still getting a blank page...

    Does the OperationsData::getAircraftInfo($id) $id mean the registration or the actual aircraft id (1,2,3 etc.). WorldACARS sends the data as the registration of the aircraft and not the numeric ID.

    Updated Code:

    	
    	public function maintence()
    		{
    				$reg = $this->get->reg;      		   		
    				$aircraft = $this->getAircraftInfo($reg);
    				echo "$aicraft->totaltime";
    		}

  8. I'm working one of the new features for WorldACARS that pulls aircraft data from the database, displays it, gets processed by WorldACARS then displays it to the user.

    For some reason the code I wrote doesn't work:

    (It pulls data from url, e.g http://localhost/action.php/wacars/maintence?reg=VH-FTW)

    		public function maintence()
    		{
    				$reg = $_GET['reg'];      		   		
    				$aicraft = self::getAircraftInfo($reg);
    				echo "$aicraft->totaltime";
    		}
    
    		public static function getAircraftInfo($reg)
    		{
    			$reg = DB::escape($reg);
    
    			return DB::get_row('SELECT * FROM '.TABLE_PREFIX.'aircraft 
    								WHERE `registration`='.$reg);
    		}

    Could someone please tell me whats wrong with it?

    Thanks,

    Mitch

  9. I've noticed the table lists the planes in order by their registration.

    Example:

    MD87 MD-87 N214AM 0 0 130 10000 0

    MD88 MD-88 N401NV 0 0 150 15000 0

    MD88 MD-88 N402NV 0 0 150 15000 0

    MD88 MD-88 N403NV 0 0 150 15000 0

    MD88 MD-88 N404NV 0 0 150 15000 0

    MD83 MD-83 N405NV 0 0 150 15000 0

    MD82 MD-82 N406NV 0 0 150 15000 0

    MD82 MD-82 N407NV 0 0 150 15000 0

    MD82 MD-82 N408NV 0 0 150 15000 0

    How do we set it so that it lists in order by aircraft type ?

    MD82 MD-82 N406NV 0 0 150 15000 0

    MD82 MD-82 N407NV 0 0 150 15000 0

    MD82 MD-82 N408NV 0 0 150 15000 0

    MD83 MD-83 N405NV 0 0 150 15000 0

    MD87 MD-87 N214AM 0 0 130 10000 0

    MD88 MD-88 N401NV 0 0 150 15000 0

    MD88 MD-88 N402NV 0 0 150 15000 0

    MD88 MD-88 N403NV 0 0 150 15000 0

    MD88 MD-88 N404NV 0 0 150 15000 0

    Open up Fleet.php and instead of the default FleetInfo() change it to this code:

    		/**
    	* Return all possible information about the fleet
    	* Code by Mitchell W
    	* Enhanced by Stu (stuartpb) 		
    	* Fleet Table 2.0 Order by Aicraft Type Edit							
    	*/
    	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.name';
    
    		return DB::get_results($sql);
    		DB::debug();
    		return $ret;
    
    	}

    This was exactly what I was about to ask!

    Would be a great addition to a great module!!

    Reasin being ...

    I duplicated then renamed the original fleet table and edited the out put only to display;

    Type

    Rego

    Location - Location

    Now all I need is the last pilot who flew it.

    Then I can promote the Module as "Last Known Whereabouts" giving pilots the incentive to take that aircraft and fly it to where they want to go.

    Any assistance in coding would be mostly appreciative.

    Thanks in advance

    Adam

    AUZ

    I have tried to get the last pilot who flew it but I can't seem to get it to work, as soon as I get it working I'll post the code here

    a conclusion in the two tables, first table of Boeing 737 and the second table all Airbus
    
    how can I create this?
    
    
    
    
    First Table is (list of all Boeing aircraft's)
    
    Boeing B737-300
    
    EI-CHH, total flight time 00:12:50. 
    
    Located at the airport Cologne Bonn (EDDK).
    
    
    
    
    Second Table is (list of all Airbus aircraft's)
    
    Airbus A319-100
    
    VP-BBG, total flight time 01:20:15. 
    
    Located at the airport Munich (EDDM).
    
    
    please help!!
    
    
    I've created this code but, this code show all  aircraft's in list, but i needet 2 tabeles! 
    
    
    
    
    <?php foreach ($fleet as $aircraft) 
    {
    ?>
    <?php $airbus = explode("EI", $aircraft->registration); echo $airbus[0];?>,  total flight time <?php echo $aircraft->totaltime; ?>.<br>  Located at the airport<?php
    $params = (array('a.registration'=>$aircraft->registration, 'p.accepted'=>PIREP_ACCEPTED));
    
    $pirep = PIREPData::findPIREPS($params);
    $current_location = $pirep[0]->arricao;
    $current_location2 = $pirep[0]->arrname;
           {
               echo ''.$current_location2.' ('.$current_location.')';
           }
    ?>.<br><br>
    <?php } ?>

    Copy the table and move it below the first table and change the airbus stuff to boeing or whatever.

  10. I'm in! I'm really interedted.

    One question Mitchell,

    Do we get to desgin our WorldACARS with a SDK or something. I remembered a post you made about that. Am i correct?

    This is the order things will happen:

    BETA Testing

    WorldACARS 1.0 Standard Release (For VAs that just want the normal version with standard features)

    WorldACARS 1.0 Custom Release (Comes with SDK, for VAs that want there own logo, colors, features etc.)

    The SDK will pretty much be the Visual Studio 2008 project file plus documentation.

  11. Hello all,

    For WorldACARS I have chosen to have the program open a browser and go to http://localhost/action.php/wacars/pirep and then insert the data after the url (e.g wacars/pirep?id=1&code=VMS). I always get:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'wacars::pirep' was given in /home/a5059087/public_html/core/classes/MainController.class.php on line 218
    

    With this code:

    private function pirep()
    	{
    
    
    			$id = $_GET['id'];      		
    
    			$code = $_GET['code'];      		
    
    			$flightnum = $_GET['flightnum'];      		
    
    			$depicao = $_GET['depicao'];      		
    
    			$arricao = $_GET['arricao'];  
    
    			$aircraft = $_GET['aircraft'];  
    
    			$flighttime = $_GET['flighttime'];  
    
    			$landingrate = $_GET['landingrate'];  
    
    			$comment = $_GET['comment'];  
    
    			$fuelused = $_GET['fuelused'];      	  
    
    			$load = $_GET['load'];   	
    
    
    			$data = array(
    			'pilotid'=>$id,
    			'code'=>$code,
    			'flightnum'=>$flightnum,
    			'depicao'=>$depicao,
    			'arricao'=>$arricao,
    			'aircraft'=> $aircraft,
    			'registration'=>$registration,
    			'flighttime'=> $flighttime,
    			'landingrate'=> $landingrate,
    			'submitdate'=>'NOW()',
    			'comment'=> $comment,
    			'fuelused'=> $fuelused,
    			'source'=>'worldacars',
    			'load'=>$load,
    			'log'=>$log,
    			'flighttype'=>$type,
    			);
    
    			$ret = ACARSData::FilePIREP($pilotid, $data);
    
    
    	} 

    Something about the code doesn't seem right to me with that code pulling the data from the URL...

    Can anyone help me?

    Thanks,

    Mitchell

  12. :huh: I'm feeling really dumb. It looks nice, but what does it actually do that isn't already being done?

    The truth is...it dosn't. It adds a realistic side of things to make the VA website seem more real, also in the future (once im done with WorldACARS and a million other things) i will add all sorts of stuff to enhance it. But pretty much its another way of bidding on flights ;)

  13. PROJECT ABANDONED!

    Reason:

    phpVMS already has a large amount of compatible acars programs. With the release of kACARS and N402K's ACARS...whats the point or need for another ACARS program?

    For Developers:

    I will post the uncompleted source code on github soon. Details will be posted below once i have uploaded the stuff to git.

  14. thanks a lot will add this ASAP

    this procedere will work with other modules too I guess?

    BR

    Thomas

    Yes it should just change the ('/booking') to ('/modulename')

    modulename = Name of the module (the folder in core/modules)

×
×
  • Create New...