<?PHP /* * AntiSpam Confirmator * * @package AntiSpam Confirmator * @author $Author: sheiko $ * @version $Id: asf_confirm.php, v 1.0 sheiko Exp $ * @since v.1.0 * @copyright (c) Dmitry Sheiko http://www.cmsdevelopment.com */
define("FEEDBACKEMAIL", "info@site.com"); define("HEADERS", "MIME-Version: 1.0\r\nContent-type: text/html; charset=UTF-8\r\n"); define("LETTER_STYLE", "<style>BODY { padding: 10px; }\r\nBODY, TD {font-family: Arial, Tahoma; font-size: 12px; } </style>");
$Error = false; if(!isset($_GET["msgid"])) $Error = "Invalid code of the message"; if(!$Error) { $content = @file_get_contents($_GET["msgid"].".msg"); if(!$content) $Error = "The message doesn't exists"; if(!$Error) { if(!@mail( FEEDBACKEMAIL, "You have got a message", LETTER_STYLE."{$content}" , HEADERS)) $Error = "Can not send the message."; if(!$Error) @unlink($_GET["msgid"].".msg"); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head> <title>AntiSpam Feedback Confirmator</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style> div.asf_form { width: 300px; font-family: Arial, Tahoma; font-size: 12px;} fieldset { border: 1px solid #AAAAAA; padding: 5px; } .asf_error { color: red; } </style>
</head> <body> <div class="asf_form"> <fieldset> <legend> <b>AntiSpam Feedback Confirmator</b> </legend> <?PHP if($Error) print "<div class=\"asf_error\">{$Error}</div>"; else print "Your message has been sent successfully"; ?> </fieldset> </div> </body> </html>
|