exit() after headers

master
pecesama 2008-10-23 18:12:38 +00:00
parent 965fa05dac
commit 0d1341a930
2 changed files with 5 additions and 6 deletions

View File

@ -12,8 +12,6 @@ if(!defined('entry'))define('entry', true);
=========================== */
?>
<?php
require('../entry.php');
global $user, $conf, $tumble;
$template = new plantillas("admin");
@ -21,7 +19,7 @@ $template = new plantillas("admin");
$isEdition = (isset($_GET["edit"])) ? true : false;
$postId = ($isEdition) ? $_GET["edit"] : NULL;
if ($user->isAdmin()) {
if ($user->isAuthenticated()) {
if (isset($_GET["delete"])) {
$tumble->deletePost($_GET['delete']);

View File

@ -21,11 +21,12 @@ if ($user->isAuthenticated()) {
header("Location: ".$conf->urlGelato."/admin/index.php");
} else {
if (isset($_POST["pass"]) && isset($_POST["login"])) {
//print "<pre>"; print_r($_SESSION); print "</pre>";die();
if ($user->validateUser($_POST['login'], md5($_POST['pass']))) {
header("Location: ".$conf->urlGelato."/admin/index.php");
exit();
} else {
header("Location: ".$conf->urlGelato."/login.php?error=1");
exit();
}
} else {
?>