Jump to content

jamyboy

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by jamyboy

  1. Module which one Link please?
  2. btw can you please help me in this http://forum.phpvms.net/topic/9193-search-schedules-by-airlines/
  3. Dear folks i am willing to put search function by airlines please help this what i have in schedule_searchform.tpl <h3>Search Schedules</h3> <?php if(Auth::LoggedIn()) {?>[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]<form id="form" action="<?php echo actionurl('/schedules/view');?>" method="post">[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]<div id="tabcontainer"> <ul> <li><a href="#depapttab"><span>By Departure Airport</span></a></li> <li><a href="#arrapttab"><span>By Arrival Airport</span></a></li> <li><a href="#aircrafttab"><span>By Aircraft Type</span></a></li> <li><a href="#distance"><span>By Distance</span></a></li> </ul> <div id="depapttab"> <p>Select your departure airport:</p> <select id="depicao" name="depicao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div> <div id="arrapttab"> <p>Select your arrival airport:</p> <select id="arricao" name="arricao"> <option value="">Select All</option> <?php if(!$depairports) $depairports = array(); foreach($depairports as $airport) { echo '<option value="'.$airport->icao.'">'.$airport->icao .' ('.$airport->name.')</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div> <div id="aircrafttab"> <p>Select aircraft:</p> <select id="equipment" name="equipment"> <option value="">Select equipment</option> <?php if(!$equipment) $equipment = array(); foreach($equipment as $equip) { echo '<option value="'.$equip->name.'">'.$equip->name.'</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div> <div id="distance"> <p>Select Distance:</p> <select id="type" name="type"> <option value="greater">Greater Than</option> <option value="less">Less Than</option> </select> <input type="text" name="distance" value="" /> <input type="submit" name="submit" value="Find Flights" /> </div>[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]<div id="airline"> <p>Select Airline:</p> <p><b>This feature is under construction. Check back soon! AFVA Management. </b></p> <select id="airline" name="airline"> <option value="">Select Airline</option> <?php $allairlines = OperationsData::GetAllAirlines(true); foreach($allairlines as $airline) { echo '<option value="'.$airline->code.'">'.$airline->name.'</option>'; } ?> </select> <input type="submit" name="submit" value="Find Flights" /> </div> </div>[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]<p> <input type="hidden" name="action" value="findflight" /> </p> </form> <script type="text/javascript">[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]</script> <hr> <?php } ?>[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2] Schedules.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 Schedules extends CodonModule { public function index() { $this->view(); } public function view() { if(isset($this->post->action) && $this->post->action == 'findflight') { $this->FindFlight(); return; } $this->showSchedules(); } public function detail($routeid='') { $this->details($routeid); } public function details($routeid = '') { //$routeid = $this->get->id; if(!is_numeric($routeid)) { preg_match('/^([A-Za-z]{3})(\d*)/', $routeid, $matches); $code = $matches[1]; $flightnum = $matches[2]; $params = array('s.code'=>$code, 's.flightnum'=>$flightnum); } else { $params = array('s.id' => $routeid); } $schedule = SchedulesData::getScheduleDetailed($routeid); $this->set('schedule', $schedule); $this->render('schedule_details.tpl'); $this->render('route_map.tpl'); } public function brief($routeid = '') { if($routeid == '') { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $schedule = SchedulesData::getScheduleDetailed($routeid); $this->set('schedule', $schedule); $this->render('schedule_briefing.tpl'); } public function boardingpass($routeid) { if($routeid == '') { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.tpl'); return; } $schedule = SchedulesData::getScheduleDetailed($routeid); $this->set('schedule', $schedule); $this->render('schedule_boarding_pass.tpl'); } public function bids() { if(!Auth::LoggedIn()) return; $this->set('bids', SchedulesData::GetBids(Auth::$userinfo->pilotid)); $this->render('schedule_bids.tpl'); } public function addbid() { if(!Auth::LoggedIn()) return; $routeid = $this->get->id; if($routeid == '') { echo 'No route passed'; return; } // See if this is a valid route $route = SchedulesData::findSchedules(array('s.id' => $routeid)); if(!is_array($route) && !isset($route[0])) { echo 'Invalid Route'; return; } CodonEvent::Dispatch('bid_preadd', 'Schedules', $routeid); /* Block any other bids if they've already made a bid */ if(Config::Get('DISABLE_BIDS_ON_BID') == true) { $bids = SchedulesData::getBids(Auth::$userinfo->pilotid); # They've got somethin goin on if(count($bids) > 0) { echo 'Bid exists!'; return; } } $ret = SchedulesData::AddBid(Auth::$userinfo->pilotid, $routeid); CodonEvent::Dispatch('bid_added', 'Schedules', $routeid); if($ret == true) { echo 'Bid added'; } else { echo 'Already in bids!'; } } public function removebid() { if(!Auth::LoggedIn()) return; SchedulesData::RemoveBid($this->post->id); }[/size][/font][/color] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]public function showSchedules() { $depapts = OperationsData::GetAllAirports(); $equip = OperationsData::GetAllAircraftSearchList(true); $this->set('depairports', $depapts); $this->set('equipment', $equip); $this->render('schedule_searchform.tpl'); # Show the routes. Remote this to not show them. $this->set('allroutes', SchedulesData::GetSchedules()); $this->render('schedule_list.tpl'); } public function FindFlight() { if($this->post->depicao != '') { Template::Set('allroutes', SchedulesData::GetRoutesWithDeparture($this->post->depicao)); } if($this->post->arricao != '') { Template::Set('allroutes', SchedulesData::GetRoutesWithArrival($this->post->arricao)); } if($this->post->equipment != '') { Template::Set('allroutes', SchedulesData::GetSchedulesByEquip($this->post->equipment)); } if($this->post->distance != '') { if($this->post->type == 'greater') $type = '>'; else $type = '<'; Template::Set('allroutes', SchedulesData::GetSchedulesByDistance($this->post->distance, $type)); } if($this->post->airline!= '') { $routes = SchedulesData::GetSchedulesWithCode($this->post->airline, true); Template::Set('allroutes', $routes); } Template::Show('schedule_results.tpl'); } public function statsdaysdata($routeid) { $routeinfo = SchedulesData::findSchedules(array('s.id'=>$routeid)); $routeinfo = $routeinfo[0]; // Last 30 days stats $data = PIREPData::getIntervalDataByDays( array( 'p.code' => $routeinfo->code, 'p.flightnum' => $routeinfo->flightnum, ), 30); $this->create_line_graph('Schedule Flown Counts', $data); } protected function create_line_graph($title, $data) { if(!$data) { $data = array(); } $titles = array(); $bar_titles = array(); foreach($data as $val) { $titles[] = $val->ym; $values[] = floatval($val->total); } OFCharts::add_data_set($titles, $values); echo OFCharts::create_line_graph($title); } } please need solution error Fatal error: Call to undefined method SchedulesData::GetSchedulesWithCode() in/home/james/public_html/jetblue/core/modules/Schedules/Schedules.php on line 205
  4. yea sure can you plz give me your email iD?
  5. i have cleared the cache 2 times and also done recounting from maintenance options with no luck dont no where exactly is the problem what causing not to display stats accurately any IDEA?
  6. again same problem remains anyone can help please why all stats showing zero. this code is in frontpage_main.tpl should i have to put in layout.tpl? <div align="center"> <table class="qtable" width="200px" style="margin-left:-4px;"> <tbody> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Flights Today</strong> </div></td><br /> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::totalflightstoday(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Flights</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::TotalFlights(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Registrations Status</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="success label">OPEN</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Pilots</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label">375</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Passengers Carried</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalPaxCarried (); ?></span></div></td> </tr><tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Aircraft</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalAircraftInFleet () ; ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Schedules</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalSchedules (); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Pending Applications</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="alert label"><?php echo count(PilotData::GetPendingPilots())?></span></div></td>
  7. again same problem remains anyone can help please why all stats showing zero. this code is in frontpage_main.tpl should i have to put in layout.tpl? <div align="center"> <table class="qtable" width="200px" style="margin-left:-4px;"> <tbody> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Flights Today</strong> </div></td><br /> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::totalflightstoday(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Flights</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label"><?php echo StatsData::TotalFlights(); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Registrations Status</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="success label">OPEN</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Pilots</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="center"><span class="label">375</span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Passengers Carried</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalPaxCarried (); ?></span></div></td> </tr><tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Aircraft</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalAircraftInFleet () ; ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Total Schedules</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="label"><?php echo StatsData::TotalSchedules (); ?></span></div></td> </tr> <tr> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"> <strong>Pending Applications</strong> </div></td> <td style="border-bottom:1px dashed #CDCDCD;"><div align="left"><span class="alert label"><?php echo count(PilotData::GetPendingPilots())?></span></div></td>
  8. SOLVED THANKS GOT THE SOLUTION FROM HERE http://forum.phpvms.net/topic/5049-airline-logos-on-flights-completed-solved/#entry33796
  9. Dear Folks i have been messing with this from last 2 hrs or more with no luck i checked the forums as well also with no luck so please help me out. this is the code i am using to display airline logo on latest arrival board <h3 style="text-align: left;">Latest Arrivals</h3> <?php $count = 5; $pireps = PIREPData::getRecentReportsByCount($count); ?> <div style="border:solid 1px #0B3861"> <table class="imagetable2" width="100%" cellpadding="1" cellspacing="0"> <thead> <tr bgcolor="#0B3861"> <th><font color="#ffc600"> Airline</font></th> <th><font color="#ffc600">Flight #</font></th> <th><font color="#ffc600">Departure</font></th> <th><font color="#ffc600">Arrival</font></th> <th><font color="#ffc600">Aircraft</font></th> <th><font color="#ffc600">Duration</font></th> <th><font color="#ffc600">Pilot</font></th> <th><font color="#ffc600">Landing Rate</font></th> <th><font color="#fffc600">Status</font></th> </tr> </thead> <tbody> <?php foreach($pireps as $pirep) { $pilotinfo = PilotData::getPilotData($pirep->pilotid); $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); ?> <tr bgcolor="#D8D8D8"> <td align="center"> <img src="'.fileurl('/lib/images/airline/'.$pirep->code.'.gif').'" alt="'.$airline->name.'" width="127px" height="32px" /></a> </td> <td align="center"><a href="<?php echo url('/pireps/view/'.$pirep->pirepid);?>"><?php echo $pirep->code . $pirep->flightnum; ?></a></td> <td align="center"><?php echo $pirep->depicao; ?></td> <td align="center"><?php echo $pirep->arricao; ?></td> <td align="center"><?php echo $pirep->aircraft . " ($pirep->registration)"; ?></td> <td align="center"><?php echo $pirep->flighttime; ?></td> <td align="center"><?php echo $pilotinfo->firstname . ' ' . $pilotinfo->lastname; ?></td> <td align="center"> <?php echo $pirep->landingrate; ?> </td> i hope some one have solution for this i do not know how write code between <td>CODE</td> to display image for different airlines..... thanks in advance.
  10. thanks a million man rock solid solution worked like a charm........ vangeils SOLVED
  11. Dear Folks i was trying to use pretty photo using jquery to expand Screenshot pics on the same page but unfortunatley i am getting below Error here is my code <b>Click on any image to view fullsize.</b><br /><br /> <?php if (!$screenshots) {echo '<div id="error">There are no screenshots in the database!</div>'; } else { echo '<table class="profiletop">'; $tiles=0; foreach($screenshots as $screenshot) { $pilot = PilotData::getpilotdata($screenshot->pilot_id); if(!$screenshot->file_description) {$screenshot->file_description = 'Not Available';} if ($tiles == '0') { echo '<tr>'; } echo '<td width="25%" valign="top"><br /> Views: '.$screenshot->views.' - Rating: '.$screenshot->rating.'<br /><br /> <a rel="prettyPhoto" href="'.SITE_URL.'/index.php/Screenshots/large_screenshot?id='.$screenshot->id.'"> <img src="'.SITE_URL.'/pics/'.$screenshot->file_name.'" border="0" width="200px" height="150px" alt="By: '.$pilot->firstname.' '.$pilot->lastname.'"/></a> <br /> <u>Submited By:</u> '.$pilot->firstname.' '.$pilot->lastname.' - '.PilotData::getpilotcode($pilot->code, $pilot->pilotid).'<br /> <u>Date:</u> '.date('m/d/Y', strtotime($screenshot->date_uploaded)).'<br /> <u>Description:</u> '.$screenshot->file_description.'<br /><br /> </td>'; $tiles++; if ($tiles == '3') { echo '</tr>'; $tiles=0; } } echo '</table>'; } $navigation = $pagination->create_links(); echo $navigation; ?> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto(); }); </script> </center> quik help will be appreciated thanks
  12. Folks need quick help on my website in Airline stats Flights today and total pilots are showing zero why any suggestions?
  13. To resolve this problem simply open CodonModule.class.php and just after php opening tag add: ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); That's it fixed!
  14. BUMP can anyone please help done everything possible with no luck cant able to receive any emails
  15. Folks just need quick help regarding email function i cannot able to receive any kind of pirep submission email or either contact us email can any one have solution for this. searched the forum didn't find any help so posted Thanks Jeff
  16. Thanks mattia and lorathon above code helped me to resolve the issue of memory limit. Jeff
  17. Dear Fellow Members i am getting this error after login into admin panel can anyone explain why this error in coming. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2323 bytes) in/home/jeffery/public_html/VE/core/classes/ezdb/ezdb_mysql.class.php on line 273 Thanks jeff ISSUE SOLVED
  18. Dear Vanser please update your module to work with 3.0.11 version of PhpBB forums awaiting changes and updation. Thank You James
  19. thanks for providing me the email ID will contact you soon. its a sudden increase in price from $ 39.99 to $ 69.99 the price is bit high the people who are running websites just for flying hobby from their own pocket its a bit costly for them please Re-consider to lower the amount. thanks
  20. Dear turbofandude i would like to suggest you please put contact us page on your website or paste a link for your email ID to ask you general questions regarding Acars program before buying it would be great awaiting reply James
  21. Guys luckily have saved this template here is the new downloading link for template Download Here (Updated) 03/05/2012 Enjoy it mates
  22. thanks for guiding sir fatal error have been gone now by simply putting your command and now its not showing anything on front page just tell me is this code ok to fetch data from database or not if not than just please tell me how to put this code in front_recentdownloads.tpl file <?php if(!$downloads) { echo 'No New Uploads'; return; } foreach($downloads as $download) { ?> <table class="tablesorter" width="100%" cellpadding="0" cellspacing="0" bordercolor="#0B3861"> <tr> <td width="40%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->name?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->description?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->link?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->image?> </div></td> </tr> <?php } ?> </table>
  23. ok simpilot i have tried by my self taken a reference codes from front_recentbids and more and tried to get the result but failed here what i do. i have added your given code in DownloadData.class.php like this public static function get_latest_downloads() { $sql = "SELECT * FROM ".TABLE_PREFIX."downloads ORDER BY id DESC LIMIT 5"; return DB::get_results($sql); } } than after looking the recentbids code i have created a module file with the name FrontDownloads.php and added this code in it. <?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 FrontDownloads extends CodonModule { public function index() { $this->RecentFrontPage(); } public function RecentFrontPage($total=5) { $this->set('lastdownloads', DownloadData::GetLatestDownloads($total)); $this->render('frontpage_recentdownloads.tpl'); } } after that created front_recentdownloads.tpl file and given this code to show on front page. <?php if(!$downloads) { echo 'No downloads have been uploaded'; return; } foreach($downloads as $download) { ?> <table class="tablesorter" width="100%" cellpadding="0" cellspacing="0" bordercolor="#0B3861"> <tr> <td width="40%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->name?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->description?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->link?> </div></td> <td width="31%" style="color: #FFF; background-color:#3584BD;"><div align="left"><?php echo $download->image?> </div></td> </tr> <?php } ?> </table> when checked on the main page got error Fatal error: Call to undefined method DownloadData::GetLatestDownloads() in C:\wamp\www\RVA\core\modules\FrontDownloads\FrontDownloads.php on line 30 i tried now its your turn to show me a way please. james
  24. first of all thank you so much simpilot for helping out but let me say that i am nob in PHP thing instead of making it right i will mess up with files so will request you if you can tell me in very simple version where to put the above code in which data class file and what code should i use on front page or pilot center to fetch the data i would highly appreciate your effort of explaining please. i shall wait for your reply thanks and best regards James
  25. yea jeff you are right but i was thinking to put this on main page would be very easy for me and for pilots it will save lot of time to write about the latest updates in forums in detail thanks any ways. any further idea and help please to make this possible like we can show our recent reports bids so i think it would be possible also but i need help how can i fetch data and what would be the code i shall wait for further replies. good day james
×
×
  • Create New...