Jump to content

AFVA | Mitchell

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by AFVA | Mitchell

  1. G'day all,

    I am working on a advanced fleet page at the moment and ran into a problem.

    I want the ICAO, Type, Registration, Range, Empty Weight, Cruise Alt, Max Pax, Max Cargo, Total Hours, Total Distance Flown and Total Flight Time.

    The problem is that i am trying to use both OperationsData (for ICAO to Total Hours) and StatsData (for Total Distance and Total Flight Time) in one table which is getting hard.

    My code without StatsData

    <?php $allaircraft = OperationsData::GetAllAircraft(); ?>
    <?php
    if(!$allaircraft)
    {
    echo '<p id="error">No aircraft have been added</p>';
    return;
    }
    ?>
    <table border="1">
    <thead>  
    <tr><td><b>ICAO</b></td><td><b>Type</b></td><td><b>Registration</b></td><td><b>Range</b></td><td><b>Empty Weight</b></td><td><b>Cruise Alt</b></td><td><b>Max Pax</b></td><td><b>Max Cargo</b></td><td><b>Total Hours</b></td></tr>
    </thead>
    <tbody>
    <?php foreach ($allaircraft as $aircraft) 
    {
    ?>
    <tr>
    <td><?php echo $aircraft->icao; ?> </td>
    <td><?php echo $aircraft->name; ?> </td>
    <td><?php echo $aircraft->registration; ?></td>
    <td><?php echo $aircraft->range; ?> </td>
    <td><?php echo $aircraft->weight; ?></td>
    <td><?php echo $aircraft->cruise; ?></td>
    <td><?php echo $aircraft->maxpax; ?></td>
    <td><?php echo $aircraft->maxcargo; ?></td>
    </tr>
    <?php } ?>
    </tbody>
    </table>

    Can someone please tell me if it is possible to have two different arrays in one table?

    Thanks in advance,

    Mitchell

    (I have finally worked out how to make modules, may help when comes to coding. Fleet.php can be posted on request)

  2. Add this to the page you are working on:

    <?php $allaircraft = OperationsData::GetAllAircraft(); ?>
    <?php
    if(!$allaircraft)
    {
    echo '<p id="error">No aircraft have been added</p>';
    return;
    }
    ?>
    
    <table border="1">
    <thead>  
    <?php //thead Is the top of the table ?>
    <tr><td><b>ICAO</b></td><td><b>Type</b></td><td><b>Registration</b></td><td><b>Range</b></td><td><b>Weight</b></td><td><b>Cruise</b></td><td><b>Max Pax</b></td><td><b>Max Cargo</b></td></tr>
    </thead>
    <tbody>
    <?php //below is all the info for each aircraft ?>
    <?php foreach ($allaircraft as $aircraft) 
    {
    ?>
    <tr>
    <td><?php echo $aircraft->icao; ?> </td>
    <td><?php echo $aircraft->name; ?> </td>
    <td><?php echo $aircraft->registration; ?></td>
    <td><?php echo $aircraft->range; ?> </td>
    <td><?php echo $aircraft->weight; ?></td>
    <td><?php echo $aircraft->cruise; ?></td>
    <td><?php echo $aircraft->maxpax; ?></td>
    <td><?php echo $aircraft->maxcargo; ?></td>
    </tr>
    <?php } ?>
    </tbody>
    </table>

  3. G'day all

    I have a request from one of my pilots. At the moment the pilot center has a pie graph which shows percentages of aircraft hours.

    Can someone please give me the code so the pilot could VIEW the hours that he/she has flown for each aircraft.

    E.g

    BOEING 737-800

    10.1

    CESSNA 172

    1.4

  4. Hey everyone,

    On our domain (afva.servegame.org) we have two different VMSs, one is our main one (afva.servegame.org/index.php and the other our new pacific counterpart (afva.servegame.org/pacific/index.php . If one pilot is logged in on one site and goes on the other they are logged in on that site they just went on as a different person!

    More simple way:

    Logged in: afva.servegame.org as AF0001 as 'Example Guy'

    Goes on : afva.servegame.org/pacific as PF0001 (auto login because already logged on the other site) as 'Example Girl Smith'

    This will cause massive problems on our vms,

    can anyone help us???

    Thanks

    Mitch

    On behalf of the AFVA Team

  5. I am getting a     

    <br /> <b>Warning</b>:  call_user_method_array() [<a href='function.call-user-method-array'>function.call-user-method-array</a>]: Unable to call calculatedistance() in <b>/home/afva/public_html/core/classes/MainController.class.php</b> on line <b>274</b><br />

    when calculating distances in add schedule.

    Line 274 of maincontroller.class.php:

    $ret = call_user_method_array($call_function, $$ModuleName, CodonRewrite::$params);

    phpVMS Version: 1.2.773

    Any ideas?

  6. Can someone explain in it, i am confused  ???

    It should be looping through all the data that is available- Is there more than one pilot using ACARS within the timeout period you are setting in the command?

    I want to make the online pilots appear in a list (table)

  7. I get the word 'array'

    How do i fix this?

    Code:

    			<?php echo $pilots = ACARSData::GetACARSData($cutofftime = '720'); ?>
          <td>
    		<?php echo $pilots->pilotname; ?>
    		</td>
    		<td>
          <?php echo $pilots->flightnum; ?>
    		</td>
          <td>
          <?php echo $pilots->depicao; ?>
          </td>
          <td>
          <?php echo $pilots->arricao; ?>
          </td>
          <td>
          <?php echo $pilots->phasedetail; ?>
          </td>
          </tbody>

  8. Whenever I go on my site i get this error:

    Parse error: syntax error, unexpected $end in /home/afva/public_html/lib/skins/afva_new/header.tpl on line 143

    Whenever I try to reupload header.tpl this is my upload log:

    NOTE:>    [21/10/2009 6:46:30 PM] New transfer created for "C:Documents and SettingsMitchellMy DocumentsAFVA Website Develepmontafva_newheader.tpl" <5326>

    STATUS:>  [21/10/2009 6:46:31 PM] Transferring file "/lib/skins/afva_new/header.tpl"...

    STATUS:>  [21/10/2009 6:46:31 PM] Checking directory existence: "/lib/skins/afva_new".

    STATUS:>  [21/10/2009 6:46:31 PM] Remote directory already exists: "/lib/skins/afva_new".

    COMMAND:> [21/10/2009 6:46:31 PM] TYPE I

    [21/10/2009 6:46:31 PM] 200 TYPE is now 8-bit binary

    COMMAND:> [21/10/2009 6:46:31 PM] SIZE header.tpl

    [21/10/2009 6:46:31 PM] 213 4096

    COMMAND:> [21/10/2009 6:46:31 PM] MDTM header.tpl

    [21/10/2009 6:46:31 PM] 213 20091021074303

    STATUS:>  [21/10/2009 6:46:31 PM] An identical file already exists on the remote site.

    STATUS:>  [21/10/2009 6:46:31 PM] Applying Smart Overwrite rule: prompting.

    COMMAND:> [21/10/2009 6:46:33 PM] PASV

    [21/10/2009 6:46:33 PM] 227 Entering Passive Mode (203,88,114,49,116,126)

    COMMAND:> [21/10/2009 6:46:33 PM] STOR header.tpl

    STATUS:>  [21/10/2009 6:46:33 PM] Connecting FTP data socket... 203.88.114.49:29822...

    [21/10/2009 6:46:33 PM] 150 Accepted data connection

    [21/10/2009 6:46:33 PM] 450-Error during write to file: Disk quota exceeded

    450 header.tpl partially uploaded

    ERROR:>  [21/10/2009 6:46:33 PM] File error.

    STATUS:>  [21/10/2009 6:46:34 PM] Getting listing "/lib/skins/afva_new"...

    COMMAND:> [21/10/2009 6:46:34 PM] TYPE A

    [21/10/2009 6:46:34 PM] 200 TYPE is now ASCII

    COMMAND:> [21/10/2009 6:46:34 PM] PASV

    [21/10/2009 6:46:34 PM] 227 Entering Passive Mode (203,88,114,49,147,184)

    COMMAND:> [21/10/2009 6:46:34 PM] LIST

    STATUS:>  [21/10/2009 6:46:34 PM] Connecting FTP data socket... 203.88.114.49:37816...

    [21/10/2009 6:46:34 PM] 150 Accepted data connection

    [21/10/2009 6:46:35 PM] 226-Options: -a -l

    226 27 matches total

    STATUS:>  [21/10/2009 6:46:35 PM] Directory listing completed.

    Can anyone PLEASE help me???

    (i tried using cute ftp and core ftp and didnt work)

  9. G'day all,

    One of my pilots (the CEO) is having problems with the live map, the map is not displaying.

    Seems to have started when I first had full control of the VMS and me and a fellow person from the management team applied updates on the VMS.

    Help appreciated,

    Mitch

    EDIT: Works on most other peoples computers

  10. schedules.php: FindFlight section

    public function FindFlight()
    {
    
    	if($this->post->depicao != '')
    	{
    		Template::Set('allroutes', SchedulesData::GetRoutesWithDeparture($this->post->depicao));
    	}
    
    	if($this->post->arricao != '')
    	{
    		Template::Set('allroutes', SchedulesData::GetRoutesWithArrival($this->post->arricao));
    	}
    
    	if($this->post->equipment != '')
    	{
    		Template::Set('allroutes', SchedulesData::GetSchedulesByEquip($this->post->equipment));
    	}
    
    	if($this->post->distance != '')
    	{
    		if($this->post->type == 'greater')
    			$type = '>';
    		else
    			$type = '<';
    
    		Template::Set('allroutes', SchedulesData::GetSchedulesByDistance($this->post->distance, $type));
    	}
    
    	if($this->post->airline!= '')
        {
       $routes = SchedulesData::GetSchedulesWithCode($this->post->airline);
       Template::Set('allroutes', $routes);
        }
    
    	Template::Show('schedule_results.tpl');
    }

    schedule_searchform.tpl : Airline Search

    <div id="airline">
    		<p>Select Airline:</p>
    		<p><b>This feature is under construction. Check back soon! AFVA Management. </b></p>
    	<select id="airline" name="airline">
    		<option value="">Select Airline</option>
    	<?php
    
    	$allairlines = OperationsData::GetAllAirlines(true);
        foreach($allairlines as $airline)
    	{
    		echo '<option value="'.$airline->code.'">'.$airline->name.'</option>';
    	}
    	?>
    
        </select>
    	<input type="submit" name="submit" value="Find Flights" />
      </div>

    Sorry for the long reply, internet has been down the last couple of days.

×
×
  • Create New...