ViewWidth()-1; $minY = 0; $maxY = $monitor->ViewHeight()-1; if ( !isset($newZone) ) { if ( $zid > 0 ) { $zone = dbFetchOne('SELECT * FROM Zones WHERE MonitorId=? AND Id=?', NULL, array($monitor->Id(), $zid)); } else { $zone = array( 'Id' => 0, 'Name' => translate('New'), 'Type' => 'Active', 'Units' => 'Pixels', 'MonitorId' => $monitor->Id(), 'NumCoords' => 4, 'Coords' => sprintf('%d,%d %d,%d, %d,%d %d,%d', $minX, $minY, $maxX, $minY, $maxX, $maxY, $minX, $maxY), 'Area' => $monitor->ViewWidth() * $monitor->ViewHeight(), 'AlarmRGB' => 0xff0000, 'CheckMethod' => 'Blobs', 'MinPixelThreshold' => '', 'MaxPixelThreshold' => '', 'MinAlarmPixels' => '', 'MaxAlarmPixels' => '', 'FilterX' => '', 'FilterY' => '', 'MinFilterPixels' => '', 'MaxFilterPixels' => '', 'MinBlobPixels' => '', 'MaxBlobPixels' => '', 'MinBlobs' => '', 'MaxBlobs' => '', 'OverloadFrames' => '', 'ExtendAlarmFrames' => '', ); } $zone['Points'] = coordsToPoints($zone['Coords']); $zone['AreaCoords'] = preg_replace('/\s+/', ',', $zone['Coords']); $newZone = $zone; } # end if new Zone # Ensure Zone fits within the limits of the Monitor limitPoints($newZone['Points'], $minX, $minY, $maxX, $maxY); ksort($newZone['Points'], SORT_NUMERIC); $newZone['Coords'] = pointsToCoords($newZone['Points']); $newZone['Area'] = getPolyArea($newZone['Points']); $newZone['AreaCoords'] = preg_replace('/\s+/', ',', $newZone['Coords']); $selfIntersecting = isSelfIntersecting($newZone['Points']); $focusWindow = true; # Have to do this here, because the .js.php references somethings figured out when generating the streamHTML $monitor->connKey(); $StreamHTML = getStreamHTML($monitor, array('mode'=>'single')); # So I'm thinking now that 50% of screen real-estate with a minimum of 640px. # scale should be floor(whatever that width is/actual width) # So we need javascript to figure out browser width, figure out scale and then activate the stream. xhtmlHeaders(__FILE__, translate('Zone')); ?>

Name().' - '.translate('Zone').' '.$newZone['Name'] ?>

Id(), $zone['Id'])); } else { $other_zones = dbFetchAll('SELECT * FROM Zones WHERE MonitorId = ?', NULL, array($monitor->Id())); } if ( count($other_zones) ) { $html = ''; foreach ( $other_zones as $other_zone ) { $other_zone['AreaCoords'] = preg_replace('/\s+/', ',', $other_zone['Coords']); $html .= ''; } echo $html; } ?> Sorry, your browser does not support inline SVG
 -  fps
'applyZoneType', 'id'=>'newZone[Type]')); ?>
'applyPreset', 'id'=>'presetSelector') ) ?>
'applyZoneUnits', 'id'=>'newZone[Units]') ); # Used later for number inputs $step = $newZone['Units'] == 'Percent' ? ' step="any" max="100"' : ''; ?>
/ /
min="0"/> min="0"/>
min="0"/> min="0"/>
min="0"/> min="0"/>