0 ) { $zone = dbFetchOne( 'SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array( $monitor['Id'], $zid ) ); } else { $zone = array( 'Name' => $SLANG['New'], 'Id' => 0, '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['Width'] * $monitor['Height'], 'AlarmRGB' => 0xff0000, 'CheckMethod' => 'Blobs', 'MinPixelThreshold' => '', 'MaxPixelThreshold' => '', 'MinAlarmPixels' => '', 'MaxAlarmPixels' => '', 'FilterX' => '', 'FilterY' => '', 'MinFilterPixels' => '', 'MaxFilterPixels' => '', 'MinBlobPixels' => '', 'MaxBlobPixels' => '', 'MinBlobs' => '', 'MaxBlobs' => '', 'OverloadFrames' => '', 'ExtendAlarmFrames' => '', ); } $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'] ); $wd = getcwd(); chdir( ZM_DIR_IMAGES ); $command = getZmuCommand( " -m ".$mid." -z" ); $command .= '"'.$zid.' '.$hicolor.' '.$newZone['Coords'].'"'; $status = exec( escapeshellcmd( $command ) ); chdir( $wd ); $zoneImage = ZM_DIR_IMAGES.'/Zones'.$monitor['Id'].'.jpg?'.time(); $focusWindow = true; xhtmlHeaders(__FILE__, $SLANG['Zone'] ); ?>
0) { // Get plugin status from zmu command line exec(escapeshellcmd(getZmuCommand(" -p -m".$mid)), $cmdOutput, $retval); if($retval == 0) { echo "\n"; } } ?>
"applyPreset()", "onblur"=>"this.selectedIndex=0" ) ) ?>
 /  / 
".$SLANG['Plugins']."\n"; $plName = ""; $plReg = "0"; $plConf = "0"; foreach($cmdOutput as $key => $line) { // Skip header lines or "No plugin found" if($key < 2) continue; // Parse line $pl = preg_split ('/[\s]+/ ', trim($line)); $offset = 0; if(sizeof($pl) == 9) { $plName = $pl[0]; $plReg = $pl[1]; $plConf = $pl[2]; $offset = 3; } // Skip line if zone mismatch if($pl[$offset] != $zid) continue; // Select class and set display setting $class = ''; $dspPlConf = true; if(!ZM_LOAD_PLUGINS) { $class = " class=\"pluginNotEnabled\""; $dspPlConf = false; } else if($plReg == "0" || (($plReg == "1") && ($plConf == "0"))) { $class = " class=\"pluginError\""; $dspPlConf = false; } else if(($pl[1 + $offset] == "1") && ($pl[2 + $offset] == "0")) { $class = " class=\"pluginNotActive\""; } else if($pl[2 + $offset] == "1") { $class = " class=\"pluginActive\""; } // Display plugin name and enable link if($dspPlConf) echo "".$plName."
\n"; else echo "".$plName."
\n"; } echo "
Zone Image
disabled="disabled"/> disabled="disabled"/> + 3 ) { ?>  X
 
disabled="disabled"/>