<?php

include 'system/bd.php';
include 'system/cook.php';
include ("system/gzip.php");

$pass = mysql_real_escape_string($_GET['password']);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id`='".intval($_GET['id'])."' and `password`= '$pass' "),0)){
	$us=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id`='".intval($_GET['id'])."' and `password`='$pass' "));
}else{



header ("Location: index.php?act=clear2");
exit;
}

if ($err){  foreach($err as $value){  echo "".$value.""; 
}


exit;
}else{
//if ($us['id']==1 OR $us['id']==2){
$_SESSION['id']=$us['id'];
$_SESSION['login']=$us['login'];
$_SESSION['password']=$us['password'];
$_SESSION['auth']=1;
header ("Location: main.php?");

}



?>
