Jump to content

Recommended Posts

Posted

Hello Guys,

i use the Codeshare module to display my flights. I have set in the admin Area the Aricraft Rank Level. But i can book a Flight where the Rank level if higher as mine..

If there a Solution to resolve this so only Pilots with corrects Ranks can book the Flight

A Sample

Second Flight Officer

C208 oer another airplane from teh database with ther ranklevel

so im now Second Flight Oficer and i can book a flight with a 777. In the admin aerea i have set the level to Captain. But its not working.

here is my code of Codeshare

<style type="text/css">
<!--
body,td,th {
color: #000;
-webkit-border-radius: 40px;
-moz-border-radius: 40px;
border-radius: 15px;
}
-->
</style>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css" type="text/css" />
<script type="text/javascript">
   $(function (){
    $('a.ajax').click(function() {
	    var url = this.href;
	    // show a spinner or something via css
	    var dialog = $('<div style="display:none" class="loading"></div>').appendTo('body');

	    // open the dialog
	    dialog.dialog({
		    // add a close listener to prevent adding multiple divs to the document
		    close: function(event, ui) {
			    // remove div with all data and events
			    dialog.remove();
		    },
		    modal: true, height: 600, width: 800, position: ['center',80], title: "Schedule details"
	    });
	    // load remote content
	    dialog.load(
		    url,
		    {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object
		    function (responseText, textStatus, XMLHttpRequest) {
			    // remove the loading class
			    dialog.removeClass('loading');
		    }
	    );
	    //prevent the browser to follow the link
	    return false;
    });
   });
   </script>
<script type="text/javascript">
$(document).ready(function() {
    $('#Codeshare').dataTable( {
		    "sPaginationType": "full_numbers"
    } );
} );
		    </script>
   <h3 align="center">Codeshare Flights</h3>
<table id="Codeshare" width="600" border="3" align="center" cellpadding="5" cellspacing="5" bordercolor="#FF0000" class="ui-corner-all">
 <tr>
   <td bgcolor="#99FF00" > </td>
   <th bgcolor="#99FF00"><div align="center">Airline Information<br />
<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/sonstiges/departure.jpg" width="632" height="194" /></div></th>
   <td bgcolor="#99FF00"> </td>
 </tr>
 <tr>
   <td> </td>
   <td><p align="center"><strong>!!Attention!!</strong></p>
   <p align="center"><strong>The Codeshare is under Development. All Flights can be booked as well.</strong></p>
   <p align="center"> </p>
   <p align="center"><strong>Airline Information</strong></p>
   <p align="center"><strong>LAX = Lausitz Aircargo /Cargo</strong></p>
   <p align="center"><strong>LAP= Lausitz Aircargo Business Line</strong></p>
   <p align="center"><strong>LAJ= Internation Line</strong></p></td>
   <td> </td>
 </tr>
</table>
<p align="center"> </p>
<?php
if(!$codeshares)
   {
 echo '<span style="color:red;">No Codeshares</span>';
   }
   else {?>
<table align="center" width="100%"  border="3" bordercolor="#FF0000" cellpadding="5" cellspacing="5" class="ui-corner-all">
<thead>
<tr>
 <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Flight Number<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
    <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Departure<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
    <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Arrival<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
   <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Airline<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
    <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Aircraft<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
  <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" />Details<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
    <th bgcolor="#99FF00"><div align="center"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" width="25" height="25" />Book<img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/airplane-57-512.gif" alt="" width="25" height="25" /></div></th>
   </tr>
</thead>
<tbody>
<?php

   foreach($codeshares as $codeshares){
 $codeshare_details = SchedulesData::getScheduleDetailed($codeshares->schedid);
    ?>
    <tr>
 <td align="center" bgcolor="#CCCCCC"><a class="ajax" href="<?php echo SITE_URL?>/action.php/schedules/details/<?php echo $codeshare_details->id;?>"><span class="btn"><strong><?php echo $codeshare_details->code; ?><?php echo $codeshare_details->flightnum; ?></strong></span></a></td>
    <td bgcolor="#CCCCCC"><div align="center"><?php echo $codeshare_details->depicao; ?></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><?php echo $codeshare_details->arricao; ?></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><img src="<?php echo $codeshares->image; ?>" alt="<?php echo $codeshares->airline; ?>" /></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><span class="label label-info"><?php echo $codeshare_details->aircraft; ?></span></div></td>
    <td bgcolor="#CCCCCC"><div align="center"><a href="<?php echo SITE_URL ?>/index.php/schedules/brief/<?php echo $codeshare_details->id; ?>"><img src="http://www.lausitz-aircargo.de/lib/skins/ocean_blue/images/buttons/Details.png" width="75" height="25" /></a></div></td>
    <td bgcolor="#CCCCCC"><div align="center">
	  <?php
   if(Auth::LoggedIn())
   {?>

	  <?php
   }
   else
   {
 echo 'Login first!';
 }
 ?>
	  <?php
 # Don't allow overlapping bids and a bid exists
 if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
 {
 ?>
	  <a id="<?php echo $codeshare_details->id; ?>" class="addbid"
								    href="<?php echo url('/schedules/addbid');?>">Book Flight</a>
	  <?php
 }
 else
 {

if(Auth::LoggedIn())
{
if($route->aircraftlevel > Auth::$userinfo->ranklevel)
{
?>
	  <b><font color="#FF0000">Above your rank!</font></b>
 <?php
}
else
{
?>
 <a id="<?php echo $codeshare_details->id; ?>" class="addbid"
								    href="<?php echo url('/schedules/addbid');?>">Book Flight</a>
	  <?php
								    }
								    }
								    }
								    ?>
    </div></td>
   </tr>
    <?php

   }

   ?></tbody>
</table>
<?php
}
?>
<hr />
<div align="center">module contributed under © Strider. Codeshare V1.3
</div>

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