Вход Регистрация
Файл: forgot.php
Строк: 67
<?
session_start
();
$font='<font color="#ffd022">';
$fend='</font>';
include (
"header.php");
if (empty(
$mod)) $mod="form";
$date=date("Ymd");
switch (
$mod) {
               case 
"form":

 echo 
$div["im"];
   echo 
"<img src="/logo.gif" alt=""/><br/>";
 echo 
$div["end"];

 echo 
$div["okcent"];

 echo 
$div["gif"];

           echo 
$div["div"];
           if (
$_SESSION['wap']!="xml") {echo "---<br/>";}
           echo 
$div["end"];
           if (
$_SESSION['wap']=="xml")
           {
 echo 
$div["ten"];
echo 
'<center>';
           echo 
"<form action="forgot.php?mod=reg&amp;".session_name()."=".session_id()."" method="post">";
           echo 
"Введите логин: <br/>";
           echo 
"<input class="ibutton" name="login" maxlength="12" title="Text"/><br/>";
           echo 
"Введите e-mail: <br/>";
           echo 
"<input class="ibutton" name="mail" type="text"/><br/><br/>";
           echo 
"<input class="ibutton" type="submit" value="Напомнить"/>";
           echo 
"</form>";
echo 
'</center>';
           echo 
$div["end"];
           }
           else
           {
           echo 
"Введите логин: <br/>";
           echo 
"</small><input name="login" maxlength="12" title="Text"/><br/><small>";
           echo 
"Введите e-mail: <br/>";
           echo 
"</small><input name="mail" type="text"/><br/>";
           echo 
"<anchor title="send">Напомнить<go href="reg.php?mod=reg&amp;".session_name()."=".session_id()."" method="post">";
           echo 
"<postfield name="login" value="$(login)"/>";
           echo 
"<postfield name="mail" value="$(mail)"/>";
           echo 
"</go></anchor><br/>";
           }

if (
$_SESSION['wap']!="xml") {echo "---<br/>";}
           
 break;

           case 
"reg":

 echo 
$div["im"];
   echo 
"<img src="/logo.gif" alt=""/><br/>";
 echo 
$div["end"];

 echo 
$div["okcent"];

 echo 
$div["gif"];

           echo 
$div["ten"];
           
$login=htmlspecialchars(stripslashes(trim($login)));
           
$mail=str_replace("$","$$",$mail);
           if(empty(
$error)) $error='';
           if(empty(
$login)) $error='Не введен логин!<br/>';
       
$q=mysql_query("select* from `uzvers` where `log`='$login';");
$row=mysql_fetch_array($q);
$emailr=$row['email'];
$pass=$row['psss'];
if (
$mail!=$emailr)
{
$error=$error.'Неверно указан е-мэйл!<br/>';
}

           if(empty(
$mail)) $error=$error.'Не указан адрес e-mail!<br/>';
           if(empty(
$error))

{
include (
"func/forgot.php");
echo 
"Пароль успешно выслан на ваш e-mail<br/>";
        }
else
{
        echo 
$error;
echo 
$div["end"];
 echo 
$div["ten"];
    echo 
"<a href="forgot.php?mod=form&amp;".session_name()."=".session_id()."">Повторить</a><br/>";
}
echo 
$div["end"];
           break;
           }
echo 
$div["end"];
           echo 
$div["ten"];
           echo 
"<a href="index.php?".session_name()."=".session_id()."">На главную</a><br/>";
echo 
$div["end"];

include (
"footer.php");
?>
Онлайн: 2
Реклама