mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update fifo_interactive_inc.php
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
//set variables
|
//set variables
|
||||||
$fifo_name = trim($_REQUEST["c"]);
|
$fifo_name = trim($_REQUEST["c"]);
|
||||||
|
$fifo_name = preg_replace('#[^a-zA-Z0-9\-./]#', '', $fifo_name);
|
||||||
|
|
||||||
//if not the user is not a member of the superadmin then restrict to viewing their own domain
|
//if not the user is not a member of the superadmin then restrict to viewing their own domain
|
||||||
if (!if_group("superadmin")) {
|
if (!if_group("superadmin")) {
|
||||||
@@ -54,7 +55,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//prepare and send the api command over event socket
|
//prepare and send the api command over event socket
|
||||||
|
|
||||||
$switch_cmd = 'fifo list_verbose '.$fifo_name.'';
|
$switch_cmd = 'fifo list_verbose '.$fifo_name.'';
|
||||||
|
|
||||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||||
if (!$fp) {
|
if (!$fp) {
|
||||||
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
|
||||||
@@ -64,7 +67,7 @@
|
|||||||
echo "<th align='left'>Message</th>\n";
|
echo "<th align='left'>Message</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='row_style1'><strong>$msg</strong></td>\n";
|
echo "<td class='row_style1'><strong>".escape($msg)."</strong></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
@@ -193,7 +196,6 @@
|
|||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
|
|
||||||
//Current logged members
|
//Current logged members
|
||||||
//set the alternating row styles
|
//set the alternating row styles
|
||||||
$c = 0;
|
$c = 0;
|
||||||
@@ -207,20 +209,14 @@
|
|||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<th>".$text['label-username']."</th>\n";
|
echo "<th>".$text['label-username']."</th>\n";
|
||||||
echo "<th>Total inbound calls</th>\n";
|
echo "<th>Total inbound calls</th>\n";
|
||||||
echo "<th>Logged on since</th>\n";
|
echo "<th>Logged on since</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
//print_r($xml->fifo->outbound->member[0]);
|
//print_r($xml->fifo->outbound->member[0]);
|
||||||
//print_r($xml->fifo->outbound->member[1]);
|
//print_r($xml->fifo->outbound->member[1]);
|
||||||
|
|
||||||
foreach ($xml->fifo->outbound->member as $row) {
|
foreach ($xml->fifo->outbound->member as $row) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$username=explode("@",$row);
|
$username=explode("@",$row);
|
||||||
$username=explode("/",$username[0]);
|
$username=explode("/",$username[0]);
|
||||||
$username=$username[1];
|
$username=$username[1];
|
||||||
@@ -237,4 +233,5 @@
|
|||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user