mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-07-13 06:32:26 -04:00
Merge branch 'iconnor-updated-console' into storageareas
This commit is contained in:
@@ -152,6 +152,7 @@ function getNavBarHTML() {
|
||||
# Used to determine if the Cycle button should be made available
|
||||
$cycleCount = 0;
|
||||
$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
|
||||
global $displayMonitors;
|
||||
$displayMonitors = array();
|
||||
for ( $i = 0; $i < count($monitors); $i++ ) {
|
||||
if ( !visibleMonitor( $monitors[$i]['Id'] ) ) {
|
||||
|
||||
@@ -85,7 +85,8 @@ $displayMonitors = NULL;
|
||||
$navbar = getNavBarHTML();
|
||||
$zoneCount = 0;
|
||||
|
||||
foreach( $displayMonitors as $monitor ) {
|
||||
for( $i = 0; $i < count($displayMonitors); $i += 1 ) { {
|
||||
$monitor = $displayMonitors[$i];
|
||||
$monitor['zmc'] = zmcStatus( $monitor );
|
||||
$monitor['zma'] = zmaStatus( $monitor );
|
||||
$monitor['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitor['Id']) );
|
||||
@@ -98,9 +99,9 @@ foreach( $displayMonitors as $monitor ) {
|
||||
}
|
||||
$sql = "select ".join($counts,", ")." from Events as E where MonitorId = ?";
|
||||
$counts = dbFetchOne( $sql, NULL, array($monitor['Id']) );
|
||||
if ( $counts ) $monitor = array_merge( $monitor, $counts );
|
||||
for ( $i = 0; $i < count($eventCounts); $i++ ) {
|
||||
$eventCounts[$i]['total'] += $monitor['EventCount'.$i];
|
||||
if ( $counts ) $displayMonitors[$i] = array_merge( $monitor, $counts );
|
||||
for ( $i = 0; $j < count($eventCounts); $j++ ) {
|
||||
$eventCounts[$j]['total'] += $monitor['EventCount'.$j];
|
||||
}
|
||||
$zoneCount += $monitor['ZoneCount'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user