Update fifo_list_inc.php
This commit is contained in:
parent
0455859934
commit
57147fd7f1
|
|
@ -17,22 +17,26 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010
|
||||
Copyright (C) 2010 - 2019
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('active_queue_view')) {
|
||||
|
||||
//includes
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('active_queue_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
|
|
@ -41,9 +45,10 @@ else {
|
|||
//include theme config for button images
|
||||
include_once("themes/".$_SESSION['domain']['template']['name']."/config.php");
|
||||
|
||||
$switch_cmd = 'fifo list';
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
//show the list
|
||||
$switch_cmd = 'fifo list';
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
|
||||
try {
|
||||
$xml = new SimpleXMLElement($xml_str);
|
||||
|
|
@ -95,29 +100,29 @@ if ($fp) {
|
|||
$tmp_name_array = explode('@', $name);
|
||||
$tmp_name = $tmp_name_array[0];
|
||||
|
||||
$td_onclick = "onclick=\"document.location.href='fifo_interactive.php?c=".$name."';\"";
|
||||
$td_onclick = "onclick=\"document.location.href='fifo_interactive.php?c=".escape($name)."';\"";
|
||||
|
||||
if (if_group("superadmin")) {
|
||||
//show all fifo queues
|
||||
echo "<tr >\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick."><a href='fifo_interactive.php?c=".$name."'>".$tmp_name."</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$consumer_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$caller_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$waiting_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$importance."</td>\n";
|
||||
echo "<td class='list_control_icon'><a href='fifo_interactive.php?c=".$name."' alt='".$text['button-view']."'>$v_link_label_view</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick."><a href='fifo_interactive.php?c=".escape($name)."'>".escape($tmp_name)."</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($consumer_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($caller_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($waiting_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($importance)."</td>\n";
|
||||
echo "<td class='list_control_icon'><a href='fifo_interactive.php?c=".escape($name)."' alt='".$text['button-view']."'>$v_link_label_view</a></td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
else {
|
||||
//show only the fifo queues that match the domain_name
|
||||
if (stripos($name, $_SESSION['domain_name']) !== false) {
|
||||
echo "<tr >\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick."><a href='fifo_interactive.php?c=".$name."'>".$tmp_name."</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$consumer_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$caller_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$waiting_count."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".$importance."</td>\n";
|
||||
echo "<td class='list_control_icon'><a href='fifo_interactive.php?c=".$name."' alt='".$text['button-view']."'>$v_link_label_view</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick."><a href='fifo_interactive.php?c=".$name."'>".escape($tmp_name)."</a></td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($consumer_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($caller_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($waiting_count)."</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."' ".$td_onclick.">".escape($importance)."</td>\n";
|
||||
echo "<td class='list_control_icon'><a href='fifo_interactive.php?c=".escape($name)."' alt='".$text['button-view']."'>$v_link_label_view</a></td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -125,6 +130,6 @@ if ($fp) {
|
|||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Reference in New Issue