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
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canView( 'Control' ) )
|
|
|
|
{
|
2008-09-26 17:47:20 +08:00
|
|
|
$view = "error";
|
2008-07-14 21:54:50 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$groupSql = "";
|
2014-03-22 05:16:56 +08:00
|
|
|
if ( !empty($_REQUEST['group']) ) {
|
2013-12-18 01:53:15 +08:00
|
|
|
$row = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, array($_REQUEST['group']) );
|
2008-07-14 21:54:50 +08:00
|
|
|
$groupSql = " and find_in_set( Id, '".$row['MonitorIds']."' )";
|
|
|
|
}
|
|
|
|
|
2009-04-01 16:37:10 +08:00
|
|
|
$mid = validInt($_REQUEST['mid']);
|
|
|
|
|
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();
|
|
|
|
foreach( dbFetchAll( $sql ) as $row )
|
|
|
|
{
|
|
|
|
if ( !visibleMonitor( $row['Id'] ) )
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( empty($mid) )
|
|
|
|
$mid = $row['Id'];
|
|
|
|
$mids[$row['Id']] = $row['Name'];
|
|
|
|
}
|
|
|
|
|
2008-07-23 00:24:36 +08:00
|
|
|
foreach ( getSkinIncludes( 'includes/control_functions.php' ) as $includeFile )
|
|
|
|
require_once $includeFile;
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2013-12-18 01:53:15 +08:00
|
|
|
$sql = 'SELECT C.*,M.* FROM Monitors AS M INNER JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
|
2014-03-22 05:16:56 +08:00
|
|
|
$monitor = dbFetchOne( $sql, NULL, array( $mid ) );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
|
|
|
xhtmlHeaders(__FILE__, $SLANG['Control'] );
|
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
|
|
|
<div id="headerButtons">
|
2014-12-05 07:44:23 +08:00
|
|
|
<a href="#" onclick="closeWindow();"><?php echo $SLANG['Close'] ?></a>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
2014-12-05 07:44:23 +08:00
|
|
|
<h2><?php echo $SLANG['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">
|
2014-12-05 07:44:23 +08:00
|
|
|
<?php echo ptzControls( $monitor ) ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|