
lanousbh
Members-
Posts
27 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
Recent Profile Visitors
11120 profile views
lanousbh's Achievements
Newbie (1/14)
0
Reputation
-
Hi, I'm not the best at coding but I would like to know if anyone knows a function that will count all live flight from the acars db and put it in a number. For example if the acars map shows 6 flight I would like the function to show 6 Thanks
-
So does anyone knows how to solve the profile editing problems, and all Java problems?
-
Of course yes!
-
Dosn't work on my side... I get No aircraft available No airport available I have the latest module downloaded on GitHub today and the database installed from the SQL file provided
-
As you said Swan it tried to repeat the template for each HUB, so I got ride of this. To make the code above work you gotta edit the module Pilots.php Here is the code of the file: <?php class Pilots extends CodonModule { public function index() { $this->set('pilot_list', PilotData::getAllPilots()); $this->render('pilots_list.tpl'); } public function reports($pilotid='') { if($pilotid == '') { $this->set('message', 'No pilot specified!'); $this->render('core_error.php'); return; } $this->set('pireps', PIREPData::GetAllReportsForPilot($pilotid)); $this->render('pireps_viewall.php'); } /* Stats stuff for charts */ public function statsdaysdata($pilotid) { $data = PIREPData::getIntervalDataByDays(array('p.pilotid'=>$pilotid), 30); $this->create_line_graph('Past 30 days PIREPs', $data); } public function statsmonthsdata($pilotid) { $data = PIREPData::getIntervalDataByMonth(array('p.pilotid'=>$pilotid), 3); $this->create_line_graph('Monthly Flight Stats', $data); } public function statsaircraftdata($pilotid) { $data = StatsData::PilotAircraftFlownCounts($pilotid); if(!$data) $data = array(); include CORE_LIB_PATH.'/php-ofc-library/open-flash-chart.php'; $d = array(); foreach($data as $ac) { OFCharts::add_data_set($ac->aircraft, floatval($ac->hours)); } echo OFCharts::create_pie_graph('Aircraft Flown'); } protected function create_line_graph($title, $data) { if(!$data) { $data = array(); } $bar_values = array(); $bar_titles = array(); foreach($data as $val) { $bar_titles[] = $val->ym; $bar_values[] = floatval($val->total); } OFCharts::add_data_set($bar_titles, $bar_values); echo OFCharts::create_area_graph($title); } public function RecentFrontPage($count = 5) { $this->set('pilots', PilotData::GetLatestPilots($count)); $this->render('frontpage_recentpilots.php'); } } then for the pilots_list.php <?php require 'app_top.php' ?> <section class="content-header"> <h1>Crew Members</h1> </section> <section class="content"> <div class="row"> <div class="col-lg-8"> <div class="box box-primary"> <div class="box-body table-responsive"> <?php if(!$pilot_list) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter table table-hover"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> </div> </div> </div> </section> <?php require 'app_bottom.php' ?>
-
Hi again, Can someone help me I'm trying to make a crew member pages with the default pilots_list.php? Here is the code <?php require 'app_top.php' ?> <section class="content-header"> <h1>Crew Members</h1> </section> <section class="content"> <div class="row"> <div class="col-lg-8"> <div class="box box-primary"> <div class="box-body table-responsive"> <?php if(!$pilot_list) { echo 'There are no pilots!'; return; } ?> <table id="tabledlist" class="tablesorter table table-hover"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> </div> </div> </div> </section> <?php require 'app_bottom.php' ?>
-
Thanks a lot! works perfect
-
Hi all, am I the only one who doesn't have the login kind of still box for the registration page? Here is the link to the page http://skyline-va.esy.es/index.php/registration
-
Got this error Notice: The template file "/home/swissint/public_html//lib/skins/Ocean_Blue 2/header.php" doesn't exist in /home/swissint/public_html/core/classes/TemplateSet.class.php on line 231 I'm with the latest simpilot PHP version of PHPVMS
-
Is there a way to show the rank needed to fly the selected aircraft?
-
Solved it was because there were no equipment in the schedule
-
Are you continuing the development? If yes can you make a french version I can help you with the translation just make a list of the word you need and I'll sent it to you