Jump to content

AFVA | Mitchell

Members
  • Posts

    143
  • Joined

  • Last visited

Posts posted by AFVA | Mitchell

  1. Im trying to figure out how to show modules on a page and i dont know how for example i want to put the RouteMap on a page what do i need and where do i put it?

    Thanks

    Try this for the routemap (by routemap do you mean show how the flights by a pilot?):

    <?php MainController::Run('RouteMap', 'index'); ?>

    Put it wherever you want it to appear.

    The Template for this is:

    <?php MainController::Run('ModuleName', 'function name'); ?>

    Module Name -> duh, the module name

    Function Name -> Usually you would put index but if it is for example your want to view schedules on a page you would do this:

    <?php MainController::Run('Schedules', 'View'); ?>

    Its the URL broken down so for example: Viewing schedules is www.yoursite.com/index.php/schedules/view

    Hope this helps!

  2. Alot of the new modules me and Daryl have been working on ever since the 2.0 update have this error:

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

    Any Ideas?

    Thanks,

    Mitch

  3. I am to busy at the moment to test it but...

    Try this code for day of week:

    Replace the params stuff in booking.php's search feature.

          $params = array(
          's.depicao' => $this->post->depicao,
          's.arricao' => $this->post->arricao,
          's.daysofweek' =>$this->post->day,
          's.enabled' => 1,
          );

    and add this to booking_form.tpl

    		<select name="day" id="day">
    	<option value="0">Sunday</option>
    	<option value="1">Monday</option>
        <option value="2">Tuesday</option>
    	<option value="3">Wednesday</option>
    	<option value="4">Thursday</option>
    	<option value="5">Friday</option>
        <option value="6">Saturday</option>
        </select>

  4. I'm sorry if this has been brought up previously

    We got a problem with XAcars, it sends the wrong flight number to the site and live map

    Anyone know how to fix this?

    E-mail from Daryl (PFV Manager)

    Hey mitch,I use XACARS for my flights, i tried to do flight AF127 earlier, but that flight number in XACARS.. on the live map and home page it shows me doing AF133 no matter what i try

    Thanks in advance,

    Mitch

  5. [move]phpVMSBooking[/move]

    -----------------------------------

    FEATURES:

    Flight Search

    Easy-To-Customize

    Add To Bid Feature

    INSTALLATION:

    1. Download attached .ZIP

    2. Upload booking_results.tpl, booking_form.tpl and booking_confirm.tpl to your core/templates or lib/skins/[sKIN NAME]/

    3. Upload 'Booking' to core/modules

    4. Go to www.[yoursitename].[com or whatever]/index.php/booking

    COMING SOON:

    Confirmation Page

    Small Form you can put on home page

    Enjoy!

    Mitch

    phpvms_booking_1_0.zip

  6. I have not used V2 of this yet with the thumbnail images

    Actually its 1.1.2

    Here is a peak at how I have mine looking

    Looks very nice!

    Also while im here:

    Version 2.0 (Final Public Release Version) of the Fleet Table will be released soon....

    FEATURES:

    Aircraft Image

    fleet_table.tpl bugs fixed.

    Fleet.php Fixes

    Some Information about fleet below the table

    Just a question....anyone interested in a 'Download' Link for each aircraft?

    Also if anyone has ANY requests for the page whether its got to do with the table or if you want something nice below it (screenshot gallery, downloads, checklists etc)

  7. How to import that table in pages from Admin, its html, and this is php related, right? Any tip here, so i can learn something...;) Thxs

    Sadly, with this you can't. Fleet Table 1.1 uses its own SQL code in Fleet.php so making it into a html page from the admin center won't work....

  8. Or this:

    Add this (above where the departure/arrival airports are):

    <?php $depairport = GetAirportInfo($schedule->depicao); ?>
    <?php $arrairport = GetAirportInfo($schedule->arricao); ?>
    

    Departure Airport Country:

    <?php echo $depairport->country; ?>

    Arrival Airport Country:

    <?php echo $arrairport->country; ?>

    For Schedule Results make $schedule into $route and for briefing leave it the way it is

  9. BACK UP PILOTS_LIST.TPL

    1. Delete everything in pilots_list

    2. Copy all this code into it:

    <?php $roster = PilotData::GetAllPilotsDetailed($start='', $limit=50) ?>
    <?php
    if(!$roster)
    {
    	echo 'There are no pilots!';
    	return;
    }
    ?>
    <table id="tabledlist" class="tablesorter">
    <thead>
    <tr>
    <th>Pilot ID</th>
    <th>Name</th>
    <th>Rank</th>
    <th>Flights</th>
    <th>Hours</th>
    <th>HUBs</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach($roster as $pilot) { ?>
    <tr>
    <td width="1%" nowrap>
           <img src="<?php echo Countries::getCountryImage($pilot->location);?>" 
    		alt="<?php echo Countries::getCountryName($pilot->location);?>" />
      <a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>">
    		<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
    </td>
    <td>
    
    
    	<center><?php echo $pilot->firstname.' '.$pilot->lastname?></center>
    </td>
    <center><td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td></center>
    <center><td><?php echo $pilot->totalflights?></td></center>
    <center><td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td></center>
    <center><td><?php echo $pilot->hub?></td></center>
    </tr>
    <?php } ?>
    </tbody>
    </table>

    If it doesn't work restore the backup.

  10. For example:

    Pilot Center

    <?php
    $last_location = PIREPData::getLastReports($pilotcode, 1, PIREP_ACCEPTED);
    
    echo "This pilot's last location is: {$last_location->arricao}";
    ?>
    

    $pilotcode returns the pilot ID (works in pilot center only)

    Pilot List (Roster)

    <?php
    $last_location = PIREPData::getLastReports($pilot->pilotid, 1, PIREP_ACCEPTED);
    
    echo "This pilot's last location is: {$last_location->arricao}";
    ?>
    

    $pilot->pilotid  returns the pilotid varible for the $pilot array.

×
×
  • Create New...