$maxSequence ) { $maxSequence = $monitors[$i]['Sequence']; } $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] ); $monitors[$i]['zma'] = zmaStatus( $monitors[$i] ); $monitors[$i]['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitors[$i]['Id']) ); if ( $monitors[$i]['Function'] != 'None' ) { $cycleCount++; $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth; if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight; } $seqIdList[] = $monitors[$i]['Id']; $displayMonitors[] = $monitors[$i]; } $lastId = 0; $seqIdUpList = array(); foreach ( $seqIdList as $seqId ) { if ( !empty($lastId) ) $seqIdUpList[$seqId] = $lastId; else $seqIdUpList[$seqId] = $seqId; $lastId = $seqId; } $lastId = 0; $seqIdDownList = array(); foreach ( array_reverse($seqIdList) as $seqId ) { if ( !empty($lastId) ) $seqIdDownList[$seqId] = $lastId; else $seqIdDownList[$seqId] = $seqId; $lastId = $seqId; } $cycleWidth = $maxWidth; $cycleHeight = $maxHeight; $eventsView = ZM_WEB_EVENTS_VIEW; $eventsWindow = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW); $eventCount = 0; for ( $i = 0; $i < count($eventCounts); $i++ ) { $eventCounts[$i]['total'] = 0; } $zoneCount = 0; foreach( $displayMonitors as $monitor ) { for ( $i = 0; $i < count($eventCounts); $i++ ) { $eventCounts[$i]['total'] += $monitor['EventCount'.$i]; } $zoneCount += $monitor['ZoneCount']; } $seqUpFile = getSkinFile( 'graphics/seq-u.gif' ); $seqDownFile = getSkinFile( 'graphics/seq-d.gif' ); $versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':''; xhtmlHeaders( __FILE__, $SLANG['Console'] ); ?>