本文整理汇总了PHP中visibleMonitor函数的典型用法代码示例。如果您正苦于以下问题:PHP visibleMonitor函数的具体用法?PHP visibleMonitor怎么用?PHP visibleMonitor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了visibleMonitor函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: validHtmlStr
}
} else {
$mode = validHtmlStr($_REQUEST['mode']);
}
$group = '';
$groupSql = '';
if (!empty($_REQUEST['group'])) {
$group = validInt($_REQUEST['group']);
$row = dbFetchOne('SELECT * FROM Groups WHERE Id = ?', NULL, array($group));
$groupSql = " and find_in_set( Id, '" . $row['MonitorIds'] . "' )";
}
$sql = "SELECT * FROM Monitors WHERE Function != 'None'{$groupSql} ORDER BY Sequence";
$monitors = array();
$monIdx = 0;
foreach (dbFetchAll($sql) as $row) {
if (!visibleMonitor($row['Id'])) {
continue;
}
if (isset($_REQUEST['mid']) && $row['Id'] == $_REQUEST['mid']) {
$monIdx = count($monitors);
}
$row['ScaledWidth'] = reScale($row['Width'], $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
$row['ScaledHeight'] = reScale($row['Height'], $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
$monitors[] = $row;
}
$monitor = $monitors[$monIdx];
$nextMid = $monIdx == count($monitors) - 1 ? $monitors[0]['Id'] : $monitors[$monIdx + 1]['Id'];
$montageWidth = $monitor['ScaledWidth'];
$montageHeight = $monitor['ScaledHeight'];
$widthScale = $montageWidth * SCALE_BASE / $monitor['Width'];
$heightScale = $montageHeight * SCALE_BASE / $monitor['Height'];
开发者ID:moeiscool,项目名称:ZoneMinder-video,代码行数:31,代码来源:cycle.php
示例2: array
$eventCounts = array(array("title" => $SLANG['Events'], "filter" => array("terms" => array())), array("title" => $SLANG['Hour'], "filter" => array("terms" => array(array("attr" => "Archived", "op" => "=", "val" => "0"), array("cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour")))), array("title" => $SLANG['Day'], "filter" => array("terms" => array(array("attr" => "Archived", "op" => "=", "val" => "0"), array("cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day")))), array("title" => $SLANG['Week'], "filter" => array("terms" => array(array("attr" => "Archived", "op" => "=", "val" => "0"), array("cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day")))), array("title" => $SLANG['Month'], "filter" => array("terms" => array(array("attr" => "Archived", "op" => "=", "val" => "0"), array("cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month")))), array("title" => $SLANG['Archived'], "filter" => array("terms" => array(array("attr" => "Archived", "op" => "=", "val" => "1")))));
$running = daemonCheck();
$status = $running ? $SLANG['Running'] : $SLANG['Stopped'];
if ($group = dbFetchOne("select * from Groups where Id = '" . (empty($_COOKIE['zmGroup']) ? 0 : dbEscape($_COOKIE['zmGroup'])) . "'")) {
$groupIds = array_flip(split(',', $group['MonitorIds']));
}
$maxWidth = 0;
$maxHeight = 0;
$cycleCount = 0;
$minSequence = 0;
$maxSequence = 1;
$seqIdList = array();
$monitors = dbFetchAll("select * from Monitors order by Sequence asc");
$displayMonitors = array();
for ($i = 0; $i < count($monitors); $i++) {
if (!visibleMonitor($monitors[$i]['Id'])) {
continue;
}
if ($group && !empty($groupIds) && !array_key_exists($monitors[$i]['Id'], $groupIds)) {
continue;
}
$monitors[$i]['Show'] = true;
if (empty($minSequence) || $monitors[$i]['Sequence'] < $minSequence) {
$minSequence = $monitors[$i]['Sequence'];
}
if ($monitors[$i]['Sequence'] > $maxSequence) {
$maxSequence = $monitors[$i]['Sequence'];
}
if (isset($_GET['nostatus'])) {
$monitors[$i]['zmc'] = 1;
$monitors[$i]['zma'] = 1;
开发者ID:ardiqghenatya,项目名称:koptel2,代码行数:31,代码来源:console.php
示例3: validHtmlStr
echo validHtmlStr($newGroup['Name']);
?>
"/></td>
</tr>
<tr>
<th scope="row"><?php
echo translate('MonitorIds');
?>
</th>
<td>
<select name="newGroup[MonitorIds][]" size="4" multiple="multiple">
<?php
$monitors = dbFetchAll("select Id,Name from Monitors order by Sequence asc");
$monitorIds = array_flip(explode(',', $newGroup['MonitorIds']));
foreach ($monitors as $monitor) {
if (visibleMonitor($monitor['Id'])) {
?>
<option value="<?php
echo $monitor['Id'];
?>
"<?php
if (array_key_exists($monitor['Id'], $monitorIds)) {
?>
selected="selected"<?php
}
?>
><?php
echo validHtmlStr($monitor['Name']);
?>
</option>
<?php
开发者ID:rodoviario,项目名称:ZoneMinder,代码行数:31,代码来源:group.php
示例4: translate
<tr>
<td><?php
echo translate('LinkedMonitors');
?>
</td>
<td>
<select name="monitorIds" size="4" multiple="multiple" onchange="updateLinkedMonitors( this )">
<?php
$monitors = dbFetchAll("select Id,Name from Monitors order by Sequence asc");
if (!empty($newMonitor['LinkedMonitors'])) {
$monitorIds = array_flip(explode(',', $newMonitor['LinkedMonitors']));
} else {
$monitorIds = array();
}
foreach ($monitors as $monitor) {
if ((empty($newMonitor['Id']) || $monitor['Id'] != $newMonitor['Id']) && visibleMonitor($monitor['Id'])) {
?>
<option value="<?php
echo $monitor['Id'];
?>
"<?php
if (array_key_exists($monitor['Id'], $monitorIds)) {
?>
selected="selected"<?php
}
?>
><?php
echo validHtmlStr($monitor['Name']);
?>
</option>
<?php
开发者ID:jbudding,项目名称:ZoneMinder,代码行数:31,代码来源:monitor.php
示例5: monitorIdsToNames
function monitorIdsToNames($ids)
{
global $mITN_monitors;
if (!$mITN_monitors) {
$sql = "select Id, Name from Monitors";
foreach (dbFetchAll($sql) as $monitor) {
$mITN_monitors[$monitor['Id']] = $monitor;
}
}
$names = array();
foreach (preg_split('/\\s*,\\s*/', $ids) as $id) {
if (visibleMonitor($id)) {
if (isset($mITN_monitors[$id])) {
$names[] = $mITN_monitors[$id]['Name'];
}
}
}
$name_string = join(', ', $names);
return $name_string;
}
开发者ID:schrorg,项目名称:ZoneMinder,代码行数:20,代码来源:functions.php
示例6: intval
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
require_once 'includes/Monitor.php';
if (!canView('Stream')) {
$view = "error";
return;
}
// This is for input sanitation
$mid = intval($_REQUEST['mid']);
if (!visibleMonitor($mid)) {
$view = "error";
return;
}
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
$monitor = new Monitor($mid);
#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) );
if (isset($_REQUEST['showControls'])) {
$showControls = validInt($_REQUEST['showControls']);
} else {
$showControls = canView('Control') && $monitor->DefaultView() == 'Control';
}
$showPtzControls = ZM_OPT_CONTROL && $monitor->Controllable() && canView('Control');
if (isset($_REQUEST['scale'])) {
$scale = validInt($_REQUEST['scale']);
} else {
开发者ID:schrorg,项目名称:ZoneMinder,代码行数:31,代码来源:watch.php
示例7: ON
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
if (!canView('Stream')) {
$view = "error";
return;
}
if (!visibleMonitor($_REQUEST['mid'])) {
$view = "error";
return;
}
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
$monitor = dbFetchOne($sql, NULL, array($_REQUEST['mid']));
if (isset($_REQUEST['showControls'])) {
$showControls = validInt($_REQUEST['showControls']);
} else {
$showControls = canView('Control') && $monitor['DefaultView'] == 'Control';
}
$showPtzControls = ZM_OPT_CONTROL && $monitor['Controllable'] && canView('Control');
if (isset($_REQUEST['scale'])) {
$scale = validInt($_REQUEST['scale']);
} else {
$scale = reScale(SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
开发者ID:rodoviario,项目名称:ZoneMinder,代码行数:31,代码来源:watch.php
注:本文中的visibleMonitor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论