forked from libyerman/queue-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
realtime_qdetail.php
52 lines (45 loc) · 1.88 KB
/
realtime_qdetail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/*
Copyright 2007, 2008 Nicolás Gudiño
This file is part of Asternic Call Center Stats.
Asternic Call Center Stats is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
Asternic Call Center Stats is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Asternic Call Center Stats. If not, see
<http://www.gnu.org/licenses/>.
*/
echo "<BR><h2>".$lang[$language]['calls_waiting_detail']."</h2><BR>";
foreach($queue as $qn) {
$position=1;
if(!isset($queues[$qn]['calls'])) continue;
foreach($queues[$qn]['calls'] as $key=>$val) {
if($position==1) {
echo "<table width='700' cellpadding=3 cellspacing=3 border=0 class='sortable' id='table1' >\n";
echo "<thead>";
echo "<tr>";
echo "<th>".$lang[$language]['queue']."</th>";
echo "<th>".$lang[$language]['position']."</th>";
echo "<th>".$lang[$language]['callerid']."</th>";
echo "<th>".$lang[$language]['wait_time']."</th>";
echo "</tr>\n";
echo "</thead>\n";
echo "<tbody>\n";
}
echo "<tr><td>$qn</td><td>$position</td>";
echo "<td>".$queues[$qn]['calls'][$key]['chaninfo']['callerid']."</td>";
echo "<td>".$queues[$qn]['calls'][$key]['chaninfo']['duration_str']." min</td>";
echo "</tr>";
$position++;
}
if($position>1) {
echo "</tbody>\n";
echo "</table>\n";
}
}
?>