-
Posts
20 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by chilemugriento
-
-
Hi, thank you for that possible solution, but still don´t works.
Is there other solution ?
Best regards
-
SOLVED....
Since 2006 our VA had FSPassengers reports
Total Flights: 39122
Total Passengers: 3,422,452
Total freight: 165 960 327 kg / lbs 365 879 868
averaging the data shown above where
freight (lbs) / pax = 106.90577048268 (lbs)
This represents the average weight per luggage per passenger. With this total number of flights, I believe that the sample is statistically representative and very close to reality.
Now, to represent this variable within the phpvms in regular passenger flights, we have to perform a mathematical operation. I used the vStatsCenter module to show cargo transported on flights that are not Freight and Cargo
Here we go:
This is for THIS MONTH values
align="center"> <table
<thead>
? <th colspan="8"> <Center> SELECTED STATISTICS MONTH <BR> <php echo $ month_name = date ('F', mktime (0, 0, 0, $ month)); ?> - <Php echo $ year;> </ h3> <Center> </ th>?
<tr>
<th> <Center> <img src="yoursite.JPG"> <Center> Flights </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Passengers </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Load </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Hours </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Miles </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Fuel </ th>
<th> <Center> <img src="yoursite.JPG"> <Center> Land </ th>
</ tr>
</ thead>
<tbody>
<tr>
<td align="center"> <? php echo $ flightcount;> </ td>
<td align="center"> <? php echo number_format ($ passengers);> </ td>
<td align="center"> <? php echo number_format (($ passengers) * (107))> lbs </ td>
<td align="center"> <php echo substr ($ flighthours, 0, 6); > </ td>
<td align="center"> <? php echo number_format ($ flightmiles)> mn </ td>
<td align="center"> <? php echo number_format ($ flightfuel)> lbs </ td>
<td align="center"> <? php echo round ($ avglanding)> ft / min </ td>
<td colspan="7"> </ td>
</ tbody>
</ table> </ p> <BR><BR><BR>
The value 107 can be modified according to characteristics of each VA.
You can use 100 lbs per passenger, 75, 60, 120, etc.
The load data can also be displayed in an additional table that represents the accumulated reports or Pireps that exist in the database
</tbody>
</table></p><BR><BR><BR><BR><BR><BR><h3 align="center">ACUMULATED FROM JANUARY 2006 UNTIL TODAY</h3><BR><BR>
<table align="center">
<thead>
<th colspan="9"><Center>OPERACIONES AEREAS<Center></th>
<tr>
<th><Center><img src="yoursite.JPG">Vuelos</th>
<th><Center><img src="yoursite.JPG">Pasajeros</th>
<th><Center><img src="yoursite.JPG">Carga</th>
<th><Center><img src="yoursite.JPG">Horas</th>
<th><Center><img src="yoursite.JPG">Millas</th>
<th><Center><img src="yoursite.JPG"...bustible</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><?php echo number_format(StatsData::TotalFlights()); ?><br />
<td align="center"><?php echo number_format(StatsData::totalpaxcarried()); ?><br />
<td align="center"><?php
$query="SELECT SUM(`load`)*(107) as totalfreight FROM `phpvms_1pireps` WHERE `flighttype`='P' OR `flighttype`='C' OR `flighttype`='H' ";
$result=DB::get_results($query);
echo number_format ($result[0] ->totalfreight); ?> lbs<br />
<td align="center"><?php echo number_format (StatsData::TotalHours())?> <?php echo hrs; ?><br />
<td align="center"><?php echo number_format(StatsData::totalmilesflown()); ?> mn<br />
<td align="center"><?php echo number_format(StatsData::totalfuelburned(), 0); ?> lbs<br />
<td colspan="9"></td>
</tbody>
</table></p><BR><BR><BR><BR><BR>
furthermore, they can be displayed on the PILOT profile.tpl
</table><BR><BR><BR><BR>
<h3 align="center">PRODUCTIVIDAD</h3>
<table align="center">
<thead>
<th colspan="5"><Center>Totales Acumulados<Center></th>
<tr>
<th><Center><img src="yoursite.JPG">Vuelos</th>
<th><Center><img src="yoursite.JPG">Pasajeros</th>
<th><Center><img src="yoursite.JPG"><Center>Horas de vuelo</th>
<th><Center><img src="yoursite.JPG">Recorridas</th>
<th><Center><img src="yoursite.JPG">Carga</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><?php echo number_format ($userinfo->totalflights)?></td>
<td align="center"><?php echo number_format (getTotalPassengersPilot());?></td>
<td align="center"><?php echo number_format ($userinfo->totalhours); ?> hrs</td>
<td align="center"><?php echo number_format (getTotalMilesPilot());?> mn</td>
<td align="center"><?php echo number_format (getTotalPassengersPilot()*(107));?> lbs</td>
<td colspan="5"></td><BR>
</tbody>
</table>
Hope this will be helpfull for your VA
Best Regards
-
Hi Gentlemen
Have vAwards, in profile main and pilot public profile, and admin every works perfect,
but dont show issued awards inserted in index tpl from vStatsCenter with this code:
<table align="center">
<thead>
<th colspan="4"><Center>AWARDS OTORGADOS<Center></th>
<tr>
<th><Center><img src="http://surair.com.mx/phpvms/lib/images/estadisticas/id.jpg"><Center>Matricula</th>
<th><Center><img src="http://surair.com.mx/phpvms/lib/images/estadisticas/piloto.jpg"><Center>Piloto</th>
<th><Center><img src="http://surair.com.mx/phpvms/lib/images/estadisticas/award.jpg"><Center>Award</th>
<th><Center><img src="http://surair.com.mx/phpvms/lib/images/estadisticas/mes.jpg"><Center>Fecha</th>
</tr>
</thead>
<tbody>
<?php
if(!$awards)
{
?>
<tr><td colspan="4"><Center>No se han otorgado Awards este mes<Center></td></tr>
<?php
}
else
{
foreach($awards as $awd)
{
?>
<tr>
<td align="center"><a href="<?php echo url('/profile/view/'.$awd->pilotid);?>"><?php echo PilotData::GetPilotCode($awd->code, $awd->pilotid);?></a></td>
<td align="center"><?php echo $awd->firstname . ' ' . $awd->lastname; ?></td>
<td align="center"><?php echo $awd->name;?></td>
<td align="center"><?php echo date("F j, Y", $awd->dateissued); ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
Have granted awards this month but dont appear
Thanks for your help
-
Thank you, very, very much !!!!!
Solved.
-
-
We offer awards if pilots reach 15 flights per month in 3 consecutive months
http://www.surair.com.mx/pilotos/salon
If we can acces to that info, issue wil be simple.
Thanks.
-
Hi Vangelis, Thanks for reply.
Error in line 72 gone, but still not working, because displays VA Total Flights this month, not per pilot.
Take a look from General Statistics and Pilot´s Stats :
http://www.surair.co...p/vStatsCenter/ (first table, last column)
http://www.surair.co...ndex.php/pilots (last column) (had same value as above)
-
in which file or where can i find Month name ?
Want to translate from English to our native language.
Best regards
-
Wrote a script to get VA total flights current month
This for StatsData.class
/**
* Return the number of flights current month
*
* @return int Total number of flights
*
*/
public static function Totalflightscurrentmonth($airline_code='')
{
$key = 'total_flights_month';
if($airline_code != '')
{
$key .= '_'.$airline_code;
}
$total = CodonCache::read($key);
if($total === false)
{
$sql = 'SELECT COUNT(*) AS `total`
FROM '.TABLE_PREFIX.'pireps p
WHERE month(p.submitdate) = month(now())
AND year(p.submitdate) = year(now())';
$result = DB::get_row($sql);
if(!$result)
{
$total = 0;
}
else
{
$total = $result->total;
}
CodonCache::write($key, $total, '15minute');
}
return $total;
}
and this for Index.tpl from vStatsCenter
<?php echo StatsData::Totalflightscurrentmonth(); ?>
And working fine :)
but want to show Total Flights This Month for each pilot, in pilots_list.tpl
<?php echo StatsData::Totalflightscurrentmonth()($pilot->pilotid) ?>
but had an error
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /home/surair/public_html/phpvms/core/templates/pilots_list.tpl on line 72
Any help would be appreciated
Best regards.
-
SOLVED !!!!
Here is:
function getTotalPassengersPilot()
{
$query = "SELECT SUM(`load`) AS passengers FROM ".TABLE_PREFIX."pireps WHERE pilotid = ".Auth::$userinfo->pilotid." AND accepted = 1";
$result = DB::get_row($query);
if (!$result) return 0;
return ($result->passengers == '') ? 0 : $result->passengers;
}
and
<?php echo number_format (getTotalPassengersPilot());?>
Best regards
-
I noticed some kind of bug
Total time per aircraft stops at 838:59:59 hrs (same as Virtual Airline total flight time in FSPassengers default table)
http://www.surair.com.mx/phpvms/index.php/Fleet
Any solution ?
I will apreciate help.
Best regards
-
Its a code inserted into pilot_list tpl
-
Gentlemen, hi again:
i wrote this code to show total passengers carried by pilot
<?php
$query = "SELECT SUM(load) as totalpax FROM phpvms_1pireps WHERE pilotid = '$pilotid' ";
$result=DB::get_results($query);
echo $result[0]->totalpax; ?></td>
Dont work,
Any help is welcome.
Best regards.
-
[sOLVED] Good day,
Finally can made script myself http://www.surair.co...p/vStatsCenter/
Here is, hope will be useful for every interested
(noticed table prefix, mine is phpvms_1pireps)
<table align="center">
<thead>
<th colspan="5"><Center>PIREPS Y ACARS<Center></th>
<tr>
<th><Center><img src="http:/yoursite"><Center>FSPassengers</th>
<th><Center><img src="http:/yoursite"><Center>Xacars</th>
<th><Center><img src="http:/yoursite"><Center>Kacars</th>
<th><Center><img src="http:/yoursite"><Center>FSAcars</th>
<th><Center><http:/yoursite"><Center>FSCaptain</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><?php
$query="SELECT COUNT(*) as totalfsp FROM `phpvms_1pireps` WHERE `source`='fspax'";
$result=DB::get_results($query);
echo $result[0]->totalfsp; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalxac FROM `phpvms_1pireps` WHERE `source`='xacars'";
$result=DB::get_results($query);
echo $result[0]->totalxac; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalkac FROM `phpvms_1pireps` WHERE `source`='kacars'";
$result=DB::get_results($query);
echo $result[0]->totalkac; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalfsac FROM `phpvms_1pireps` WHERE `source`='fsac'";
$result=DB::get_results($query);
echo $result[0]->totalfsac; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalfscap FROM `phpvms_1pireps` WHERE `source`='fscap'";
$result=DB::get_results($query);
echo $result[0]->totalfscap; ?></td>
<td colspan="5"></td>
</tbody>
</table>
<table align="center">
<thead>
<th colspan="5"><Center><Center></th>
<tr>
<th><Center><img src="http:/yoursite"><Center>FS Flight Keeper</th>
<th><Center><img src="http:/yoursite"><Center>APVacars</th>
<th><Center><img src="http:/yoursite"><Center>CAVacars</th>
<th><Center><img src="http:/yoursite"><Center>SUR AIR Report</th>
<th><Center><img src="http:/yoursite"><Center>Otros</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><?php
$query="SELECT COUNT(*) as totalfsfk FROM `phpvms_1pireps` WHERE `source`='fsfk'";
$result=DB::get_results($query);
echo $result[0]->totalfsfk; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalapv FROM `phpvms_1pireps` WHERE `source`='apv'";
$result=DB::get_results($query);
echo $result[0]->totalapv; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalcav FROM `phpvms_1pireps` WHERE `source`='cav'";
$result=DB::get_results($query);
echo $result[0]->totalcav; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalfpr FROM `phpvms_1pireps` WHERE `source`='fpr'";
$result=DB::get_results($query);
echo $result[0]->totalfpr; ?></td>
<td align="center"><?php
$query="SELECT COUNT(*) as totalotro FROM `phpvms_1pireps` WHERE `source`='otro'";
$result=DB::get_results($query);
echo $result[0]->totalotro; ?></td>
<td colspan="5"></td>
</tbody>
</table></p><BR><BR>
Best regards
-
Good day Gentlemen.
Still working on my VA,
Noticed in Pirep table there is a column called source. So added in customfileds table, new item, called "Simulator" with a dropdown menu for: FS9, FSX, Xplane, Prepare3D (this are for registration form)
Want to active a table in VA Statistic to show those parameters, total numbers of every Simulator and total numbers of Pirep System
Example:
SIMULATOR PIREP
FS9 (120) FSPASSENGERS (170)
FSX (185) FS FLIGHT KEEPER (8)
XPLANE (16) FSACARS (14)
PREPARE3D (12) XACARS (97)
KACARS (16)
FSCAPTAIN (3)
PILOT REPORT (25)
TOTAL (333) TOTAL (333)
Table already build, (copy from pilots by country) trying to put the code by myself, with no results.
http://www.surair.co...th=06&year=2014
Somebody can help me with this code ?
Thank you very much !!!!
Best regards.
-
sorry, wrong url, my apologize
This are (confirmed)
www.surair.com.mx
www.surair.com.mx/phpvms (by the moment, altough register is enabled, dont accept pilots until FSP database is full instaled into phpvms)
I will try your directions and post my results, hope can do it, otherwise, will contact you again for furhter help.
Best regards.
-
Mr Vangelis, Thank you !!!!
Before you make a lot of work for me (apreciated), i wonder if a empty template CSV (like import schedules template) could be enough .
I can get data from FSP tables (by column) and copy - paste to template CSV, then import to phpvms.
It will work ?
You can help me with template or a simple or automated script as you said.
BTW: this is our site
www.surairmexico.com.mx
www.surairmexico.com.mx/phpvms
Best regards
-
Thanks for reply.
This is my work by now:
Exported FSP flights table as sql, CSV for Excel and PHP array as well. Same job for phpvms_pireps and compare them.
Not match at all !!!! Values and syntax are diferent.
Any sugestion ?
Thank you !!
-
Good day gentlemen:
Congratulations for this phpvms and this forum, glad to be here.
Our VA works with FSPassengers since 8 years ago with over 38300 pireps, but want to add phpvms for other acars, pireps system and flightsim as well.
Is it posible swap or migrate FSPassengers flights and user tables to phpvms ? Dont want to lose pilots records.
Regards.
[SOLVED] Pirep Chart
in Support Forum
Posted
Thank you for this helpful tip.
Any chance to solve this ?
Best regards