Have been exploring adding search by Carrier option to the search form but struggling a bit to get it to work. Any got any suggestions for the code to add to the search form in order to search by airline code? i.e. pull out all flights for a specific airline (we have 14).
Have been exploring adding search by Carrier option to the search form but struggling a bit to get it to work. Any got any suggestions for the code to add to the search form in order to search by airline code? i.e. pull out all flights for a specific airline (we have 14).
I know this may be getting ignored as a similair question came up and the anser was the realschedules module. However, all I want to do is add a list by carrier (code) option to the schedule search page so a drop down box shows all airline codes, and selcted will list all flights by that airline. Nabeel, you must have a quick solution for this surely?
Hey,
No quick solution, if you know PHP it’s pretty quick. But if I have the time I willl add it for the next build
I’m thinking of replacing this with the way the schedules are handled in the admin side.
Hey,
No quick solution, if you know PHP it’s pretty quick. But if I have the time I willl add it for the next build
I’m thinking of replacing this with the way the schedules are handled in the admin side.
Yeah am ok in it, have been using this
<div id="airlinetab">
<p>Select by Airline:</p>
<select id="code" name="code">
<option value="">Select Airline</option>
<?php
if(!$airline) $airline = array();
foreach($airline as $code)
{
echo '<option value="'.$code->name.'">'.$code->name.'</option>';
}
?>
</select>
<input type="submit" name="submit" value="Find Flights" />
</div>
No list of airline codes appears in drop down though, anything obvious?
I’ll add it for 937 into the stock Schedules module
Works like a charm, top man! Have made changes to airlineSearchResults.tpl though which make it display better, and more like standard search results.
<table>
<tr>
<th>Airline</th>
<th>Flight #</th>
<th>Departure</th>
<th>Departure Time</th>
<th>Arrival</th>
<th>Arrival Time</th>
<th>Distance</th>
<th>Aircraft</th>
<th>Options</th>
</tr>
<?php
if (!$results)
{ ?>
<tr><td>No Routes Found!</td></tr>
<?php }
else
{ ?>
<?php foreach($results as $result)
{
?>
<tr>
<td><?php echo $result->code;?></td>
<td><?php echo $result->code.$result->flightnum;?></td>
<td><?php echo $result->depicao;?></td>
<td><?php echo $result->deptime;?></td>
<td><?php echo $result->arricao;?></td>
<td><?php echo $result->arrtime;?></td>
<td><?php echo $result->distance;?></td>
<td><?php echo $result->aircraft;?> (<?php echo $result->registration;?>)</td>
<td><a id="<?php echo $result->id; ?>" class="addbid" href="<?php echo SITE_URL?>.php/Schedules/addbid/">Add to Bid</a></td>
</tr>
<?php }
} ?>
</table>
Just a quick question:
Where do I place the airlineSearch Module? I have made a new folder /core/modules/airlinesearch and placed the airlineSearch.php inside the folder, but still getting this message:
An Error Was Encountered
The module “AIRLINESEARCH” doesn’t exist!
Any help is appreciated