gio1961
-
Posts
252 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by gio1961
-
-
48 minutes ago, RodrigoMoreira9 said:
Personally, I just installed the PHPVMS V2 Master version for phpvms 5. But I can not add airports. I put an ICAO code but only the message "Fetching airport data ..." Sorry for my English
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}
-
8 hours ago, ProAvia said:
In both default schedule search and in one I linked above, all airports show whether there is a schedule or not. But if airport without schedule is chosen, result is "No routes have been found!"
Thank you. As always very kind and helpful
9 hours ago, ProAvia said:I use this one - edited for versoin 5.5.2
https://github.com/DavidJClark/phpVMS-ScheduleSearch
OK - in airports table but NO schedule are showing also with default schedule search - let me check mine
Thank you. As always very kind and helpful
-
19 minutes ago, ProAvia said:
Pilot flies from EDDF-EDDM - Pilot is now in EDDM - when searching for a place to fly next, pilot will show current airport (last arrival airport) of EDDM in schedule search.
Pilot still has choice to search from any departure airport, but the displayed default is their last arrival airport.
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
-
20 minutes ago, ProAvia said:
If an airport has an arrival, it should also have a departure - to allow pilots to fly from one airport to another and be able to depart from the last arrival point.
Are you saying that airports without a schedule are listed also in your departure airport list?
Or are you wanting to have the last arrival point show as their next departure point?
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> -
-
6 minutes ago, Karamellwuerfel said:
Thanks,
but this refreshes the map - not the data. The data is send every 30 secons and the map just reads the send data every 10 seconds. This means the actual data just changes after 30 seconds. Am I right?
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.
-
1 hour ago, Karamellwuerfel said:
Hello Folks,
I wonder if it's possible to set the intervall of the data send to the website or is this set by the acars program?
Currently there are updates every 30 seconds. I want to update maybe every 15 seconds - is this possible?
Thanks!
<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)
-
5 minutes ago, PaintSplasher said:
<h5> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); $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> '.substr($pilot->lastname, 0, 1).'<br />'; echo '<small></small>'; echo "</p>"; } ?>
Thank you.
-
10 hours ago, ProAvia said:
Try this
<?php echo $pilot->firstname .' '. substr ($pilot->lastname, 0, 1)?>
https://www.w3schools.com/php7/func_string_substr.asp
I've done the same everywhere on the user/public side of my site. On the admin side, I still show complete last name.
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 -
On 5/3/2019 at 9:57 AM, Shadesb181 said:
is the source file no longer available? I got so used to working with it, I can't download it anymore.
...
-
On 4/24/2013 at 3:19 AM, TK0001 said:
Hello Im using chatroll chat in iframe tags and it works as well.
Chatroll also has php application but i cant figure out howto make it work in my website. The code of Php Application
<?php // Chatroll Single Sign-On (SSO) Parameters $uid = 1; // Current user id $uname = 'test'; // Current user name $ulink = 'http://example.com/profile/test'; // Current user profile URL (leave blank for none) $upic = ''; // Current user profile picture URL (leave blank for none) $ismod = 0; // Is current user a moderator? $sig = md5($uid . $uname . $ismod . 'dwcbbkhmrlldo28m'); $ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink=" . urlencode($ulink) . "&upic=" . urlencode($upic) . "&ismod=" . $ismod . "&sig=" . $sig; ?> <iframe width='450' height='350' src='http://chatroll.com/embed/chat/thy-crew?id=B0mMF3LTJ7V&platform=php<?= $ssoParams ?>&w=$0' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' allowtransparency='true'></iframe>
I just could not figure out what is the variables of $uname $ulink $upic
In the chatroll website they say:
To enable Single Sign-On (SSO) and integrate with your PHP application's user profile system:
(a) Assign correct values for the uid, uname, ulink and upic variables.
( Enable the Single Sign-On (SSO) feature from your Chatroll's settings page.
I could not get more support from them.
Best Regards
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
-
9 minutes ago, flyalaska said:
Try this
<?php echo $pirep->aircraft . " ($pirep->registration)"; ?>
unfortunately it does not work. Thanks anyway
-
8 hours ago, flyalaska said:
Are you referring to last flights per pilot?
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"
-
1 hour ago, BlackSwan said:
Whate references do you mean?
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);
-
2 hours ago, flyalaska said:
Try this! Just edit the button class to your own if you don't have Bootstrap 4.
<?php $count = 10; $pireps = PIREPData::getRecentReportsByCount($count); ?> <table class="table table-striped mt30" width="100%" cellspacing="0"> <tr> <th>Flight</th> <th>Departure</th> <th>Arrival</th> <th>Aircraft</th> <th>Duration</th> <th>Landing</th> <th>Status</th> </tr> <?php if(count($pireps) > 0) { foreach ($pireps as $pirep) { $pilotinfo = PilotData::getPilotData($pirep->pilotid); $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); $acrid = OperationsData::getAircraftByReg($pirep->registration); echo '<tr>'; echo '<td><a href="'.SITE_URL.'/index.php/pireps/viewreport/'.$pirep->pirepid.'">'.$pirep->code.$pirep->flightnum.'</a></td>'; echo '<td>'.$pirep->depicao.'</td>'; echo '<td>'.$pirep->arricao.'</td>'; echo '<td>'.$pirep->aircraft.'</td>'; echo '<td>'.$pirep->flighttime.'</td>'; echo '<td>'.$pirep->landingrate.' ft/m</td>'; if($pirep->accepted == PIREP_ACCEPTED) echo '<td><button type="button" class="btn btn-outline btn-success btn-xs mb-2">Flight Approved</button></td>'; elseif($pirep->accepted == PIREP_REJECTED) echo '<td><button type="button" class="btn btn-outline btn-danger btn-xs mb-2">Flight Rejected</button></td>'; elseif($pirep->accepted == PIREP_PENDING) echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">Approval Pending</button></td>'; elseif($pirep->accepted == PIREP_INPROGRESS) echo '<td><button type="button" class="btn btn-outline btn-primary btn-xs mb-2">On Progress</button></td>'; echo '</tr>'; } } else { echo '<tr><td>There are no recent flights!</td></tr>'; } ?> </tbody> </table> <div class="clear"></div> <div class="clear"></div>
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 -
3 hours ago, flyalaska said:
Try taking off the <?php right above the if($report->accepted == PIREP_ACCEPTED)
Thanks, unfortunately it doesn't work
Multiple Airlines Huge Schedules Database
in Support Forum
Posted · Edited 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