<?
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";
////////////////////////////
////// Mod 1 by Stanislav
////////////////////////////
$password = htmlspecialchars(stripslashes(trim($password)));
$mail = htmlspecialchars(stripslashes(trim($mail)));
$url = htmlspecialchars(stripslashes(trim($url)));
$password=str_replace("@","", $password);
$password=str_replace(" ","_", $password);
$password=str_replace("$","", $password);
$password=str_replace("`","", $password);
$password=str_replace("~","", $password);
$password=str_replace("!","", $password);
$password=str_replace("#","", $password);
$password=str_replace("%","", $password);
$password=str_replace("","", $password);
$password=str_replace(":","", $password);
$password=str_replace("?","", $password);
$password=str_replace("&","", $password);
$password=str_replace("*","", $password);
$password=str_replace("(","", $password);
$password=str_replace(")","", $password);
$password=str_replace(",","", $password);
$password=str_replace("/","", $password);
$password=str_replace("|","", $password);
$password=str_replace("'","", $password);
$url=str_replace("@","", $url);
$url=str_replace(" ","_", $url);
$url=str_replace("$","", $url);
$url=str_replace("`","", $url);
$url=str_replace("~","", $url);
$url=str_replace("!","", $url);
$url=str_replace("#","", $url);
$url=str_replace("%","", $url);
$url=str_replace("","", $url);
$url=str_replace("*","", $url);
$url=str_replace("(","", $url);
$url=str_replace(")","", $url);
$url=str_replace(",","", $url);
$url=str_replace("|","", $url);
$url=str_replace("'","", $url);
if(ereg("[а-яА-Я]",$login) OR ereg("[а-яА-Я]",$mail) OR ereg("[а-яА-Я]",$url) OR ereg("[а-яА-Я]",$password)) {
echo" Использовать кирилицу запрещено!<br/> Вернитесь <a href=\"settings.php\">назад!</a><br/><tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit; }
if(strlen($login) > 12) { echo" <b>ИДИ НА ХУЙ!</b><br/>Вернись <a href=\"settings\">назад</a> и сделай ник покороче!<br/><tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit; }
if(strlen($url) > 50) { echo" <b>ИДИ НА ХУЙ!</b> Ссылки, превышающие 50 символов - запрещены!<br/>Вернись <a href=\"settings.php\">назад!</a><br/><tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit; }
if (!eregi("^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$", $mail)) { echo" Не верный формат мыла!<br/> Вернитесь <a href=\"settings.php\">назад!</a><br/><tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit; }
////////////////////////////
$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?".SID."\">В панель</a><br/>
<tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>";
}else{ echo" Вы не выполнили вход!<br/><a href=\"vhod.php\">Войти</a><br/>
<tr><td bgcolor=\"#CCCCFF\" align=\"center\"><font color=\"#008080\"><b>CLICK-CLUB</b></td></tr></table></body></html>"; exit; }
?>