Jump to content

Linit the Schedule list?


ukmil

Recommended Posts

this may have been covered, but my search has not found a solution. As my Schedule list grows, I am wondering if there is a way to only show flights that a pilot can actually do?

At present, the full list shows, and the pilot can limit the selection manually by selecting his airport from the drop down, but is there a way to alter the list, so it automatically only shows flights from the airport he is located? I see no point in showing him any others since he is unable to bid on them? ;)

Link to comment
Share on other sites

This might help you. Give this a shot:

<td bgcolor="#05305D" border="1"><font color="#FFFFFF"><b>Your Current Location:</b></font></td>
		<td><select id="depicao" name="depicao">
			<option value="<?php echo $last_location->arricao?>"><?php echo $last_location->arricao?> (<?php echo $last_name->name?>)</option>
		</td>

Link to comment
Share on other sites

THanks Jeff, not too sure how to use that code tho? I assume it goes in the Schedule_results.tpl, but where? it seems to be a script that simply shows your current location? I am looking for a way to skip [continue] past a flight, if it does not start at your current location, much like the drop down box does. But I want it to automatically load that page without having to select it manually.

The Schedule_search page currently has this

<div id="depapttab">

<p>Select your departure airport:</p>

<select id="depicao" name="depicao">

<option value="">Select All</option>

<?php

if(!$depairports) $depairports = array();

foreach($depairports as $airport)

{

echo '<option value="'.$airport->icao.'">'.$airport->icao

.' ('.$airport->name.')</option>';

}

?>

</select>

<input type="submit" name="submit" value="Find Flights" />

</div>

which sets the pre-selection of the results to all, and allows you to select your departure, but is there a way to alter this to automatically select your current location, without having to do it manually?

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