Active Queues: Hide array warnings.
This commit is contained in:
parent
231ac12381
commit
afca52f267
|
|
@ -134,65 +134,67 @@
|
||||||
echo "<th>".$text['label-duration']."</th>\n";
|
echo "<th>".$text['label-duration']."</th>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($xml->fifo->callers->caller as $row) {
|
if (is_array($xml->fifo->callers->caller) && @sizeof($xml->fifo->callers->caller) != 0) {
|
||||||
/*
|
foreach ($xml->fifo->callers->caller as $row) {
|
||||||
$username = $row->caller_profile->username;
|
/*
|
||||||
$dialplan = $row->caller_profile->dialplan;
|
$username = $row->caller_profile->username;
|
||||||
$caller_id_name = urldecode($row->caller_profile->caller_id_name);
|
$dialplan = $row->caller_profile->dialplan;
|
||||||
$caller_id_number = $row->caller_profile->caller_id_number;
|
$caller_id_name = urldecode($row->caller_profile->caller_id_name);
|
||||||
$ani = $row->caller_profile->ani;
|
$caller_id_number = $row->caller_profile->caller_id_number;
|
||||||
$aniii = $row->caller_profile->aniii;
|
$ani = $row->caller_profile->ani;
|
||||||
$network_addr = $row->caller_profile->network_addr;
|
$aniii = $row->caller_profile->aniii;
|
||||||
$destination_number = $row->destination_number->rdnis;
|
$network_addr = $row->caller_profile->network_addr;
|
||||||
$rdnis = $row->caller_profile->rdnis;
|
$destination_number = $row->destination_number->rdnis;
|
||||||
$uuid = $row->caller_profile->uuid;
|
$rdnis = $row->caller_profile->rdnis;
|
||||||
$source = $row->caller_profile->source;
|
$uuid = $row->caller_profile->uuid;
|
||||||
$context = $row->caller_profile->context;
|
$source = $row->caller_profile->source;
|
||||||
$chan_name = $row->caller_profile->chan_name;
|
$context = $row->caller_profile->context;
|
||||||
$default_language = $row->variables->default_language;
|
$chan_name = $row->caller_profile->chan_name;
|
||||||
$fifo_position = $row->variables->fifo_position;
|
$default_language = $row->variables->default_language;
|
||||||
$fifo_priority = $row->variables->fifo_priority;
|
$fifo_position = $row->variables->fifo_position;
|
||||||
$fifo_status = $row->variables->fifo_status;
|
$fifo_priority = $row->variables->fifo_priority;
|
||||||
$fifo_timestamp = urldecode($row->variables->fifo_timestamp);
|
$fifo_status = $row->variables->fifo_status;
|
||||||
$fifo_time = strtotime($fifo_timestamp);
|
$fifo_timestamp = urldecode($row->variables->fifo_timestamp);
|
||||||
$fifo_duration = time() - $fifo_time;
|
$fifo_time = strtotime($fifo_timestamp);
|
||||||
$fifo_duration_formatted = str_pad(intval(intval($fifo_duration/3600)),2,"0",STR_PAD_LEFT).":" . str_pad(intval(($fifo_duration / 60) % 60),2,"0",STR_PAD_LEFT).":" . str_pad(intval($fifo_duration % 60),2,"0",STR_PAD_LEFT) ;
|
$fifo_duration = time() - $fifo_time;
|
||||||
*/
|
$fifo_duration_formatted = str_pad(intval(intval($fifo_duration/3600)),2,"0",STR_PAD_LEFT).":" . str_pad(intval(($fifo_duration / 60) % 60),2,"0",STR_PAD_LEFT).":" . str_pad(intval($fifo_duration % 60),2,"0",STR_PAD_LEFT) ;
|
||||||
|
*/
|
||||||
|
|
||||||
$username = $row->cdr->callflow->caller_profile->username;
|
$username = $row->cdr->callflow->caller_profile->username;
|
||||||
$dialplan = $row->cdr->callflow->caller_profile->dialplan;
|
$dialplan = $row->cdr->callflow->caller_profile->dialplan;
|
||||||
$caller_id_name = urldecode($row->cdr->callflow->caller_profile->caller_id_name);
|
$caller_id_name = urldecode($row->cdr->callflow->caller_profile->caller_id_name);
|
||||||
$caller_id_number = $row->cdr->callflow->caller_profile->caller_id_number;
|
$caller_id_number = $row->cdr->callflow->caller_profile->caller_id_number;
|
||||||
$ani = $row->cdr->callflow->caller_profile->ani;
|
$ani = $row->cdr->callflow->caller_profile->ani;
|
||||||
$aniii = $row->cdr->callflow->caller_profile->aniii;
|
$aniii = $row->cdr->callflow->caller_profile->aniii;
|
||||||
$network_addr = $row->cdr->callflow->caller_profile->network_addr;
|
$network_addr = $row->cdr->callflow->caller_profile->network_addr;
|
||||||
$destination_number = $row->cdr->callflow->caller_profile->destination_number;
|
$destination_number = $row->cdr->callflow->caller_profile->destination_number;
|
||||||
$rdnis = $row->cdr->callflow->caller_profile->rdnis;
|
$rdnis = $row->cdr->callflow->caller_profile->rdnis;
|
||||||
$uuid = $row->cdr->callflow->caller_profile->uuid;
|
$uuid = $row->cdr->callflow->caller_profile->uuid;
|
||||||
$source = $row->cdr->callflow->caller_profile->source;
|
$source = $row->cdr->callflow->caller_profile->source;
|
||||||
$context = $row->cdr->callflow->caller_profile->context;
|
$context = $row->cdr->callflow->caller_profile->context;
|
||||||
$chan_name = $row->cdr->callflow->caller_profile->chan_name;
|
$chan_name = $row->cdr->callflow->caller_profile->chan_name;
|
||||||
$default_language = $row->cdr->variables->default_language;
|
$default_language = $row->cdr->variables->default_language;
|
||||||
$fifo_position = $row->cdr->variables->fifo_position;
|
$fifo_position = $row->cdr->variables->fifo_position;
|
||||||
$fifo_priority = $row->cdr->variables->fifo_priority;
|
$fifo_priority = $row->cdr->variables->fifo_priority;
|
||||||
$fifo_status = $row->cdr->variables->fifo_status;
|
$fifo_status = $row->cdr->variables->fifo_status;
|
||||||
$fifo_timestamp = urldecode($row->cdr->variables->fifo_timestamp);
|
$fifo_timestamp = urldecode($row->cdr->variables->fifo_timestamp);
|
||||||
$fifo_time = strtotime($fifo_timestamp);
|
$fifo_time = strtotime($fifo_timestamp);
|
||||||
$fifo_duration = time() - $fifo_time;
|
$fifo_duration = time() - $fifo_time;
|
||||||
$fifo_duration_formatted = str_pad(intval(intval($fifo_duration/3600)),2,"0",STR_PAD_LEFT).":" . str_pad(intval(($fifo_duration / 60) % 60),2,"0",STR_PAD_LEFT).":" . str_pad(intval($fifo_duration % 60),2,"0",STR_PAD_LEFT) ;
|
$fifo_duration_formatted = str_pad(intval(intval($fifo_duration/3600)),2,"0",STR_PAD_LEFT).":" . str_pad(intval(($fifo_duration / 60) % 60),2,"0",STR_PAD_LEFT).":" . str_pad(intval($fifo_duration % 60),2,"0",STR_PAD_LEFT) ;
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($username)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($username)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($caller_id_name)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($caller_id_name)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($caller_id_number)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($caller_id_number)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($default_language)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($default_language)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($destination_number)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($destination_number)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_position)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_position)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_priority)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_priority)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_status)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_status)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_duration_formatted)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_duration_formatted)." </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
if ($c==0) { $c=1; } else { $c=0; }
|
$c = $c ? 0 : 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
|
|
@ -216,20 +218,22 @@
|
||||||
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) {
|
if (is_array($xml->fifo->outbound->member) && @sizeof($xml->fifo->outbound->member) != 0) {
|
||||||
$username=explode("@",$row);
|
foreach ($xml->fifo->outbound->member as $row) {
|
||||||
$username=explode("/",$username[0]);
|
$username=explode("@",$row);
|
||||||
$username=$username[1];
|
$username=explode("/",$username[0]);
|
||||||
|
$username=$username[1];
|
||||||
|
|
||||||
$fifo_duration_formatted=$row["logged-on-since"];
|
$fifo_duration_formatted=$row["logged-on-since"];
|
||||||
$fifo_total_inbound_calls=$row["outbound-call-total-count"];
|
$fifo_total_inbound_calls=$row["outbound-call-total-count"];
|
||||||
|
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($username)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($username)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_total_inbound_calls)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_total_inbound_calls)." </td>\n";
|
||||||
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_duration_formatted)." </td>\n";
|
echo "<td valign='top' class='".$row_style[$c]."'>".escape($fifo_duration_formatted)." </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$c = $c ? 0 : 1;
|
$c = $c ? 0 : 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue