'$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 ) ) { $row['zmc'] = zmcCheck( $row ); $row['zma'] = zmaCheck( $row ); //$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]'"; $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; ?> ZM - Console
ZoneMinder Console - () - v Server Load:
1 ) { ?> Monitor (Montage) Monitor Configured for bandwidth (change to 1, "medium"=>1, "low"=>1 ); unset( $bw_array[$bandwidth] ); $bw_keys = array_keys( $bw_array ); ?> , ) Report Bug
Id Name Function Source Events Hour Day Week Month Archive Zones Mark
. /dev/video ()
ZM - Cycle Watch
Stills Stream   Close
=ZM_WEB_MONTAGE_MAX_COLS?ZM_WEB_MONTAGE_MAX_COLS:count($monitors); $widths = array(); $heights = array(); for ( $i = 0; $i < count($monitors); $i++ ) { $monitor = $monitors[$i]; $frame_height = $monitor[Height]+16; $row = $i/ZM_WEB_MONTAGE_MAX_COLS; $col = $i%ZM_WEB_MONTAGE_MAX_COLS; if ( $frame_height > $heights[$row] ) $heights[$row] = $frame_height; if ( $monitor[Width] > $widths[$col] ) $widths[$col] = $monitor[Width]; } $row_spec = join( ',', $heights ); $col_spec = join( ',', $widths ); ?> ZM - Montage ZM - Montage Header
ZM - <?= $monitor[Name] ?> - MontageFeed
Stills Stream  
0 && $last_status == 0 ); $old_alarm = ( $status == 0 && $last_status > 0 ); $refresh = (isset($force)||$forced||$status)?1:REFRESH_STATUS; $url = "$PHP_SELF?view=montagestatus&mid=$mid&last_status=$status"; header("Refresh: $refresh; URL='$url'" ); 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:  -  fps  
ZM - <?= $monitor[Name] ?> - Watch ZM - <?= $monitor[Name] ?> - WatchFeed
Stills Stream   Close
0 && $last_status == 0 ); $old_alarm = ( $status == 0 && $last_status > 0 ); $refresh = (isset($force)||$forced||$status)?1:REFRESH_STATUS; $url = "$PHP_SELF?view=watchstatus&mid=$mid&last_status=$status".(($force||$forced)?"&forced=1":""); header("Refresh: $refresh; URL='$url'" ); 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:  -  fps Cancel Forced Alarm Force Alarm  
ZM - <?= $monitor ?> - Events
Last events All Archive Check All
 
Id Name Time Secs Frames Score Mark
/ /
'."\n"; } for ( $i = 1; $i <= $trms; $i++ ) { $conjunction_name = "cnj$i"; $obracket_name = "obr$i"; $cbracket_name = "cbr$i"; $attr_name = "attr$i"; $op_name = "op$i"; $value_name = "val$i"; if ( $$conjunction_name ) { $filter_query .= "&$conjunction_name=".$$conjunction_name; $filter_sql .= " ".$$conjunction_name." "; $filter_fields .= ''."\n"; } if ( $$obracket_name ) { $filter_query .= "&$obracket_name=".$$obracket_name; $filter_sql .= str_repeat( "(", $$obracket_name ); $filter_fields .= ''."\n"; } if ( $$attr_name ) { $filter_query .= "&$attr_name=".$$attr_name; $filter_fields .= ''."\n"; switch ( $$attr_name ) { case 'DateTime': $dt_val = strtotime( $$value_name ); $filter_sql .= "E.StartTime ".$$op_name." from_unixtime( $dt_val )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Date': $dt_val = strtotime( $$value_name ); $filter_sql .= "to_days( E.StartTime ) ".$$op_name." to_days( from_unixtime( $dt_val ) )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Time': $dt_val = strtotime( $$value_name ); $filter_sql .= "extract( hour_second from E.StartTime ) ".$$op_name." extract( hour_second from from_unixtime( $dt_val ) )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Weekday': $dt_val = strtotime( $$value_name ); $filter_sql .= "weekday( E.StartTime ) ".$$op_name." weekday( from_unixtime( $dt_val ) )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Length': case 'Frames': case 'AlarmFrames': case 'TotScore': case 'AvgScore': case 'MaxScore': $filter_sql .= "E.".$$attr_name." ".$$op_name." ".$$value_name; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Archived': $filter_sql .= "E.Archived = ".$$value_name; break; } $filter_query .= "&$value_name=".urlencode($$value_name); $filter_fields .= ''."\n"; } if ( $$cbracket_name ) { $filter_query .= "&$cbracket_name=".$$cbracket_name; $filter_sql .= str_repeat( ")", $$cbracket_name ); $filter_fields .= ''."\n"; } } if ( $filter_sql ) { $sql .= " and ( $filter_sql )"; } $sql .= " order by $sort_column $sort_order"; //echo $sql; $result = mysql_query( $sql ); if ( !$result ) { die( mysql_error() ); } $n_rows = mysql_num_rows( $result ); //echo $filter_query; ?> ZM - <?= $monitor[Name] ?> - Events
- events   Close
 
Refresh Show Filter Window Check All
 
>
Id Name Time Duration Frames Alarm
Frames
Total
Score
Avg.
Score
Max.
Score
Mark
    
'Choose Filter' ); $result = mysql_query( "select * from Filters where MonitorId = '$mid' order by Name" ); if ( !$result ) die( mysql_error() ); while ( $row = mysql_fetch_assoc( $result ) ) { $filter_names[$row[Name]] = $row[Name]; if ( $filter_name == $row[Name] ) { $filter_data = $row; } } if ( $filter_data ) { //$filter_query = unserialize( $filter_data[Query] ); //if ( is_array($filter_query) ) //{ //while( list( $key, $value ) = each( $filter_query ) ) //{ //$$key = $value; //} //} foreach( split( '&', $filter_data[Query] ) as $filter_parm ) { list( $key, $value ) = split( '=', $filter_parm, 2 ); if ( $key ) { $$key = $value; } } } $conjunction_types = array( 'and'=>'and', 'or'=>'or' ); $obracket_types = array( ''=>'' ); $cbracket_types = array( ''=>'' ); for ( $i = 1; $i <= ceil(($trms-1)/2); $i++ ) { $obracket_types[$i] = str_repeat( "(", $i ); $cbracket_types[$i] = str_repeat( ")", $i ); } $attr_types = array( 'DateTime'=>'Date/Time', 'Date'=>'Date', 'Time'=>'Time', 'Weekday'=>'Weekday', 'Length'=>'Duration', 'Frames'=>'Frames', 'AlarmFrames'=>'Alarm Frames', 'TotScore'=>'Total Score', 'AvgScore'=>'Avg. Score', 'MaxScore'=>'Max. Score', 'Archived'=>'Archive Status' ); $op_types = array( '='=>'equal to', '!='=>'not equal to', '>='=>'greater than or equal to', '>'=>'greater than', '<'=>'less than', '<='=>'less than or equal to' ); $archive_types = array( '0'=>'Unarchived Only', '1'=>'Archived Only' ); ?> ZM - <?= $monitor[Name] ?> - Event Filter
Use  filter expressions Use filter:  1 ) { buildSelect( $select_name, $filter_names, "submitToFilter( document.filter_form );" ); } else { ?> Save Delete   Close
 
  2 ) { buildSelect( $obracket_name, $obracket_types ); } else { ?> 
is equal to
2 ) { buildSelect( $cbracket_name, $cbracket_types ); } else { ?> 
 
  
ZM - <?= $monitor[Name] ?> - Save Filter
1 ) { ?>
Save as:  or enter new name:  Enter new filter name: 
 
Automatically delete all matching events:  >
Automatically upload all matching events:  >
Automatically email details of all matching events:  >
Automatically message details of all matching events:  >
 
 
ZM - Image <?= $eid."-".$fid ?> 1 ) { ?> 1 ) { ?>
Image (Stats) Delete Close
First   Prev   Next   Last  
ZM - Stats <?= $eid."-".$fid ?>
Image Close
Zone Alarm Px Filter Px Blob Px Blobs Blob Sizes Alarm Limits Score

There are no statistics recorded for this event/frame

'$eid' and MonitorId = '$mid' order by Id asc limit 0,1" ); if ( !$result ) die( mysql_error() ); $next_event = mysql_fetch_assoc( $result ); ?> ZM - Event - <?= $event[Name] ?>
Learn Pref: 
Refresh Delete Unarchive Archive Stills Stream   Video   Close
$thumb_image"; else $command = ZM_PATH_NETPBM."/jpegtopnm -dct fast $capt_image | ".ZM_PATH_NETPBM."/pnmscalefixed $fraction | ".ZM_PATH_NETPBM."/ppmtojpeg --dct=fast > $thumb_image"; #exec( escapeshellcmd( $command ) ); exec( $command ); } } ?>
<?= $frame_id ?>/<?= $row[Score] ?>
Prev  Delete & Prev  Delete & Next  Next 
ZM - <?= $monitor[Name] ?> - Zones " href="javascript: newWindow( '?view=zone&mid=&zid=', 'zmZone', , );"> " href="javascript: newWindow( '?view=zone&mid=&zid=', 'zmZone', , );">
  Zones Close
Id Name Type Units Dimensions Mark
. ,-,
 
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"; $monitor['Function'] = "None"; $monitor[Type] = "Local"; $monitor[Port] = "80"; $monitor[LabelFormat] = '%%s - %y/%m/%d %H:%M:%S'; $monitor[LabelX] = 0; $monitor[LabelY] = 0; $monitor[ImageBufferCount] = 100; $monitor[WarmupCount] = 25; $monitor[PreEventCount] = 10; $monitor[PostEventCount] = 10; $monitor[MaxFPS] = 0; $monitor[FPSReportInterval] = 1000; $monitor[RefBlendPerc] = 10; } $local_palettes = array( "Grey"=>1, "RGB24"=>4, "RGB565"=>3, "YUV420P"=>15 ); $remote_palettes = array( "8 bit greyscale"=>1, "24 bit colour"=>4 ); ?> ZM - Monitor <?= $monitor[Name] ?> "Local", "Remote"=>"Remote" ); ?>
Monitor
ParameterValue
Name
Function
Source Type
Device Number (/dev/video?)
Device Channel
Device Format (0=PAL,1=NTSC etc)
Capture Palette
Remote Host Name
Remote Host Port
Remote Host Path
Remote Image Colours
Capture Width (pixels)
Capture Height (pixels)
Timestamp Label Format
Timestamp Label X
Timestamp Label Y
Image Buffer Size (frames)
Warmup Frames
Pre Event Image Buffer
Post Event Image Buffer
Maximum FPS
FPS Report Interval
Reference Image Blend %ge
X10 Activation String
X10 Input Alarm String
X10 Output Alarm String
 
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 - <?= $monitor[Name] ?> - Zone <?= $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
 
ZM - Video - <?= $event[Name] ?>
 
 
 
 
 
Generating Video
 
 
"; for ( $i = 0; $i < 2048/strlen($buffer_string); $i++ ) { echo $buffer_string."\n"; } ?> ZM - Video - <?= $event[Name] ?> ZM - Video - <?= $event[Name] ?>




Video Generation Failed!


ZM - Function - <?= $monitor[Name] ?>
Monitor '' Function