Response message updates.

This commit is contained in:
Nate Jones 2014-02-23 09:26:30 +00:00
parent 9e838bd011
commit 56dda441a0
8 changed files with 32 additions and 66 deletions

View File

@ -78,12 +78,8 @@ if (strlen($id)>0) {
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu.php\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-delete'];
header("Location: menu.php");
return;
?>

View File

@ -113,12 +113,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$menu->restore();
//redirect the user back to the main menu
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu.php\">\n";
echo "<div align='center'>\n";
echo $text['message-add']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-add'];
header("Location: menu.php");
return;
} //if ($action == "add")
@ -133,12 +129,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset($sql);
//redirect the user back to the main menu
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu.php\">\n";
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-update'];
header("Location: menu.php");
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")

View File

@ -70,12 +70,8 @@ if (count($_GET)>0) {
unset($sql);
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu_edit.php?id=$menu_uuid\">\n";
echo "<div align='center'>";
echo $text['message-delete'];
echo "</div>";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-delete'];
header("Location: menu_edit.php?id=".$menu_uuid);
return;
}

View File

@ -54,12 +54,8 @@ else {
$sql .= "and group_name = '".$group_name."' ";
$db->exec(check_sql($sql));
//redirect the browser
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu_item_edit.php?id=$menu_uuid&menu_item_uuid=$menu_item_uuid&menu_uuid=$menu_uuid\">\n";
echo "<div align='center'>\n";
echo $text['message-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-delete'];
header("Location: menu_item_edit.php?id=".$menu_uuid."&menu_item_uuid=".$menu_item_uuid."&menu_uuid=".$menu_uuid);
return;
}
@ -265,18 +261,14 @@ else {
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=menu_edit.php?id=$menu_uuid\">\n";
echo "<div align='center'>\n";
if ($action == "add") {
echo $text['message-add']."\n";
}
if ($action == "update") {
echo $text['message-update']."\n";
}
echo "</div>\n";
require_once "resources/footer.php";
return;
if ($action == "add") {
$_SESSION["message"] = $text['message-add'];
}
if ($action == "update") {
$_SESSION["message"] = $text['message-update'];
}
header("Location: menu_edit.php?id=".$menu_uuid);
return;
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)

View File

@ -82,12 +82,8 @@ if (count($_GET)>0) {
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=menu_list.php?menu_item_id=$menu_item_id\">\n";
echo "<div align='center'>";
echo $text['message-moved_down'];
echo "</div>";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-moved_down'];
header("Location: menu_list.php?menu_item_id=".$menu_item_id);
return;
}

View File

@ -69,12 +69,8 @@ if (count($_GET)>0) {
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=menu_list.php?menu_item_id=$menu_item_id\">\n";
echo "<div align='center'>";
echo $text['message-moved_up'];
echo "</div>";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-moved_up'];
header("Location: menu_list.php?menu_item_id=".$menu_item_id);
return;
}

View File

@ -34,6 +34,12 @@ else {
return;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//get the http value and set as a php variable
$menu_uuid = check_str($_REQUEST["menu_uuid"]);
$menu_language = check_str($_REQUEST["menu_language"]);
@ -54,12 +60,8 @@ else {
$_SESSION["template_content"] = '';
//show a message to the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=/core/menu/menu_edit.php?id=$menu_uuid\">\n";
echo "<div align='center'>\n";
echo "Restore Complete\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-restore'];
header("Location: /core/menu/menu_edit.php?id=".$menu_uuid);
return;
?>

View File

@ -60,12 +60,8 @@ else {
$_SESSION["template_content"] = '';
//show a message to the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"1;url=".PROJECT_PATH."/core/menu/menu_edit.php?id=$menu_uuid\">\n";
echo "<div align='center'>\n";
echo $text['message-restore']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-restore'];
header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".$menu_uuid);
return;
?>