Merge pull request #1332 from moteus/call_active_count
Add. Display number of active calls in title.
This commit is contained in:
commit
77aacfcbfd
|
|
@ -93,7 +93,21 @@ else {
|
||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
echo "<b>".$text['title']."</b>";
|
$rows = array();
|
||||||
|
foreach ($results["rows"] as &$row) {
|
||||||
|
//determine show all
|
||||||
|
if (!($show == 'all' && permission_exists('call_active_all'))) {
|
||||||
|
$foreign_call = true;
|
||||||
|
foreach ($row as $key => $value) {
|
||||||
|
if (substr_count($value, $_SESSION['domain_name']) > 0) { $foreign_call = false; }
|
||||||
|
}
|
||||||
|
if ($foreign_call) { continue; }
|
||||||
|
}
|
||||||
|
// append call
|
||||||
|
$rows[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<b>".$text['title']." (" . count($rows) . ")"."</b>";
|
||||||
echo "<br><br>\n";
|
echo "<br><br>\n";
|
||||||
echo $text['description']."\n";
|
echo $text['description']."\n";
|
||||||
echo "<br><br>\n";
|
echo "<br><br>\n";
|
||||||
|
|
@ -123,15 +137,7 @@ else {
|
||||||
echo "<td class='list_control_icon'></td>\n";
|
echo "<td class='list_control_icon'></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
foreach ($results["rows"] as $row) {
|
foreach ($rows as &$row) {
|
||||||
//determine show all
|
|
||||||
if (!($show == 'all' && permission_exists('call_active_all'))) {
|
|
||||||
$foreign_call = true;
|
|
||||||
foreach ($row as $key => $value) {
|
|
||||||
if (substr_count($value, $_SESSION['domain_name']) > 0) { $foreign_call = false; }
|
|
||||||
}
|
|
||||||
if ($foreign_call) { continue; }
|
|
||||||
}
|
|
||||||
//set the php variables
|
//set the php variables
|
||||||
foreach ($row as $key => $value) {
|
foreach ($row as $key => $value) {
|
||||||
$$key = $value;
|
$$key = $value;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue