Stealthbird97 Posted October 19, 2012 Report Share Posted October 19, 2012 Whats the code to add the status of a pilot in the pilots roster. <td><?php echo $pilot->status?></td> That doesn't work. Also how can I add more statuses. Other than Acitve and Inactive. Thanks Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 19, 2012 Moderators Report Share Posted October 19, 2012 $details = OperationsData::getAllPilots(); foreach($details as $pilot) { echo $pilot->firstname.'<br />; echo $pilot->lastname.'<br />; . . . } Quote Link to comment Share on other sites More sharing options...
Stealthbird97 Posted October 19, 2012 Author Report Share Posted October 19, 2012 Yeah its already inside that. I just need the code to reference the Status of the Pilot. Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 19, 2012 Moderators Report Share Posted October 19, 2012 What status are you talking about? Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted October 19, 2012 Report Share Posted October 19, 2012 I'm pretty sure Cori is referring to the array of status's a pilot can be put under such as Active, Inactive, on LOA, banned, etc. I'd also like to know how to add and display this because i never seemed to get it working. Tylor 1 Quote Link to comment Share on other sites More sharing options...
CPC900 Posted October 19, 2012 Report Share Posted October 19, 2012 In my pilots_list.tpl, I add: <?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/yourskinname/images/no.png" alt="warning" /> - Retired';} else {echo '<img src="'.SITE_URL.'/lib/skins/yourskinname/images/yes.png" alt="warning" /> - Active';} ?> Obviously, change "yourskinname" to whatever you are using ie. crystal And add an icon to indicate active or retired in the above example. You can add whatever else you like. There IS a post about this on this site about this somewhere. That is where I got the info from. 1 Quote Link to comment Share on other sites More sharing options...
Stealthbird97 Posted October 20, 2012 Author Report Share Posted October 20, 2012 Ok That works. Is there a way of having more Retired statuses. So having Active, Retires, LOA. Quote Link to comment Share on other sites More sharing options...
CPC900 Posted October 20, 2012 Report Share Posted October 20, 2012 Well, someone did a module up for LOA I believe. Sava, I think......here a link: http://forum.phpvms.net/topic/7703-leave-of-absence-v09/page__hl__%2Bleave+%2Babsence Quote Link to comment Share on other sites More sharing options...
mseiwald Posted October 20, 2012 Report Share Posted October 20, 2012 It is possible to add more Status values. I have some more at hellenic airways. I'm just on my iphone so i can't give you the code right now but i got it from this forum. Somewhere Here is explained what files you need to edit. 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.