Jump to content

REALScheduleLite beta 1.0 [DEPRECATED]


Recommended Posts

  • 1 month later...

I modified the realschedulelite a little and now it shows all the schedules from a depart airport for a specific aircraft. Also I have made the code when a pilot bid a flight with an <a> aircraft and there are other flights with the same plane from the same Departure airport, can not bid them other pilot. You can see those flights but the code shows reserved and no one can bid them. I made this because if an airplane depart from than airport and a pilot bid the same time a flight with the same aircraft(registration) then the aircraft will change arrival airport and the pilot who made the first flight looses the aircraft.

I post a picture to see it

k77y.jpg

Sorry for my english

Could you please provide the code for that table?

Thanks,

Link to comment
Share on other sites

  • 5 months later...
  • 4 weeks later...

I am having the old "no route passed" error and I have determined that two lines in my layout.tpl seem to be the culprits. If i remove the "skins/redwood/" from both lines' URLs the booking starts working and the "no route passed" error disappears. The only problem is that when I do this all the active content on my site dies (i.e, menus, pic carousels, etc.).

<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/redwood/js/jquery-1.11.0.min.js"></script>
and
<script type="text/javascript" src="<?php echo SITE_URL?>/lib/skins/redwood/js/custom.js"></script>

I've tried leaving both versions (both with and without the /skins/redwood/ portion or the URL) in the file but that hasn't worked. I've tapped a couple of friends who are good with php but we haven't been able to figure it out. Any help is greatly appreciated. Thanks in advance.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 2 weeks later...
  • 4 weeks later...

In this module, there is a very nice feature.

Your unit can display the plane at the airport have or do not have it.

Tell me, how can this function is set to flight list ??? (Schedule_resilts.tpl)

The pilot could not make reservation for a flight, if it is not the plane right now?

Schedule_resilts.tpl- I have now installed this code.

<?php
$pilotid = Auth::$userinfo->pilotid;
$last_location = FltbookData::getLocation($pilotid, 1);
$last_name = OperationsData::getAirportInfo($last_location->arricao);
?>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="http://code.jquery.com/jquery-latest.js"></script><!-- Latest compiled and minified Javascript - Modified to clear modal on data-dismiss -->
<script type="text/javascript" src="<?php echo SITE_URL;?>/lib/js/bootstrap.js"></script>
<br /> 
<table width="787" class="table table-striped table-bordered table-hover" id="tabledlist">
<?php
if(!$allroutes)
{
?>


<?php
}
else
{
?>
<thead>
<tr id="tablehead">
		 <th bgcolor="#C20A1F">Компания</th>
		    <th bgcolor="#C20A1F">Номер рейса </th>
		    <th bgcolor="#C20A1F">Вылет</th>
		    <th bgcolor="#C20A1F">Прибытие  </th>
		    <th bgcolor="#C20A1F">Самолет</th>
		    <th bgcolor="#C20A1F">Статус</th>
</tr>
</thead>
<tbody>
<?php
foreach($allroutes as $route)
{
if(Config::Get('RESTRICT_AIRCRAFT_RANKS') === true && Auth::LoggedIn())
{
 if($route->aircraftlevel > Auth::$userinfo->ranklevel)
 {
  continue;
 }
}
?>
<tr style="height:12px; font-size:14px; font-weight:normal;">
<td width="16.5%" align="left" valign="middle"><div align="center"><img src="<?php echo SITE_URL?>/lib/skins/red/images/airlines/<?php echo $route->code;?>-tail.png" width="50" height="50" align="absbottom" style="vertical-align:top; margin-bottom:10px;"></div></td>
<td width="16.5%" align="center" valign="middle"><center><?php echo $route->code . $route->flightnum?></center></td>
<td width="16.5%" align="center" valign="middle"><?php
$country = OperationsData::getAirportInfo($route->depicao);
$imgicao = array_search($country->country, Countries::$countries);
?>
<img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strtolower($imgicao);?>.png" alt="<?php echo strtolower($imgicao);?>" />
<a href="<?php echo SITE_URL?>/index.php/airports/get_airport?icao=<?php echo $route->depicao ?>" target="_blank"><?php echo $route->depicao;?></a> (<?php echo $route->deptime; ?>)
</strong><br />
<?php $departname = OperationsData::getAirportInfo($route->depicao);
$depairport = substr($departname->name,0,18);?><?php echo $depairport;?></td>
<td width="16.5%" align="center" valign="middle"><?php
$country = OperationsData::getAirportInfo($route->arricao);
$imgicao = array_search($country->country, Countries::$countries);
?>
<img src="<?php echo SITE_URL;?>/lib/images/countries/<?php echo strtolower($imgicao);?>.png" alt="<?php echo strtolower($imgicao);?>" />
<a href="<?php echo SITE_URL?>/index.php/airports/get_airport?icao=<?php echo $route->arricao ?>" target="_blank"><?php echo $route->arricao;?></a> (<?php echo $route->arrtime; ?>)
</strong><br />
<?php  $arrivename = OperationsData::getAirportInfo($route->arricao);
$arrairport = substr($arrivename->name,0,18);?><?php echo $arrairport;?></td>
<td width="16.5%" align="left" valign="middle"><?php echo $route->aircraft ;?> <?php echo $route->registration ;?>
  <div class="vertical-align-text pull-right" style="padding-left:6px;">
	    <div class="font-small pull-right"><?php echo $route->flighttime; ?>h</div>
	    <div class="font-small"><?php echo round($route->distance,0,PHP_ROUND_HALF_UP); ?>nm</div>
    </div>    </td>
   <td width="16.5%" align="center" valign="middle"><?php
    if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0)
 {
    ?>

    <div class="btn btn-danger btn-sm sharp disabled">недоступен</div>
    <?php
 }
    else
 {
 ?>
   <a data-toggle="modal" href="<?php echo SITE_URL?>/action.php/Fltbook" data-target="#confirm" class="btn btn-success btn-md">Свободен</a>
   <?php				   
    }
    ?>



 </td>
</tr>
 <td colspan="6">

 <table cellspacing="0" cellpadding="0" border="1" id="details_dialog_<?php echo $route->flightnum;?>" style="display:none" width="100%">

  <tr>
  <th align="center" bgcolor="black" colspan="4"><font color="white">Flight Brefing</font></th>
  </tr>
  <td><a href="<?php echo url('/schedules/details/'.$route->id);?>"><strong><font color="red">Отправить Fplan в VATSIM </strong></a></td>
  <tr>
  <td align="left"> &nbspDeaprture:</td>
  <td colspan="0" align="left" ><b>  <?php
  $name = OperationsData::getAirportInfo($route->depicao);
  echo "{$name->name}"?></b></td>
  <td align="left"> &nbspArrival:</td>
  <td colspan="0" align="left" ><b>  <?php
  $name = OperationsData::getAirportInfo($route->arricao);
  echo "{$name->name}"?></b></td>
  </tr>
  <tr>
  <td align="left"> &nbspAircraft</td>
  <td colspan="0" align="left" ><b>  <?php
  $plane = OperationsData::getAircraftByName($route->aircraft);
  echo $plane->fullname ; ?></b></td>
  <td align="left"> &nbspDistance:</td>
  <td colspan="0" align="left" ><b>  <?php echo $route->distance . Config::Get('UNITS') ;?></b></td>
  </tr>
  <tr>
  <td align="left"> &nbspDep Time:</td>
  <td colspan="0" align="left" ><b>  <font color="red"><?php echo $route->deptime?> GMT</font></b></td>
  <td align="left"> &nbspArr Time:</td>
  <td colspan="0" align="left" ><b>  <font color="red"><?php echo $route->arrtime?> GMT</font></b></td>
  </tr>
  <tr>
  <td align="left"> &nbspAltitude:</td>
  <td colspan="0" align="left" ><b>  <?php echo $route->flightlevel; ?> ft</b></td>
  <td align="left"> &nbspDuration:</td>
  <td colspan="0" align="left" ><font color="red"><b> 
  <?php

  $dist = $route->distance;
  $speed = 440;
  $app = $speed / 60 ;
  $flttime = round($dist / $app,0)+ 20;
  $hours = intval($flttime / 60);
	    $minutes = (($flttime / 60) - $hours) * 60;
  if($hours > "9" AND $minutes > "9")
  {
  echo $hours.':'.$minutes ;
  }
  else
  {
  echo '0'.$hours.':0'.$minutes ;
  }
  ?> Hrs</b></font></td>
  </tr>
  <tr>
  <td align="left"> &nbspDays</td>
  <td colspan="0" align="left" ><b>  <?php echo Util::GetDaysLong($route->daysofweek) ;?></b></td>
  <td align="left"> &nbspPrice:</td>
  <td colspan="0" align="left" ><b>  $<?php echo $route->price ;?>.00</b></td>
  </tr>
  <tr>
  <td align="left"> &nbspFlight Type:</td>
  <td colspan="0" align="left" ><b>  <?php
  if($route->flighttype == "P")
  {
  echo'Passenger' ;
  }
  if($route->flighttype == "C")
  {
  echo'Cargo' ;
  }
  if($route->flighttype == "H")
  {
  echo'Charter' ;
  }
  ?></b></td>
  <td align="left"> &nbspFlown</td>
  <td colspan="0" align="left" ><b>  <?php echo $route->timesflown ;?></b></td>
  </tr>
  <tr>
  <th align="center" bgcolor="black" colspan="4"><font color="white">Fuel Calculation for <?php
  $plane = OperationsData::getAircraftByName($route->aircraft);
  echo $plane->fullname ; ?>
  </font></th>
  </tr>
  <?php
	    $fuelflowB722 = 3800;
  $fuelhrB722 = 3000;
  $fuelflowB738 = 1045;
	    $fuelhrB738 = 3970;
  $fuelflowB744 = 1845;
  $fuelhrB744 = 7671;
  $fuelflowB763 = 1405;
  $fuelhrB763 = 4780;
	    $fuelflowB772 = 2200;
  $fuelhrB772 = 6400;
  $fuelflowA30B = 1526;
  $fuelhrA30B = 8065;
  $fuelflowA320 = 790;
  $fuelhrA320 = 3000;
  $fuelflowA332 = 1433;
  $fuelhrA332 = 6375;
	    $fuelflowA343 = 1829;
  $fuelhrA343 = 8300;
  $fuelflowF100 = 744;
  $fuelhrF100 = 2136;




    if($route->aircraft == 'B737-800')
	 {
	  $fuelflow = $fuelflowB738;
	    $fuelhr = $fuelhrB738;
	 }
	 elseif($route->aircraft == 'B747-400')
	 {
	  $fuelflow = $fuelflowB744;
	    $fuelhr = $fuelhrB744;
	 }
	 elseif($route->aircraft == 'B767-300')
	 {
	  $fuelflow = $fuelflowB763;
	    $fuelhr = $fuelhrB744;
	 }
  elseif($route->aircraft == 'B777-200')
	 {
	  $fuelflow = $fuelflowB772;
	    $fuelhr = $fuelhrB772;
	 }
	 elseif($route->aircraft == 'B727-200')
	 {
	  $fuelflow = $fuelflowB727;
	    $fuelhr = $fuelhrB727;
	 }
	 elseif($route->aircraft == 'A300B2')
	 {
	  $fuelflow = $fuelflowA30B;
	    $fuelhr = $fuelhrA30B;
	 }
	 elseif($route->aircraft == 'A320-200')
	 {
	  $fuelflow = $fuelflowA320;
	    $fuelhr = $fuelhrA320;
	 }
  elseif($route->aircraft == 'A330-200')
	 {
	  $fuelflow = $fuelflowA332;
	    $fuelhr = $fuelhrA332;
	 }
  elseif($route->aircraft == 'A340-300')
	 {
	  $fuelflow = $fuelflowA343;
	    $fuelhr = $fuelhrA343;
	 }
  elseif($route->aircraft == 'F100')
	 {
	  $fuelflow = $fuelflowF100;
	    $fuelhr = $fuelhrF100;
	 }

    $fldis = $route->distance / 100;
 $fuelnm = $fuelflow * $fldis;
    $fltaxi = 200;
 $flndg = $fuelhr * 3/4;
 $result = $fuelnm + $flndg + $fltaxi;
    ?> 
   <tr>
   <td><a href="<?php echo url('/schedules/details/'.$route->id);?>">Смотреть детали </a></td>
		    <td align="left" colspan="2"> &nbspAverage Cruise Speed:</td>
   <td align="left" colspan="2">  <b>430 kt/h - 800 km/h</b></td>
   </tr>
   <tr>
		    <td align="left" colspan="2"> &nbspFuel Per 1 Hour:</td>
   <td align="left" colspan="2">  <b><?php echo $fuelhr ;?> kg - <?php echo ($fuelhr *2.2) ;?> lbs</b></td>
   </tr>
   <tr>
   <td align="left" colspan="2"> &nbspFuel Per 100 NM:</td>
   <td align="left" colspan="2"><b>  <?php echo $fuelflow ;?> kg - <?php echo ($fuelflow *2.2) ;?> lbs</b></td>
   </tr>
   <tr>
   <td align="left" colspan="2"> &nbspTaxi Fuel:</td>
   <td align="left" colspan="2"><b>  <?php echo $fltaxi ;?> kg - <?php echo ($fltaxi *2.2) ;?> lbs</b></td>
   <tr>
   <td align="left" colspan="2"> &nbspMinimum Fuel Requiered At Destination:</td>
   <td align="left" colspan="2"><b>  <?php echo $flndg ;?> kg - <?php echo ($flndg *2.2) ;?> lbs</b></td>
   </tr>
   <tr>
   <td align="center" colspan="4"><font color="blue" size="4">Total Estimated Fuel Requiered For This Route:   <?php echo round($result, 1) ;?> kg - <?php echo round(($result *2.2), 1) ;?> lbs</font></td>
   </tr>
					 <tr>
   <td align="center" colspan="4"><font size="3" color="red"><b>TO PREVENT ANY MISCALCULATION ADD 500 KG EXTRA!</b></font></td>								 
					 </tr>
  </td>
  </tr>
  <tr>
  <th align="center" bgcolor="black" colspan="4"><font color="white">Flight Map</font></th>
  </tr>
  <tr>
  <td width="100%" colspan="4">
  <?php
  $string = "";
				    $string = $string.$route->depicao.'+-+'.$route->arricao.',+';
				    ?>		  <img width="100%" src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=680x200&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" /></tr>
</td>
   </table>
    </td>
<div class="modal fade" id="confirm">
 <div class="modal-dialog">
   <div class="modal-content">
  <div class="modal-body">	  </div>
   </div>
 </div>
</div>
<?php
/* END OF ONE TABLE ROW */
}
}
?>
</tbody>
</table>
</div>
<hr>
<center>
 <a href="<?php echo url('/Fltbook') ;?>"></a>
</center></div>
<br />

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 3 weeks later...

Installed this module and i had no problems ...all ok.

 

but now im standing at the airport and if i click "Search for a flight" im always getting "no routes have been found" :-(

* jumpseat is working fine.

what im doing wrong?

 

im using the last phpvms version and i changed all from tpl to php also inside "RealScheduleLiteData.class.php"

Edited by Melli
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...