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
|
|
|
//
|
|
|
|
|
2017-05-30 23:37:48 +08:00
|
|
|
if ( !canView( 'Control' ) ) {
|
|
|
|
$view = 'error';
|
|
|
|
return;
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2017-05-30 23:37:48 +08:00
|
|
|
$groupSql = '';
|
2014-03-22 05:16:56 +08:00
|
|
|
if ( !empty($_REQUEST['group']) ) {
|
2017-05-30 23:37:48 +08:00
|
|
|
$row = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, array($_REQUEST['group']) );
|
|
|
|
$groupSql = " and find_in_set( Id, '".$row['MonitorIds']."' )";
|
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
|
|
|
|
2014-03-22 05:16:56 +08:00
|
|
|
$sql = "SELECT * FROM Monitors WHERE Function != 'None' AND Controllable = 1$groupSql ORDER BY Sequence";
|
2008-07-14 21:54:50 +08:00
|
|
|
$mids = array();
|
2017-05-30 23:37:48 +08:00
|
|
|
foreach( dbFetchAll( $sql ) as $row ) {
|
|
|
|
if ( !visibleMonitor( $row['Id'] ) ) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( empty($mid) )
|
|
|
|
$mid = $row['Id'];
|
|
|
|
$mids[$row['Id']] = $row['Name'];
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
2008-07-23 00:24:36 +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
|
|
|
|
2016-09-13 09:36:03 +08:00
|
|
|
$monitor = new Monitor( $mid );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
2015-05-10 21:10:30 +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">
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?php echo $view ?>"/>
|
|
|
|
<?php echo buildSelect( "mid", $mids, "this.form.submit();" ); ?>
|
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">
|
2017-05-30 23:37:48 +08:00
|
|
|
<?php echo ptzControls( $monitor ) ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|