File size: 1.12Kb
<?php
include "shapka.php";
switch($mod){
case "ok":
if($mess==""){
print $header;
print 'Вы не указали сообщение!<br/>';
print $footer;
exit();}
if($name==""){
print $header;
print 'Вы не указали Имя!<br/>';
print $footer;
exit();}
$headers = "From: [email protected] - xTLT.org <[email protected]>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Transfer-Encoding: 8bit\r\n";
$headers .= "Content-Type: text/plain; charset=\"utf-8\"\r\n";
$headers .= "X-Mailer: PHP v.".phpversion();
$subject=$sait;
mail($komy, $subject, $mess, $headers);
print $header;
print 'Сообщение успешно отправлено!';
print $footer;
break;
default:
include "shapka.php";
print $header;
print '<div class="bblockin">'.$mail.'</div>
<form action="mail.php?mod=ok&komy='.$mail.'" method="post"/>
<div class="bblockin">Ваше Имя:</div>
<input name="name"/>
<div class="bblockin">Ваш Email:</div>
<input name="ot"/>
<div class="bblockin">Сообщение:</div>
<input name="mess"/><br/>
<input type="submit" value="Отправить"/><br/>
';
print $footer;
break;}
?>