thomas2360 Posted April 11, 2011 Report Share Posted April 11, 2011 Hello every one! Can someone help me? In fact, I would like to have a pilot list without hubs. Can someone give a php code for pilot.php in modules? to order my pilots in a single list. I hope you could help me! Thomas Quote Link to comment Share on other sites More sharing options...
Strider Posted April 11, 2011 Report Share Posted April 11, 2011 If you use the search in the forum you will find that this question has been answered and the code posted up. Quote Link to comment Share on other sites More sharing options...
Tomgis34 Posted April 11, 2011 Report Share Posted April 11, 2011 Ok but we haven't find that Quote Link to comment Share on other sites More sharing options...
thomas2360 Posted April 11, 2011 Author Report Share Posted April 11, 2011 Can someone give me a clear instruction with a code? Thank you! Quote Link to comment Share on other sites More sharing options...
Tomgis34 Posted April 11, 2011 Report Share Posted April 11, 2011 Hi, It's urgent, I sincerely ask you to help us Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted April 11, 2011 Moderators Report Share Posted April 11, 2011 It was found in Code Spinets. This is what I have: core>modules>Pilots>pilots.php <?php /** * phpVMS - Virtual Airline Administration Software * Copyright (c) 2008 Nabeel Shahzad * For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ class Pilots extends CodonModule { public function index() { $this->set('allpilots', PilotData::getAllPilots()); $this->render('pilots_list.tpl'); } public function reports($pilotid='') { if($pilotid == '') { $this->set('message', 'No pilot specified!'); $this->render('core_error.tpl'); return; } $this->set('pireps', PIREPData::GetAllReportsForPilot($pilotid)); $this->render('pireps_viewall.tpl'); } /* 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.tpl'); } } That will get rid of the hubs. Quote Link to comment Share on other sites More sharing options...
Tomgis34 Posted April 11, 2011 Report Share Posted April 11, 2011 Thanks very much ! Quote Link to comment Share on other sites More sharing options...
AidasP Posted December 18, 2017 Report Share Posted December 18, 2017 mope, the pilots.php completely ignores me whatever i do Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.