// check if offline if ($award->teamNominees()->Offline == 'Y') { // they in a shop so considered offline. need to fix email with all requirements. will need to get from Jamie $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\t<p>" . $award->nominator()->full_name . " has nominated " . $award->teamEmailList . " 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\t<p>Below is the content of the card:</p>\n\t\t\t\t\t\t\t\t\t\t\t<p>" . $award->content . "</p>"; $email = sendEmail($sendEmail, 'T' . $ID); echo "offline email sent to xxexec"; $_SESSION['alreadydone'] = 'yes'; } else { $award->Eaddress = $list->Eaddress; if (filter_var($award->Eaddress, FILTER_VALIDATE_EMAIL)) { $award->subject = "Congratulations, your team has been sent an Our Heroes award with 'A Little Extra'"; $email = sendEcardEmail($award, 'T' . $ID); $_SESSION['alreadydone'] = 'yes'; } else { $email = "fail"; } echo $email; } } //return "approved"; } else { // set approver if approver is SU if ($_SESSION['user']->EmpNum != $award->ApproverEmpNum) { $approver_name = $_SESSION['user']->Fname . ' ' . $_SESSION['user']->Sname; $approver_fname = $_SESSION['user']->Fname; $approver_email = $_SESSION['user']->Eaddress; } else {
$_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 { if (filter_var($_SESSION['nominee']->Eaddress, FILTER_VALIDATE_EMAIL)) { $email = sendEcardEmail($_SESSION['nominee'], $id); } else { $email = "fail"; } echo "email sent to nominee"; } $_SESSION['alreadydone'] = 'yes'; } echo $email; $_SESSION['alreadydone'] = 'yes'; header("Location: nominate-done.php"); } else { header("Location: index.php"); }
$stmt->execute(); //echo $_SESSION['teamnominee']->content; // test if offline if ($list->Offline == 'Y') { // they in a shop so considered offline. need to fix email with all requirements. will need to get wording from Jamie $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\t\t<p>" . $_SESSION['user']->Fname . " has nominated " . $_SESSION['teamnominee']->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\t\t<p>Below is the content of the card:</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p>" . $_SESSION['teamnominee']->content . "</p>"; $email = sendEmail($sendEmail, 'T' . $id); echo "offline email sent to xxexec"; } else { if (filter_var($_SESSION['teamnominee']->Eaddress, FILTER_VALIDATE_EMAIL)) { $_SESSION['teamnominee']->subject = "Congratulations, your team has been sent an Our Heroes award"; $email = sendEcardEmail($_SESSION['teamnominee'], 'T' . $id); echo $email; echo "email sent to teamnominee"; } else { $email = "fail xexec"; } } $_SESSION['alreadydone'] = 'yes'; } } } echo $email; $_SESSION['alreadydone'] = 'yes'; $_SESSION['teamnominee']->teamEmailList = $teamEmailList; header("Location: nominate-team-done.php"); } else {
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'"; $email = sendEcardEmail($award, $ID); $_SESSION['alreadydone'] = 'yes'; } else { $email = "fail"; } echo $email; } return "approved"; } else { // set approver if approver is SU if ($_SESSION['user']->EmpNum != $award->ApproverEmpNum) { $approver_name = $_SESSION['user']->Fname . ' ' . $_SESSION['user']->Sname; $approver_fname = $_SESSION['user']->Fname; $approver_email = $_SESSION['user']->Eaddress; } else { $approver_name = $award->approver()->full_name;