Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 03/08/20 in all areas

  1. 1 point
    AirMail 3.1 phpVMS module to create a messaging system your phpVMS based virtual airline. Released under the following license: Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License Developed by: simpilot www.simpilotgroup.com Developed on: phpVMS v2.1.934-158 php 5.3.4 mysql 5.0.7 apache 2.2.17 This system is not compatible with any earlier versions of AirMail New Features: -Delete All function in inbox and all message folders -Individual pilot setting to have email sent to pilot when new message is received -Threaded messages -Cleaner templates to help with site integration Install: -Download the attached package. -unzip the package and place the files as structured in your root phpVMS install. -use the airmail.sql file to create the tables needed in your sql database using phpmyadmin or similar. To Use the "You Have Mail" function place the following code where you would like the notice to appear, it will only appear if the pilot is logged in. <?php MainController::Run('Mail', 'checkmail'); ?> -Create a link on your site for your pilots to access their AIRMail <a href="<?php echo url('/Mail'); ?>">AIRMail</a> File Updated 9/2/2011 files changed: core/templates/sentitems.tpl core/common/MailDataClass.php File Updates 9/26/11 core/common/MailDataClass.php - NOTAM bug fix Code hosted on Github - Link In Signature.
  2. 1 point
    Hi guys - the default installation of iCrew LITE sometimes does not automatically go to the login page if you visit the site while not logged in, or when your login session expires. I'm posting the fix below. Hope this helps some of you: In index.php in the root of phpvms: define('CODON_DEFAULT_MODULE', 'Frontpage'); change to: define('CODON_DEFAULT_MODULE', 'Profile'); And in modules/Profile/Profile.php: public function index() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.php'); return; change to: public function index() { if(!Auth::LoggedIn()) { $this->render('login_form.php'); return;
  3. 1 point
    Found this: https://github.com/tutsplus/how-to-integrate-google-no-captcha-recaptcha-on-your-website/blob/master/recaptchalib.php Does your recaptchalib.php look alike? If yes, try to replace this: function ReCaptcha with this: function __contruct
  4. 1 point
    I think its because on your schedule search form it says <form id="form" action="https://va.atlasgaming.group/index.php/schedules/view" method="post"> While it should be <form id="form" action="https://va.atlasgaming.group/action.php/schedules/view" method="post"> When using index it will render the whole template and action will ony render the results part In your php file it will probably look like action="<?php echo url('/schedules/view')" OR action="<?php echo SITE_URL."/schedules/view" ?>" If so it should be. action="<?php echo actionurl('/schedules/view')" But again I think Im saying this from memory since im at work
  5. 1 point
    Quick question, Do you know where the script pulls the Airline and Flight Number? Every time I click "Click to Generate" it puts a random flight number, that 1. Isn't in my aircraft database, or listed anyone on my site. So I'm not sure how to fix that. Example: Airline = LXA Flight Number = LXA57 on Brief Page. After clicking Generate, Flight Number = N320SB. Edit: So I figured out it's pulling the registration number of the aircraft from the SimBrief database. Is there any way to transmit our airline and flight number, in order for it to show up like that on generated pilot brief under flight number? Solution: Fixed by adding this code before the submit button. <input type="hidden" name="airline" value="<?php echo $schedule->code?>"> <input type="hidden" name="fltnum" value="<?php echo $schedule->flightnum?>"> <input type="hidden" name="reg" value="<?php echo $schedule->registration?>">
  6. 1 point
    Help me with the code. I'm trying to do so on the page of the Airport (HUB module), displays a list of planes that are currently at this airport. I'm trying to take some code from the module (RealScheduleLite), but the page out only the aircraft which have not yet done a single flight. Below the code of the page (hub master) hubview.tpl <div class="container">[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<br>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<div class="row">[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<div class="col-md-3"> <div class="panel panel-default"> <div class="panel-heading">AIRPORT DETALIS </div> <table class="table table-hover"> <tbody> <tr> <td><img src="<?php echo SITE_URL;?>/lib/skins/red/images/airports/<?php echo $hubs->icao;?>.jpg" alt="<?php echo $hubs->icao;?>" width="100%" height="100"/></td></tr> <tr><td><div><strong>ICAO</strong></div> <?php echo $hubs->icao;?></td></tr> <tr><td><div><strong>Airport name</strong></div> <?php echo $hubs->name;?> </td></tr> <tr><td><div><strong>Number of Pilots:</strong></div> <span><?php echo HubStats::CountPilots($hubs->icao);?></font></span><br></td></tr> <tr><td><div><strong>Total Flight </strong></div> <?php echo vFleetTrackData::countFlights($aircraft->id);?><br></td></tr> <tr><td><div><strong>Location (Lat) </strong></div> <?php echo $hubs->lat;?><br></td></tr><tr><td><div><strong>Location (Lon) </strong></div> <?php echo round(vFleetTrackData::countHours($aircraft->id));?><br></td></tr> <tr><td><div><strong>Annual passenger traffic</strong></div> 30 500 000 people<br></td></tr> <tr><td><div><strong>Number of Flights Flown:</strong></div><?php echo HubStats::CountFlights($hubs->icao);?> <br></td></tr> <tr><td><div><strong>Number of Routes Flown From <?php echo $hubs->icao;?>:</strong></div><?php echo HubStats::CountRoutes($hubs->icao);?><br></td></tr> <tr><td><div><strong>Total Miles Flown:</strong></div><?php echo HubStats::TotalMiles($hubs->icao);?>nm <br></td></tr> <tr><td><div><strong>Total Hours Flown:</strong></div><?php echo round(HubStats::TotalHours($hubs->icao));?><br></td></tr> <tr><td><div><strong>Total Fuel Used:</strong></div><?php echo round(HubStats::TotalFuelUsed($hubs->icao));?>lbs <br></td></tr> <tr><td><div><strong>Hub for airlines (ICAO) </strong></div>SVR, RWZ, SBI, MOV, RLU <br></td></tr> <tr><td><div><strong>Maximum takeoff weight (MTOW)</strong></div><br></td></tr> <tr><td><div><strong>Type</strong></div> International civil<br></td></tr><tr><td><div class="small"><strong>IATA</strong></div> DME<br></td></tr> <tr><td><div><strong>Country</strong></div>Russian Federation<br></td></tr> </tbody></table>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] </div> </div>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<div>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<div class="col-md-3"> <div class="panel panel-default"> <div class="panel-heading">AIRPORT Ranweys </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th>Runway</th> <th>Runway length</th> <th>Runway width</th> </tr> <tr> <td>14C</td> <td>8531 ft</td> <td>148 ft</td> </tr> <tr> <td>32C</td> <td>8531 ft</td> <td>148 ft</td> </tr> <tr> <td>14L</td> <td>12448 ft</td> <td>174 ft</td> </tr> <tr> <td>32R</td> <td>12448 ft</td> <td>174 ft</td> </tr> <tr> <td>14R</td> <td>11483 ft</td> <td>230 ft</td> </tr> <tr> <td>32L</td> <td>11483 ft</td> <td>230 ft</td> </tr> </table>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] </div> </div> <div class="col-md-3"> <div class="panel panel-default"> <div class="panel-heading">AIRPORT FREQUENCIES </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th>Type</th> <th>Name</th> <th>Frequency</th> </tr> <tr> <td>APP</td> <td>APP</td> <td>120.6 MHZ</td> </tr> <tr> <td>ATIS</td> <td>ATIS</td> <td>128.3 MHZ</td> </tr> <tr> <td>GND</td> <td>TAXIING</td> <td>119 MHZ</td> </tr> <tr> <td>MISC</td> <td>TRANSIT</td> <td>129.15 MHZ</td> </tr> <tr> <td>PMSV</td> <td>VOLMET</td> <td>127.875 MHZ</td> </tr> <tr> <td>RDR</td> <td>KRUG</td> <td>127.7 MHZ</td> </tr> <tr> <td>RMP</td> <td>APRON</td> <td>130.6 MHZ</td> </tr> <tr> <td>TWR</td> <td>TWR</td> <td>118.6 MHZ</td> </tr> </table>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] </div> </div> <div class="col-md-3"> <div class="panel panel-default"> <div class="panel-heading">AIRPORT NAVIGATION AIDS </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <th>Type</th> <th>Name</th> <th>Frequency</th> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>437 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>659 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>659 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>437 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>887 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>320 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>320 KHZ</td> </tr> <tr> <td>NDB</td> <td>Domodedovo</td> <td>887 KHZ</td> </tr> </table>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] </div> </div> [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<div class="col-md-9"> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"><?php echo $hubs->icao;?> map</div> <!--<img src="http://www.gcmap.com/map?P=<?php echo $hubs->icao;?>,+&MS=bm&MR=30&MX=700x360&PM=b:disc4:blue%2b%22%25i%25+%28N%2210:yellow&PC=%23ffffff&MP=rect" width="100%" />--> <script type="text/javascript">[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] function initialize() { var mapDiv = document.getElementById('airport'); var map = new google.maps.Map(mapDiv, { center: new google.maps.LatLng(<?php echo $hubs->lat;?> , <?php echo $hubs->lng;?> ), zoom: 14, mapTypeId: google.maps.MapTypeId.SATELLITE }); } [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] google.maps.event.addDomListener(window, 'load', initialize); </script> <div id="airport" style="width: 100%; height: 250px"></div></div> </br> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading"> <?php echo '<td>'.$airport->name.'</td>'; echo '<td>'.$airport->country.'</td><td>'; $aircrafts = OperationsData::getAllAircraft('true'); $count = 0; if(!$aircrafts) { echo 'The Airline Has No Aircraft'; } else { foreach ($aircrafts as $aircraft) { $location = RealScheduleLiteData::get_aircraft_location($aircraft->id); $airfield = $location->arricao; if(!$location) { $location = RealScheduleLiteData::get_aircraft_start($aircraft->id); $airfield = $location->depicao; } else { $airfield = $location->arricao; } if ($airfield == $airport->icao) { if ($count == 0) { echo '| '; } echo ''.$aircraft->registration.' | '; $count++; } } if ($count == 0) { echo '<font color="#6D7B8D"><i>No Aircraft Available</i></font>'; } echo '</td>'; } ?> </div></div> </br> <div class="panel panel-default"> <!-- Default panel contents --> <div class="panel-heading">FLIGHTS FOR AIRCRAFT WITH TAIL NUMBER</div> <div> <div> <?php $hubs_details = HubStats::Pilots($hubs->icao); if($hubs_details == ''){ echo 'Sorry, no Pilots allocated to this hub yet. <br />';} else { [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]?> <script type="text/javascript"> $(document).ready(function() { $('#plist').dataTable( { "sPaginationType": "bootstrap" } ); } ); </script> <table width="100%" id="plist" class="table table-striped"> <thead> <tr id="tablehead"> <th>Country</th> <th>Pilot ID</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<th>Name</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<th>Rank</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<th>Flights</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<th>Hours</th> <th>Group</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] <th>Vatsim ID/IVAO ID</th> <th>Active</th>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]</tr> </thead> <tbody> <?php foreach($hubs_details as $pilot) { if($pilot->retired =='1') { continue; } if($pilot->totalhours =='0'){ continue; } if(!$pilot){echo "Sorry, no pilot allocated to this hub yet.";} ?>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<tr> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> </td> <td width="1%" nowrap><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid;?>"><?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid);?></a>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]</td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<td> [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] <?php echo $pilot->firstname.' '.$pilot->lastname;?>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]</td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<td><img src="<?php echo $pilot->rankimage;?>" alt="<?php echo $pilot->rank;?>" /></td> [/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<td><?php echo $pilot->totalflights; ?></td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]<td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <td><?php echo $pilot->group;?></td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] <td><?php[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]$fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]if($fieldvalue != '')[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]{[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] echo '<a href="http://www.vataware.com/pilot.cfm?cid='.$fieldvalue.'" target="_blank"><img src="'.SITE_URL.'/lib/skins/mva/images/vatsim.gif" alt="Vatsim ID" border="0" /></a>';[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]}[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]?> <?php $feildvalue = PilotData::GetFieldValue($pilot->pilotid, 'IVAO ID');[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]if($feildvalue != '') { echo '<img src="http://status.ivao.aero/R/'.$feildvalue.'.png">'; } ?> </td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4] <td> <?php if($pilot->retired == 0) echo '<span class="label label-success">Active</span>'; elseif($pilot->retired == 1) echo '<span class="label label-warning">Inactive</span>'; elseif($pilot->retired == 2) echo '<span class="label label-error">Banned</span>'; elseif($pilot->retired == 3) echo '<span class="label label-warning">On Leave</span>'; ?> <!--<?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/mva/images/no.png" alt="Retired" /> - Retired';} else {echo '<img src="'.SITE_URL.'/lib/skins/mva/images/yes.png" alt="Active" /> - Active';} ?>--> <?php[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]}[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]?></td>[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]</tr> </tbody> </table> <?php[/size][/font][/color] [color=#333333][font=Arial, Helvetica, sans-serif][size=4]}?> </div> </div> </div> </div> </div> </div>
×
×
  • Create New...