//Create Error Logger $logger = new Swift_Plugins_Loggers_ArrayLogger(); $mailer->registerPlugin(new Swift_Plugins_LoggerPlugin($logger)); $swiftObj = new SwiftMail(); // ==================================================================================== // EMAIL TO ADMIN ASSISTANT // ==================================================================================== $subject = "Request for Temp " . ucfirst($response); $swift_super = $swiftObj->createHTMLMsg($subject, '*****@*****.**', '*****@*****.**', '', $email_msg); //$swift_super = $swiftObj->createHTMLMsg($subject , '*****@*****.**', '*****@*****.**', '', $email_msg); //so special characters ( ) do not come out all garbled (weird characters) $swift_super->setCharset('UTF-8'); $num_sent = $mailer->send($swift_super, $failedRecipients); $errs = $swiftObj->getErrors($failedRecipients, $num_sent, $logger, $email_msg); if ($errs != 0) { $swift_errs = $swiftObj->createPlainMsg('temp hire response email error', '*****@*****.**', '*****@*****.**', '', $errs); $num_sent2 = $mailer->send($swift_errs, $failedRecipients); } //MSG FOR SUBMITTER Utilities::msg_alert("Form submitted successfully.", ""); Utilities::go_to("index.php"); } //end spam check } catch (Exception $e) { echo $e->getMessage(); echo "<br/>"; exit; } ?>
throw new Exception("Error fetching data - PDO::errorInfo(): " . print_r($conn->errorInfo(), true)); } //check if already responded if (!IS_NULL($row['date_of_response'])) { Utilities::msg_alert("This request was already processed and the notices were sent out.", ""); $disabled = 'disabled'; } // ======================================================================================= // // GET REASONS // ======================================================================================= // //to get number of rows $sql_count = "SELECT COUNT(*) FROM request WHERE request_id = {$reqID}"; $result = $conn->query($sql_count); if ($result->fetchColumn() == 0) { Utilities::msg_alert("No matching record in database", "Access Denied"); Utilities::go_to("http://www.facilities.rochester.edu/apps/request_for_temp/index.php"); } else { //GET REASONS $reasons = array(); $sql2 = "SELECT reason_id FROM request_reason WHERE request_id = {$reqID}"; $stmt2 = $conn->prepare($sql2); $stmt2->execute(array($reqID)); while ($row2 = $stmt2->fetch(PDO::FETCH_ASSOC)) { $reasons[] = $row2['reason_id']; } // ================================================================================== // BOOTSTRAP PAGE TOP WITH NAVIGATION // ================================================================================== $page_view = new PageView(); $page_view->createHTMLHead('Additional Pay Form::Facilities and Services:: University of Rochester'); echo "<body class='home blue'>";