<?
@session_start();
require_once('../connect/connect.php');
include_once('../lib/lib.php');
$bp="../";
$reload = intval($_REQUEST['reload']);
$MM_redirectLoginSuccess = "b_user.php";
$action = $_SERVER['PHP_SELF'];
if ((isset($_REQUEST["MM_logn"])) && ($_REQUEST["MM_logn"] == "logn"))
{
if ((!empty($_REQUEST['email'])) && (!empty($_REQUEST['pass'])))
{
$email=trim(anti($_REQUEST['email']));
$pass=trim(anti($_REQUEST['pass']));
$r_log = mysql_query("SELECT * FROM akk WHERE email='".$email."' and pass='".$pass."'");
$n_log = mysql_num_rows($r_log);
$rr_log = mysql_fetch_array($r_log);
if ($n_log>0)
{
$_SESSION['ID_P']=array(
1=>$rr_log['id_akk'],
2=>md5($_SERVER['REMOTE_ADDR']),
3=>$rr_log['contakt']
);
if($rr_log['blok']==2) {echo "<h1>ВАШ АККАУНТ ЗАБЛОКИРОВАН</h1>"; unset($_SESSION['ID_P']); exit();}
if($rr_log['blok']==0) {echo "<h1>ВАШ АККАУНТ ЕЩЕ НЕ АКТИВИРОВАН</h1>"; unset($_SESSION['ID_P']); exit();}
if($rr_log['blok']==1)
{
?>
<script>
var re = <?=$reload?>;
var per;
if(re) per = parent.window.location+'&re='+re;
else per = '<?=$MM_redirectLoginSuccess?>';
parent.window.location=per;
parent.$.fancybox.close();
</script>
<?
}
}
else
{
$err = 'Неверный email или пароль<br><a class="iframe" href="logpass_zab.php">Забыли пароль?</a>';
}
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Вход</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="nofollow" />
<link rel="stylesheet" href="../style/style.css" type="text/css">
<link rel="stylesheet" type="text/css" href="../style/jquery.fancybox.css" media="screen" />
<script type="text/javascript" charset="utf-8" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="../js/jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript" src="../js/fancy.js"></script>
</head>
<body>
<table width=100%>
<tr height=64>
<td width=64>
<h1 align="center" style="color:#008cc3">Вход</h1>
<img class="fig" border=0 src="<?=$bp?>icon/8.gif">
<tr>
<td colspan=2>
<?
if($err) echo "<p><font color=red>".$err."</font></p>";
?>
<form name="form1" method="POST" action="<?=$action?>">
<table>
<tr>
<td align="right" width="150">
E-mail
<td>
<input name="email" type="text" size="20" style="padding:7px;border: 1px solid #B5B8C8;">
<tr>
<td align="right" >
Пароль
<td>
<input name="pass" type="password" size="20" style="padding:7px;border: 1px solid #B5B8C8;">
<tr>
<td align="right" >
<input class="submit" type="submit" name="Submit" value="Войти в личный кабинет">
<input type="hidden" name="MM_logn" value="logn">
<input type="hidden" name="reload" value="<?=$reload?>">
<tr>
<td colspan=2>
<a style="margin-left:145px; margin-right:5px" href="logpass_zab.php?reload=<?=$reload?>"class="top1">Забыли пароль?</a> <a href="registr.php?reload=<?=$reload?>"class="top1">Регистрация</a>
</table>
</form>
</table>
</body>
</html>
<link rel="stylesheet" href="../style/style.css" type="text/css">
<link rel="stylesheet" type="text/css" href="../style/jquery.fancybox.css" media="screen" />
<script type="text/javascript" charset="utf-8" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="../js/jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript" src="../js/fancy.js"></script>