Jump to content

FlightBookingSystem


Parkho

Recommended Posts

@ EmiratesVA

I also want options with Select Airline, first.

Hi.. How you add code for Airline Choose?

Can you put that code here, please?

Thanks

Question? After You choose airline does options select aircraft select's only aircraft wich are belong to selected airline?

Link to comment
Share on other sites

This is my airport_search.tpl :

<?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://creativecommo...s/by-nc-sa/3.0/

//

//@author David Clark (simpilot)

//@copyright Copyright © 2009-2010, David Clark

//@license http://creativecommo...s/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>

<h3><b>Flight Dispatch</b></h3>

<form action="<?php echo url('/FrontSchedules');?>" method="post" enctype="multipart/form-data">

<table width="100%" cellpadding="10px">

<tr>

<td>Select An Airline</td>

<td>

<select class="search" name="airline">

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

<?php

foreach ($airlines as $airline)

{echo '<option value="'.$airline->code.'">'.$airline->name.'</option>';}

?>

</select>

</td>

</tr>

<tr>

<td>Select An Aircraft Type</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>Select An Arrival Airfield</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 align="left">Current Location:</td>

<td align="left"><select id="depicao" name="depicao">

<option value="<?php echo $last_location->arricao?>"><?php echo $last_location->arricao?> (<?php echo $last_name->name?>)</option>

</td>

</tr>

<tr>

<td align="center" colspan="2">

<input type="hidden" name="action" value="findflight" />

<input border="0" type="submit" name="submit" value="Search">

</td>

</tr>

<tr>

<td align="center" colspan="2"><a href="http://alvandair.com/index.php/schedules/bids">Remove Bid</a></td>

</tr>

<br />

</table>

</form>

<h3><b>Pilot Transfer</b></h3>

<form action="<?php echo url('/realschedulelite/purchase');?>" method="get">

<table border="0" width="100%">

<tr>

<td align="center">Select An Airport to transfer:</td>

<td align="left">

<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);

$check = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1,1);

if($cost >= Auth::$userinfo->totalpay)

{

echo "<option>{$airport->icao} - {$airport->name} --Low Money!</option>";

}

elseif($check->accepted == PIREP_ACCEPTED)

{

echo "<option name='{$cost}' value='{$airport->icao}'>{$airport->icao} - {$airport->name} /Cost - $ {$cost}</option>";

}

?>

<hr>

<?php

}

?>

</select>

<INPUT TYPE="submit" VALUE="Go!">

</td>

</select>

</td>

</tr>

</table>

<input type="hidden" name="cost">

<input type="hidden" name="airport">

</form>

Than have you current location and Arrival Airfield. thats for me better :) maybe one for you also too :)

Greets

Michael Kraan <_<

Link to comment
Share on other sites

  • 1 month later...
  • Moderators

Please how it possible change sorting of flight results table by aircraft?

Look into schedules_result.tpl, It's now based on pilot's last location, so you need to remove the filter for pilot's last location.

Link to comment
Share on other sites

  • 1 month later...

I want something like this, but instead of based on pilots, I'd like it based on aircrafts...

So, everytime a pilot files a pirep, it updates the location of the aircraft, and then when searching schedules from EGLL for example, only aircraft at EGLL would pop-up as available...

Is that possible with this add-on? Or what modification would be needed?

Link to comment
Share on other sites

RSL yes, but there is for me unaceptable obligatory airplane rotation. Perfect for me may be your flight schedule with remembering airplane position. If pilot is on location A and airplane on loacation B pilot must transfer as in real to this B point and fly :). And absolute perfect (as in real) is as in ryrvirtual.com - airplane is locked 24 hours for scheduled pilot's fly. But this is not phpvms ryrvirtual runs on own system.

Link to comment
Share on other sites

  • 1 month later...

Parkho you did a great job as usual, thank you very much for this one.

Everything works perfect although I still have to skin it and finish the necessary customization but I have one question for you.

I noticed on page one that you said you could help about the piece of code and relative changes needed to restore the jumpseat fee.

Could you please tell me how to?

Thanks again........

Link to comment
Share on other sites

I'm not sure that is a good idea as this will bring up every flight available from that airport, and will result in members complaining of a very extended navigation submenu.

There is, however a better alternative if you use Jeff Kobus' code that shows an option to view flights from your location right from your schedule search. I use this option on my schedule search.

Link to comment
Share on other sites

I'm not sure that is a good idea as this will bring up every flight available from that airport, and will result in members complaining of a very extended navigation submenu.

There is, however a better alternative if you use Jeff Kobus' code that shows an option to view flights from your location right from your schedule search. I use this option on my schedule search.

Ok, but I think is good for my VA. It is possible???

Link to comment
Share on other sites

  • Moderators

This system is designed to show you schedules from your last location. Now if you want to implement that in your navigation bar, you're gonna have to do it like you did for RealScheduleLite and basically change the link to this system.

I suggest you install this first to see how it's working out for you and then decide from there.

Link to comment
Share on other sites

I have other problem. When I go to book flights page. It show all flights for this airport for all airplanes. Example: The Plane whith registratrion EC-MHK are in KATL, the Plane EC-MHD are in KJFK. If I am in KATL and I go the book flights page I can book schedules for EC-MHK and for EC-MHD. I want think is better if i can book flights for the airplane are in my location not for all airplanes. It is possible??

Link to comment
Share on other sites

  • 4 weeks later...

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>

Link to comment
Share on other sites

  • 2 weeks later...

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