-
Posts
2773 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by simpilot
-
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.
-
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....
-
Adding some custom css to the pilots public profile
simpilot replied to mark1million's topic in Support Forum
It uses a second template for the PIREPs list -> pireps_viewall.tpl -
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.........
-
Nice Work!
-
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';
-
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
-
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....
-
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
-
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.
-
Uncomment lines 267 thru 271 in your Auth.class.php file and it will disable logins for retired pilots.
-
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.
-
Bids - Cancellation at the end of 24 hours
simpilot replied to CEO North Air's topic in Support Forum
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! - -
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 } ?>
-
http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm
-
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.
-
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.
-
Multiple Airlines - how to limit flights?
simpilot replied to CEO North Air's topic in Support Forum
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. -
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.
-
Welcome Aboard Sean!
-
A search finds this -> http://forum.phpvms.net/topic/751-released-pilot-self-activation-module/
-
Multiple Airlines - how to limit flights?
simpilot replied to CEO North Air's topic in Support Forum
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" } ?> -
Look for lines 80-82 in your pilot profile template (profile_main.tpl) the instructions are there. It needs to be uncommented and placed where you would like it to display. /* To show the image: <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> */
-
In your local.config.php file add the following line -> Config::Set('PIREPS_ORDER_BY', 'p.submitdate ASC');
-
Nice work!