Пример #1
0
<?php 
}
?>
          <div id="scaleControl"><?php 
echo translate('Scale');
?>
: <?php 
echo buildSelect("scale", $scales, "changeScale( this );");
?>
</div>
        </div>
      </div>
      <div id="imageFeed">
<?php 
if ($streamMode == "mpeg") {
    outputVideoStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), ZM_MPEG_LIVE_FORMAT, $monitor->Name());
} elseif ($streamMode == "jpeg") {
    if (canStreamNative()) {
        outputImageStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), $monitor->Name());
    } elseif (canStreamApplet()) {
        outputHelperStream("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), $monitor->Name());
    }
} else {
    outputImageStill("liveStream", $streamSrc, reScale($monitor->Width(), $scale), reScale($monitor->Height(), $scale), $monitor->Name());
}
?>
      </div>
      <div id="monitorStatus">
<?php 
if (canEdit('Monitors')) {
    ?>
Пример #2
0
}
$optTypes = array();
foreach (getEnumValues('Zones', 'Type') as $optType) {
    $optTypes[$optType] = $optType;
}
$optUnits = array();
foreach (getEnumValues('Zones', 'Units') as $optUnit) {
    $optUnits[$optUnit] = $optUnit;
}
$optCheckMethods = array();
foreach (getEnumValues('Zones', 'CheckMethod') as $optCheckMethod) {
    $optCheckMethods[$optCheckMethod] = $optCheckMethod;
}
$monitor = new Monitor($mid);
$minX = 0;
$maxX = $monitor->Width() - 1;
$minY = 0;
$maxY = $monitor->Height() - 1;
if (!isset($newZone)) {
    if ($zid > 0) {
        $zone = dbFetchOne('SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array($monitor->Id(), $zid));
    } else {
        $zone = array('Name' => translate('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']);
    $zone['AreaCoords'] = preg_replace('/\\s+/', ',', $zone['Coords']);
    $newZone = $zone;
}
//if ( !$points )
//{
//$points = $zone['Points'];