0){ if(check_pass($user_name,$user_pass)){ setcookie('user_name_cookie',$user_name,time()+(60*60*24*30)); setcookie('user_pass_cookie',$user_pass,time()+(60*60*24*30)); } } } break; case 'logout'; setcookie('user_name_cookie','',time()-(60*60*24*30*12)); setcookie('user_pass_cookie','',time()-(60*60*24*30*12)); redirect2(); break; } $sqlslectinfouser = mysql_query("SELECT * FROM ".prifex."users WHERE user_name = '".$_COOKIE['user_name_cookie']."' and user_password = '".$_COOKIE['user_pass_cookie']."'")or die(error_sql(mysql_error(),__LINE__,__FILE__)); if(mysql_num_rows($sqlslectinfouser) > 0){ $resultselectinfouser = mysql_fetch_object($sqlslectinfouser); $user_id = $resultselectinfouser->user_id; $user_name = $resultselectinfouser->user_name; $user_password = $resultselectinfouser->user_password; $user_email = $resultselectinfouser->user_email; $user_contry = $resultselectinfouser->user_contry; $user_date_register = $resultselectinfouser->user_date_register; $user_age = $resultselectinfouser->user_age; $user_level = $resultselectinfouser->user_level; }else{ $user_id = 0; $user_name = 0; $user_password = 0; $user_email = 0; $user_contry = 0; $user_date_register = 0; $user_age = 0; $user_level = 0; } define(user_id,$user_id); define(user_level,$user_level); define(user_name,$user_name); define(user_email,$user_email); define(user_contry,$user_contry); define(user_date_register,$user_date_register); define(user_age,$user_age); mysql_free_result($sqlslectinfouser); ?>