Jump to content

Modified SimPilot's FrontSchedule Search


stuartpb

Recommended Posts

With this code:

<?php
foreach($allroutes as $route)
{
if (Auth::LoggedIn())
{
$last = PIREPData::GetLastReports(Auth::$userinfo->pilotid);
if($last->arricao != $route->depicao)
{continue;}
}

Is possible to add for determinate a pilot HUB if he don't have any pirep filed, so for he have flights from his HUB (if he don't have any pirep filed)?

Link to comment
Share on other sites

  • Moderators

With this code:

<?php
foreach($allroutes as $route)
{
if (Auth::LoggedIn())
{
$last = PIREPData::GetLastReports(Auth::$userinfo->pilotid);
if($last->arricao != $route->depicao)
{continue;}
}

Is possible to add for determinate a pilot HUB if he don't have any pirep filed, so for he have flights from his HUB (if he don't have any pirep filed)?

You can do this way...

<?php
foreach($allroutes as $route)
{
if (Auth::LoggedIn())
{
$last = PIREPData::GetLastReports(Auth::$userinfo->pilotid);
if(!$last) $last->arricao = Auth::$userinfo->hub;
if($last->arricao != $route->depicao)
{
{continue;}
}
}

Link to comment
Share on other sites

  • 3 years later...

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