2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web control view file, $Date$, $Revision$
|
2008-07-25 17:48:16 +08:00
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// 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
|
2016-12-26 23:23:16 +08:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
|
2019-02-13 05:40:48 +08:00
|
|
|
if ( !canView('Control') ) {
|
2017-05-30 23:37:48 +08:00
|
|
|
$view = 'error';
|
|
|
|
return;
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2019-01-19 22:46:21 +08:00
|
|
|
$params = array();
|
2017-05-30 23:37:48 +08:00
|
|
|
$groupSql = '';
|
2014-03-22 05:16:56 +08:00
|
|
|
if ( !empty($_REQUEST['group']) ) {
|
2019-09-20 22:37:19 +08:00
|
|
|
$groupSql = ' AND (m.Id IN (SELECT MonitorID FROM Groups_Monitors WHERE GroupId = :groupid))';
|
2019-02-13 05:40:48 +08:00
|
|
|
$params[':groupid'] = $_REQUEST['group'];
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2017-05-30 23:37:48 +08:00
|
|
|
$mid = !empty($_REQUEST['mid']) ? validInt($_REQUEST['mid']) : 0;
|
2009-04-01 16:37:10 +08:00
|
|
|
|
2020-05-08 01:57:37 +08:00
|
|
|
$sql = "SELECT m.* FROM Monitors m WHERE m.`Function` != 'None' AND m.`Controllable` = 1$groupSql ORDER BY `Sequence`";
|
2008-07-14 21:54:50 +08:00
|
|
|
$mids = array();
|
2019-02-13 05:40:48 +08:00
|
|
|
foreach ( dbFetchAll($sql, false, $params) as $row ) {
|
|
|
|
if ( !visibleMonitor($row['Id']) ) {
|
2017-05-30 23:37:48 +08:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( empty($mid) )
|
|
|
|
$mid = $row['Id'];
|
|
|
|
$mids[$row['Id']] = $row['Name'];
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2019-02-13 05:40:48 +08:00
|
|
|
foreach ( getSkinIncludes('includes/control_functions.php') as $includeFile )
|
2017-05-30 23:37:48 +08:00
|
|
|
require_once $includeFile;
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2019-02-22 22:19:07 +08:00
|
|
|
$monitor = new ZM\Monitor($mid);
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
2019-02-13 05:40:48 +08:00
|
|
|
xhtmlHeaders(__FILE__, translate('Control'));
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
|
|
|
<div id="headerButtons">
|
2019-01-16 22:59:58 +08:00
|
|
|
<a href="#" data-on-click="closeWindow"><?php echo translate('Close') ?></a>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
2015-05-10 21:10:30 +08:00
|
|
|
<h2><?php echo translate('Control') ?></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
<div id="headerControl">
|
2020-10-04 10:44:24 +08:00
|
|
|
<form name="contentForm" id="controlForm" method="get" action="?">
|
2014-12-05 07:44:23 +08:00
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
2020-10-04 10:44:24 +08:00
|
|
|
<?php echo buildSelect('mid', $mids); ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
2008-07-16 21:16:19 +08:00
|
|
|
<div id="ptzControls" class="ptzControls">
|
2019-02-13 05:40:48 +08:00
|
|
|
<?php echo ptzControls($monitor) ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|