exit() after headers
parent
965fa05dac
commit
0d1341a930
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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']))) {
|
||||
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 {
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue