diff --git a/app/fifo_agents/app_config.php b/app/fifo_agents/app_config.php deleted file mode 100644 index f070c44b99..0000000000 --- a/app/fifo_agents/app_config.php +++ /dev/null @@ -1,39 +0,0 @@ - \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent/root.php b/app/fifo_agents/fifo_agent/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/fifo_agent/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent/v_fifo_agent.php b/app/fifo_agents/fifo_agent/v_fifo_agent.php deleted file mode 100644 index cc0923651d..0000000000 --- a/app/fifo_agents/fifo_agent/v_fifo_agent.php +++ /dev/null @@ -1,186 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("agent") || if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Active Agents 
\n"; - echo "Shows the agents that are currently logged into the queues.

\n"; - echo "
\n"; - echo " login"; - echo " logout"; - echo "
\n"; - - - $sql = ""; - $sql .= " select * from v_fifo_agents "; - $sql .= " where agent_username = '".$_SESSION["username"]."' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 10; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= " select * from v_fifo_agents "; - $sql .= " where agent_username = '".$_SESSION["username"]."' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - //$sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('fifo_name', 'Queue Name', $order_by, $order); - echo th_order_by('agent_username', 'Username', $order_by, $order); - echo th_order_by('agent_priority', 'Agent Priority', $order_by, $order); - echo th_order_by('agent_status', 'Status', $order_by, $order); - echo th_order_by('agent_last_call', 'Last Call', $order_by, $order); - echo th_order_by('agent_contact_number', 'Contact Number', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //set the php variables - $agent_last_call = $row[agent_last_call]; - date_default_timezone_set('America/Boise'); - - //format the last call time - $agent_last_call_desc = date("g:i:s a j M Y",$agent_last_call); - - //get the agent status description - $x=1; - $agent_status_desc = ''; - foreach($_SESSION["array_agent_status"] as $value) { - if ($row[agent_status] == $x) { - $agent_status_desc = $value; - } - $x++; - } - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - //echo " $v_link_label_add\n"; - echo "
".$row[fifo_name]."".$row[agent_username]."".$row[agent_priority]."".$agent_status_desc."".$agent_last_call_desc."".$row[agent_contact_number]."\n"; - echo " $v_link_label_edit\n"; - //echo " $v_link_label_delete\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - //echo " $v_link_label_add\n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_agent/v_fifo_agent_edit.php b/app/fifo_agents/fifo_agent/v_fifo_agent_edit.php deleted file mode 100644 index e4b16dfc39..0000000000 --- a/app/fifo_agents/fifo_agent/v_fifo_agent_edit.php +++ /dev/null @@ -1,412 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("agent") || if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//save the uuid to a variable from the http GET - $uuid = check_str($_GET["uuid"]); - -//POST to PHP variables - if (count($_POST)>0) { - //$domain_uuid = check_str($_POST["domain_uuid"]); - $resolution_code = check_str($_POST["resolution_code"]); - $transaction_id = check_str($_POST["transaction_id"]); - $action_item = check_str($_POST["action_item"]); - $uuid = check_str($_POST["uuid"]); - $notes = check_str($_POST["notes"]); - //$fifo_name = check_str($_POST["fifo_name"]); - //$agent_username = check_str($_POST["agent_username"]); - //$agent_priority = check_str($_POST["agent_priority"]); - $agent_status = check_str($_POST["agent_status"]); - //$agent_last_call = check_str($_POST["agent_last_call"]); - //$agent_contact_number = check_str($_POST["agent_contact_number"]); - } - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - //check for all required data - if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - //if (strlen($resolution_code) == 0) { $msg .= "Please provide: Resolution Code
\n"; } - //if (strlen($transaction_id) == 0) { $msg .= "Please provide: Transaction ID
\n"; } - //if (strlen($action_item) == 0) { $msg .= "Please provide: Action Item
\n"; } - //if (strlen($uuid) == 0) { $msg .= "Please provide: UUID
\n"; } - //if (strlen($notes) == 0) { $msg .= "Please provide: Notes
\n"; } - //if (strlen($fifo_name) == 0) { $msg .= "Please provide: Queue Name
\n"; } - //if (strlen($agent_username) == 0) { $msg .= "Please provide: Username
\n"; } - //if (strlen($agent_priority) == 0) { $msg .= "Please provide: Agent Priority
\n"; } - if (strlen($agent_status) == 0) { $msg .= "Please provide: Status
\n"; } - //if (strlen($agent_last_call) == 0) { $msg .= "Please provide: Last Call
\n"; } - //if (strlen($agent_contact_number) == 0) { $msg .= "Please provide: Contact Number
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - //update the database - if ($_POST["persistformvar"] != "true") { - //do not insert {uuid} into the database - if ($uuid == "{uuid}") { $uuid = ''; } - - //add to the agent call logs - if (strlen($uuid) > 0) { - $sql = "insert into v_fifo_agent_call_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "resolution_code, "; - $sql .= "transaction_id, "; - $sql .= "action_item, "; - $sql .= "uuid, "; - $sql .= "notes, "; - $sql .= "add_user, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$resolution_code', "; - $sql .= "'$transaction_id', "; - $sql .= "'$action_item', "; - $sql .= "'$uuid', "; - $sql .= "'$notes', "; - $sql .= "'".$_SESSION["username"]."', "; - $sql .= "now() "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - } - - //update the status - $sql = "update v_fifo_agents set "; - $sql .= "domain_uuid = '$domain_uuid', "; - //$sql .= "fifo_name = '$fifo_name', "; - //$sql .= "agent_username = '$agent_username', "; - //$sql .= "agent_priority = '$agent_priority', "; - $sql .= "agent_status = '$agent_status', "; - $sql .= "agent_status_epoch = ".time()." "; - //$sql .= "agent_last_call = '$agent_last_call', "; - //$sql .= "agent_contact_number = '$agent_contact_number' "; - $sql .= " where agent_username = '".$_SESSION["username"]."' "; - $db->exec(check_sql($sql)); - unset($sql); - - //agent status log - if (strlen($agent_status) > 0) { - $sql = "insert into v_fifo_agent_status_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "username, "; - $sql .= "agent_status, "; - $sql .= "uuid, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'".$_SESSION["username"]."', "; - $sql .= "'$agent_status', "; - $sql .= "'$uuid', "; - $sql .= "now() "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - } - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($_POST["persistformvar"] != "true") { - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - if ($_POST["persistformvar"] != "true") { - $login_status = false; - $sql = ""; - $sql .= "select * from v_fifo_agents "; - $sql .= " where agent_username = '".$_SESSION["username"]."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $domain_uuid = $row["domain_uuid"]; - //$fifo_name = $row["fifo_name"]; - //$agent_username = $row["agent_username"]; - //$agent_priority = $row["agent_priority"]; - $agent_status = $row["agent_status"]; - $agent_last_call = $row["agent_last_call"]; - $agent_last_uuid = $row["agent_last_uuid"]; - //$agent_contact_number = $row["agent_contact_number"]; - $login_status = true; - break; //limit to 1 row - } - unset ($prep_statement); - } - -//format the last call time - if ($agent_last_call == 0) { - $agent_last_call_desc = ''; - } - else { - $agent_last_call_desc = date("g:i:s a j M Y",$agent_last_call); - } - -//show the content - require_once "includes/header.php"; - -//if the agent_status is available and the uuid has been supplied then refrsh the page - //until the status changes or until a time out has been reached - if ($agent_status == '2' && strlen($uuid) > 0 && $uuid != "{uuid}") { - if (count($_GET["refresh"]) < 10) { - if (substr($_SERVER["SERVER_PROTOCOL"], 0,5) == "HTTP/") { - $meta_refresh_url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."&refresh[]=".count($_SERVER["refresh"]); - } - else { - $meta_refresh_url = "https://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."&refresh[]=".count($_SERVER["refresh"]); - } - echo "\n"; - } - } - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - //echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - //echo "\n"; - //echo "\n"; - //echo "\n"; - //echo "\n"; - - if ($login_status) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - - /* - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - */ - - if ($login_status && $agent_status == '9') { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - } - if ($login_status) { - echo " \n"; - echo " \n"; - echo " "; - } - - - echo "
Agent\n"; - if (!$login_status) { - echo " \n"; - } - if ($login_status) { - echo " \n"; - } - - //echo " \n"; - echo "
\n"; - echo "Enables the agent to set their status.

\n"; - echo "
\n"; - echo " Username:\n"; - echo "\n"; - echo " ".$_SESSION["username"].""; - echo "
\n"; - echo "\n"; - echo "
\n"; - //echo " Last Call:\n"; - //echo "\n"; - //echo $agent_last_call_desc; - //echo " \n"; - //echo "
\n"; - //echo "\n"; - //echo "
\n"; - echo " Status:\n"; - echo "\n"; - //generate the agent status select list - $sql = "SELECT var_name, var_value FROM v_vars "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and var_cat = 'Queues Agent Status' "; - $sql .= "and var_name not like 'system%' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - echo ""; - $_SESSION["array_agent_status"] = ""; - if (!is_array($_SESSION["array_agent_status"])) { - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - } - /* - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - - $x=1; - foreach($_SESSION["array_agent_status"] as $value) { - echo "$x $value
\n"; - $x++; - } - */ - unset($sql, $result); - - echo "
\n"; - echo "Enter the status of the Agent.\n"; - echo "
\n"; - echo "  \n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo " Contact Number:\n"; - echo "\n"; - echo $agent_contact_number; - //echo " \n"; - echo "
\n"; - //echo "Enter the agent contact number.\n"; - echo "
\n"; - echo " Resolution Code:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the resolution code.\n"; - echo "
\n"; - echo " Transaction ID:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the Transaction ID.\n"; - echo "
\n"; - echo " Action Item:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the Action Item.\n"; - echo "
\n"; - echo " Notes:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the notes.\n"; - echo "
\n"; - if (strlen($uuid) == 0) { - $uuid = $agent_last_uuid; - } - echo " \n"; - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent/v_fifo_agent_login.php b/app/fifo_agents/fifo_agent/v_fifo_agent_login.php deleted file mode 100644 index 270261dd17..0000000000 --- a/app/fifo_agents/fifo_agent/v_fifo_agent_login.php +++ /dev/null @@ -1,297 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("agent") || if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//Action add or update -if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_id = check_str($_REQUEST["id"]); -} -else { - $action = "add"; -} - -//POST to PHP variables -if (count($_POST)>0) { - //$fifo_name = check_str($_POST["fifo_name"]); - $fifo_agent_profile_id = check_str($_POST["fifo_agent_profile_id"]); - $agent_username = $_SESSION["username"]; - $agent_contact_number = check_str($_POST["agent_contact_number"]); -} - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - ////recommend moving this to the config.php file - $uploadtempdir = $_ENV["TEMP"]."\\"; - ini_set('upload_tmp_dir', $uploadtempdir); - ////$imagedir = $_ENV["TEMP"]."\\"; - ////$filedir = $_ENV["TEMP"]."\\"; - - if ($action == "update") { - $fifo_agent_id = check_str($_POST["fifo_agent_id"]); - } - - //check for all required data - if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - if (strlen($fifo_agent_profile_id) == 0) { $msg .= "Please provide: profile
\n"; } - //if (strlen($fifo_name) == 0) { $msg .= "Please provide: Queue Name
\n"; } - //if (strlen($agent_username) == 0) { $msg .= "Please provide: Username
\n"; } - //if (strlen($agent_priority) == 0) { $msg .= "Please provide: Agent Priority
\n"; } - if (strlen($agent_contact_number) == 0) { $msg .= "Please provide: Contact Number
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - - $fifo_agent_profile_member_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_profile_members "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_id = '$fifo_agent_profile_id' "; - $sql .= "and agent_username = '$agent_username' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $fifo_agent_profile_member_id = $row["fifo_agent_profile_member_id"]; - $fifo_agent_profile_id = $row["fifo_agent_profile_id"]; - $fifo_name = $row["fifo_name"]; - $agent_priority = $row["agent_priority"]; - $agent_status = '2'; //available - $agent_last_call = 0; - - $sql = "insert into v_fifo_agents "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "fifo_name, "; - $sql .= "agent_username, "; - $sql .= "agent_priority, "; - $sql .= "agent_status, "; - $sql .= "agent_status_epoch, "; - $sql .= "agent_last_call, "; - $sql .= "agent_contact_number "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$fifo_name', "; - $sql .= "'$agent_username', "; - $sql .= "'$agent_priority', "; - $sql .= "'$agent_status', "; - $sql .= "'".time()."', "; - $sql .= "'$agent_last_call', "; - $sql .= "'$agent_contact_number' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - //agent status log login - $agent_status = '1'; //login - $sql = "insert into v_fifo_agent_status_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "username, "; - $sql .= "agent_status, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'".$_SESSION["username"]."', "; - $sql .= "'$agent_status', "; - $sql .= "now() "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - } - unset ($prep_statement); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Login Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - /* - if ($action == "update") { - $sql = "update v_fifo_agents set "; - $sql .= "domain_uuid = '$domain_uuid', "; - $sql .= "fifo_name = '$fifo_name', "; - $sql .= "agent_username = '$agent_username', "; - $sql .= "agent_priority = '$agent_priority', "; - $sql .= "agent_contact_number = '$agent_contact_number' "; - $sql .= "where fifo_agent_id = '$fifo_agent_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - */ - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - /* - if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agents "; - $sql .= "where fifo_agent_id = '$fifo_agent_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $domain_uuid = $row["domain_uuid"]; - $fifo_name = $row["fifo_name"]; - $agent_username = $row["agent_username"]; - $agent_priority = $row["agent_priority"]; - $agent_contact_number = $row["agent_contact_number"]; - break; //limit to 1 row - } - unset ($prep_statement); - } - */ - -//begin the content - require_once "includes/header.php"; - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - //if ($action == "update") { - // echo "\n"; - //} - echo "\n"; - echo "\n"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo " \n"; - echo " \n"; - echo " "; - echo "
Agent LoginAgent Login
\n"; - echo " Profile Name:\n"; - echo "\n"; - - $sql = ""; - $sql .= "select * from v_fifo_agent_profiles "; - $sql .= "where domain_uuid = '$domain_uuid' "; - //$sql .= "and fifo_agent_profile_id = '$fifo_agent_profile_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $x = 0; - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - echo "\n"; - unset ($prep_statement); - - - echo "
\n"; - echo " Contact Number:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the agent contact number.\n"; - echo "
\n"; - //if ($action == "update") { - // echo " \n"; - //} - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent/v_fifo_agent_logout.php b/app/fifo_agents/fifo_agent/v_fifo_agent_logout.php deleted file mode 100644 index 1847a73a59..0000000000 --- a/app/fifo_agents/fifo_agent/v_fifo_agent_logout.php +++ /dev/null @@ -1,74 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("agent") || if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//agent logout - $sql = ""; - $sql .= "delete from v_fifo_agents "; - $sql .= "where agent_username = '".$_SESSION["username"]."' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); - -//agent status log login - $agent_status = '0'; //login - $sql = "insert into v_fifo_agent_status_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "username, "; - $sql .= "agent_status, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'".$_SESSION["username"]."', "; - $sql .= "'$agent_status', "; - $sql .= "now() "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - -//redirect - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Logout Complete\n"; - echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent/v_fifo_agent_remote.php b/app/fifo_agents/fifo_agent/v_fifo_agent_remote.php deleted file mode 100644 index 26227d3097..0000000000 --- a/app/fifo_agents/fifo_agent/v_fifo_agent_remote.php +++ /dev/null @@ -1,52 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("agent") || if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//show the header - require_once "includes/header.php"; - -echo "
\n"; -echo " \n"; -echo "   \n"; -echo "
\n"; - -//show the iframe - echo "\n"; - -//show the footer - require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent_call_logs/root.php b/app/fifo_agents/fifo_agent_call_logs/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/fifo_agent_call_logs/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.php b/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.php deleted file mode 100644 index 825f985a6e..0000000000 --- a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.php +++ /dev/null @@ -1,170 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Fifo Agent Call Data 
\n"; - echo "The agent call data show a list of call calls agents have received.

\n"; - echo "
\n"; - - - $sql = ""; - $sql .= " select * from v_fifo_agent_call_logs "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 10; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - //$sql .= " select * from v_fifo_agent_call_logs "; - $sql .= " select * from v_fifo_agent_call_data "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('call_uuid', 'Call UUID', $order_by, $order); - echo th_order_by('resolution_code', 'Resolution Code', $order_by, $order); - echo th_order_by('transaction_id', 'Transaction ID', $order_by, $order); - echo th_order_by('action_item', 'Action Item', $order_by, $order); - echo th_order_by('notes', 'Notes', $order_by, $order); - echo th_order_by('add_user', 'Add User', $order_by, $order); - echo th_order_by('add_date', 'Add Date', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[call_uuid]."".$row[resolution_code]."".$row[transaction_id]."".$row[action_item]."".$row[notes]."".$row[add_user]."".$row[add_date]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.sql b/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.sql deleted file mode 100644 index dcad41b95a..0000000000 --- a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agent_call_logs ( fifo_agent_call_log_id INTEGER PRIMARY KEY, v_id TEXT, resolution_code TEXT, transaction_id TEXT, action_item TEXT, uuid TEXT, notes TEXT, add_user TEXT, add_date TEXT ); diff --git a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_delete.php b/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_delete.php deleted file mode 100644 index 1b88a20292..0000000000 --- a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_delete.php +++ /dev/null @@ -1,61 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_fifo_agent_call_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_call_log_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_edit.php b/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_edit.php deleted file mode 100644 index 39b2927552..0000000000 --- a/app/fifo_agents/fifo_agent_call_logs/v_fifo_agent_call_logs_edit.php +++ /dev/null @@ -1,299 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//Action add or update -if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_call_log_id = check_str($_REQUEST["id"]); -} -else { - $action = "add"; -} - -//POST to PHP variables -if (count($_POST)>0) { - $resolution_code = check_str($_POST["resolution_code"]); - $transaction_id = check_str($_POST["transaction_id"]); - $action_item = check_str($_POST["action_item"]); - $uuid = check_str($_POST["uuid"]); - $notes = check_str($_POST["notes"]); - $add_user = check_str($_POST["add_user"]); - $add_date = check_str($_POST["add_date"]); -} - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - if ($action == "update") { - $fifo_agent_call_log_id = check_str($_POST["fifo_agent_call_log_id"]); - } - - //check for all required data - //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - //if (strlen($resolution_code) == 0) { $msg .= "Please provide: Resolution Code
\n"; } - //if (strlen($transaction_id) == 0) { $msg .= "Please provide: Transaction ID
\n"; } - //if (strlen($action_item) == 0) { $msg .= "Please provide: Action Item
\n"; } - //if (strlen($uuid) == 0) { $msg .= "Please provide: UUID
\n"; } - //if (strlen($notes) == 0) { $msg .= "Please provide: Notes
\n"; } - //if (strlen($add_user) == 0) { $msg .= "Please provide: Add User
\n"; } - //if (strlen($add_date) == 0) { $msg .= "Please provide: Add Date
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agent_call_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "resolution_code, "; - $sql .= "transaction_id, "; - $sql .= "action_item, "; - $sql .= "uuid, "; - $sql .= "notes, "; - $sql .= "add_user, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$resolution_code', "; - $sql .= "'$transaction_id', "; - $sql .= "'$action_item', "; - $sql .= "'$uuid', "; - $sql .= "'$notes', "; - $sql .= "'$add_user', "; - $sql .= "'$add_date' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agent_call_logs set "; - $sql .= "resolution_code = '$resolution_code', "; - $sql .= "transaction_id = '$transaction_id', "; - $sql .= "action_item = '$action_item', "; - $sql .= "uuid = '$uuid', "; - $sql .= "notes = '$notes', "; - $sql .= "add_user = '$add_user', "; - $sql .= "add_date = '$add_date' "; - $sql .= "where domain_uuid = '$domain_uuid'"; - $sql .= "and fifo_agent_call_log_id = '$fifo_agent_call_log_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form -if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_call_log_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_call_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_call_log_id = '$fifo_agent_call_log_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $resolution_code = $row["resolution_code"]; - $transaction_id = $row["transaction_id"]; - $action_item = $row["action_item"]; - $uuid = $row["uuid"]; - $notes = $row["notes"]; - $add_user = $row["add_user"]; - $add_date = $row["add_date"]; - break; //limit to 1 row - } - unset ($prep_statement); -} - -//begin the content - require_once "includes/header.php"; - - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
Fifo Agent Call Log AddFifo Agent Call Log Edit
\n"; - echo "The agent call logs show a list of call calls agents have received.

\n"; - echo "
\n"; - echo " Resolution Code:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the resolution code.\n"; - echo "
\n"; - echo " Transaction ID:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the Transaction ID.\n"; - echo "
\n"; - echo " Action Item:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the Action Item.\n"; - echo "
\n"; - echo " UUID:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the UUID.\n"; - echo "
\n"; - echo " Notes:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the notes.\n"; - echo "
\n"; - echo " Add User:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo " Add Date:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent_profiles/root.php b/app/fifo_agents/fifo_agent_profiles/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.php deleted file mode 100644 index 689e8013cb..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.php +++ /dev/null @@ -1,161 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Agent Member List 
\n"; - - - $sql = ""; - $sql .= " select * from v_fifo_agent_profile_members "; - $sql .= " where domain_uuid = '$domain_uuid' "; - $sql .= " and fifo_agent_profile_id = '$fifo_agent_profile_id' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 100; - $param = "&id=".$_GET['id']; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= " select * from v_fifo_agent_profile_members "; - $sql .= " where domain_uuid = '$domain_uuid' "; - $sql .= " and fifo_agent_profile_id = '$fifo_agent_profile_id' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('fifo_name', 'FIFO Name', $order_by, $order); - echo th_order_by('agent_username', 'Agent', $order_by, $order); - echo th_order_by('agent_priority', 'Agent Priority', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[fifo_name]."".$row[agent_username]."".$row[agent_priority]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.sql b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.sql deleted file mode 100644 index 8d5c990d3e..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agent_profile_members (fifo_agent_profile_member_id INTEGER PRIMARY KEY, v_id NUMBER, fifo_agent_profile_id NUMBER, fifo_name TEXT, agent_priority TEXT, agent_username TEXT); diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_delete.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_delete.php deleted file mode 100644 index 2de2f84828..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_delete.php +++ /dev/null @@ -1,62 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); - $fifo_agent_profile_id = check_str($_GET["fifo_agent_profile_id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_fifo_agent_profile_members "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_member_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_edit.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_edit.php deleted file mode 100644 index 6b8ee32a71..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profile_members_edit.php +++ /dev/null @@ -1,359 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//Action add or update -if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_profile_member_id = check_str($_REQUEST["id"]); -} -else { - $action = "add"; -} - -if (strlen($_GET["fifo_agent_profile_id"]) > 0) { - $fifo_agent_profile_id = check_str($_GET["fifo_agent_profile_id"]); -} - -//POST to PHP variables -if (count($_POST)>0) { - //$domain_uuid = check_str($_POST["domain_uuid"]); - $fifo_agent_profile_id = check_str($_POST["fifo_agent_profile_id"]); - $fifo_name = check_str($_POST["fifo_name"]); - $agent_priority = check_str($_POST["agent_priority"]); - $agent_username = check_str($_POST["agent_username"]); -} - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - ////recommend moving this to the config.php file - $uploadtempdir = $_ENV["TEMP"]."\\"; - ini_set('upload_tmp_dir', $uploadtempdir); - ////$imagedir = $_ENV["TEMP"]."\\"; - ////$filedir = $_ENV["TEMP"]."\\"; - - if ($action == "update") { - $fifo_agent_profile_member_id = check_str($_POST["fifo_agent_profile_member_id"]); - } - - //check for all required data - if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - if (strlen($fifo_agent_profile_id) == 0) { $msg .= "Please provide: fifo_agent_profile_id
\n"; } - //if (strlen($fifo_name) == 0) { $msg .= "Please provide: FIFO Name
\n"; } - //if (strlen($agent_priority) == 0) { $msg .= "Please provide: Agent Priority
\n"; } - //if (strlen($agent_username) == 0) { $msg .= "Please provide: Agent
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - -//add or update the database -if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agent_profile_members "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "fifo_agent_profile_id, "; - $sql .= "fifo_name, "; - $sql .= "agent_priority, "; - $sql .= "agent_username "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$fifo_agent_profile_id', "; - $sql .= "'$fifo_name', "; - $sql .= "'$agent_priority', "; - $sql .= "'$agent_username' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agent_profile_members set "; - $sql .= "fifo_agent_profile_id = '$fifo_agent_profile_id', "; - $sql .= "fifo_name = '$fifo_name', "; - $sql .= "agent_priority = '$agent_priority', "; - $sql .= "agent_username = '$agent_username' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_member_id = '$fifo_agent_profile_member_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") -} //if ($_POST["persistformvar"] != "true") { - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form -if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_profile_member_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_profile_members "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_member_id = '$fifo_agent_profile_member_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $fifo_agent_profile_id = $row["fifo_agent_profile_id"]; - $fifo_name = $row["fifo_name"]; - $agent_priority = $row["agent_priority"]; - $agent_username = $row["agent_username"]; - break; //limit to 1 row - } - unset ($prep_statement); -} - - - require_once "includes/header.php"; - - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo " \n"; - echo " \n"; - echo " "; - echo "
Agent Member List AddAgent Member List Edit
\n"; - echo " Queue Name:\n"; - echo "\n"; - //echo " \n"; - - //generate the fifo name select list - $sql = ""; - $sql .= "select * from v_dialplan_details "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $x = 0; - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - echo "\n"; - unset ($prep_statement); - - - echo "
\n"; - echo "Select the queue name.\n"; - echo "
\n"; - echo " Agent:\n"; - echo "\n"; - //echo " \n"; - - //generate the user list - $sql = "SELECT * FROM v_users "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and user_enabled = 'true' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - - echo ""; - unset($sql, $result); - - echo "
\n"; - echo "Select the agent.\n"; - echo "
\n"; - echo " Agent Priority:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Select the agent priority.\n"; - echo "
\n"; - echo " \n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.php deleted file mode 100644 index 569b20430c..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.php +++ /dev/null @@ -1,156 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Agent Profile List 
\n"; - - - $sql = ""; - $sql .= "select * from v_fifo_agent_profiles "; - $sql .= "where domain_uuid = '$domain_uuid' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 10; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= "select * from v_fifo_agent_profiles "; - $sql .= "where domain_uuid = '$domain_uuid' "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('profile_name', 'Profile Name', $order_by, $order); - echo th_order_by('profile_desc', 'Description', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[profile_name]."".$row[profile_desc]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.sql b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.sql deleted file mode 100644 index 07ab882606..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agent_profiles (fifo_agent_profile_id INTEGER PRIMARY KEY, v_id NUMBER, profile_name TEXT, profile_desc TEXT); diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_delete.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_delete.php deleted file mode 100644 index b02c5e21eb..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_delete.php +++ /dev/null @@ -1,72 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - - //delete child data - $sql = ""; - $sql .= "delete from v_fifo_agent_profile_members "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql, $prep_statement); - - //delete parent data - $sql = ""; - $sql .= "delete from v_fifo_agent_profiles "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql, $prep_statement); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_edit.php b/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_edit.php deleted file mode 100644 index 89381c9159..0000000000 --- a/app/fifo_agents/fifo_agent_profiles/v_fifo_agent_profiles_edit.php +++ /dev/null @@ -1,222 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//Action add or update -if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_profile_id = check_str($_REQUEST["id"]); -} -else { - $action = "add"; -} - -//POST to PHP variables -if (count($_POST)>0) { - //$domain_uuid = check_str($_POST["domain_uuid"]); - $profile_name = check_str($_POST["profile_name"]); - $profile_desc = check_str($_POST["profile_desc"]); -} - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - ////recommend moving this to the config.php file - $uploadtempdir = $_ENV["TEMP"]."\\"; - ini_set('upload_tmp_dir', $uploadtempdir); - ////$imagedir = $_ENV["TEMP"]."\\"; - ////$filedir = $_ENV["TEMP"]."\\"; - - if ($action == "update") { - $fifo_agent_profile_id = check_str($_POST["fifo_agent_profile_id"]); - } - - //check for all required data - if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - if (strlen($profile_name) == 0) { $msg .= "Please provide: Profile Name
\n"; } - if (strlen($profile_desc) == 0) { $msg .= "Please provide: Description
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agent_profiles "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "profile_name, "; - $sql .= "profile_desc "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$profile_name', "; - $sql .= "'$profile_desc' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agent_profiles set "; - $sql .= "domain_uuid = '$domain_uuid', "; - $sql .= "profile_name = '$profile_name', "; - $sql .= "profile_desc = '$profile_desc' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_id = '$fifo_agent_profile_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form -if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_profile_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_profiles "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_profile_id = '$fifo_agent_profile_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $domain_uuid = $row["domain_uuid"]; - $profile_name = $row["profile_name"]; - $profile_desc = $row["profile_desc"]; - break; //limit to 1 row - } - unset ($prep_statement); -} - - - require_once "includes/header.php"; - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
Agent Profile AddAgent Profile Edit
\n"; - echo " Profile Name:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the profile name.\n"; - echo "
\n"; - echo " Description:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the description.\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - if ($action == "update") { - require "v_fifo_agent_profile_members.php"; - } - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_agent_status_logs/root.php b/app/fifo_agents/fifo_agent_status_logs/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/fifo_agent_status_logs/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.php b/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.php deleted file mode 100644 index e26d8177dc..0000000000 --- a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.php +++ /dev/null @@ -1,185 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - -//get the agent status session array - //unset($_SESSION["array_agent_status"]); - if (!is_array($_SESSION["array_agent_status"])) { - $sql = "SELECT var_name, var_value FROM v_vars "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and var_cat = 'Queues Agent Status' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - } - -//send the content to the browser - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Fifo Agent Status Log List 
\n"; - echo "Agent Status History

\n"; - echo "
\n"; - - - $sql = ""; - $sql .= " select * from v_fifo_agent_status_logs "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 100; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= " select * from v_fifo_agent_status_logs "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('username', 'Username', $order_by, $order); - echo th_order_by('agent_status', 'Status', $order_by, $order); - echo th_order_by('uuid', 'UUID', $order_by, $order); - echo th_order_by('add_date', 'Add Date', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //print_r( $row ); - //set the php variables - $agent_status = $row[agent_status]; - - //get the agent description - $agent_status_desc = $_SESSION["array_agent_status"][$agent_status]; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[username]."".$agent_status_desc."".$row[uuid]." ".$row[add_date]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.sql b/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.sql deleted file mode 100644 index 5d8c919e35..0000000000 --- a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agent_status_logs (fifo_agent_status_log_id INTEGER PRIMARY KEY, v_id NUMBER, username TEXT, agent_status TEXT, uuid TEXT, add_date TEXT) diff --git a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_delete.php b/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_delete.php deleted file mode 100644 index 2ab49480f8..0000000000 --- a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_delete.php +++ /dev/null @@ -1,60 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_fifo_agent_status_logs "; - $sql .= "where fifo_agent_status_log_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_edit.php b/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_edit.php deleted file mode 100644 index 93fe33aa9f..0000000000 --- a/app/fifo_agents/fifo_agent_status_logs/v_fifo_agent_status_logs_edit.php +++ /dev/null @@ -1,262 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//action add or update - if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_status_log_id = check_str($_REQUEST["id"]); - } - else { - $action = "add"; - } - -//POST to PHP variables - if (count($_POST)>0) { - $username = check_str($_POST["username"]); - $agent_status = check_str($_POST["agent_status"]); - $uuid = check_str($_POST["uuid"]); - $add_date = check_str($_POST["add_date"]); - } - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - if ($action == "update") { - $fifo_agent_status_log_id = check_str($_POST["fifo_agent_status_log_id"]); - } - - //check for all required data - //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - //if (strlen($username) == 0) { $msg .= "Please provide: Username
\n"; } - //if (strlen($agent_status) == 0) { $msg .= "Please provide: Status
\n"; } - //if (strlen($uuid) == 0) { $msg .= "Please provide: UUID
\n"; } - //if (strlen($add_date) == 0) { $msg .= "Please provide: Add Date
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - - //add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agent_status_logs "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "username, "; - $sql .= "agent_status, "; - $sql .= "uuid, "; - $sql .= "add_date "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$username', "; - $sql .= "'$agent_status', "; - $sql .= "'$uuid', "; - $sql .= "now() "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agent_status_logs set "; - $sql .= "domain_uuid = '$domain_uuid', "; - $sql .= "username = '$username', "; - $sql .= "agent_status = '$agent_status', "; - $sql .= "uuid = '$uuid', "; - $sql .= "add_date = '$add_date' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_status_log_id = '$fifo_agent_status_log_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - - -//pre-populate the form - if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_status_log_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_status_logs "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_status_log_id = '$fifo_agent_status_log_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $domain_uuid = $row["domain_uuid"]; - $username = $row["username"]; - $agent_status = $row["agent_status"]; - $uuid = $row["uuid"]; - $add_date = $row["add_date"]; - break; //limit to 1 row - } - unset ($prep_statement); - } - - -//send the content - require_once "includes/header.php"; - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
Fifo Agent Status Log AddFifo Agent Status Log Edit
\n"; - echo "Agent Status History

\n"; - echo "
\n"; - echo " domain_uuid:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo " Username:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the Username.\n"; - echo "
\n"; - echo " Status:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the agent status.\n"; - echo "
\n"; - echo " UUID:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the UUID.\n"; - echo "
\n"; - echo " Add Date:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo " Enter the date.\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/fifo_languages/root.php b/app/fifo_agents/fifo_languages/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/fifo_languages/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/fifo_languages/v_fifo_agent_languages.php b/app/fifo_agents/fifo_languages/v_fifo_agent_languages.php deleted file mode 100644 index 68c4d6fded..0000000000 --- a/app/fifo_agents/fifo_languages/v_fifo_agent_languages.php +++ /dev/null @@ -1,161 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Fifo Agent Language List 
\n"; - echo "Matches the Agent with languages they can speak with their proficiency level.

\n"; - echo "
\n"; - - - $sql = ""; - $sql .= " select * from v_fifo_agent_languages "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $num_rows = count($result); - unset ($prep_statement, $result, $sql); - $rows_per_page = 10; - $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; - - $sql = ""; - $sql .= " select * from v_fifo_agent_languages "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - $sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('username', 'Username', $order_by, $order); - echo th_order_by('language', 'Language', $order_by, $order); - echo th_order_by('proficiency', 'Proficiency', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //print_r( $row ); - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[username]."".$row[language]."".$row[proficiency]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/fifo_languages/v_fifo_agent_languages.sql b/app/fifo_agents/fifo_languages/v_fifo_agent_languages.sql deleted file mode 100644 index 70e91ae3a3..0000000000 --- a/app/fifo_agents/fifo_languages/v_fifo_agent_languages.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agent_languages (fifo_agent_language_id INTEGER PRIMARY KEY, v_id TEXT, username TEXT, language TEXT, proficiency TEXT); diff --git a/app/fifo_agents/fifo_languages/v_fifo_agent_languages_delete.php b/app/fifo_agents/fifo_languages/v_fifo_agent_languages_delete.php deleted file mode 100644 index 20010421c2..0000000000 --- a/app/fifo_agents/fifo_languages/v_fifo_agent_languages_delete.php +++ /dev/null @@ -1,60 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_fifo_agent_languages "; - $sql .= "where fifo_agent_language_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/fifo_languages/v_fifo_agent_languages_edit.php b/app/fifo_agents/fifo_languages/v_fifo_agent_languages_edit.php deleted file mode 100644 index be2db09c21..0000000000 --- a/app/fifo_agents/fifo_languages/v_fifo_agent_languages_edit.php +++ /dev/null @@ -1,337 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//Action add or update -if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_language_id = check_str($_REQUEST["id"]); -} -else { - $action = "add"; -} - -//POST to PHP variables - if (count($_POST)>0) { - $username = check_str($_POST["username"]); - $language = check_str($_POST["language"]); - $proficiency = check_str($_POST["proficiency"]); - } - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - if ($action == "update") { - $fifo_agent_language_id = check_str($_POST["fifo_agent_language_id"]); - } - - //check for all required data - //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - //if (strlen($username) == 0) { $msg .= "Please provide: Username
\n"; } - //if (strlen($language) == 0) { $msg .= "Please provide: Language
\n"; } - //if (strlen($proficiency) == 0) { $msg .= "Please provide: Proficiency
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - - //Add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agent_languages "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "username, "; - $sql .= "language, "; - $sql .= "proficiency "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$username', "; - $sql .= "'$language', "; - $sql .= "'$proficiency' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agent_languages set "; - $sql .= "domain_uuid = '$domain_uuid', "; - $sql .= "username = '$username', "; - $sql .= "language = '$language', "; - $sql .= "proficiency = '$proficiency' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_language_id = '$fifo_agent_language_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_language_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agent_languages "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and fifo_agent_language_id = '$fifo_agent_language_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $domain_uuid = $row["domain_uuid"]; - $username = $row["username"]; - $language = $row["language"]; - $proficiency = $row["proficiency"]; - break; //limit to 1 row - } - unset ($prep_statement); - } - -//begin the content - require_once "includes/header.php"; - - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
Fifo Agent Language AddFifo Agent Language Edit
\n"; - echo "Matches the Agent with languages they can speak with their proficiency level.

\n"; - echo "
\n"; - echo " Username:\n"; - echo "\n"; - - //generate the user list - $sql = "SELECT * FROM v_users "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and user_enabled = 'true' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - - echo ""; - unset($sql, $result); - - echo "
\n"; - echo "Select the Username from the list.\n"; - echo "
\n"; - echo " Language:\n"; - echo "\n"; - - //generate the language select list - $sql = "SELECT var_name, var_value FROM v_vars "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and var_cat = 'Languages' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - echo ""; - - echo "
\n"; - echo "Enter the two letter language code.\n"; - echo "
\n"; - echo " Proficiency:\n"; - echo "\n"; - - echo " \n"; - echo "
\n"; - echo "Select the language proficiency level.\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?> diff --git a/app/fifo_agents/root.php b/app/fifo_agents/root.php deleted file mode 100644 index 7b882438ea..0000000000 --- a/app/fifo_agents/root.php +++ /dev/null @@ -1,50 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ - -// make sure the PATH_SEPARATOR is defined - if (!defined("PATH_SEPARATOR")) { - if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); } - } - -// make sure the document_root is set - $_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]); - $_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]); - //echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."
\n"; - //echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."
\n"; - //echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."
\n"; - -// if the project directory exists then add it to the include path otherwise add the document root to the include path - if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){ - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' ); - } - else { - if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); } - set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] ); - } - -?> \ No newline at end of file diff --git a/app/fifo_agents/v_fifo_agents.php b/app/fifo_agents/v_fifo_agents.php deleted file mode 100644 index b4f0038b2d..0000000000 --- a/app/fifo_agents/v_fifo_agents.php +++ /dev/null @@ -1,206 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} -require_once "includes/header.php"; -require_once "includes/paging.php"; - - -//$time_start = microtime(true); -//sleep for a while -//usleep(1000000); - - -$order_by = $_GET["order_by"]; -$order = $_GET["order"]; - - - echo "
"; - echo "\n"; - echo "\n"; - echo " "; - echo ""; - echo "
\n"; - echo "
"; - - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Active Agents 
\n"; - echo "Shows the agents that are currently logged into the queues.

\n"; - echo "
\n"; - - //set the default order by and order asc, desc - if (strlen($order_by) == 0) { - $order_by = 'fifo_name'; - $order = 'asc'; - } - - //run the sql queries - $sql = ""; - $sql .= " select * from v_fifo_agents "; - if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; } - //$sql .= " limit $rows_per_page offset $offset "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - $result_count = count($result); - unset ($prep_statement, $sql); - - - $c = 0; - $row_style["0"] = "row_style0"; - $row_style["1"] = "row_style1"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - echo th_order_by('fifo_name', 'Queue Name', $order_by, $order); - echo th_order_by('agent_username', 'Username', $order_by, $order); - echo th_order_by('agent_priority', 'Agent Priority', $order_by, $order); - echo th_order_by('agent_status', 'Status', $order_by, $order); - echo th_order_by('agent_last_call', 'Last Call', $order_by, $order); - echo th_order_by('agent_last_uuid', 'Last UUID', $order_by, $order); - echo th_order_by('agent_contact_number', 'Contact Number', $order_by, $order); - echo "\n"; - echo "\n"; - - if ($result_count == 0) { //no results - } - else { //received results - foreach($result as $row) { - //set the php variables - $agent_last_call = $row[agent_last_call]; - $agent_status = $row[agent_status]; - - //format the last call time - if ($agent_last_call == 0) { - $agent_last_call_desc = ''; - } - else { - $agent_last_call_desc = date("g:i:s a j M Y",$agent_last_call); - } - - //get the agent status session array - //unset($_SESSION["array_agent_status"]); - if (!is_array($_SESSION["array_agent_status"])) { - $sql = "SELECT var_name, var_value FROM v_vars "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and var_cat = 'Queues Agent Status' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - } - - //get the agent description - $agent_status_desc = $_SESSION["array_agent_status"][$agent_status]; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n"; - if ($c==0) { $c=1; } else { $c=0; } - } //end foreach - unset($sql, $result, $row_count); - } //end if results - - - echo "\n"; - echo "\n"; - echo "\n"; - - - echo "
\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
".$row[fifo_name]."".$row[agent_username]."".$row[agent_priority]."".$agent_status_desc."".$agent_last_call_desc." ".$row[agent_last_uuid]." ".$row[agent_contact_number]."\n"; - echo " $v_link_label_edit\n"; - echo " $v_link_label_delete\n"; - //echo " \n"; - //echo " \n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - //echo " \n"; - echo " \n"; - echo " \n"; - echo "
 $paging_controls\n"; - echo " $v_link_label_add\n"; - //echo " \n"; - echo "
\n"; - echo "
"; - echo "
"; - echo "

"; - echo "

"; - -//sleep(1); -//$time_end = microtime(true); -//$time = $time_end - $time_start; -//if ($time < 2) { -// echo "use cache "; -//} -//else { -// echo "expired the cache "; -//} -//echo "load time $time seconds\n"; - - echo "
"; - echo "
"; - echo "

"; - - -require_once "includes/footer.php"; -unset ($result_count); -unset ($result); -unset ($key); -unset ($val); -unset ($c); -?> diff --git a/app/fifo_agents/v_fifo_agents.sql b/app/fifo_agents/v_fifo_agents.sql deleted file mode 100644 index 39e9bc5aa7..0000000000 --- a/app/fifo_agents/v_fifo_agents.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE v_fifo_agents (fifo_agent_id INTEGER PRIMARY KEY, v_id NUMBER, fifo_name TEXT, agent_username TEXT, agent_priority TEXT, agent_status TEXT, agent_status_epoch NUMBER, agent_last_call NUMBER, agent_last_uuid TEXT, agent_contact_number NUMBER) diff --git a/app/fifo_agents/v_fifo_agents_delete.php b/app/fifo_agents/v_fifo_agents_delete.php deleted file mode 100644 index ea3778c349..0000000000 --- a/app/fifo_agents/v_fifo_agents_delete.php +++ /dev/null @@ -1,60 +0,0 @@ - - Portions created by the Initial Developer are Copyright (C) 2008-2012 - the Initial Developer. All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -if (count($_GET)>0) { - $id = check_str($_GET["id"]); -} - -if (strlen($id)>0) { - $sql = ""; - $sql .= "delete from v_fifo_agents "; - $sql .= "where fifo_agent_id = '$id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - unset($sql); -} - -require_once "includes/header.php"; -echo "\n"; -echo "
\n"; -echo "Delete Complete\n"; -echo "
\n"; - -require_once "includes/footer.php"; -return; - -?> - diff --git a/app/fifo_agents/v_fifo_agents_edit.php b/app/fifo_agents/v_fifo_agents_edit.php deleted file mode 100644 index cf21122ada..0000000000 --- a/app/fifo_agents/v_fifo_agents_edit.php +++ /dev/null @@ -1,480 +0,0 @@ - - Copyright (C) 2010 - All Rights Reserved. - - Contributor(s): - Mark J Crane -*/ -require_once "root.php"; -require_once "includes/require.php"; -require_once "includes/checkauth.php"; -if (if_group("admin") || if_group("superadmin")) { - //access granted -} -else { - echo "access denied"; - exit; -} - -//action add or update - if (isset($_REQUEST["id"])) { - $action = "update"; - $fifo_agent_id = check_str($_REQUEST["id"]); - } - else { - $action = "add"; - } - -//get http post variables and set them to php variables - if (count($_POST)>0) { - $fifo_name = check_str($_POST["fifo_name"]); - $agent_username = check_str($_POST["agent_username"]); - $agent_priority = check_str($_POST["agent_priority"]); - $agent_status = check_str($_POST["agent_status"]); - $agent_last_call = check_str($_POST["agent_last_call"]); - $agent_last_uuid = check_str($_POST["agent_last_uuid"]); - $agent_contact_number = check_str($_POST["agent_contact_number"]); - } - -if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { - - $msg = ''; - - ////recommend moving this to the config.php file - $uploadtempdir = $_ENV["TEMP"]."\\"; - ini_set('upload_tmp_dir', $uploadtempdir); - ////$imagedir = $_ENV["TEMP"]."\\"; - ////$filedir = $_ENV["TEMP"]."\\"; - - if ($action == "update") { - $fifo_agent_id = check_str($_POST["fifo_agent_id"]); - } - - //check for all required data - if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - if (strlen($fifo_name) == 0) { $msg .= "Please provide: Queue Name
\n"; } - if (strlen($agent_username) == 0) { $msg .= "Please provide: Username
\n"; } - if (strlen($agent_priority) == 0) { $msg .= "Please provide: Agent Priority
\n"; } - if (strlen($agent_status) == 0) { $msg .= "Please provide: Status
\n"; } - //if (strlen($agent_last_call) == 0) { $msg .= "Please provide: Last Call
\n"; } - //if (strlen($agent_last_uuid) == 0) { $msg .= "Please provide: Last UUID
\n"; } - //if (strlen($agent_contact_number) == 0) { $msg .= "Please provide: Contact Number
\n"; } - if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { - require_once "includes/header.php"; - require_once "includes/persistformvar.php"; - echo "
\n"; - echo "
\n"; - echo $msg."
"; - echo "
\n"; - persistformvar($_POST); - echo "
\n"; - require_once "includes/footer.php"; - return; - } - - //Add or update the database - if ($_POST["persistformvar"] != "true") { - if ($action == "add") { - $sql = "insert into v_fifo_agents "; - $sql .= "("; - $sql .= "domain_uuid, "; - $sql .= "fifo_name, "; - $sql .= "agent_username, "; - $sql .= "agent_priority, "; - $sql .= "agent_status, "; - $sql .= "agent_last_call, "; - $sql .= "agent_last_uuid, "; - $sql .= "agent_contact_number "; - $sql .= ")"; - $sql .= "values "; - $sql .= "("; - $sql .= "'$domain_uuid', "; - $sql .= "'$fifo_name', "; - $sql .= "'$agent_username', "; - $sql .= "'$agent_priority', "; - $sql .= "'$agent_status', "; - $sql .= "'$agent_last_call', "; - $sql .= "'$agent_last_uuid', "; - $sql .= "'$agent_contact_number' "; - $sql .= ")"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Add Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "add") - - if ($action == "update") { - $sql = "update v_fifo_agents set "; - $sql .= "domain_uuid = '$domain_uuid', "; - $sql .= "fifo_name = '$fifo_name', "; - $sql .= "agent_username = '$agent_username', "; - $sql .= "agent_priority = '$agent_priority', "; - $sql .= "agent_status = '$agent_status', "; - $sql .= "agent_status_epoch = ".time()." "; - $sql .= "agent_last_call = '$agent_last_call', "; - $sql .= "agent_last_uuid = '$agent_last_uuid', "; - $sql .= "agent_contact_number = '$agent_contact_number' "; - $sql .= "where fifo_agent_id = '$fifo_agent_id'"; - $db->exec(check_sql($sql)); - unset($sql); - - require_once "includes/header.php"; - echo "\n"; - echo "
\n"; - echo "Update Complete\n"; - echo "
\n"; - require_once "includes/footer.php"; - return; - } //if ($action == "update") - } //if ($_POST["persistformvar"] != "true") - -} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) - -//pre-populate the form - if (count($_GET)>0 && $_POST["persistformvar"] != "true") { - $fifo_agent_id = $_GET["id"]; - $sql = ""; - $sql .= "select * from v_fifo_agents "; - $sql .= "where fifo_agent_id = '$fifo_agent_id' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($result as &$row) { - $fifo_name = $row["fifo_name"]; - $agent_username = $row["agent_username"]; - $agent_priority = $row["agent_priority"]; - $agent_status = $row["agent_status"]; - $agent_last_call = $row["agent_last_call"]; - $agent_last_uuid = $row["agent_last_uuid"]; - $agent_contact_number = $row["agent_contact_number"]; - break; //limit to 1 row - } - unset ($prep_statement); - } - -//send the content to the browser - require_once "includes/header.php"; - - - echo "
"; - echo "\n"; - - echo "\n"; - echo " "; - echo " "; - echo "
\n"; - echo "
"; - - - echo "
\n"; - - echo "
\n"; - echo "\n"; - - echo "\n"; - if ($action == "add") { - echo "\n"; - } - if ($action == "update") { - echo "\n"; - } - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo " \n"; - echo " "; - echo "
Agent LoginFifo Agent Edit
\n"; - echo "List the agents assigned to a Queue.

\n"; - echo "
\n"; - echo " Queue Name:\n"; - echo "\n"; - //echo " \n"; - - //generate the fifo name select list - $sql = ""; - $sql .= "select * from v_dialplan_details "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $x = 0; - $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - echo "\n"; - unset ($prep_statement); - - echo "
\n"; - echo "Select the queue name.\n"; - echo "
\n"; - echo " Username:\n"; - echo "\n"; - //echo " \n"; - - //generate the user list - $sql = "SELECT * FROM v_users "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and user_enabled = 'true' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - - echo ""; - unset($sql, $result); - - echo "
\n"; - echo "Select the username.\n"; - echo "
\n"; - echo " Agent Priority:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Select a priority.\n"; - echo "
\n"; - echo " Status:\n"; - echo "\n"; - //generate the agent status select list - $sql = "SELECT var_name, var_value FROM v_vars "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and var_cat = 'Queues Agent Status' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - echo ""; - /* - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - - $x=1; - foreach($_SESSION["array_agent_status"] as $value) { - echo "$x $value
\n"; - $x++; - } - */ - - if (!is_array($_SESSION["array_agent_status"])) { - echo "not an array"; - foreach($result as $field) { - $_SESSION["array_agent_status"][$field[var_value]] = $field[var_name]; - } - } - else { - //echo "is an array"; - //unset($_SESSION["array_agent_status"]); - } - unset($sql, $result); - - /* - echo " \n"; - */ - echo "
\n"; - echo "Enter the status of the Agent.\n"; - echo "
\n"; - echo " Last Call:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "\n"; - echo "
\n"; - echo " Last UUID:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the UUID for the last call.\n"; - echo "
\n"; - echo " Contact Number:\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo "Enter the agent contact number.\n"; - echo "
\n"; - if ($action == "update") { - echo " \n"; - } - echo " \n"; - echo "
"; - echo ""; - - echo "
"; - echo "
"; - - -require_once "includes/footer.php"; -?>