Jump to content

Admin Email Inactive pilots


Tylor Eddy

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

$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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...