'$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 ); } $max_cols = 8; $montage_cols = (int)(($cycle_count+1)/((int)(($cycle_count-1)/ZM_WEB_MONTAGE_MAX_COLS)+1)); $montage_rows = intval(ceil($cycle_count/$montage_cols)); $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'], 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&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['EventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&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', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['HourEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&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', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['DayEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&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', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['WeekEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&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', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['MonthEventCount'], canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=1', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['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&page=1&filter=1&trms=1&attr1=Archived&val1=0', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+hour', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $hour_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+day', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $day_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+week', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $week_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+month', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $month_event_count, canView( 'Events' ) ) ?> | = makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=1&attr1=Archived&val1=1', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $arch_event_count, canView( 'Events' ) ) ?> | = $zone_count ?> |