gio1961
Members-
Posts
252 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by gio1961
-
I share with Heritage1 and another solution in my opinion. Download the Simpilot module from here: https://github.com/DavidJClark/phpVMS-ScheduleSearch Make some changes: - file extension from airport_search.tpl to airport_search.php; - April the file FrontSchedules.php from the directory modules and modify the extension of the files from .tpl to .php; - open the file FrontSchedulesData.class from the common folder and change "public function" to "public static function. - open the airport_search.php file and make the changes as shown below. (no drop-down menus for airport search, just typing) just change: <select class = "search" name = "depicao"> <option value = ""> All </option> <? Php foreach ($ airports as $ airport) {echo '<option value = "'. $ airport-> icao. '">'. $ airport-> icao. ' - '. $ airport-> name.' </option> ';} ?> </ Select> To: <input type = "text" name = "depicao" value = "" placeholder = "Input ICAO Code" /> **** <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> To: <input type="text" name="arricao" value="" placeholder="Input ICAO Code"/> the result is this: I hope it was useful. Greetings
-
See here if it can be useful
-
Hi guys, how can I change the code below. I have to display the days that are missing for pilots who have not made any flights since the registration date. Thank you (Date Joined) <td><?php echo date("d-m-Y", $jtme) ;?></td> This is the code <?php $totaldays = Config::Get('PILOT_INACTIVE_TIME'); { ?> <?php if ($pilot->lastpirep == '0000-00-00 00:00:00') { echo '<image src="/en/admin/lib/images/Warning.png">'; } else { $datebefore1 = substr($pilot->lastpirep, 0, 10); $datetoday2 = date("Y-m-d"); $datebefore3 = strtotime($datebefore1); $datetoday4 = strtotime($datetoday2); $newdate = $datetoday4-$datebefore3; $lastpirep = floor($newdate/(60*60*24)); $daysleft = $totaldays-$lastpirep; echo ''; if ($lastpirep == 0) { echo ''; } else if ($lastpirep == 1) { echo ''; } else { echo ''; } echo '<font color="#eb0f48">'; if ($daysleft <= 0) { echo '<image src="/en/admin/lib/images/OFF.png"><br>Pilot in pension'; } else { echo $daysleft . '</font> days left to be marked as a retired pilot.'; } } ?> <?php }
-
Thank you. As always very kind and helpful Thank you. As always very kind and helpful
-
Exactly, but it also shows other airports that I have in the database and that do not have a timetable I just downloaded and installed FlightBooking System. V1.1 works, while the other doesn't
-
Do I want to show the last point of arrival as the next starting point?
-
Hi guys, I have a problem with searching for schedules. In the drop-down box, you give me all the airports instead of just departures. Thanks for a possible reply. This is the code: <div class="tab-pane active" id="tab_1"> <p>Select your departure airport:</p> <div class="form-group"> <select id="depicao" name="depicao" class="form-control"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> </div> <input type="submit" name="submit" value="Search" class="btn btn-danger btn-block btn-flat" style="width:80px;"/> </div>
-
https://forum.phpvms.net/topic/2197-schedule-search-airline-aircraft-arrival-departure/?page=6
-
I guess the local.config.php file in the core directory needs to be modified # ACARS options # Minutes, flights to show on the ACARS # Default is 720 minutes (12 hours) Config::Set('ACARS_LIVE_TIME', 10); Config::Set('ACARS_DEBUG', false); otherwise I don't know.
-
<script type="text/javascript"> <?php /* These are the settings for the Google map. You can see the Google API reference if you want to add more options. There's two options I've added: autozoom: This will automatically center in on/zoom so all your current flights are visible. If false, then the zoom and center you specify will be used instead refreshTime: Time, in seconds * 1000 to refresh the map. The default is 10000 (10 seconds) */ ?> var acars_map_defaults = { autozoom: true, zoom: 4, center: new google.maps.LatLng("<?php echo Config::Get('MAP_CENTER_LAT'); ?>", "<?php echo Config::Get('MAP_CENTER_LNG'); ?>"), mapTypeId: google.maps.MapTypeId.TERRAIN, refreshTime: 10000 }; </script> <div class="mapcenter" align="center"> <div id="acarsmap" style="width:<?php echo Config::Get('MAP_WIDTH');?>; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div> </div> <?php /* See below for details and columns you can use in this table */ ?> In acarsmap.php change 10000 to 15000 (15 seconds)
-
Thank you. Very kind <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <h5><?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo "<p>"; echo '<img src="/en/lib/skins/crewcenter/images/pilot.png" class="img-circle" alt="User Image" height="20"> <img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).' " width="17" height="17" />'; echo ' <Strong>'.$pilot->firstname.'</strong> '.$pilot->lastname.'<br />'; echo '<small></small>'; echo "</p>"; } ?> On the highlighted line I have problems
-
Hi guys, for privacy reasons, I have to display only the name of the pilot and the first character of the last name, how can I edit this code? <?php echo $pilot->firstname.' '.$pilot->lastname?> Grace for a possible response
-
Hi everyone. I integrated the following code with the related changes (code) and apparently the chat works. If I click on the driver's profile, I am sent back to the chat site https://chatroll.com/ and not to the driver's profile. Thanks for a possible reply <? // Chatroll Single Sign-On (SSO) Parameters $userinfo= Auth::$userinfo; $uid = $userinfo->pilotid; // Current user id $uname = Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname; // Current user name $ulink = url('/profile/view/'.$userinfo->pilotid); // Current user profile URL (leave blank for none) $upic = PilotData::getPilotAvatar($pilotid); // Current user profile picture URL (leave blank for none) if (Auth::$userinfo->pilotid==1) // Is current user a moderator? { $ismod = 1; } else { $ismod = 0; } $sig = md5($uid . $uname . $ismod . '0m9lz2hd44k2duyh'); $ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink=" . urlencode($ulink) . "&upic=" . urlencode($upic) . "&ismod=" . $ismod . "&sig=" . $sig; ?> <iframe width='450' height='350' src='https://chatroll.com/embed/chat/virtual-airlines-chat?id=IhQNVCJBoPf&platform=php<?= $ssoParams ?>' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>
-
Ok, thanks to everyone
-
Hi guys, someone at the updated version for phpvms 5.5.2? Thank you
-
"$ report" and "$ reports" refers to the pirep table in the database. The skin used is CrewCenter. I got the code from here: https://forum.phpvms.net/topic/7789-add-pireps-to-pilot-main-profile/
-
<table class="table table-striped mt30" cellspacing="0" width="100%" height="30" border="1" bordercolor="#FFFFFF"> <tr> <th bgcolor="#dd4b39"><font color="#ffffff">Flight Number</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Aircraft</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Departure</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Arrival</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Flight Time</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Landing rate</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Date</font></th> <th bgcolor="#dd4b39"><font color="#ffffff">Status</font></th> </tr> <?php if($reports) foreach($reports as $report) { ?> <tr> <td><a href="<?php echo url('/pireps/view/'.$report->pirepid);?>"><?php echo $report->code . $report->flightnum; ?></a></td> <td><?php echo $report->aircraft . " ($report->registration)"; ?></td> <td><?php echo $report->depicao;?> <br /> <?php $departname = OperationsData::getAirportInfo($report->depicao); $depairport = substr($departname->name,0,18);?><?php echo $depairport;?> </td> <td><?php echo $report->arricao;?> <br /> <?php $arrivename = OperationsData::getAirportInfo($report->arricao); $arrairport = substr($arrivename->name,0,18);?><?php echo $arrairport;?> </td> <td><?php echo $report->flighttime; ?></td> <td><?php echo $report->landingrate; ?> ft/min</td> <td><?php echo date(DATE_FORMAT, strtotime($report->submitdate)); ?></td> <td><?php if($report->accepted == PIREP_ACCEPTED) echo '<div id="success">Accepted</div>'; elseif($report->accepted == PIREP_REJECTED) echo '<div id="error">Rejected</div>'; elseif($report->accepted == PIREP_PENDING) echo '<div id="error">Approval Pending</div>'; elseif($report->accepted == PIREP_INPROGRESS) echo '<div id="error">Flight in Progress</div>'; } ?> </td> </tr> </table> table pireps I'm using version 5.5.2. I tried all the codes posted, nothing to do. Thank you all
-
unfortunately it does not work. Thanks anyway
-
Yes, I'm referring to the pilot last flights As you can see from the image posted, instead of the name of the plane there is number "1"
-
Configuration Modifications In your core/app.config.php and core/local.config.php, replace the following: MAP_TYPE The base map can be customized and changed out to different providers. Find: Config::Set('MAP_TYPE', 'G_PHYSICAL_MAP'); and replace with: Config::Set('MAP_TYPE', 'OpenStreetMap.Mapnik'); You can also change OpenStreetMap.Mapnik to a different basemap. Those options can be found here: http://leaflet-extras.github.io/leaflet-providers/preview To use a base map that requires an API key, see the notes in libs/js/base_map.js. MAP_ZOOM_LEVEL The scaling for zoom is different between Google Maps and the Leaflet zoom system. Find: Config::Set('MAP_ZOOM_LEVEL', 12); and replace with: Config::Set('MAP_ZOOM_LEVEL', 5);
-
Thank you for answering. The code you posted refers to the pilot reports and not the "MY" last flights. The code I posted refers to this. Sincerely
-
Thanks, unfortunately it doesn't work