예제 #1
0
     $message .= "=======================================================\n\n";
     $message .= "Submitted At:\t\t" . date("r", time()) . "\n";
     $message .= "Submitted By:\t\t" . $fullname . " [" . (isset($_POST["hide_identity"]) ? "withheld" : $_SESSION["details"]["username"]) . "]\n";
     $message .= "E-Mail Address:\t\t" . $email_address . "\n\n";
     $message .= "Comments / Feedback:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= clean_input($_POST["feedback"], array("trim", "emailcontent")) . "\n\n";
     $message .= "Web-Browser / OS:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= clean_input($_SERVER["HTTP_USER_AGENT"], array("trim", "emailcontent")) . "\n\n";
     $message .= "URL Sent From:\n";
     $message .= "-------------------------------------------------------\n";
     $message .= (isset($_SERVER["HTTPS"]) ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"] . clean_input($extracted_information["url"], array("trim", "emailcontent")) . "\n\n";
     $message .= "=======================================================";
     $mail->setBodyText($message);
     if ($mail->Send()) {
         echo "<h4>Feedback Submission Successful</h4>";
         add_success("Thank-you for providing us with your valuable feedback.<br /><br />Once again, thank-you for using our automated anonymous feedback system and feel free to submit comments any time.");
         echo display_success();
         echo "<div style=\"text-align:right;\"><input type=\"button\" class=\"btn\" value=\"Close\" /></a>";
     } else {
         add_error("We apologize however, we are unable to submit your feedback at this time due to a problem with the mail server.<br /><br />The system administrator has been informed of this error, please try again later.");
         echo display_error();
         application_log("error", "Unable to send anonymous feedback with the anonymous feedback agent.");
     }
 } else {
     add_error("We apologize however, we are unable to submit your feedback at this time due to a problem with the mail server.<br /><br />The system administrator has been informed of this error, please try again later.");
     echo display_error();
     application_log("error", "An error ocurred when trying to send feedback to agent [" . $WHO . "], no recipients found in language file.");
 }
 break;