Просмотр файла click_club/surfing.php

Размер файла: 1.56Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
function myErrorHandler ($errno, $errstr, $errfile, $errline) {}
set_error_handler("myErrorHandler");
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
extract($HTTP_COOKIE_VARS);
extract($HTTP_SERVER_VARS);
extract($HTTP_SESSION_VARS);
session_name("ID");
session_start();
//////////////////
include "inc/conf_db.php";
include"ban.php";
include"inc/conf.php";
/////////////////
$login=$_SESSION['login'];
$password=$_SESSION['password'];
//////////////////
$q = mysql_query("select * from `user` where  login='$login';");
$data = mysql_fetch_array($q);
if(!$_SESSION['login']=="" && !($_SESSION['password'])=="" &&  ($_SESSION['password'])==$data['pass']){
//////////////////
$result = mysql_query("SELECT * FROM perehod where nick='$login' AND ssylka='$link'");
$rows=mysql_num_rows($result);
if($rows>0){
include"inc/head.php";
echo"Вы не можете переходить по одной ссылке больше одного раза!<br/><a href=\"panel.php\">В панель</a><br/>"; include"inc/foot.php"; exit;}
//////////////////
header("Location: $link");


$counter=$data['counter']+1;
@mysql_query("update `user` set pass='".$data['pass']."', url='".$data['url']."', mail='".$data['mail']."',counter='".$counter."' where login='".$login."';");
@mysql_query("insert into `perehod` values(0,'$login','$link');");
//////////////////

}else{ echo"Вы не выполнили вход!<br/><a href=\"vhod.php\">Войти</a><br/>";
include"inc/foot.php"; exit;}
?>