Bad MySQL host"; exit; } /* Подключение к БД. */ if(!@mysql_select_db($db_name,$db)) { echo "Wrong MySQL db name"; exit; } mysql_query('set charset utf8',$db); mysql_query('SET names utf8',$db); mysql_query('set character_set_client="utf8"',$db); mysql_query('set character_set_connection="utf8"',$db); mysql_query('set character_set_result="utf8"',$db); @session_name('SESS'); @session_start(); $sess=mysql_escape_string(session_id()); if(!preg_match('#[A-z0-9]{32}#i',$sess))$sess=md5(rand(09009,999999)); if(isset($_SESSION['id_user']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$_SESSION[id_user]' LIMIT 1"), 0)==1) { $ku=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$_SESSION[id_user]'")); } $set=array(); $set['p_str']=10; ?>