// CATCH ERRORS if (count($failedRecips) != 0) { $err_msg = "These addresses failed: " . print_r($failedRecips, true) . " Original message:<br/>" . $email_msg; } elseif (!$num_sent || $num_sent == 0) { $err_msg = "Log: " . $logger->dump() . " Original message:<br/>" . $email_msg; } else { $err_msg = 0; } if ($errs != 0) { $swift_errs = $swiftObj->createPlainMsg('additional pay form email error', '*****@*****.**', '*****@*****.**', '', $errs); $num_sent2 = $mailer->send($swift_errs, $failedRecipients); } //MSG FOR SUBMITTER Utilities::msg_alert("Form submitted successfully.", ""); Utilities::go_to("index.php"); // ======================================================================================== // DATA FAILED VALIDATION - ERROR OUT // ======================================================================================== } else { Utilities::err_alert("One or more form fields failed validation.", $err_msg); } } //end spam check } catch (Exception $e) { echo $e->getMessage(); echo "<br/>"; exit; } ?>
$page_view->displayScrollToTop(); // Jquery and Bootstrap CDN $page_view->includeJavascripts(); // Form UI and Validation $page_view->includeFormScripts(); ?> <!-- // ================================================================================== CUSTOM JAVASCRIPTS <!-- // ================================================================================== --> <!-- Standard JS --> <script src="http://www.facilities.rochester.edu/scripts/scripts.js"></script> <!-- Custom JS --> <script src="./js/custom_scripts.js"></script> </body> </html> <?php //close all connections $stmt2 = null; $conn2 = null; $conn = null; } catch (Exception $e) { Utilities::msg_alert($e->getMessage(), ""); Utilities::close(); //closes window opened by alert exit; } ?>