Вход Регистрация
Файл: region_clean/mail.php
Строк: 138
<?php
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################

require_once "start.php";
require_once 
"sid.php";

header("Cache-Control: no-cache");
if (
$ver == "wml")header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else 
header("Content-Type:text/html; charset=UTF-8");

require_once 
"inc.php";
$link connect_db();
list(
$row$id$ps$fsize1$fsize2) = check_login($link);
require_once 
"version.php";

if (isset(
$go)) {
@
$to str_replace(chr("13"), " "$to);
@
$to str_replace(chr("10"), " "$to);
@
$to str_replace("\n"" "$to);
@
$to str_replace(" ""  "$to);
@
$to=substr($to,0,100);
@
$to str_replace("  "" "$to);
@
$to=ereg_replace(" +"," ",$to);
@
$to trim($to ");
if (!
eregi("^[a-z0-9._-]+@[a-z0-9._-]+.[a-z]{2,4}$"$to)) $err "Неверный формат e-mail адреса";
@
$subject str_replace(chr("13"), " "$subject);
@
$subject str_replace(chr("10"), " "$subject);
@
$subject str_replace("\n"" "$subject);
@
$subject str_replace(" ""  "$subject);
@
$subject str_replace("  "" "$subject);
@
$subject=ereg_replace(" +"," ",$subject);
@
$subject trim($subject ");
@
$subject str_replace(""""$subject);
@
$subject str_replace(""""$subject);
@
$subject str_replace(""""$subject);
@
$subject str_replace(""""$subject);
@
$subject str_replace(""""$subject);
@
$subject str_replace(""""$subject);
@
$subjectstr_replace("\", "", $subject);
@
$mail = str_replace(chr("13"), " ", $mail);
@
$mail = str_replace(chr("10"), " ", $mail);
@
$mail = str_replace("\n", " ", $mail);
@
$mail = str_replace(" ", "  ", $mail);
@
$mail = str_replace("  ", " ", $mail);
@
$mail=ereg_replace(" +"," ",$mail);
@
$mail = trim(" $mail ");
@
$mail = str_replace("", "", $mail);
@
$mail = str_replace("", "", $mail);
@
$mail = str_replace("", "", $mail);
@
$mail = str_replace("", "", $mail);
@
$mail = str_replace("", "", $mail);
@
$mail = str_replace("", "", $mail);
@
$mail= str_replace("\", "", $mail);
@
$body = str_replace(chr("13"), " ", $body);
@
$body = str_replace(chr("10"), " ", $body);
@
$body = str_replace("\n", " ", $body);
@
$body = str_replace(" ", "  ", $body);
@
$body = str_replace("  ", " ", $body);
@
$body=ereg_replace(" +"," ",$body);
@
$body = trim(" $body ");
@
$body = str_replace("", "", $body);
@
$body = str_replace("", "", $body);
@
$body = str_replace("", "", $body);
@
$body = str_replace("", "", $body);
@
$body = str_replace("", "", $body);
@
$body = str_replace("", "", $body);
@
$body= str_replace("\", "", $body);
if (@
$body==="") $err="Не заполнено поле ввода "Письмо"";

if (!isset(
$err)) {
$subject = utf_to_win($subject);
$subject = substr($subject,0,100);
$body = utf_to_win($body);
$body = substr($body,0,1000);
$mail = utf_to_win($mail);
$mail = substr($mail,0,100);
$now = date("j-m-Y");
$body = "You have a letter from$mail n $body n $now n This email sent via the postal service wap-site http://4atlove.ru";
$subject convert_cyr_string($subject'w','k');
$body convert_cyr_string($body'w','k');
$mail convert_cyr_string($mail'w','k');
$adds "From: support@4atlove.ru n";
$adds .= "X-sender: < From: support@4atlove.ru >n";
$adds .= "Content-Type: text/plain; charset=koi8-rn";
mail($to,$subject,$body,$adds);

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo 
"<wml>n
      <head><meta http-equiv="
Cache-Control" content="no-cache" forua="true"/></head>n";
echo 
"<card id="ok" title="ok" ontimer="enter.php?$ses&amp;ref=$ref"><timer value="10"/>n";
echo 
"<do type="prev" label="Назад"><prev/></do>n
      <p align="
center">n";
} else {
echo 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
<html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
      <
title>ОК</title>";
echo "
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=enter.php?$ses&amp;ref=$ref">";
echo "
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>";
echo "
<div align="center">";
}
echo 
$fsize1;
echo '<b>Твоё письмо для '.
$to.' успешно отправлено!</b>';
echo 
$fsize2;
include_once "
foot.php";
exit;
}
}
$yourmail = $row['mail'];
if (strstr(
$yourmail,"<a href=""))
{
$t strpos($yourmail,"">");
$yourmail = substr($yourmail,0,$t);
$e = strlen($yourmail);
$yourmail = substr($yourmail,51,$e);
}

if (
$ver == "wml") {
echo 
$xml;
echo 
$dtd;
echo "
<wml>n
      
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
      
<card id="send" title="Мыло Админу">n
      
<p align="center">n";
} else {
echo "
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <
html xmlns="http://www.w3.org/1999/xhtml">
      <
head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
      <
title>Мыло Админу</title>
      <
meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
      <
div align="center">
      <
form action=mail.php?$ses&amp;go=send method=post title="">n";
}
if (isset(
$err)) echo $err . '<br/>';
$adr = $to;
echo 
$fsize1;
echo 'Кому:<br/>';
echo 
$fsize2;
echo "
<input name="to" maxlength="100" value="$adrtitle="to"/><br/>n";
echo 
$fsize1;
echo 'Тема:<br/>';
echo 
$fsize2;
echo "
<input name="subject" maxlength="100" title="subject"/><br/>n";
echo 
$fsize1;
echo 'Письмо:<br/>';
echo 
$fsize2;
echo "
<input name="body" title="body"/><br/>n";
echo 
$fsize1;
echo 'Твой E-M@il:<br/>';
echo 
$fsize2;
echo "
<input name="mail" maxlength="100" value="$yourmailtitle="body"/><br/>n";
if (
$ver == "wml") {
echo "
<anchor title="Sign">Отправить<go href="mail.php?$ses&amp;rm=$rm&amp;go=send" method="post">n
      
<postfield name="to" value="$(to)"/>n
      
<postfield name="subject" value="$(subject)"/>n
      
<postfield name="body" value="$(body)"/>n
      
<postfield name="mail" value="$(mail)"/>n
      
</go></anchor>n";
echo 
$fsize2;
echo '<br />';
} else {
echo "
<input type=submit class="ibutton" value="Отправить"/></form>n";
}
echo 
$fsize1;
echo 
$divide;
if (
$rm == "enter") {
echo "
<a href="enter.php?$ses&amp;r=$ref">В прихожую</a>n";
} else {
echo "
<a href="chat.php?$ses&amp;rm=$rm&amp;r=$ref">В чат</a>n";
}
echo 
$fsize2;
include_once "
foot.php";
?>
Онлайн: 1
Реклама