include("/home2/thegaunt/www/adm/connectdb.php"); if ($login==logout) { //this makes the time in the past to destroy the cookie $ID=$_COOKIE["thegauntletlog"]; $past = time() - 60000; //this makes the time in the past to destroy the cookie setcookie("thegauntletlog", $ID, $past, '/', '.thegauntlet.com'); header("Location: index.php"); } if ($login=='1') { $password = $_POST['password']; $password = md5($password); $linkm = mysql_connect("localhost", "thegaunt", "t4ntr1c") or die("Could not connect"); mysql_select_db("the_gauntlet_com", $linkm) or die("Could not select database"); $result = mysql_query( "SELECT * FROM mm_cthegauntlet WHERE password2='$password' AND username='".$_POST["username"]."'", $linkm ); if ( mysql_num_rows($result) > 0 ) { $row = mysql_fetch_assoc($result); $hour = time() + 3600*24*30; setcookie("thegauntletlog", $row["ID"], $hour, '/', '.thegauntlet.com'); header("Location:index.php"); } else { $error = 'Incorrect username or password.'; $ac=1; }; }; if (isset($delcookie)) { setcookie("thegauntletlog", "", time()); }; include("/home2/thegaunt/www/common/header-new.php"); if (!isset($_COOKIE["thegauntletlog"]) or $_COOKIE["thegauntletlog"]=='') { /// on submit check for login ?>
| Photo | Category | Rating | # of Votes | # of Views |
|
|
echo cat_name($row->cid); ?> | echo "$row->rate"; ?> | echo "$row->rank_cnt"; ?> | echo "$row->views"; ?> |