Jump to content

Multi Flight Search


chris.edde

Recommended Posts

Hi there,

I have a difficult question, I guess.

The flight search for pilots does search for various inputs. For example when I search for A320 and EDDF, the reults are either flights departing from EDDF or flights with A320. But what I want is a explicit search for flights departing from EDDF with A320. How can I change it?

Many thanks in advance! :)

Link to comment
Share on other sites

  • 3 weeks later...

<?php
//simpilotgroup addon module for phpVMS virtual airline system
//
//simpilotgroup addon modules are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2009-2010, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
?>
<p><span style="color: rgb(0, 0, 0);"><span style="font-size: 16px;"><font color="000000">Search Flight Schedules</font></span></span></p>
<form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data">
   <table align="left" border="0" width="100%">
       <tr>
           <td bgcolor="#FFEFAD" border="1"><font color="#003399"><b>Select An Airline</b></font></td>
           <td>
               <select class="search" name="airline">
                   <option value="">All</option>
                   <?php
                       foreach ($airlines as $airline)
                           {echo '<option value="'.$airline->code.'">'.$airline->icao.''.$airline->name.'</option>';}

                   ?>
               </select>
           </td>
       </tr>
       <tr>
           <td bgcolor="#FFEFAD" border="1"><font color="#003399"><b>Select An Aircraft Type</b></font></td>
           <td>
               <select class="search" name="aircraft">
                   <option value="">All</option>
                   <?php
                       foreach ($aircrafts as $aircraft)
                           {echo '<option value="'.$aircraft->icao.'">'.$aircraft->icao.'</option>';}
                   ?>
               </select>
           </td>
       </tr>
       <tr>
           <td bgcolor="#FFEFAD" border="1"><font color="#003399"><b>Select A Departure Airfield</b></font></td>
           <td>
               <select class="search" name="depicao">
                   <option value="">All</option>
<?php if (Auth::LoggedIn()) {?>   
<?php $reports = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED);
if(is_object($reports))
       {echo '<option value="'.$reports->arricao.'">Your current location ('.$reports->arricao.')</option>';}
elseif(!$reports)
{echo '<option value="'.Auth::$userinfo->hub.'">Your current location ('.Auth::$userinfo->hub.')</option>';}}?>
<?php
foreach ($airports as $airport)
{
echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';
}?>
               </select>
           </td>
       </tr>
           <td bgcolor="#FFEFAD" border="1"><font color="#003399"><b>Select An Arrival Airfield</></font></td>
           <td>
               <select class="search" name="arricao">
                   <option value="">All</option>
                   <?php
                       foreach ($airports as $airport)
                           {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';}
                   ?>
               </select>
           </td>
       </tr>
       <tr>
           <td>
               <input title="Click here to search for flights" type="hidden" name="action" value="findflight" />
               <input title="Click here to search for flights" type="submit" name="submit" value="Find My Flights" />
           </td>
       </tr>
   </table>
</form>

I have that code in its own file. It works off of this: http://forum.phpvms.net/topic/2197-schedule-search-airline-aircraft-arrival-departure/page__view__findpost__p__14669

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