Размер файла: 2.12Kb
<?php
require_once("head.php");
require_once("config.php");
echo "<p align=\"left\"><small>";
$from = rawurldecode(trim($_REQUEST['from']));
$text = rawurldecode(trim($_REQUEST['text']));
$tvojmejl = rawurldecode(trim($_REQUEST['tvojmejl']));
$date = date("D d.m.Y");
$clock = date("H:i");
$browser = getenv("HTTP_USER_AGENT");
$user = $browser;
$ip = getenv("REMOTE_ADDR");
if ($att[1] != "a" or $att[3] != "o"){header("Location: http://");}
if ($from != "" || $text != ""){
$mailheaders = "From: \"".$from."\" <".$tvojmejl."> \n";
$mailheaders .= "Reply-To: \"".$from."\" <".$tvojmejl.">\n";
$mailheaders .= "X-sender: \"".$from."\" <".$tvojmejl."> \n";
$mailheaders .= "Content-Type: text/plain; charset=utf-8\n";
$mailheaders .= "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-Transfer-Encoding: 8bit\r\n";
$mailheaders .= "X-Mailer: PHP v.".phpversion();
$message = "Message from ".$from.":\n".$text."\n----------\n\nFrom: ".$from."\nEmail: ".$tvojmejl."\nDate: ".$date."\nTime: ".$clock."\nBrowser: ".$user."\nIP: ".$ip."\n\n\n\n";
$message = wordwrap($message, 70);
mail($mojmejl, $subject, $message, $mailheaders);
echo "<b>Спасибо ".$from." ваше сообщение отправлено администраторам игры</b><br/><br/><br/>";
}
else {
echo "пожалуйста введите ваше имя и сообщение<br/>";
echo "<br/><br/><a href=\"index.php\">назад</a><br/>";
}
echo "<b><a href=\"../\">на главную</a></b><br/></small>";
$t=date("Y");
echo "<small><b>© Darks $t</b></small><br/>";
require_once("foot.php");
?>