Merge branch 'always_show_ptz' into storageareas
This commit is contained in:
commit
197ae67313
|
@ -962,6 +962,7 @@ function daemonControl( $command, $daemon=false, $args=false )
|
||||||
|
|
||||||
function zmcControl( $monitor, $mode=false )
|
function zmcControl( $monitor, $mode=false )
|
||||||
{
|
{
|
||||||
|
if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) {
|
||||||
$row = NULL;
|
$row = NULL;
|
||||||
if ( $monitor['Type'] == "Local" )
|
if ( $monitor['Type'] == "Local" )
|
||||||
{
|
{
|
||||||
|
@ -987,10 +988,12 @@ function zmcControl( $monitor, $mode=false )
|
||||||
}
|
}
|
||||||
daemonControl( "start", "zmc", $zmcArgs );
|
daemonControl( "start", "zmc", $zmcArgs );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function zmaControl( $monitor, $mode=false )
|
function zmaControl( $monitor, $mode=false )
|
||||||
{
|
{
|
||||||
|
if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) {
|
||||||
if ( !is_array( $monitor ) )
|
if ( !is_array( $monitor ) )
|
||||||
{
|
{
|
||||||
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
|
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
|
||||||
|
@ -1035,6 +1038,7 @@ function zmaControl( $monitor, $mode=false )
|
||||||
daemonControl( "reload", "zma", "-m ".$monitor['Id'] );
|
daemonControl( "reload", "zma", "-m ".$monitor['Id'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initDaemonStatus()
|
function initDaemonStatus()
|
||||||
|
|
|
@ -79,8 +79,8 @@
|
||||||
border: 1px solid #006699;
|
border: 1px solid #006699;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
width: 96px;
|
width: 100px;
|
||||||
height: 96px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
|
.ptzControls .controlsPanel .pantiltPanel .pantiltControls .arrowBtn {
|
||||||
|
|
|
@ -243,7 +243,7 @@ function controlPanTilt( $monitor, $cmds )
|
||||||
ob_start();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class="pantiltControls">
|
<div class="pantiltControls">
|
||||||
<div class="pantilLabel"><?php echo translate('PanTilt') ?></div>
|
<div class="pantiltLabel"><?php echo translate('PanTilt') ?></div>
|
||||||
<div class="pantiltButtons">
|
<div class="pantiltButtons">
|
||||||
<?php
|
<?php
|
||||||
$hasPan = $monitor->CanPan;
|
$hasPan = $monitor->CanPan;
|
||||||
|
|
|
@ -33,14 +33,7 @@ if ( ! visibleMonitor( $mid ) ) {
|
||||||
return;
|
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 );
|
$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' ) );
|
$showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable() && canView( 'Control' ) );
|
||||||
|
|
||||||
|
@ -82,23 +75,6 @@ xhtmlHeaders( __FILE__, $monitor->Name()." - ".translate('Feed') );
|
||||||
<div id="closeControl"><a href="#" onclick="closeWindow(); return( false );"><?php echo translate('Close') ?></a></div>
|
<div id="closeControl"><a href="#" onclick="closeWindow(); return( false );"><?php echo translate('Close') ?></a></div>
|
||||||
<div id="menuControls">
|
<div id="menuControls">
|
||||||
<?php
|
<?php
|
||||||
if ( $showPtzControls )
|
|
||||||
{
|
|
||||||
if ( canView( 'Control' ) )
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<div id="controlControl"<?php echo $showControls?' class="hidden"':'' ?>><a id="controlLink" href="#" onclick="showPtzControls(); return( false );"><?php echo translate('Control') ?></a></div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if ( canView( 'Control' ) && $monitor->Type() == "Local" )
|
if ( canView( 'Control' ) && $monitor->Type() == "Local" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
@ -168,7 +144,7 @@ if ( $showPtzControls )
|
||||||
foreach ( getSkinIncludes( 'includes/control_functions.php' ) as $includeFile )
|
foreach ( getSkinIncludes( 'includes/control_functions.php' ) as $includeFile )
|
||||||
require_once $includeFile;
|
require_once $includeFile;
|
||||||
?>
|
?>
|
||||||
<div id="ptzControls" class="ptzControls<?php echo $showControls?'':' hidden' ?>">
|
<div id="ptzControls" class="ptzControls">
|
||||||
<?php echo ptzControls( $monitor ) ?>
|
<?php echo ptzControls( $monitor ) ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -176,7 +152,7 @@ if ( $showPtzControls )
|
||||||
if ( canView( 'Events' ) )
|
if ( canView( 'Events' ) )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div id="events"<?php echo $showControls?' class="hidden"':'' ?>>
|
<div id="events">
|
||||||
<table id="eventList" cellspacing="0">
|
<table id="eventList" cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue