Jump to content

flight schedule


faraz

Recommended Posts

  • Administrators

You can add that  bit of code in the template, schedule_details.tpl

<?php

// under the 
foreach($allroutes as $route)
{


if(Auth::LoggedIn())
    {
        $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED);
        
        if(is_array($reports))
        {
            # IF the arrival airport doesn't match the departure airport
            if($reports[0]->arricao != $route->depicao)
            {
                continue;
            }
        }
    }

Link to comment
Share on other sites

I added This code , but doesn't work! please check Code

<h3>Schedule Details</h3>
<div class="indent">
<?php

// under the 
foreach($allroutes as $route)
{


if(Auth::LoggedIn())
    {
        $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED);
        
        if(is_array($reports))
        {
            # IF the arrival airport doesn't match the departure airport
            if($reports[0]->arricao != $route->depicao)
            {
                continue;
            }
        }
}
<strong>Flight Number: </strong> <?php echo $schedule->code.$schedule->flightnum ?><br />
<strong>Departure: </strong><?php echo $schedule->depname ?> (<?php echo $schedule->depicao ?>) at <?php echo $schedule->deptime ?><br />
<strong>Arrival: </strong><?php echo $schedule->arrname ?> (<?php echo $schedule->arricao ?>) at <?php echo $schedule->arrtime ?><br />
<?php
if($schedule->route!='')
{ ?>
<strong>Route: </strong><?php echo $schedule->route ?><br />
<?php
}?>
<br />
<strong>Weather Information</strong>
<div id="<?php echo $schedule->depicao ?>" class="metar">Getting current METAR information for <?php echo $schedule->depicao ?></div>
<div id="<?php echo $schedule->arricao ?>" class="metar">Getting current METAR information for <?php echo $schedule->arricao ?></div>
<br />
<strong>Schedule Frequency</strong>
<div align="center">
<?php
$data = array();
$labels = array();

foreach($scheddata as $month=>$count)
{
	$data[] = $count;
	$labels[] = $month;
}

$chart = new ChartGraph('gchart', 'ls', 600, 150);
$chart->AddData($data, $labels);

echo '<img align="center" src="'.$chart->GenerateGraph().'" />';
?>
</div>

TNX

Link to comment
Share on other sites

  • Administrators

Sorry, here it is

<?php
/* Uncomment this code if you want only schedules which are from the last PIREP that
	pilot filed */
if(Auth::LoggedIn())
{
	$reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED);

	if(is_object($reports))
	{
		# IF the arrival airport doesn't match the departure airport
		if($reports->arricao != $route->depicao)
		{
			continue;
		}
	}
}

Link to comment
Share on other sites

Update : I added this code to schedule_results and fully working

Thank you Nabeel

If you can add jumpset or Buy Ticket  for transfer from current location to another location (airport) with  pay money from total money for pilot  !

for example: my current location is LOWW and I want transfer to EGLL . I pay 20$ and then go to EGLL  ;)

TNX

Link to comment
Share on other sites

HI

I want lock aircraft when pilot added to bid !

for example : I have 4 bids in admin panel and 2 bids are using with same aircraft registration !

I want lock Aircraft and aircraft registration when one pilot flying with this aircraft and in flight schedules doesn't show schedules  with this aircraft registration

Link to comment
Share on other sites

  • Moderators

HI

I want lock aircraft when pilot added to bid !

for example : I have 4 bids in admin panel and 2 bids are using with same aircraft registration !

I want lock Aircraft and aircraft registration when one pilot flying with this aircraft and in flight schedules doesn't show schedules  with this aircraft registration

i think you should leave thease request in the accourding toppic.

thane Nabeel can look if he wants to implement them.

gr joeri

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...