diff --git a/cookies.php b/cookies.php index b42eae8..1ffc5df 100644 --- a/cookies.php +++ b/cookies.php @@ -15,7 +15,7 @@ function checkcookies() { if (mysql_num_rows($query) != 1) { die("Invalid cookie data (Error 1). Please clear cookies and log in again."); } $row = mysql_fetch_array($query); if ($row["id"] != $theuser[0]) { die("Invalid cookie data (Error 2). Please clear cookies and log in again."); } - if (md5($row["password"] . "--" . $dbsettings["secretword"]) != $theuser[2]) { die("Invalid cookie data (Error 3). Please clear cookies and log in again."); } + if (md5($row["password"] . "--" . $dbsettings["secretword"]) !== $theuser[2]) { die("Invalid cookie data (Error 3). Please clear cookies and log in again."); } // If we've gotten this far, cookie should be valid, so write a new one. $newcookie = implode(" ",$theuser); diff --git a/forum.php b/forum.php index 1799413..a7554df 100644 --- a/forum.php +++ b/forum.php @@ -8,7 +8,12 @@ if ($userrow == false) { display("The forum is for registered players only.", "F $controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"); $controlrow = mysql_fetch_array($controlquery); +// Close game. if ($controlrow["gameopen"] == 0) { display("The game is currently closed for maintanence. Please check back later.","Game Closed"); die(); } +// Force verify if the user isn't verified yet. +if ($controlrow["verifyemail"] == 1 && $userrow["verify"] != 1) { header("Location: users.php?do=verify"); die(); } +// Block user if he/she has been banned. +if ($userrow["authlevel"] == 2) { die("Your account has been blocked. Please try back later."); } if (isset($_GET["do"])) { $do = explode(":",$_GET["do"]); diff --git a/lib.php b/lib.php index 1491bce..261f729 100644 --- a/lib.php +++ b/lib.php @@ -2,7 +2,7 @@ $starttime = getmicrotime(); $numqueries = 0; -$version = "1.1.9"; +$version = "1.1.10"; $build = ""; // Handling for servers with magic_quotes turned on.