Flightguy123 Posted January 29, 2010 Report Share Posted January 29, 2010 Hi I was wondering how I can get PHPvms to allow only certain pilots with enough hours to fly bigger planes... Meaning like if the Pilot has 0 hours, they can not fly planes like the 777, they need to fly the ATR-72 ect,ect... Thanks Ada Erzurumlu CEO of American Airlines Virtual www.aavirtual.net Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted January 29, 2010 Author Report Share Posted January 29, 2010 Does anyone have any idea how i would do this? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted January 29, 2010 Administrators Report Share Posted January 29, 2010 If you search, there's been a few topics about this Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted January 31, 2010 Author Report Share Posted January 31, 2010 I checked the forums and found his code if(Auth::LoggedIn()) { if(Auth::$userinfo->rank == 'New Hire') { // Skip any B737-800 flights if they're a "New Hire" rank if($route->aircraft == 'B737-800 ') { continue; // This will tell it to skip and move to the next route } } } But I am unable to find out how to put it in, I put in and the whole schedules disapear besides this one route... Which is not supposed to happen. Ada Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 2, 2010 Author Report Share Posted February 2, 2010 Help????? Please did anyone ever find out how to do this??? If you did please respond... or if you have ideas please respond.. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 3, 2010 Administrators Report Share Posted February 3, 2010 Hey, You'll have to modify that code to suit your airline's ranks and aircraft. That was just an example of how to go about doing that Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 3, 2010 Author Report Share Posted February 3, 2010 Yes I ave tried that, but still no luck, it only takes out 1 to 2 routes .... Ada Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted February 3, 2010 Administrators Report Share Posted February 3, 2010 Show your code Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 4, 2010 Author Report Share Posted February 4, 2010 <?php if(!$allroutes) { echo '<p align="center">No routes have been found!</p>'; return; } ?> <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Flight Info</th> <th>Options</th> </tr> </thead> <tbody> <?php foreach($allroutes as $route) { /* Uncomment this code if you want only schedules which are from the last PIREP that pilot filed */ /*if(Auth::LoggedIn())if(Auth::LoggedIn()) { if(Auth::$userinfo->rank == 'Second Lieutenant') { // Skip any B757-200 flights if they're a "Second Lieutenant" rank if($route->aircraft == 'B757-200') { continue; // This will tell it to skip and move to the next route } } } { $search = array( 'p.pilotid' => Auth::$userinfo->pilotid, 'p.accepted' => PIREP_ACCEPTED ); $reports = PIREPData::findPIREPS($search, 1); // return only one if(is_object($reports)) { # IF the arrival airport doesn't match the departure airport if($reports->arricao != $route->depicao) { continue; } } }*/ /* Skip over a route if it's not for this day of week Left this here, so it can be omitted if your VA doesn't use this. Comment out these two lines if you don't want to. */ if(strpos($route->daysofweek, date('w')) === false) continue; /* END DAY OF WEEK CHECK */ /* This will skip over a schedule if it's been bid on This only runs if the below setting is enabled If you don't want it to skip, then comment out this code below by adding // in front of each line until the END DISABLE SCHEDULE comment below If you do that, and want to show some text when it's been bid on, see the comment below */ if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { continue; } /* END DISABLE SCHEDULE ON BID */ /* THIS BEGINS ONE TABLE ROW */ ?> <tr> <td > <a href="<?php echo url('/schedules/details/'.$route->id);?>"><?php echo $route->code . $route->flightnum?><?php echo '('.$route->depicao.' - '.$route->arricao.')'?></a> <br /> <strong>Departure: </strong><?php echo $route->deptime;?> <strong>Arrival: </strong><?php echo $route->arrtime;?><br /> <strong>Equipment: </strong><?php echo $route->aircraft; ?> (<?php echo $route->registration;?>) <strong>Distance: </strong><?php echo $route->distance . Config::Get('UNITS');?> <br /> <strong>Days Flown: </strong><?php echo Util::GetDaysCompact($route->daysofweek); ?><br /> <?php echo ($route->route=='')?'':'<strong>Route: </strong>'.$route->route.'<br />' ?> <?php echo ($route->notes=='')?'':'<strong>Notes: </strong>'.html_entity_decode($route->notes).'<br />' ?> <?php # Note: this will only show if the above code to # skip the schedule is commented out if($route->bidid != 0) { echo 'This route has been bid on'; } ?> </td> <td nowrap> <a href="<?php echo url('/schedules/details/'.$route->id);?>">View Details</a><br /> <a href="<?php echo url('/schedules/brief/'.$route->id);?>">Pilot Brief</a><br /> <?php # Don't allow overlapping bids and a bid exists if(Config::Get('DISABLE_SCHED_ON_BID') == true && $route->bidid != 0) { ?> <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo actionurl('/schedules/addbid');?>">Add to Bid</a> <?php } else { if (Auth::LoggedIn()) { ?> <a id="<?php echo $route->id; ?>" class="addbid" href="<?php echo url('/schedules/addbid');?>">Add to Bid</a> <?php } } ?> </td> </tr> <?php /* END OF ONE TABLE ROW */ } ?> </tbody> </table> <hr> Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 5, 2010 Author Report Share Posted February 5, 2010 Is this code correct?? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 5, 2010 Administrators Report Share Posted February 5, 2010 If you are trying to utilize the section that skips the routes of a 757 unless you are a second lieutenant it is not going to work. You have it all commented out from line 20 to line 58. At line 22 you have a /* which does not get closed until line 50. Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 5, 2010 Author Report Share Posted February 5, 2010 How would I fix this then? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 5, 2010 Administrators Report Share Posted February 5, 2010 How would I fix this then? Uncomment the sections of code you want the browser to see and use. Quote Link to comment Share on other sites More sharing options...
Flightguy123 Posted February 6, 2010 Author Report Share Posted February 6, 2010 Can I see a example of this? I have hardly ever used HTML, PHP, or any other things like this...... In fact we are looking for a website designer ;D Quote Link to comment Share on other sites More sharing options...
TennShadow Posted February 6, 2010 Report Share Posted February 6, 2010 Can I see a example of this? I have hardly ever used HTML, PHP, or any other things like this...... In fact we are looking for a website designer ;D First off, go to http://w3schools.com/ . This place will help you get some of the basics down. You will honestly need to learn a little bit in order to work on your site. Sometimes it's hard to find a webmaster. As for commenting, remove the /* for the code you want to use. 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.