Jump to content

chilemugriento

Members
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Mexico

chilemugriento's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you for this helpful tip. Any chance to solve this ? Best regards
  2. Hi, thank you for that possible solution, but still don´t works. Is there other solution ? Best regards
  3. 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
  4. 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
  5. Wonder if someone can fixed this in Vansers´s vAwards Awards displays in vertical position, will be better if in horizontal Best regards
  6. 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.
  7. 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)
  8. in which file or where can i find Month name ? Want to translate from English to our native language. Best regards
  9. 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.
  10. 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
  11. 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
  12. Its a code inserted into pilot_list tpl
  13. 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.
  14. [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
×
×
  • Create New...