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