I recreated the code file airport_seach.tpl!
I tried this code block ticket buying when the pilot does not have the money!
below is the complete code!
------------------------------------//-----------------------------------------------------------
<div id="contenttext">
<?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 © 2009-2010, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
$pilotid = Auth::$userinfo->pilotid;
$last_location = RealScheduleLiteData::get_pilot_location($pilotid, 1);
$last_name = OperationsData::getAirportInfo($last_location->arricao);
?>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("select").change(function () {
var cost = "";
$("select option:selected").each(function (){
cost = $(this).attr("name");
airport = $(this).text();
});
$("input[name=cost]").val( cost );
$("input[name=airport]").val( airport );
}).trigger('change');
});
</script>
<h4>Emirates Virtual Dispatch System</h4>
<form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data">
<table width="100%" cellpadding="10px">
<tr>
<td width ="25%">Current Location:</td>
<td width ="75%"><select id="depicao" name="depicao">
<?php if (Auth::LoggedIn()) {?>
<?php $reports = RealScheduleLiteData::get_pilot_location(Auth::$userinfo->pilotid);
if(is_object($reports))
{echo '<option value="'.$reports->arricao.'">'.$reports->arricao.' - '.$last_name->name.'</option>';}
elseif(!$reports)
{echo '<option value="'.Auth::$userinfo->hub.'">'.Auth::$userinfo->hub.'</option>';}}?>
<?php
foreach ($airports as $airport)
{
}?>
</td>
</tr>
<tr>
<td align="center" colspan="3">
<input type="hidden" name="action" value="findflight" />
<input type="submit" name="submit" value=" Search For A Flight " />
</td>
</tr>
<br />
</table>
</form>
<div align="center">
<a href="<?php echo url('/schedules/bids');?>"><img src="http://flyemiratesv.net/lib/images/SKIN/Auction.png" width="80" height="80"></a>
<br>
<h4 align="left">Pilot Transfer:</h4>
<form action="<?php echo url('/RealScheduleLite/purchase'); ?>">
<table border="1px" width="50%">
<tr>
Select An Airport to transfer:
<td align="center">
<select class="search" name="depicao" onchange="listSel(this,'cost')">
<option value="">--Select</option>
<?php
foreach ($airports as $airport){
$distance = round(SchedulesData::distanceBetweenPoints($last_name->lat, $last_name->lng, $airport->lat, $airport->lng), 0);
$permile = Config::Get('JUMPSEAT_COST');
$cost = ($permile * $distance);
if($cost >= Auth::$userinfo->totalpay)
{
echo "<option>{$airport->icao} - {$airport->name} --Low Money!</option>";
}
else
{echo "<option name='{$cost}' value='{$airport->icao}'>{$airport->icao} - {$airport->name} /Cost - $ {$cost}</option>";}
?>
<hr>
<?php
}
?>
</select>
<?php
if($cost >= Auth::$userinfo->totalpay)
{
echo "Low Money!";
}
else
{
echo '
<td align="center">
<INPUT TYPE="submit" VALUE="GO">
</td>
';}
?>
</select>
</td>
</tr>
</table>
<input type="hidden" name="cost">
<input type="hidden" name="airport">
</form>
</div>