/**
  * CentralData::send_vastats()
  * 
  * @return
  */
 public static function send_vastats()
 {
     if (!self::central_enabled()) {
         return false;
     }
     if (self::$debug === false) {
         $within_timelimit = CronData::check_hoursdiff('update_vainfo', self::$limits['update_vainfo']);
         if ($within_timelimit == true) {
             return false;
         }
     }
     self::startBody('update_vainfo');
     self::addElement(null, 'pilotcount', StatsData::PilotCount());
     self::addElement(null, 'totalhours', StatsData::TotalHours());
     self::addElement(null, 'totalflights', StatsData::TotalFlights());
     self::addElement(null, 'totalschedules', StatsData::TotalSchedules());
     $all_news = SiteData::getAllNews();
     if (count($all_news) > 0) {
         $news_parent = self::addElement(null, 'newsitems');
         foreach ($all_news as $news) {
             $body = str_ireplace('<br>', "\n", $news->body);
             $body = str_ireplace('<br />', "\n", $body);
             $body = htmlentities(strip_tags($body));
             $news_xml = self::addElement($news_parent, 'news', null, array('id' => $news->id, 'subject' => $news->subject, 'body' => $body, 'postdate' => $news->postdate, 'postedby' => $news->postedby));
         }
     }
     # Some of the settings
     self::addElement(null, 'livefuel', Config::Get('FUEL_GET_LIVE_PRICE'));
     # Package and send
     CronData::set_lastupdate('update_vainfo');
     return self::sendToCentral();
 }
 public static function send_vastats()
 {
     if (!self::central_enabled()) {
         return false;
     }
     if (self::$debug === false) {
         $within_timelimit = CronData::check_hoursdiff('update_vainfo', self::$limits['update_vainfo']);
         if ($within_timelimit == true) {
             return false;
         }
     }
     self::set_xml('update_vainfo');
     self::$xml->addChild('pilotcount', StatsData::PilotCount());
     self::$xml->addChild('totalhours', StatsData::TotalHours());
     self::$xml->addChild('totalflights', StatsData::TotalFlights());
     self::$xml->addChild('totalschedules', StatsData::TotalSchedules());
     # Expenses stuff
     /*$exp_data = FinanceData::getExpensesForMonth(time());
     		self::$xml->addChild('expenses', $exp_data->total);
     		self::$xml->addChild('expensescost', $exp_data->cost);*/
     # Some of the settings
     self::$xml->addChild('livefuel', Config::Get('FUEL_GET_LIVE_PRICE'));
     # Package and send
     CronData::set_lastupdate('update_vainfo');
     return self::send_xml();
 }
Example #3
0
<br />
		<strong>Total Flights: </strong><?php 
echo StatsData::TotalFlights();
?>
<br />
		<strong>Total Hours Flown: </strong><?php 
echo StatsData::TotalHours();
?>
	</td>
	<td valign="top" width="33%" nowrap="nowrap" >
		<strong>Miles Flown: </strong><?php 
echo StatsData::TotalMilesFlown();
?>
<br />
		<strong>Total Schedules: </strong><?php 
echo StatsData::TotalSchedules();
?>
<br />
		<strong>Flights Today: </strong><?php 
echo StatsData::TotalFlightsToday();
?>
	</td>
	</tr>
</table>
<?php 
MainController::Run('Dashboard', 'CheckInstallFolder');
echo $updateinfo;
?>
<h3>Pilot Reports for the Past Week</h3>
<div align="center" style="width=98%">
	<div id="reportcounts" align="center" width="400px" >