Вход Регистрация
Файл: lost_pass.php
Строк: 148
<?
##################################################################################################
##                        Version  :  4.0 (28.04.2007)                                                                                                                                                                                                                  ##
##                       Made by  :  Neformat                                                                                                                              ##
##                             ICQ  :  209534802                                                                                                                           ##
## По вопросам приобритения скрипта или обновлений для него обращатьтся на вышеуказанные данные.                                                                            ##
## Распространение скрипта другими лицами запрешено. Скрипт защищён законом об авторском праве.                                         ##                                         
##################################################################################################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");
$ref rand(100001000000);
require(
"inc.php");
$link connect_db();

if(!isset(
$go)){
if (
$ver=="wml"){
echo 
$xml;
echo 
$dtd;
echo 
"<wml>";
echo 
"<card id="cabinet" title="Система РІРѕСЃСЃС‚ановления РїР°СЂРѕР»СЏ">";
echo 
"<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">";
echo "<html xmlns="http://www.w3.org/1999/xhtml">";
echo "<head><link rel="stylesheet" type="text/css" href="css/css.css"/>";
echo 
"<title>Система РІРѕСЃСЃС‚ановления РїР°СЂРѕР»СЏ</title>";
echo 
"<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"/></head><body>";
echo 
"<div align="center">";
echo 
"<form method="POST" action="lost_pass.php?ver=$ver&amp;go=lost_pass&amp;$ses&amp;ref=$ref" name="auth">n"
}
echo 
"<small>";
echo 
"РќРёРє РёР»Рё ID:<br/>n";
echo 
"</small>";
echo 
"<input name="nick" maxlength="13" title="lost_pass"/><br/>n";
echo 
"<small>";
echo 
"Транслитирация РЅРёРєР°:<br/>n";
echo 
"</small>";
echo 
"<select name="trun">n";
echo 
"<option value="0">Нет</option>n";
echo 
"<option value="1">Да</option>n";
echo 
"</select><br/>n";
if (
$ver=="wml"){
echo 
"<small>";
echo 
"<anchor title="go">Выслать РїР°СЂРѕР»СЊ<go href="lost_pass.php?ver=$ver&amp;go=lost_pass&amp;$ses&amp;ref=$ref" method="post">n";
echo 
"<postfield name="nick" value="$(nick)"/>n";
echo 
"<postfield name="trun" value="$(trun)"/>n";
echo 
"</go></anchor>n";
echo 
"</small>";
echo 
"<br/>";
}else{
echo 
"<input type="submit" value="Выслать РїР°СЂРѕР»СЊ" name="enter"><br/>n";
}
if (
$ver=="wml")echo "</p></card></wml>";
else echo 
"</div></body></html>";
mysql_close ($link);
exit;
}

if(@
$go == "lost_pass"){       
if (!
ctype_digit($nick)) {
if(
$trun==1)$nick=trun_to_rus($nick);
$nick=trim($nick);    
$post=trim($post);
if(
$nick=="")$nick=0;
$latuser=strtolower($nick);
$ruser rus_to_k($nick);
if(
$ruser==$nick){
$select mysql_query ("Select id,user,mail,pass from users where latuser = '".$latuser."'"); 
} else {
$select mysql_query ("select id,user,mail,pass from users where ruser = '".$ruser."'");
}
} else {
$select mysql_query ("select id,user,mail,pass from users where id = '".$nick."'");
}
if (
mysql_affected_rows() == 0){
if (
$ver=="wml"){
echo 
$xml;
echo 
$dtd;
echo 
"<wml>";
echo 
"<card id="error" title="Ошибка" ontimer="lost_pass.php?$ses&amp;ref=$ref"><timer value="15"/>";
echo 
"<p align="center">";
}else{
echo 
"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">";
echo "<html xmlns="http://www.w3.org/1999/xhtml">";
echo "<head><link rel="stylesheet" type="text/css" href="css/css.css"/>";
echo 
"<title>Ошибка</title>";
echo 
"<META HTTP-EQUIV="Refresh" CONTENT="2URL=lost_pass.php?$ses&amp;ref=$ref">";
echo 
"<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"/></head><body>";
echo 
"<div align="center">";
}
echo 
"<small>";
echo 
"Юзер РЅРµ РЅР°Р№РґРµРЅ. Р’РѕР·РјРѕР¶РЅРѕ РЅРёРє СѓРґР°Р»С‘РЅ.<br/>";
echo 
$divide;
echo 
"<a href="lost_pass.php?$ses&amp;rm=$rm&amp;ref=$ref">Назад</a><br/>n";
echo 
"</small>";
if (
$ver=="wml")echo "</p></card></wml>";
else echo 
"</div></body></html>";
mysql_close ($link);
exit;    
}
$inf mysql_fetch_array ($select);
$usid $inf["id"];
$nick $inf["user"];
$to $inf["mail"];
$pass $inf["pass"];

if (
$ver=="wml"){
echo 
$xml;
echo 
$dtd;
echo 
"<wml>n";
echo 
"<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n";
echo 
"<card id="results" title="Найдено">n";
echo 
"<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">";
echo "<html xmlns="http://www.w3.org/1999/xhtml">";
echo "<head><link rel="stylesheet" type="text/css" href="css/css.css"/>";
echo 
"<title>Найдено</title>";
echo 
"<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8"/></head><body>";
echo 
"<div align="center">";
}
if (
$to==""){
echo 
"<small>";
echo 
"E-M@il РїСЂРё СЂРµРіРёСЃС‚рации РЅРµ Р·Р°РїРѕР»РЅРµРЅ.<br/>";
echo 
"Восстановление РїР°СЂРѕР»СЏ РЅРµРІРѕР·РјРѕР¶РЅРѕ.<br/>";
echo 
"</small>";
}else{
echo 
"<small>";
echo 
"Пароль РІС‹СЃР»Р°РЅ РїРѕР»СЊР·РѕРІР°С‚елю <b>".$nick."</b> РЅР° СЌР».почту ".$to.".<br/>";
echo 
"</small>";
$adds "From: Record<Bce-ok@bk.ru> n"
$adds .= "X-sender: < Bce-ok@bk.ru >n";
$adds .= "Content-Type: text/plain; charset=koi8-rn";  
@
$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 ");
@
$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); 
@
$mailstr_replace("\", "", $mail);
$now= date("j-m-Y");
$subject = "Система восстановления пароля чата Record";
$body = "$now n Выили кто-нибудь другойпытались восстановить пароль n в чате Пароль $passn вы можете воспользоваться автологином http://адрес.чата/enter.php?ver=$ver&amp;id=$usid&amp;ps=$pass";
$body convert_cyr_string($body'w','k');
$subject convert_cyr_string($subject'w','k');
mail($to,$subject,$body,$adds);
}
echo 
"<small>";
echo 
$divide;
echo 
"<a href="index.php?ver=$ver">Главная</a><br/>n";
echo 
"</small>";
if (
$ver=="wml")echo "</p></card></wml>";
else echo 
"</div></body></html>";
mysql_close ($link);
exit;
}
?>
Онлайн: 1
Реклама