diff --git a/admin/index.php b/admin/index.php index baf5266..caf16fa 100644 --- a/admin/index.php +++ b/admin/index.php @@ -12,8 +12,6 @@ if(!defined('entry'))define('entry', true); =========================== */ ?> isAdmin()) { +if ($user->isAuthenticated()) { if (isset($_GET["delete"])) { $tumble->deletePost($_GET['delete']); diff --git a/login.php b/login.php index 2475048..b3fb7f0 100644 --- a/login.php +++ b/login.php @@ -21,11 +21,12 @@ if ($user->isAuthenticated()) { header("Location: ".$conf->urlGelato."/admin/index.php"); } else { if (isset($_POST["pass"]) && isset($_POST["login"])) { - //print "
"; print_r($_SESSION); print "
";die(); - if ($user->validateUser($_POST['login'], md5($_POST['pass']))) { + if ($user->validateUser($_POST['login'], md5($_POST['pass']))) { header("Location: ".$conf->urlGelato."/admin/index.php"); - } else { + exit(); + } else { header("Location: ".$conf->urlGelato."/login.php?error=1"); + exit(); } } else { ?>