Response message updates.

This commit is contained in:
Nate Jones
2014-02-23 06:06:34 +00:00
parent 78a4cbee5e
commit 31a866aa3d
6 changed files with 38 additions and 83 deletions
+2 -7
View File
@@ -256,13 +256,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
//redirect the browser $_SESSION["message"] = $text['message-update'];
require_once "resources/header.php"; header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php");
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
+8 -19
View File
@@ -158,29 +158,18 @@ else {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
//redirect the user
require_once "resources/header.php"; $_SESSION["message"] = $text['message-copy'];
switch ($app_uuid) { switch ($app_uuid) {
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": //inbound routes
//inbound routes case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": //outbound routes
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n"; case "4b821450-926b-175a-af93-a03c441818b1": //time conditions
break; $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid;
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
//outbound routes
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
break;
case "4b821450-926b-175a-af93-a03c441818b1":
//time conditions
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
break; break;
default: default:
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n"; $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php";
break;
} }
echo "<div align='center'>\n"; header("Location: ".$redirect_url);
echo $text['message-copy']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
?> ?>
+10 -21
View File
@@ -95,29 +95,18 @@ if (strlen($dialplan_uuid) > 0) {
} }
} }
//redirect the user
//save the message to a session variable $_SESSION["message"] = $text['message-delete'];
$_SESSION['message'] = $text['message-delete']; switch ($app_uuid) {
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": //inbound routes
require_once "resources/header.php"; case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": //outbound routes
switch ($app_uuid) { case "4b821450-926b-175a-af93-a03c441818b1": //time conditions
case "c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4": $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid;
//inbound routes
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid);
break;
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3":
//outbound routes
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid);
break;
case "4b821450-926b-175a-af93-a03c441818b1":
//time conditions
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid);
echo "<meta http-equiv=\"refresh\" content=\"2;url=\">\n";
break; break;
default: default:
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php); $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php";
break; }
} header("Location: ".$redirect_url);
return;
?> ?>
+4 -12
View File
@@ -145,12 +145,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
require_once "resources/header.php"; $_SESSION["message"] = $text['message-add'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid."\">\n"; header("Location: dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid);
echo "<div align='center'>\n";
echo $text['message-add']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} //if ($action == "add") } //if ($action == "add")
@@ -184,12 +180,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
require_once "resources/header.php"; $_SESSION["message"] = $text['message-update'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid."\">\n"; header("Location: dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=".$app_uuid);
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} //if ($action == "update") } //if ($action == "update")
} //if ($_POST["persistformvar"] != "true") { } //if ($_POST["persistformvar"] != "true") {
@@ -539,13 +539,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//redirect the user $_SESSION["message"] = $text['confirm-update-complete'];
require_once "resources/header.php"; header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4");
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=c03b422e-13a8-bd1b-e42b-b6b9b4d27ce4\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update-complete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
@@ -488,13 +488,8 @@ else {
//synchronize the xml config //synchronize the xml config
save_dialplan_xml(); save_dialplan_xml();
//redirect the user $_SESSION["message"] = $text['message-update'];
require_once "resources/header.php"; header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3");
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3\">\n";
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
?> ?>