Tylor Eddy Posted September 9, 2011 Report Share Posted September 9, 2011 G'day Guys, I was wondering if anyone has tried to make a checkbox under the emails to send out an email to inactive pilots. I'd like to make my HR managers job a little easier, by being able to mass mail pilots that are inactive within the airline. There's an option for active pilots, i would like to know if the same can be done for inactive pilots, any help would be great Basically i want to be able to automatically create and update an inactive pilots group Cheers Tylor Quote Link to comment Share on other sites More sharing options...
tutmeister Posted September 9, 2011 Report Share Posted September 9, 2011 I thought the checkbox for All Pilots included inactive pilots. Looking at the numbers on my site, it seems like it does include inactive members. However, if I'm wrong, you could always create a group to move inactive pilots to manually and phpVMS will automatically create a checkbox for that group under the textarea. Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted September 9, 2011 Author Report Share Posted September 9, 2011 I thought the checkbox for All Pilots included inactive pilots. Looking at the numbers on my site, it seems like it does include inactive members. However, if I'm wrong, you could always create a group to move inactive pilots to manually and phpVMS will automatically create a checkbox for that group under the textarea. That's an alternative, but i really want it to be done automatically to reduce workload Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted October 12, 2011 Author Report Share Posted October 12, 2011 Anyone able to help me with this, i'd also like to add pilots to their respective hub group for emailing too. This would reduce workload and make it a lot easier to keep track of pilots who are in their proper groups, seeing as its difficult to keep track of the groups theyre in manually, and a pilot can easily get missed. If anyone can help me and give me some pointers to learn this more technical side it'd be greatly appreciated. Tylor Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 12, 2011 Administrators Report Share Posted October 12, 2011 You'd have to add a checkbox to that form, then on the submit, depending on what checkbox is selected, use the PilotData::findPilots() function with the appropriate search to filter out the pilots Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted October 12, 2011 Author Report Share Posted October 12, 2011 You'd have to add a checkbox to that form, then on the submit, depending on what checkbox is selected, use the PilotData::findPilots() function with the appropriate search to filter out the pilots G'day Nabeel, I havent done this before, but i've created the checkbox fields, and took a look through the PilotData.class.php, Not sure if i've got it right or not. Here are My Checkboxes: <?php $total = PilotData::findRetiredPilots(); ?> <input type="checkbox" name="groups[]" value="all" />Inactive Pilots (<?php echo $total?> pilots)<br /> <?php $total = PilotData::getAllPilotsByHub(YMML); ?> <input type="checkbox" name="groups[]" value="all" />YMML Hub Pilots (<?php echo $total?> pilots)<br /> <?php $total = PilotData::getAllPilotsByHub(YSSY); ?> <input type="checkbox" name="groups[]" value="all" />YSSY Hub Pilots (<?php echo $total?> pilots)<br /> <?php $total = PilotData::getAllPilotsByHub(YPAD); ?> <input type="checkbox" name="groups[]" value="all" />YPAD Hub Pilots (<?php echo $total?> pilots)<br /> <?php $total = PilotData::getAllPilotsByHub(YPPH); ?> <input type="checkbox" name="groups[]" value="all" />YPPH Hub Pilots (<?php echo $total?> pilots)<br /> <?php $total = PilotData::getAllPilotsByHub(YBBN); ?> <input type="checkbox" name="groups[]" value="all" />YBBN Hub Pilots (<?php echo $total?> pilots)<br /> Here is the Categorise by Hub Section of the PilotData.class.php file in case i messed up: /** * Get all the pilots on a certain hub */ public static function getAllPilotsByHub($hub) { return self::findPilots(array('p.hub'=>$hub)); } Have i done the above correctly ? Thanks for the Reply Tylor Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted October 13, 2011 Administrators Report Share Posted October 13, 2011 $total = count(PilotData::getAllPilotsByHub('YPPH')); Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted October 14, 2011 Author Report Share Posted October 14, 2011 $total = count(PilotData::getAllPilotsByHub('YPPH')); Thanks Nabeel that works great Lastly i would like to categorise active and inactive pilots, currently this is what i have the following: <?php $total = count(PilotData::findRetiredPilots()); ?> <input type="checkbox" name="groups[]" value="all" />Inactive Pilots (<?php echo $total?> pilots)<br /> <?php $total = count(PilotData::findActivePilots()); ?> <input type="checkbox" name="groups[]" value="all" />Active Pilots (<?php echo $total?> pilots)<br /> It only displays 1 pilot as retired when there are around 15 in total. Thanks for the help so far Tylor Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted December 11, 2011 Author Report Share Posted December 11, 2011 I still havent worked out how i can do get the inactive pilots group to work, anyone able to offer any suggestions. On a similar note, i would like to be able to automatically add pilots to a group for their hubs. So when they register, they are placed into a group with the rest of the pilots in that hub. Regards Tylor 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.