View file click_club/ssettings.php

File size: 1.49Kb
<?
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"inc/conf.php";
include"ban.php";
include"inc/head.php";
/////////////////
$login=$_SESSION['login'];
//////////////////
$q = mysql_query("select * from `user` where  login='$login';");
$data = mysql_fetch_array($q);
if(!$_SESSION['login']=="" && !($_SESSION['password'])=="" &&  ($_SESSION['password'])==$data['pass']){
//////////////////
$par=preobraz(substr(trim($par), 0, 30));
$mail=preobraz(substr(trim($mail), 0, 70));
$url=preobraz(substr(trim($url), 0, 70));
//////////////////
$query = @mysql_query("update `user` set pass='".$par."', mail='".$mail."', url='".$url."' where login='".$login."';");
session_destroy();
session_destroy();
$password=$par;
session_register("login");
session_register("password");
//////////////////
if($query) print "<b>Настройки для вашего профиля изменены!</b><br/>";
/////////////////
echo"<a href=\"panel.php\">В панель</a><br/>";
//////////////////
include"inc/foot.php";
}else{ echo"Вы не выполнили вход!<br/><a href=\"vhod.php\">Войти</a><br/>";
include"inc/foot.php"; exit;}
?>