Jump to content

Search Today's Flights


elfrost

Recommended Posts

Hello,

Is anyone of you guys use custom Schedule Searh Form like Today's Flight?

I would like to get :

Form using : From current location (can be changed)
the result should be all flights available from current location today.
results with details like: From, To, Aircraft, Dep time ... and Bid on

I'm starting to work on now but asking for help :)

 


 

Edited by elfrost
Link to comment
Share on other sites

I've made this one and it does pretty much what you're after and allows the pilot to select their aircraft when booking instead of booking the one attached to the schedule (which may not be what you're after). It also goes by pilot current location. It's a bit tedious to set up, but it does the job.

Others have also contributed their share

https://github.com/parkho/FlightBookingSystem.V1.1 well known

https://github.com/DavidJClark/phpVMS-ScheduleSearch | https://github.com/DavidJClark/phpVMS-RealScheduleLite kinda old, but does the job

http://php-mods.eu/phpvms.php?module=real-booking-system Payware

https://www.crazycreatives.com/downloads/category/phpvms-modules/  Payware

There's also a few more floating around.

Link to comment
Share on other sites

Thank you for your post. 

I tried out some but did not find yet

In fact., any possibilities to edit this code below to get flights for the day
It could detect also the current day

 

<?php
//simpilotgroup addon module for phpVMS virtual airline system
//
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2009-2012, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
?>

<?php $lastreport = PIREPData::GetLastReports(Auth::$userinfo, 1);
if(!$lastreport) {$location = Auth::$userinfo->hub; }
else {$location = $lastreport->arricao;} ?>

<div class="row">
    <div class="col-md-8 col-md-offset-2">
        <h3><?php echo SITE_NAME; ?> Schedule Search</h3><hr />
    <form class="form-horizontal" role="form" method="post" action="<?php echo url('/schedulesearch');?>">
    <div class="form-group">
        <label for="depicao" class="col-lg-3 control-label">Departure Airfield</label>
        <div class="col-lg-9">
            <select class="form-control" name="depicao" id="depicao">
<?php if(Auth::LoggedIn()) {echo '<option value="'.$location.'">Your Current Location</option>';}?>
		<option value="">All</option>
                <?php
                    foreach ($airports as $airport)
                        {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';}
                ?>
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label for="arricao" class="col-lg-3 control-label">Arrival Airfield</label>
        <div class="col-lg-9">
            <select class="form-control" name="arricao" id="arricao">
		<option value="">All</option>
                <?php
                    foreach ($airports as $airport)
                        {echo '<option value="'.$airport->icao.'">'.$airport->icao.' - '.$airport->name.'</option>';}
                ?>
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label for="aircraft" class="col-lg-3 control-label">Aircraft Type</label>
        <div class="col-lg-9">
            <select class="form-control" name="aircraft" id="aircraft">
		<option value="">All</option>
                <?php
                    foreach ($aircrafts as $aircraft)
                        {echo '<option value="'.$aircraft->icao.'">'.$aircraft->icao.'</option>';}
                ?>
            </select>
        </div>
    </div>
    
    <div class="form-group">
        <label for="airline" class="col-lg-3 control-label">Airline</label>
        <div class="col-lg-9">
            <select class="form-control" name="airline" id="airline">
		<option value="">All</option>
                <?php
                    foreach ($airlines as $airline)
                        {echo '<option value="'.$airline->code.'">'.$airline->name.'</option>';}
                ?>
            </select>
        </div>
    </div>

      <div class="form-group">
        <label for="arricao" class="col-lg-3 control-label">Search By Day</label>
        <div class="col-lg-9">
           <select class="search" name="daysofweek">
                   <option value="">All days</option>
                   <?php
                       foreach ($daysofweek as $days)
                           {echo '<option value="'.$days->name.'">'.$days->name.'</option>';}
                   ?>
               </select>
        </div>
    </div>

    <div class="form-group">
        <label for="sortby" class="col-lg-3 control-label">Sort Results By</label>
        <div class="col-lg-9">
            <select class="form-control" name="sortby" id="sortby">
		<option value="">None</option>
                <option value="s.deptime">Departure Time</option>
                <option value="s.flighttime">Flight Duration</option>
            </select>
        </div>
    </div>
    
    
    <div class="form-group">
        <label for="sortby" class="col-lg-3 control-label">&nbsp;</label>
        <div class="col-lg-9">
            <div class="radio">
                <label>

                    <input type="radio" name="sortdir" id="optionsRadios1" value="ASC" checked>
                    Ascending
                </label>
            </div>
            <div class="radio">
                <label>
                    <input type="radio" name="sortdir" id="optionsRadios2" value="DESC">
                    Descending
                </label>
            </div>
        </div>
    </div>
    
    
    
        <input type="hidden" name="action" value="findflight" />
        <input class="btn btn-primary btn-block"type="submit" name="submit" value="Search Schedules" />
</form>
</div>
</div>

 

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