exit() after headers
parent
965fa05dac
commit
0d1341a930
|
|
@ -12,8 +12,6 @@ if(!defined('entry'))define('entry', true);
|
||||||
=========================== */
|
=========================== */
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
require('../entry.php');
|
require('../entry.php');
|
||||||
global $user, $conf, $tumble;
|
global $user, $conf, $tumble;
|
||||||
$template = new plantillas("admin");
|
$template = new plantillas("admin");
|
||||||
|
|
@ -21,7 +19,7 @@ $template = new plantillas("admin");
|
||||||
$isEdition = (isset($_GET["edit"])) ? true : false;
|
$isEdition = (isset($_GET["edit"])) ? true : false;
|
||||||
$postId = ($isEdition) ? $_GET["edit"] : NULL;
|
$postId = ($isEdition) ? $_GET["edit"] : NULL;
|
||||||
|
|
||||||
if ($user->isAdmin()) {
|
if ($user->isAuthenticated()) {
|
||||||
|
|
||||||
if (isset($_GET["delete"])) {
|
if (isset($_GET["delete"])) {
|
||||||
$tumble->deletePost($_GET['delete']);
|
$tumble->deletePost($_GET['delete']);
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,12 @@ if ($user->isAuthenticated()) {
|
||||||
header("Location: ".$conf->urlGelato."/admin/index.php");
|
header("Location: ".$conf->urlGelato."/admin/index.php");
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST["pass"]) && isset($_POST["login"])) {
|
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");
|
header("Location: ".$conf->urlGelato."/admin/index.php");
|
||||||
|
exit();
|
||||||
} else {
|
} else {
|
||||||
header("Location: ".$conf->urlGelato."/login.php?error=1");
|
header("Location: ".$conf->urlGelato."/login.php?error=1");
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue