0 ) { $zone = dbFetchOne( "select * from Zones where MonitorId = '".dbEscape($_REQUEST['mid'])."' and Id = '".dbEscape($_REQUEST['zid'])."'" ); } else { $zone = array( 'Name' => $SLANG['New'], 'Id' => 0, 'MonitorId' => $_REQUEST['mid'], 'NumCoords' => 4, 'Coords' => sprintf( "%d,%d %d,%d, %d,%d %d,%d", $minX, $minY, $maxX, $minY, $maxX, $maxY, $minX, $maxY ), 'Area' => $monitor['Width'] * $monitor['Height'], 'AlarmRGB' => 0xff0000, 'CheckMethod' => 'Blobs', 'MinPixelThreshold' => '', 'MaxPixelThreshold' => '', 'MinAlarmPixels' => '', 'MaxAlarmPixels' => '', 'FilterX' => '', 'FilterY' => '', 'MinFilterPixels' => '', 'MaxFilterPixels' => '', 'MinBlobPixels' => '', 'MaxBlobPixels' => '', 'MinBlobs' => '', 'MaxBlobs' => '', 'OverloadFrames' => '', ); } $zone['Points'] = coordsToPoints( $zone['Coords'] ); $newZone = $zone; } //if ( !$points ) //{ //$points = $zone['Points']; //} ksort( $newZone['Points'], SORT_NUMERIC ); $newZone['Coords'] = pointsToCoords( $newZone['Points'] ); $newZone['Area'] = getPolyArea( $newZone['Points'] ); $selfIntersecting = isSelfIntersecting( $newZone['Points'] ); chdir( ZM_DIR_IMAGES ); $command = getZmuCommand( " -m ".$_REQUEST['mid']." -z" ); if ( !isset($_REQUEST['zid']) ) $_REQUEST['zid'] = 0; $command .= '"'.$_REQUEST['zid'].' '.$hicolor.' '.$newZone['Coords'].'"'; $status = exec( escapeshellcmd( $command ) ); chdir( '..' ); $zoneImage = ZM_DIR_IMAGES.'/Zones'.$monitor['Id'].'.jpg?'.time(); $focusWindow = true; xhtmlHeaders(__FILE__, $SLANG['Zone'] ); ?>
"applyPreset()", "onblur"=>"this.selectedIndex=0" ) ) ?>
 /  / 
Zone Image
disabled="disabled"/> disabled="disabled"/> + 3 ) { ?>  X
 
disabled="disabled"/>