Update call_center_agent_delete.php
This commit is contained in:
parent
91ca9bae66
commit
2ff221703c
|
|
@ -23,9 +23,13 @@
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
require_once "root.php";
|
require_once "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/check_auth.php";
|
require_once "resources/check_auth.php";
|
||||||
|
|
||||||
|
//check the permissions
|
||||||
if (permission_exists('call_center_agent_delete')) {
|
if (permission_exists('call_center_agent_delete')) {
|
||||||
//access granted
|
//access granted
|
||||||
}
|
}
|
||||||
|
|
@ -38,6 +42,7 @@ else {
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
||||||
|
//get the primary key
|
||||||
if (count($_GET)>0) {
|
if (count($_GET)>0) {
|
||||||
$id = check_str($_GET["id"]);
|
$id = check_str($_GET["id"]);
|
||||||
}
|
}
|
||||||
|
|
@ -64,8 +69,6 @@ if (count($_GET)>0) {
|
||||||
$response = event_socket_request($fp, $cmd);
|
$response = event_socket_request($fp, $cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//delete the agent from db
|
//delete the agent from db
|
||||||
if (strlen($id)>0) {
|
if (strlen($id)>0) {
|
||||||
//tiers table
|
//tiers table
|
||||||
|
|
@ -75,6 +78,7 @@ if (count($_GET)>0) {
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
//agents table
|
//agents table
|
||||||
$sql = "delete from v_call_center_agents ";
|
$sql = "delete from v_call_center_agents ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue