Parašė TiFo_remix13· 2007 Sau. 14 23:01:56
#5
pala aš parašysiu žiūrėk
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."index.php", "script");
kam reiks rtam ppravers o trumpiau tai čia tai kai iš karto nuredirektina į index.php failą nereiia eiti į setuser.php
Redagavo TiFo_remix13· 2007 Sau. 14 23:01:15