'$db_now' - INTERVAL 1 HOUR && E.Archived = 0,1,NULL)) as HourEventCount, count(if(E.StartTime>'$db_now' - INTERVAL 1 DAY && E.Archived = 0,1,NULL)) as DayEventCount, count(if(E.StartTime>'$db_now' - INTERVAL 7 DAY && E.Archived = 0,1,NULL)) as WeekEventCount, count(if(E.StartTime>'$db_now' - INTERVAL 1 MONTH && E.Archived = 0,1,NULL)) as MonthEventCount from Monitors as M left join Events as E on E.MonitorId = M.Id group by M.Id order by M.Id"; $result = mysql_query( $sql ); if ( !$result ) echo mysql_error(); $monitors = array(); $max_width = 0; $max_height = 0; $cycle_count = 0; while( $row = mysql_fetch_assoc( $result ) ) { if ( !visibleMonitor( $row['Id'] ) ) { continue; } $row['zmc'] = zmcCheck( $row ); $row['zma'] = zmaCheck( $row ); $sql = "select count(Id) as ZoneCount from Zones where MonitorId = '".$row['Id']."'"; $result2 = mysql_query( $sql ); if ( !$result2 ) echo mysql_error(); $row2 = mysql_fetch_assoc( $result2 ); $monitors[] = array_merge( $row, $row2 ); if ( $row['Function'] != 'None' ) { $cycle_count++; if ( $max_width < $row['Width'] ) $max_width = $row['Width']; if ( $max_height < $row['Height'] ) $max_height = $row['Height']; } } $montage_rows = intval(ceil($cycle_count/ZM_WEB_MONTAGE_MAX_COLS)); $montage_cols = $cycle_count>=ZM_WEB_MONTAGE_MAX_COLS?ZM_WEB_MONTAGE_MAX_COLS:$cycle_count; ?>
= date( "D jS M, g:ia" ) ?> | ZoneMinder = $zmSlangConsole ?> - = $status ?> - = makeLink( "javascript: newWindow( '$PHP_SELF?view=version', 'zmVersion', ".$jws['version']['w'].", ".$jws['version']['h']." );", "v".ZM_VERSION, canEdit( 'System' ) ) ?> | = $zmSlangServerLoad ?>: = $matches[1] ?> | |
1 ) { ?> = sprintf( $zmClangMonitorCount, count($monitors), zmVlang( $zmVlangMonitor, count($monitors) ) ) ?> (= $zmSlangMontage ?>) = sprintf( $zmClangMonitorCount, count($monitors), zmVlang( $zmVlangMonitor, count($monitors) ) ) ?> | = $zmSlangLoggedInAs ?> = $user['Username'] ?>, = strtolower( $zmSlangConfiguredFor ) ?> | = $zmSlangConfiguredFor ?> = strtolower( $bw_array[$bandwidth] ) ?> = strtolower( $zmSlangBandwidth ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=options', 'zmOptions', ".$jws['options']['w'].", ".$jws['options']['h']." );", $zmSlangOptions, canView( 'System' ) ) ?> |