Просмотр файла wap_gb/in.php

Размер файла: 2.19Kb
<?php
include'login.php';
$zag='Вход';
include'head.php';
include'functions.php';
include'del_ip.php';

$s='ok';

if(empty($act)){
print'
<small>Ник/ID:</small><br/>
<input name="user" maxlength="10"/><br/>
<small>Пароль:</small><br/>
<input name="passwd" maxlength="10"/><br/>
<small>Вход:</small><br/>
<select name="value">
<option value="1">По нику</option>
<option value="2">По ID</option>
</select><br/><br/>
<small>
<anchor>Войти
<go href="in.php?act=go" method="post">
<postfield name="user" value="$(user)"/>
<postfield name="passwd" value="$(passwd)"/>
<postfield name="value" value="$(value)"/>
</go>
</anchor>
</small>
';
} else {



if(!empty($user) && !empty($passwd)){
if(empty($value)){$value=1;}

if($value==1){
$chk=checkusr($udir,$user);
if(!empty($chk)){
$filechk=file($udir.'/'.$chk);
$filechk=explode('#',$filechk[0]);

if(md5($passwd)==$filechk[1]){
print'<small>Вы успешно авторизовались. Нажмите <a href="./?id='.intval($chk).'&amp;ps='.$passwd.'">далее</a> для входа в гостевую</small>';
} else {print '<small>Неверный логин или пароль</small>'; $s='err';}
} else {print '<small>Неверный логин или пароль</small>'; $s='err';}

} else {

$user=intval($user);
if(file_exists($udir.'/'.$user.'.usr')){
$filechk=file($udir.'/'.$user.'.usr');
$filechk=explode('#',$filechk[0]);

if(md5($passwd)==$filechk[1]){
print'<small>Вы успешно авторизовались. Нажмите <a href="./?id='.$user.'&amp;ps='.$passwd.'">далее</a> для входа в гостевую</small>';
} else {print '<small>Неверный логин или пароль</small>'; $s='err';}
} else {print '<small>Неверный логин или пароль</small>'; $s='err';}
}

} else {print '<small>Неверный логин или пароль</small>'; $s='err';}

}


print'
<small><br/>-----<br/>';

if($s=='err'){print'&lt;-<a href="in.php">Назад</a><br/>';}

print'
&lt;--<a href="./?id='.$id.'&amp;ps='.$ps.'">Гостевая</a><br/>
&lt;---<a href="../">Главная</a></small>';

print $endwml;
?>