diff --git a/app/call_center/call_center_agent_delete.php b/app/call_center/call_center_agent_delete.php
index c1cbcab5b6..06444d5f80 100644
--- a/app/call_center/call_center_agent_delete.php
+++ b/app/call_center/call_center_agent_delete.php
@@ -76,13 +76,9 @@ if (count($_GET)>0) {
unset($sql);
}
-//redirect the user
- 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: call_center_agents.php");
+return;
?>
diff --git a/app/call_center/call_center_agent_edit.php b/app/call_center/call_center_agent_edit.php
index 9f913e4366..6dea7c1150 100644
--- a/app/call_center/call_center_agent_edit.php
+++ b/app/call_center/call_center_agent_edit.php
@@ -230,14 +230,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize configuration
save_call_center_xml();
- //redirect the user
- require_once "resources/header.php";
- echo "\n";
- echo "\n";
- echo $text['message-add']."\n";
- echo "
\n";
- require_once "resources/footer.php";
- return;
+ $_SESSION["message"] = $text['message-add'];
+ header("Location: call_center_agents.php");
+ return;
} //if ($action == "add")
if ($action == "update") {
@@ -261,12 +256,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize configuration
save_call_center_xml();
- 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: call_center_agents.php");
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
diff --git a/app/call_center/call_center_queue_delete.php b/app/call_center/call_center_queue_delete.php
index b4c882a6ea..51600437c1 100644
--- a/app/call_center/call_center_queue_delete.php
+++ b/app/call_center/call_center_queue_delete.php
@@ -92,13 +92,8 @@ if (strlen($id) > 0) {
$_SESSION["reload_xml"] = true;
}
-//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: call_center_queues.php");
+return;
?>
\ No newline at end of file
diff --git a/app/call_center/call_center_queue_edit.php b/app/call_center/call_center_queue_edit.php
index 543d52c69e..e5c03d6aba 100644
--- a/app/call_center/call_center_queue_edit.php
+++ b/app/call_center/call_center_queue_edit.php
@@ -187,14 +187,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
- //redirect the user
- require_once "resources/header.php";
- echo "\n";
- echo "\n";
- echo $text['message-add']."\n";
- echo "
\n";
- require_once "resources/footer.php";
- return;
+ $_SESSION["message"] = $text['message-add'];
+ header("Location: call_center_queues.php");
+ return;
} //if ($action == "add")
if ($action == "update") {
@@ -233,14 +228,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
- //redirect the user
- require_once "resources/header.php";
- echo "\n";
- echo "\n";
- echo $text['message-update']."\n";
- echo "
\n";
- require_once "resources/footer.php";
- return;
+ $_SESSION["message"] = $text['message-update'];
+ header("Location: call_center_queues.php");
+ return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
diff --git a/app/call_center/call_center_tier_delete.php b/app/call_center/call_center_tier_delete.php
index 35081939a5..307d4bb0f2 100644
--- a/app/call_center/call_center_tier_delete.php
+++ b/app/call_center/call_center_tier_delete.php
@@ -81,13 +81,8 @@ else {
unset($sql);
}
-//redirect the user
- 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: call_center_tiers.php");
+return;
?>
\ No newline at end of file
diff --git a/app/call_center/call_center_tier_edit.php b/app/call_center/call_center_tier_edit.php
index 4a2578a028..c7d4cf9144 100644
--- a/app/call_center/call_center_tier_edit.php
+++ b/app/call_center/call_center_tier_edit.php
@@ -137,12 +137,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize configuration
save_call_center_xml();
- 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: call_center_tiers.php");
return;
} //if ($action == "add")
@@ -160,12 +156,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//syncrhonize configuration
save_call_center_xml();
- 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: call_center_tiers.php");
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
diff --git a/app/call_center/cmd.php b/app/call_center/cmd.php
index 094aae48d2..d277bd8114 100644
--- a/app/call_center/cmd.php
+++ b/app/call_center/cmd.php
@@ -52,6 +52,7 @@ if ($rdr == "false") {
echo $response;
}
else {
+ $_SESSION["message"] = $response;
header("Location: call_center_queues.php?savemsg=".urlencode($response));
}
?>
\ No newline at end of file