Copyright (C) 2010 All Rights Reserved. Contributor(s): Mark J Crane */ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; if (permission_exists('active_queues_view')) { //access granted } else { echo "access denied"; exit; } $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); } catch(Exception $e) { //echo $e->getMessage(); } /* */ $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; foreach ($xml->fifo as $row) { foreach($row->attributes() as $tmp_name => $tmp_value) { $$tmp_name = $tmp_value; } unset($tmp_name, $tmp_value); //remove the domain from name $tmp_name = str_replace('_', ' ', $name); $tmp_name_array = explode('@', $name); $tmp_name = $tmp_name_array[0]; if (if_group("superadmin")) { //show all fifo queues echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { //show only the fifo queues that match the domain_name if (stripos($name, $_SESSION['domain_name']) !== false) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } if ($c==0) { $c=1; } else { $c=0; } } echo "
NameConsumer CountCaller CountWaiting CountImportance 
".$tmp_name."".$consumer_count."".$caller_count."".$waiting_count."".$importance."view
".$tmp_name."".$consumer_count."".$caller_count."".$waiting_count."".$importance."view
\n"; } ?>