Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. I think what you are looking for shows up in the route_map.tpl view. The data for the map is being passed to that view using one of two variables depending on where the map is displayed, ($pirep or $schedule) $pirep is being used when looking at the flight details accessed from the frontpage. You should be able to get the data off that page with $pirep->arricao and $pirep->depicao. If you are trying to get the data from the db and use it in your own page you should use $mydata = PIREPData::getReportDetails($pirepid); The $priepid id the db id # of the prirep you are trying to get data for. Once you have that you can do a print_r($mydata); to see all the fields that are available, which are a ton including the aircraft data, airfields, pilot, etc... Hope this helps.
  2. New England Virtual has been re-released after almost a year of changes and additions including: AIRMail internal messaging system Screenshot gallery with uploading, approval, and rating functions Real world dispatch system with schedules only being available if that aircraft is at that airfield Charter center with over 300 aircraft and 42000 destinations for pilots to create their own charter Vatsim data feed with total online and company pilots online EXAMCenter testing and training system TOPPilot monthly pilot rating system FAA delay live feed Completely revamped pilot dashboard Thanks go out to Nabeel for the excellent system that has made building addons a pleasure. You can check us out at New England Virtual
  3. What I have found is instead of intergrating phpVMS with another system, wether it be joomla, e107, a forum board, or any other system, is to do as Nabeel has said and match the templates. You can see an example on my site where I have matched the templates for both phpvms and an smf forum board. New England Virtual I am working on the template for my joomla site to match these as well.
  4. The function to extract the landing rate is now built into the ACARS module as of the newest release. There is a new column in the pireps table now called landingrate, so it is now just a coding issue to extract and display the data from the table.
  5. It is set to bring the newest post to the top of the forum but to have it marked a different color or bolded will take quite a bit more coding. I do not know if I will extend the code any further than what it is now, I have gotten my hands into a few too many projects....
  6. It uses a second template for the PIREPs list -> pireps_viewall.tpl
  7. By count <?php $pireps = PIREPData::getRecentReportsByCount('20'); //20 = # of records foreach($pireps as $pirep) { echo $pirep->depicao.'-'.$pirep->arricao.','; } ?> By days <?php $pireps = PIREPData::getRecentReports('2'); // 2 = # of days foreach($pireps as $pirep) { echo $pirep->depicao.'-'.$pirep->arricao.','; } ?> not sure what you mean here... the pirep route map shows the dep and arr already.........
  8. You should just be able to give the path like -> include'forum/includes/yourfile.php'; If you need to move up to a directory above your phpVMS install you can add ../ for each directory up you need to go. include'../forum/includes/yourfile.php';
  9. How about -> <?php $pilots = PIREPData::getAllReportsForPilot(Auth::$userinfo->pilotid); foreach($pilots as $pilot) { echo $pilot->depicao.' - '.$pilot->arricao.'<br />'; } ?> That will give you something like -> KPQI - KBOS KBOS - KATL KORD - KDEN KDEN - KMSP KBUF - KBOS KBOS - KPHL KDEN - KMSP KORD - KDEN KOWD - KBDL KBOS - KACK KBOS - KLAX
  10. I guess I dont get it. Isn't the point of inactivating a pilot that has not flown is the simple fact that they are not participating? I think if they want to get back into the va they should have to work a little, ie - emailing the ceo or hr director with a reason why they want to come back. If you dont want any requirement to come back or to be a member, why inactivate them in the first place? Just my 2cents....
  11. Folks, there are hundreds, if not thousands of sites offering code to create drop down menus. Some places to start.... css drop down menus http://www.cssmenumaker.com/ http://www.cssmenus.co.uk/ and my favorite for js type menus http://www.dynamicdrive.com/dynamicindex1/index.html and if all else fails Drop Down Menu Search
  12. You easiest fix for what you want is to go ahead and create your own sql function to call the data in the order you want it for that list only.
  13. Uncomment lines 267 thru 271 in your Auth.class.php file and it will disable logins for retired pilots.
  14. Is this a dedicated server? If so what you are showing should be working. If it is a shared server your database and username are probably appended by "username_" If it is free hostsing the db probably resides on another server all together and will need to have a url to connect.
  15. Hey guys, the date for bids is stored simply as a date so it is tough to comapre a 24 hour period but you can comapre if it is the next day or not. If you put this code at the start of your schedule_results.tpl file it will to see how old any filed bids are. Having the time comparison set at 86400 (1 day in seconds) will erase any bid that was filed two days ago. ie - any bid made on 2-20-2010 will be erased on 2-22-2010, so you could have an active bid for 47 hours.. You can change that number to 0, but that may not be desireable either. An example using 0 - any bid made on 2-20-2010 would be erased on 2-21-2010. so a bid could only last 1 second, if it were to be filed right before midnight on 2-20-2010 it would be erased the next time the script ran on 2-21-2010. <?php $bids = SchedulesData::getAllBids(); $today = date("Y-m-d"); if(isset($bids)) { foreach($bids as $bid) { $date1 = $bid->dateadded; $date2 = strtotime($today); $dateArr = explode("-",$date1); $date1Int = mktime(0,0,0,$dateArr[1],$dateArr[2],$dateArr[0]) ; $diff = ($date1Int-$date2); if ($diff < -86400) {SchedulesData::removeBid($bid->bidid);} } } ?> This code would be better placed in the index function of the Schedules.php file but you would have to replace it every time you updated..... good luck! -
  16. Move it within the foreach like this -> <ul> <?php foreach($allawards as $award){ ?> <li><?php echo $award->name ?></li> <li><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></li> <?php } ?>
  17. http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm
  18. Without creating another module or a new page for your site you can open pilots.php in your core/modules/pilots folder and find the index section -> public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if(!$allhubs) $allhubs = array(); foreach($allhubs as $hub) { $this->set('title', $hub->name); $this->set('icao', $hub->icao); $this->set('allpilots', PilotData::findPilots(array('p.hub'=>$hub->icao))); $this->render('pilots_list.tpl'); } $nohub = PilotData::findPilots(array('p.hub'=>'')); if(!$nohub) { return; } $this->set('title', 'No Hub'); $this->set('icao', ''); $this->set('allpilots', $nohub); $this->render('pilots_list.tpl'); } and change it to public function index() { $this->set('allpilots', PilotData::getAllPilots()); $this->render('pilots_list.tpl'); } Just remember when you update this will be overwritten to the default structure. You would be better served to create a new page and/or module.
  19. You can put that line of code <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> anywhere within the foreach command for the awards section, or you can leave it right where it is for it to work as well but the biggest thing is that you need to get the /* and */ from around it, that is telling the browser to ignore everything inside of the comments marks - ie "it is commented out". Also you should create a folder in the lib/skins folder for your own skin with your own name to place your edited templates in, otherwise when you do an update the templates, and all your work, will be overwritten.
  20. In the default schedule_results.tpl file find lines 73 & 74 -> /* THIS BEGINS ONE TABLE ROW */ ?> Make a new blank line between the rows and insert -> if(Auth::LoggedIn()) { if($route->code <> Auth::$userinfo->code) { continue; } } This will only show the routes for the same airline that the logged in user is a member of but still show all the routes for someone who is not logged in and just browsing the schedules. Hope this helps.
  21. Your page is good. I think it is how you are calling it. Are you still using the address as www.yoursite.com/index.php/pilots ? If so, you are calling the functions within the module which will seperate the pilots into hubs everytime. Best bet is to create a new path to the page. Either using the page function in admin or through a new module. I pasted your code into a blank page without using the pilots module and it works fine... Hope this helps a little.
  22. A search finds this -> http://forum.phpvms.net/topic/751-released-pilot-self-activation-module/
  23. In schedule_results.tpl you will have to use an if command to display only the flights that match. Maybe somethng like <?php if($route->code == $userinfo->code) { "show the route" } ?>
×
×
  • Create New...