From e204a8a180a00a7f700dc180c27cc2b445278097 Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Sun, 23 Feb 2014 05:36:11 +0000 Subject: [PATCH] Response message updates. --- app/destinations/destination_delete.php | 11 +++-------- app/destinations/destination_edit.php | 16 ++++------------ 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/app/destinations/destination_delete.php b/app/destinations/destination_delete.php index 588a0629e4..15d0bba6c4 100644 --- a/app/destinations/destination_delete.php +++ b/app/destinations/destination_delete.php @@ -54,13 +54,8 @@ if (count($_GET)>0) { unset($sql); } -//redirect the browser - require_once "resources/header.php"; - echo "\n"; - echo "
\n"; - echo $text['message-delete']."\n"; - echo "
\n"; - require_once "resources/footer.php"; - return; +$_SESSION["message"] = $text['message-delete']; +header("Location: destinations.php"); +return; ?> \ No newline at end of file diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index e16bfd1234..0ce80b64ee 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -137,12 +137,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - require_once "resources/header.php"; - echo "\n"; - echo "
\n"; - echo $text['message-add']."\n"; - echo "
\n"; - require_once "resources/footer.php"; + $_SESSION["message"] = $text['message-add']; + header("Location: destinations.php"); return; } //if ($action == "add") @@ -168,12 +164,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $db->exec(check_sql($sql)); unset($sql); - require_once "resources/header.php"; - echo "\n"; - echo "
\n"; - echo $text['message-update']."\n"; - echo "
\n"; - require_once "resources/footer.php"; + $_SESSION["message"] = $text['message-update']; + header("Location: destinations.php"); return; } //if ($action == "update") } //if ($_POST["persistformvar"] != "true")