当前位置: 首页>>代码示例>>PHP>>正文


PHP Monitor::Id方法代码示例

本文整理汇总了PHP中Monitor::Id方法的典型用法代码示例。如果您正苦于以下问题:PHP Monitor::Id方法的具体用法?PHP Monitor::Id怎么用?PHP Monitor::Id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Monitor的用法示例。


在下文中一共展示了Monitor::Id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: translate

    if (canView('Events')) {
        ?>
          <div id="eventsControl"<?php 
        echo $showControls ? '' : ' class="hidden"';
        ?>
><a id="eventsLink" href="#" onclick="showEvents(); return( false );"><?php 
        echo translate('Events');
        ?>
</a></div>
<?php 
    }
}
if (canView('Control') && $monitor->Type() == "Local") {
    ?>
          <div id="settingsControl"><?php 
    echo makePopupLink('?view=settings&amp;mid=' . $monitor->Id(), 'zmSettings' . $monitor->Id(), 'settings', translate('Settings'), true, 'id="settingsLink"');
    ?>
</div>
<?php 
}
?>
          <div id="scaleControl"><?php 
echo translate('Scale');
?>
: <?php 
echo buildSelect("scale", $scales, "changeScale( this );");
?>
</div>
        </div>
      </div>
      <div id="imageFeed">
开发者ID:schrorg,项目名称:ZoneMinder,代码行数:31,代码来源:watch.php

示例2: array

$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'];
//}
ksort($newZone['Points'], SORT_NUMERIC);
$newZone['Coords'] = pointsToCoords($newZone['Points']);
$newZone['Area'] = getPolyArea($newZone['Points']);
$selfIntersecting = isSelfIntersecting($newZone['Points']);
开发者ID:schrorg,项目名称:ZoneMinder,代码行数:31,代码来源:zone.php


注:本文中的Monitor::Id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。