'."\n" ); echo( ''."\n" ); if ( !$view ) { $view = "console"; } if ( $view == "console" ) { if ( !$HTTP_SESSION_VARS[event_reset_time] ) $HTTP_SESSION_VARS[event_reset_time] = "2000-01-01 00:00:00"; $db_now = strftime( "%Y-%m-%d %H:%M:%S" ); $sql = "select M.*, count(E.Id) as EventCount, count(if(E.StartTime>'$HTTP_SESSION_VARS[event_reset_time]' && E.Archived = 0,1,NULL)) as ResetEventCount, count(if(E.StartTime>'$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 from Monitors as M left join Events as E on E.MonitorId = M.Id group by E.MonitorId order by 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 ( $max_width < $row[Width] ) $max_width = $row[Width]; if ( $max_height < $row[Height] ) $max_height = $row[Height]; $sql = "select count(Id) as ZoneCount, count(if(Type='Active',1,NULL)) as ActZoneCount, count(if(Type='Inclusive',1,NULL)) as IncZoneCount, count(if(Type='Exclusive',1,NULL)) as ExcZoneCount, count(if(Type='Inactive',1,NULL)) as InactZoneCount 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++; } $sql = "select distinct Device from Monitors order by Device"; $result = mysql_query( $sql ); if ( !$result ) echo mysql_error(); $devices = array(); while( $row = mysql_fetch_assoc( $result ) ) { $ps_array = preg_split( "/\s+/", exec( "ps -edalf | grep 'zmc $row[Device]' | grep -v grep" ) ); if ( $ps_array[3] ) { $row['zmc'] = 1; } $ps_array = preg_split( "/\s+/", exec( "ps -edalf | grep 'zma $row[Device]' | grep -v grep" ) ); if ( $ps_array[3] ) { $row['zma'] = 1; } $devices[] = $row; } ?>

ZM - Console

Monitors -

Name Func Events

Reset Event Counts

ZM - Cycle Watch

ZM - <?php echo $monitor[Name] ?> - Watch $browser_image"; //exec( $command ); $browser_image = "$monitor[Name]-wap-$image_time.jpg"; $command = NETPBM_DIR."/jpegtopnm -dct fast $monitor_image | ".NETPBM_DIR."/pnmscale -xysize $browser[Width] $browser[Height] | ".NETPBM_DIR."/ppmtojpeg > $browser_image"; exec( $command ); ?>

ZM -

<?php echo $monitor[Name] ?>

0 && $last_status == 0 ); header("Refresh: ".REFRESH_STATUS."; URL='$PHP_SELF?view=status&mid=$mid&last_status=$status'" ); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 ?>
Status:
ZM - <?php echo $monitor ?> - Events <?php if ( $archived ) { ?>Archive<?php } ?>
= now() - interval 1 $period"; $sql .= " order by $sort_column $sort_order"; if ( $max_events ) $sql .= " limit 0,$max_events"; $result = mysql_query( $sql ); if ( !$result ) { die( mysql_error() ); } $n_rows = mysql_num_rows( $result ); ?>
Last events Recent All Archive Check All
 
Id Name Time Secs Frames Score Delete
() ()
ZM - Image <?php echo $eid."-".$fid ?> 1 ) { ?> 1 ) { ?>
Image Delete Close
First   Prev   Next   Last  
ZM - Event - <?php echo $event[Name] ?>
Refresh Delete Unarchive Archive Stills Stream   Video   Close
$thumb_image"; else $command = NETPBM_DIR."/jpegtopnm -dct fast $capt_image | ".NETPBM_DIR."/pnmscalefixed $fraction | ".NETPBM_DIR."/ppmtojpeg --dct=fast > $thumb_image"; #exec( escapeshellcmd( $command ) ); exec( $command ); } } ?>
<?php echo $frame_id ?>/<?php echo $row[Score] ?>
ZM - <?php echo $monitor[Name] ?> - Zones " href="javascript: newWindow( '?view=zone&mid=&zid=', 'zmZone', 360, 480 );">
  Zones Close
Id Name Type Units Dimensions Delete
. ,-,
 
0 ) { $result = mysql_query( "select * from Monitors where Id = '$mid'" ); if ( !$result ) die( mysql_error() ); $monitor = mysql_fetch_assoc( $result ); } else { $monitor = array(); $monitor[Name] = "New"; } ?> ZM - Monitor <?php echo $monitor[Name] ?>
Monitor
ParameterValue
Name
Function
Device Number (/dev/video?)
Device Channel
Device Format (1=PAL,2=NTSC etc)
Device Width (pixels)
Device Height (pixels)
Device Colour Depth
 
0 ) { $result = mysql_query( "select * from Zones where MonitorId = '$mid' and Id = '$zid'" ); if ( !$result ) die( mysql_error() ); $zone = mysql_fetch_assoc( $result ); } else { $zone = array(); $zone[Name] = "New"; $zone[LoX] = 0; $zone[LoY] = 0; $zone[HiX] = $monitor[Width]-1; $zone[HiY] = $monitor[Height]-1; } ?> ZM - <?php echo $monitor[Name] ?> - Zone <?php echo $zone[Name] ?>
Monitor - Zone
ParameterValue
Name
Type
Units
Minimum X (left)
Minimum Y (top)
Maximum X (right)
Maximum Y (bottom)
Alarm Colour (RGB)R: G: B:
Alarm Threshold (0>=?<=255)
Minimum Alarmed Area
Maximum Alarmed Area
Filter Width (pixels)
Filter Height (pixels)
Minimum Filtered Area
Maximum Filtered Area
Minimum Blob Area
Maximum Blob Area
Minimum Blobs
Maximum Blobs
 
$event_dir/mpeg.log" ); } //chdir( $event_dir ); //header("Content-type: video/mpeg"); //header("Content-Disposition: inline; filename=$video_name"); header("Location: $video_file" ); } elseif ( $view == "device" ) { $ps_array = preg_split( "/\s+/", exec( "ps -edalf | grep 'zmc $did' | grep -v grep" ) ); if ( $ps_array[3] ) { $zmc = 1; } $ps_array = preg_split( "/\s+/", exec( "ps -edalf | grep 'zma $did' | grep -v grep" ) ); if ( $ps_array[3] ) { $zma = 1; } ?> ZM - Device - /dev/video<?php echo $did ?>
Device Daemon Status
DaemonActive
Capture class="form">
Analysis class="form">
 
ZM - Function - <?php echo $monitor[Name] ?>
Monitor '' Function