2009-03-31 21:00:20 +08:00
|
|
|
var presets = new Hash();
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
foreach ( $presets as $preset )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
presets[<?= $preset['Id'] ?>] = {
|
|
|
|
'UnitsIndex': <?= $preset['UnitsIndex'] ?>,
|
|
|
|
'CheckMethodIndex': <?= $preset['CheckMethodIndex'] ?>,
|
|
|
|
'MinPixelThreshold': '<?= $preset['MinPixelThreshold'] ?>',
|
|
|
|
'MaxPixelThreshold': '<?= $preset['MaxPixelThreshold'] ?>',
|
|
|
|
'FilterX': '<?= $preset['FilterX'] ?>',
|
|
|
|
'FilterY': '<?= $preset['FilterY'] ?>',
|
|
|
|
'MinAlarmPixels': '<?= $preset['MinAlarmPixels'] ?>',
|
|
|
|
'MaxAlarmPixels': '<?= $preset['MaxAlarmPixels'] ?>',
|
|
|
|
'MinFilterPixels': '<?= $preset['MinFilterPixels'] ?>',
|
|
|
|
'MaxFilterPixels': '<?= $preset['MaxFilterPixels'] ?>',
|
|
|
|
'MinBlobPixels': '<?= $preset['MinBlobPixels'] ?>',
|
|
|
|
'MaxBlobPixels': '<?= $preset['MaxBlobPixels'] ?>',
|
|
|
|
'MinBlobs': '<?= $preset['MinBlobs'] ?>',
|
|
|
|
'MaxBlobs': '<?= $preset['MaxBlobs'] ?>',
|
|
|
|
'OverloadFrames': '<?= $preset['OverloadFrames'] ?>'
|
|
|
|
};
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
var zone = {
|
2008-09-26 17:47:20 +08:00
|
|
|
'Name': '<?= validJsStr($zone['Name']) ?>',
|
|
|
|
'Id': <?= validJsStr($zone['Id']) ?>,
|
|
|
|
'MonitorId': <?= validJsStr($zone['MonitorId']) ?>,
|
2008-07-14 21:54:50 +08:00
|
|
|
'CheckMethod': '<?= $zone['CheckMethod'] ?>',
|
|
|
|
'AlarmRGB': '<?= $zone['AlarmRGB'] ?>',
|
|
|
|
'NumCoords': <?= $zone['NumCoords'] ?>,
|
|
|
|
'Coords': '<?= $zone['Coords'] ?>',
|
|
|
|
'Area': <?= $zone['Area'] ?>
|
|
|
|
};
|
|
|
|
|
|
|
|
zone['Points'] = new Array();
|
|
|
|
<?php
|
|
|
|
for ( $i = 0; $i < count($newZone['Points']); $i++ )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
zone['Points'][<?= $i ?>] = { 'x': <?= $newZone['Points'][$i]['x'] ?>, 'y': <?= $newZone['Points'][$i]['y'] ?> };
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
var maxX = <?= $monitor['Width']-1 ?>;
|
|
|
|
var maxY = <?= $monitor['Height']-1 ?>;
|
|
|
|
var selfIntersecting = <?= $selfIntersecting?'true':'false' ?>;
|
|
|
|
|
|
|
|
var selfIntersectingString = '<?= addslashes($SLANG['SelfIntersecting']) ?>';
|
|
|
|
var alarmRGBUnsetString = '<?= addslashes($SLANG['AlarmRGBUnset']) ?>';
|
|
|
|
var minPixelThresUnsetString = '<?= addslashes($SLANG['MinPixelThresUnset']) ?>';
|
|
|
|
var minPixelThresLtMaxString = '<?= addslashes($SLANG['MinPixelThresLtMax']) ?>';
|
|
|
|
var filterUnsetString = '<?= addslashes($SLANG['FilterUnset']) ?>';
|
|
|
|
var minAlarmAreaUnsetString = '<?= addslashes($SLANG['MinAlarmAreaUnset']) ?>';
|
|
|
|
var minAlarmAreaLtMaxString = '<?= addslashes($SLANG['MinAlarmAreaLtMax']) ?>';
|
|
|
|
var minFilterAreaUnsetString = '<?= addslashes($SLANG['MinFilterAreaUnset']) ?>';
|
|
|
|
var minFilterAreaLtMaxString = '<?= addslashes($SLANG['MinFilterAreaLtMax']) ?>';
|
|
|
|
var minFilterLtMinAlarmString = '<?= addslashes($SLANG['MinFilterLtMinAlarm']) ?>';
|
|
|
|
var minBlobAreaUnsetString = '<?= addslashes($SLANG['MinBlobAreaUnset']) ?>';
|
|
|
|
var minBlobAreaLtMaxString = '<?= addslashes($SLANG['MinBlobAreaLtMax']) ?>';
|
|
|
|
var minBlobLtMinFilterString = '<?= addslashes($SLANG['MinBlobLtMinFilter']) ?>';
|
|
|
|
var minBlobsUnsetString = '<?= addslashes($SLANG['MinBlobsUnset']) ?>';
|
|
|
|
var minBlobsLtMaxString = '<?= addslashes($SLANG['MinBlobsLtMax']) ?>';
|