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

View File

@@ -256,14 +256,9 @@ 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"; return;
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
?><script type="text/javascript"> ?><script type="text/javascript">

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": break;
//outbound routes default:
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n"; $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php";
break; }
case "4b821450-926b-175a-af93-a03c441818b1": header("Location: ".$redirect_url);
//time conditions return;
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=$app_uuid\">\n";
break;
default:
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/dialplan/dialplans.php\">\n";
break;
}
echo "<div align='center'>\n";
echo $text['message-copy']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
?> ?>

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 break;
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid); default:
break; $redirect_url = PROJECT_PATH."/app/dialplan/dialplans.php";
case "8c914ec3-9fc0-8ab5-4cda-6c9288bdc9a3": }
//outbound routes header("Location: ".$redirect_url);
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=".$app_uuid); return;
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;
default:
header("Location: ".PROJECT_PATH."/app/dialplan/dialplans.php);
break;
}
?> ?>

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") {

View File

@@ -539,14 +539,9 @@ 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"; return;
echo "<div align='center'>\n";
echo "".$text['confirm-update-complete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
?> ?>

View File

@@ -488,14 +488,9 @@ 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"; return;
echo "<div align='center'>\n";
echo $text['message-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
} //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //end if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
?> ?>