'$db_now' - INTERVAL 1 HOUR && Archived = 0,1,NULL)) as HourEventCount, count(if(StartTime>'$db_now' - INTERVAL 1 DAY && Archived = 0,1,NULL)) as DayEventCount, count(if(StartTime>'$db_now' - INTERVAL 7 DAY && Archived = 0,1,NULL)) as WeekEventCount, count(if(StartTime>'$db_now' - INTERVAL 1 MONTH && Archived = 0,1,NULL)) as MonthEventCount from Events as E where MonitorId = '".$row['Id']."'"; $result3 = mysql_query( $sql ); if ( !$result3 ) echo mysql_error(); $row3 = mysql_fetch_assoc( $result3 ); if ( $row['Function'] != 'None' ) { $cycle_count++; if ( $max_width < $row['Width'] ) $max_width = $row['Width']; if ( $max_height < $row['Height'] ) $max_height = $row['Height']; } $monitors[] = $row = array_merge( $row, $row2, $row3 ); } if ( $cycle_count ) { $montage_rows = intval((($cycle_count-1)/ZM_WEB_MONTAGE_MAX_COLS)+1); $montage_cols = intval(ceil($cycle_count/$montage_rows)); } else { $montage_rows = 0; $montage_cols = 0; } $montage_width = ZM_WEB_MONTAGE_WIDTH?ZM_WEB_MONTAGE_WIDTH:$max_width; $montage_height = ZM_WEB_MONTAGE_HEIGHT?ZM_WEB_MONTAGE_HEIGHT:$max_height; ?>
= $zmSlangId ?> | = $zmSlangName ?> | = $zmSlangFunction ?> | = $zmSlangSource ?> | = $zmSlangEvents ?> | = $zmSlangHour ?> | = $zmSlangDay ?> | = $zmSlangWeek ?> | = $zmSlangMonth ?> | = $zmSlangArchive ?> | = $zmSlangZones ?> | = $zmSlangMark ?> | |
= makeLink( "javascript: newWindow( '$PHP_SELF?view=monitor&mid=".$monitor['Id']."', 'zmMonitor', ".$jws['monitor']['w'].", ".$jws['monitor']['h']." );", $monitor['Id'].'.', canView( 'Monitors' ) ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=watch&mid=".$monitor['Id']."', 'zmWatch".$monitor['Id']."', ".($monitor['Width']+$jws['watch']['w']).", ".($monitor['Height']+$jws['watch']['h'])." );", $monitor['Name'], ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=function&mid=".$monitor['Id']."', 'zmFunction', ".$jws['function']['w'].", ".$jws['function']['h']." );", "".$monitor['Function']."", canEdit( 'Monitors' ) ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=monitor&mid=".$monitor['Id']."', 'zmMonitor', ".$jws['monitor']['w'].", ".$jws['monitor']['h']." );", "/dev/video".$monitor['Device']." (".$monitor['Channel'].")", canEdit( 'Monitors' ) ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=monitor&mid=".$monitor['Id']."', 'zmMonitor', ".$jws['monitor']['w'].", ".$jws['monitor']['h']." );", "".preg_replace( '/^.*@/', '', $monitor['Host'] )."", canEdit( 'Monitors' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['EventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+hour', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['HourEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+day', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['DayEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+week', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['WeekEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+month', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['MonthEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=1', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['ArchEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: newWindow( '$PHP_SELF?view=zones&mid=".$monitor['Id']."', 'zmZones', ".($monitor['Width']+$jws['zones']['w']).", ".($monitor['Height']+$jws['zones']['h'])." );", $monitor['ZoneCount'], canView( 'Monitors' ) ) ?> | disabled> |
disabled> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=1&attr1=Archived&val1=0', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+hour', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $hour_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+day', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $day_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+week', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $week_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+month', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $month_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=1&attr1=Archived&val1=1', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $arch_event_count, canView( 'Events' ) ) ?> | = $zone_count ?> |