include("html.php"); $html = mysql_fetch_array(mysql_query("SELECT description FROM $tab[html];")); if(($username) && ($password)){ $user = mysql_fetch_array(mysql_query("SELECT id,status,code,email,ip FROM $tab[user] WHERE username='$username' AND password='$password';")); if($user[1] == banned){ header("Location: banned.php"); } elseif($user[1] == unverified){ header("Location: confirm.php?email=$user[3]"); } elseif($user[1] == tempban){header("Location: index.php?reason=tempban&code=$user[2]"); } elseif($user) { $host=gethostbyaddr("$REMOTE_ADDR"); mysql_query("UPDATE $tab[user] SET online='$time', ip='$REMOTE_ADDR', lastip='$user[4]', host='$host' WHERE id='$user[0]';"); setcookie("trupimp",$user[2]); header("Location: newsupdate.php"); } else{ header("Location: index.php?reason=invalid"); } } if($reason==banned){ $banned = mysql_fetch_array(mysql_query("SELECT reason FROM $tab[user] WHERE code='$code';")); } siteheader; ?>
|