Example #1
0
function getSetValues($table, $column)
{
    return getEnumValues($table, $column);
}
Example #2
0
    </div>
    <div id="content">
      <form name="contentForm" id="contentForm" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
        <input type="hidden" name="view" value="none"/>
        <input type="hidden" name="action" value="function"/>
        <input type="hidden" name="mid" value="<?php 
echo $monitor['Id'];
?>
"/>
        <p>
          <select name="newFunction">
<?php 
foreach (getEnumValues('Monitors', 'Function') as $optFunction) {
    ?>
            <option value="<?php 
    echo $optFunction;
    ?>
"<?php 
    if ($optFunction == $monitor['Function']) {
        ?>
 selected="selected"<?php 
    }
    ?>
><?php 
    echo $optFunction;
    ?>
</option>
<?php 
Example #3
0
        echo validHtmlStr($newMonitor['MotionFrameSkip']);
        ?>
" size="6"/></td></tr>
            <tr><td><?php 
        echo translate('FPSReportInterval');
        ?>
</td><td><input type="text" name="newMonitor[FPSReportInterval]" value="<?php 
        echo validHtmlStr($newMonitor['FPSReportInterval']);
        ?>
" size="6"/></td></tr>
            <tr><td><?php 
        echo translate('DefaultView');
        ?>
</td><td><select name="newMonitor[DefaultView]">
<?php 
        foreach (getEnumValues('Monitors', 'DefaultView') as $opt_view) {
            if ($opt_view == 'Control' && (!ZM_OPT_CONTROL || !$monitor['Controllable'])) {
                continue;
            }
            ?>
              <option value="<?php 
            echo $opt_view;
            ?>
"<?php 
            if ($opt_view == $newMonitor['DefaultView']) {
                ?>
 selected="selected"<?php 
            }
            ?>
><?php 
            echo $opt_view;
Example #4
0
$presetNames[0] = translate('ChoosePreset');
$sql = "select *, Units-1 as UnitsIndex, CheckMethod-1 as CheckMethodIndex from ZonePresets order by Id asc";
foreach (dbFetchAll($sql) as $preset) {
    $presetNames[$preset['Id']] = $preset['Name'];
    $presets[] = $preset;
}
$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 = dbFetchMonitor($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']);
    $newZone = $zone;