- Login
-
Click Here to Register');
} elseif ($checkip >= 10) {
die('This IP has too many failed login attempts, please contact an administrator to get your IP unblocked');
} else {
$info = mysql_fetch_array($getuser);
if (sha1(md5($_POST['password'])) != $info['password']) {
$login = "INSERT INTO logins (account, ip, success) VALUES ('".$_POST['username']."', '".$_SERVER["REMOTE_ADDR"]."', 'No')";
$add_login = mysql_query($login);
echo("
"); echo('Incorrect password, please try again.'); echo("
"); goto login; } else { $month = time() + 3600*24*30; $_SESSION['user'] = $_POST['username']; setcookie("save_user", htmlentities($_POST['username']), $month); $login = "INSERT INTO logins (account, ip, success) VALUES ('".mysql_real_escape_string($_POST['username'])."', '".$_SERVER["REMOTE_ADDR"]."', 'Yes')"; $add_login = mysql_query($login); header("location: news.php"); } } } } elseif($_POST['action'] == "Logout") { setcookie("usrid", "", time()+3600); } } else { echo(""); echo("\n\t\t\t\t\t\t"); //New Line and Tabs for clean formatting! echo("Please Login To Continue!"); login: echo("\n\t\t\t\t\t"); echo("
"); echo("\n\t\t\t\t\t"); echo(""); echo("\n"); } ?>