$microtime = $daval[0] * 1000000000; $time = $daval[1]; $cookie = md5(CRC_SALT_0007 . $time . $microtime . $username . $password . $user_id . CRC_SALT_0009); // Remove any previous login. $ENABLE_COOKIE_TABLE = 1; //pg_safe_exec(CLEAR_COOKIES_QUERY); pg_safe_exec("delete from webcookies where user_id = " . (int) $user_id); $ENABLE_COOKIE_TABLE = 0; unset($is_alumni); $is_alumni = 0; if ($ouu->flags & 128 && $is_admin > 0) { $is_alumni = 1; } // check IP restrictions . . . (only for * persons or persons with an ACL set, excepted ALUMNIs (as X on IRC)) if ($is_alumni == 0 && ($is_admin > 0 || acl())) { if (is_ip_restrict()) { header("Pragma: no-cache"); echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n"; echo "<html>\n"; echo "<head><title>Error</title>"; std_theme_styles(); echo "</head>"; std_theme_body(); echo "<font size=+0>\n"; echo "You can't login to this account using your current IP number (" . cl_ip() . ").<br><br>"; echo "<a href=\"index.php\" target=\"_top\">click here</a>.<br>\n"; echo "</font></body></html>\n\n"; die; } } if (cl_ip() == "0.0.0.0") {
echo "<b>to IP</b><br>"; echo "<input type=text name=t2ip2 size=20 maxlength=15>"; echo "</td>\n"; echo "<td valign=top>"; echo "<b>Mask</b><br>"; echo "<input type=text name=t3mask size=35 maxlength=255>"; echo "<br>"; echo "<i>"; echo "wildcards <b>*</b> and <b>?</b> are allowed."; echo "</i>"; echo "</td>\n"; echo "</tr>"; echo "<tr><td colspan=3 align=right><input type=submit value=\"Add\"></td></tr>\n"; echo "</table>\n"; echo "<br><br>"; if ($user_id == $usr->id && ($admin > 0 || has_acl($user_id)) && is_ip_restrict()) { // safety valve warning echo "<font size=+1 color=#ff1111><b>"; echo "WARNING</b> : The current IP restrictions will NOT allow you to login.<br>Your current IP is : " . cl_ip() . "</font><br><br>"; } echo "<table border=1 cellspacing=0 cellpadding=3>\n"; $amask = 0; while ($ip = pg_fetch_object($ipq)) { $amask++; echo "<tr>"; if ($ip->allowrange2 != 0) { // IP range echo "<td>Range</td>"; echo "<td><b>"; echo long2ip($ip->allowrange1) . "</b>-<b>" . long2ip($ip->allowrange2); } elseif ($ip->allowrange1 != 0) {