</style> </HEAD> <BODY> <div class=header><b>Erroneous password!</b></div> <br> <input type=button value=close onclick='window.close();'> </BODY> </HTML> <? die(); } $cat_id = _POST_num("cat_id"); $round = _POST_num("round"); $comp_id = _POST_num("comp_id"); $ncmp_id = _POST_num("ncmp_id"); if (!$cat_id || !$round || $round<=1 || !$comp_id) error(0); $qualified = strict_query("SELECT * FROM $regstable WHERE cat_id=? AND round=? AND comp_id=?", array($cat_id,$round,$comp_id)); $qualified = (sql_num_rows($qualified)==1); if (!$qualified) error(1); $noscore = strict_query("SELECT * FROM $timestable WHERE cat_id=? AND round=? AND comp_id=?", array($cat_id,$round,$comp_id)); $noscore = (sql_num_rows($noscore)==0); if (!$noscore) error(2); if ($ncmp_id) { $qualified = strict_query("SELECT * FROM $regstable WHERE cat_id=? AND round=? AND comp_id=?", array($cat_id,$round,$ncmp_id)); $qualified = (!sql_num_rows($qualified)); if (!$qualified) error(3);
{ $_SESSION["c_error"] = $msg; unset($_SESSION["c_id"]); unset($_SESSION["c_admin"]); unset($_SESSION["c_country"]); unset($_SESSION["c_name"]); if (preg_match("~^admin\\.~i",$_SERVER["HTTP_HOST"])) header("Location: index.php\r\n"); else header("Location: admin.php\r\n"); die(); } $_POSTid = NULL; if (array_key_exists('id', $_POST)) $_POSTid = _POST_num("id"); else $_POSTid = $_SESSION["c_id"]; if (array_key_exists("pw",$_POST)) $_POSTpw = _POST_key("pw"); else $_POSTpw = $_SESSION["c_pw"]; unset($_SESSION["c_pw"]); if (is_null($_POSTid)) _error("Invalid calling params"); if (!$_POSTpw) _error("Blank password"); $result = strict_query("SELECT * FROM competitions WHERE id=?",array($_POSTid)); if (!$result || sql_num_rows($result) != 1) _error("Competition not available"); if (cased_mysql_result($result,0,"admin_pw")==$_POSTpw) {