foreach ($_SESSION['nominee']->workAward as $key => $value) { if (strstr($key, 'workAward')) { $awardtype = workAwardType($value); echo $awardtype->type; $sendEmail->Content .= ", " . $awardtype->type; } } $sendEmail->Content .= "<br>Award category: " . $_SESSION['nominee']->BeliefID . "</p>\n\t\t\t\t\t\t\t\t\t\t\t<p>Any other nominations awaiting your approval can be found in the <a href='" . HTTP_PATH . "'>My Approvals</a> section of the Our Heroes Portal.</p>\n\t\t\t\t\t\t\t\t\t\t\t<p>Thank you</p>"; $email = sendEmail($sendEmail, $id); $_SESSION['alreadydone'] = 'yes'; } } if ($_SESSION['nominee']->AppEmpNum == $_SESSION['user']->EmpNum) { $_SESSION['nominee']->NomFname = $_SESSION['user']->Fname; $_SESSION['nominee']->subject = "Congratulations, you've been sent an Our Heroes award with 'A Little Extra'"; $_SESSION['nominee']->content = indEcardExtraText($_SESSION['nominee']); } else { $_SESSION['nominee']->subject = "Congratulations, you've been sent an Our Heroes award"; $_SESSION['nominee']->content = indEcardText($_SESSION['nominee']); } // test if offline if ($_SESSION['nominee']->Offline == 'Y') { // need to fix with new requirements $sendEmail = new StdClass(); $sendEmail->emailTo = $xexecEmail; $sendEmail->Cc = '*****@*****.**'; $sendEmail->subject = "Congratulations, you've been sent an Our Heroes award"; $sendEmail->Content = "<p>Hi</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . $_SESSION['user']->Fname . " has nominated " . $_SESSION['nominee']->full_name() . " to receive a Thank you card as part of an Our Heroes Award.</p>\n\t\t\t\t\t\t\t\t\t\t<p>Below is the content of the card:</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . $_SESSION['nominee']->content . "</p>"; $email = sendEmail($sendEmail, $id); echo "offline email sent to xxexec"; } else {
include '../inc/config.php'; $ecard = getNomination($_GET['id']); $ecardImage = str_replace(' ', '-', strtolower($ecard->BeliefID)); ?> <div class="ecardPadding"> <?php $ecard->Fname = getFirstName($ecard->NominatedEmpNum); if ($ecard->Volunteer != '') { $ecard->NomFull_name = $ecard->Volunteer; } else { $ecard->NomFull_name = getName($ecard->NominatorEmpNum); } $ecard->NomFname = getFirstName($ecard->NominatorEmpNum); if ($ecard->littleExtra == 'Yes') { echo indEcardExtraText($ecard); } else { echo indEcardText($ecard); } ?> <p>Thank you and well done!</p> <p><b>Our Heroes Team</b></p> <p class="small">Xexec ref: <?php echo $ecard->ID; ?> </p> </div> <div class="ourheroes"> <img class="emailCruklogo" src="<?php echo HTTP_PATH; ?>
$sendEmail = new StdClass(); $sendEmail->emailTo = $approver_email; $sendEmail->subject = "Confirmation of your approval for a 'Little Extra' award"; $sendEmail->Content = "<p>Dear " . $approver_fname . "</p>\n\t\t\t\t\t\t\t\t\t\t<p>Thank you for approving 'A Little Extra' award for " . $award->nominee()->full_name . ". The details of this award are as follows:<p>\n\t\t\t\t\t\t\t\t\t\t<p>Nominator: " . $award->nominator()->full_name . "<br>\n\t\t\t\t\t\t\t\t\t\tAward Options: " . $awardOptions . "\n\t\t\t\t\t\t\t\t\t\t<br>Award category: " . $award->BeliefID . "</p>\n\t\t\t\t\t\t\t\t\t\t<p>Any other nominations awaiting your approval can be found in the <a href='" . HTTP_PATH . "'>My Approvals</a> section of the Our Heroes Portal.</p>\n\t\t\t\t\t\t\t\t\t\t<p>Thank you</p>"; $email = sendEmail($sendEmail, $ID); $_SESSION['alreadydone'] = 'yes'; } // send email to nominee $award->Fname = $award->nominee()->Fname; if ($award->Volunteer != '') { $award->NomFull_name = $award->Volunteer; } else { $award->NomFull_name = $award->nominator()->full_name; } $award->NomFname = $award->nominator()->Fname; $award->content = indEcardExtraText($award); echo $award->content; // check if offline //print_r($award); if ($award->nominee()->Offline == 'Y') { $sendEmail = new StdClass(); $sendEmail->emailTo = $xexecEmail; $sendEmail->Cc = '*****@*****.**'; $sendEmail->subject = 'E-Card Award Notification'; $sendEmail->Content = "<p>Hi</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . $award->nominator()->full_name . " has nominated " . $award->nominee()->full_name . " to receive a Thank you card as part of an Our Heroes Award.</p>\n\t\t\t\t\t\t\t\t\t\t<p>Below is the content of the card:</p>\n\t\t\t\t\t\t\t\t\t\t<p>" . $award->content . "</p>"; $email = sendEmail($sendEmail, $ID); echo "offline email sent to xxexec"; $_SESSION['alreadydone'] = 'yes'; } else { if (filter_var($award->nominee()->Eaddress, FILTER_VALIDATE_EMAIL)) { $award->subject = "Congratulations, you've been sent an Our Heroes award with 'A Little Extra'";