Parašė ___· 2007 Geg. 1 12:05:05
#3
Error error error... Gal tiksliau nurodysi, nes aš tai kiek supratau, tai čia kažkur kirpti. Nes visam maincore.php nėra kitos vietos su setuser.php. Bet čia iškirpus ką nors erroras
if (isset($_POST['login'])) {
$user_pass = md5($_POST['user_pass']);
$user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($_POST['user_name']));
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$user_name' AND user_password='$user_pass'");
if (dbrows($result) != 0) {
$data = dbarray($result);
$cookie_value = $data['user_id'].".".$data['user_password'];
if ($data['user_status'] == 0) {
$cookie_exp = isset($_POST['remember_me']) ? time() + 3600*24*30 : time() + 3600*3;
header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");
setcookie("fusion_user", $cookie_value, $cookie_exp, "/", "", "0");
redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script");
} elseif ($data['user_status'] == 1) {
redirect(BASEDIR."setuser.php?error=1", "script");
} elseif ($data['user_status'] == 2) {
redirect(BASEDIR."setuser.php?error=2", "script");
}
} else {
redirect(BASEDIR."setuser.php?error=3");
Redagavo ozzWANTED· 2007 Geg. 1 12:05:20