<?
$summa_begin=100;
require_once('../connect/connect.php');
include_once('../lib/lib.php');

if(isset($_GET['id']) && isset($_GET['pass']))
{
$id=anti($_GET['id']);
$pass=trim(anti($_GET['pass']));
$r=mysql_query("SELECT * FROM akk WHERE id_akk='".$id."' AND pass='".$pass."'");
$nr=mysql_num_rows($r);
if($nr>0)
	{
	$rr=mysql_fetch_array($r);
	
	if($summa_begin && $rr['blok'] !=1)
		{
		mysql_query("INSERT INTO plateg (summa, id_akk, typ, data, opis)  VALUES ('".$summa_begin."', '".$id."', 1, NOW(), 'Пополнение кошелька администратором' )");
		mysql_query("UPDATE akk SET summa='".$summa_begin."' WHERE id_akk='".$id."'");
		}
	
	mysql_query("UPDATE akk SET blok='1' WHERE id_akk='".$id."'");

	?>
<form name="logn" method="post" action="logpass.php">
                  <input type="hidden" name="email" size="15" value="<? echo $rr['email']; ?>"><br>
                    <input type="hidden" name="pass" size="15" value="<? echo $pass; ?>"><br>
                    <input type="hidden" name="MM_logn" value="logn">
                    <input type="submit" name="Submit2" value="Зайти в личный кабинет">
        </form>
	<?
	} else echo "Такого аккаунта не существует";
}

?>


<!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">
<link rel="stylesheet" href="tstyl.css" type="text/css">
</head>

<body>
</body>
</html>
