put () after property names of Monitor object
This commit is contained in:
parent
e85ba683e1
commit
382ad0f390
|
@ -44,9 +44,9 @@ var showMode = "<?php echo ($showPtzControls && !empty($control))?"control":"eve
|
||||||
var connKey = '<?php echo $connkey ?>';
|
var connKey = '<?php echo $connkey ?>';
|
||||||
var maxDisplayEvents = <?php echo 2 * MAX_EVENTS ?>;
|
var maxDisplayEvents = <?php echo 2 * MAX_EVENTS ?>;
|
||||||
|
|
||||||
var monitorId = <?php echo $monitor->Id ?>;
|
var monitorId = <?php echo $monitor->Id() ?>;
|
||||||
var monitorWidth = <?php echo $monitor->Width ?>;
|
var monitorWidth = <?php echo $monitor->Width() ?>;
|
||||||
var monitorHeight = <?php echo $monitor->Height ?>;
|
var monitorHeight = <?php echo $monitor->Height() ?>;
|
||||||
|
|
||||||
var scale = <?php echo $scale ?>;
|
var scale = <?php echo $scale ?>;
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ var canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||||
|
|
||||||
var canPlayPauseAudio = Browser.ie;
|
var canPlayPauseAudio = Browser.ie;
|
||||||
|
|
||||||
<?php if ( $monitor->CanMoveMap ) { ?>
|
<?php if ( $monitor->CanMoveMap() ) { ?>
|
||||||
var imageControlMode = "moveMap";
|
var imageControlMode = "moveMap";
|
||||||
<?php } elseif ( $monitor->CanMoveRel ) { ?>
|
<?php } elseif ( $monitor->CanMoveRel() ) { ?>
|
||||||
var imageControlMode = "movePseudoMap";
|
var imageControlMode = "movePseudoMap";
|
||||||
<?php } elseif ( $monitor->CanMoveCon ) { ?>
|
<?php } elseif ( $monitor->CanMoveCon() ) { ?>
|
||||||
var imageControlMode = "moveConMap";
|
var imageControlMode = "moveConMap";
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
var imageControlMode = null;
|
var imageControlMode = null;
|
||||||
|
|
|
@ -25,21 +25,24 @@ if ( !canView( 'Stream' ) )
|
||||||
$view = "error";
|
$view = "error";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( ! visibleMonitor( $_REQUEST['mid'] ) ) {
|
|
||||||
|
// This is for input sanitation
|
||||||
|
$mid = intval( $_REQUEST['mid'] );
|
||||||
|
if ( ! visibleMonitor( $mid ) ) {
|
||||||
$view = "error";
|
$view = "error";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
|
$sql = 'SELECT C.*, M.* FROM Monitors AS M LEFT JOIN Controls AS C ON (M.ControlId = C.Id ) WHERE M.Id = ?';
|
||||||
$monitor = new Monitor( $_REQUEST['mid'] );
|
$monitor = new Monitor( $mid );
|
||||||
#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) );
|
#dbFetchOne( $sql, NULL, array( $_REQUEST['mid'] ) );
|
||||||
|
|
||||||
if ( isset($_REQUEST['showControls']) )
|
if ( isset($_REQUEST['showControls']) )
|
||||||
$showControls = validInt($_REQUEST['showControls']);
|
$showControls = validInt($_REQUEST['showControls']);
|
||||||
else
|
else
|
||||||
$showControls = (canView( 'Control' ) && ($monitor->DefaultView == 'Control'));
|
$showControls = (canView( 'Control' ) && ($monitor->DefaultView() == 'Control'));
|
||||||
|
|
||||||
$showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable && canView( 'Control' ) );
|
$showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable() && canView( 'Control' ) );
|
||||||
|
|
||||||
if ( isset( $_REQUEST['scale'] ) )
|
if ( isset( $_REQUEST['scale'] ) )
|
||||||
$scale = validInt($_REQUEST['scale']);
|
$scale = validInt($_REQUEST['scale']);
|
||||||
|
@ -56,7 +59,7 @@ if ( ZM_WEB_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT )
|
||||||
elseif ( canStream() )
|
elseif ( canStream() )
|
||||||
{
|
{
|
||||||
$streamMode = "jpeg";
|
$streamMode = "jpeg";
|
||||||
$streamSrc = $monitor->getStreamSrc( array( "mode=".$streamMode, "scale=".$scale, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "buffer=".$monitor->StreamReplayBuffer ) );
|
$streamSrc = $monitor->getStreamSrc( array( "mode=".$streamMode, "scale=".$scale, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "buffer=".$monitor->StreamReplayBuffer() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -99,7 +102,7 @@ if ( $showPtzControls )
|
||||||
if ( canView( 'Control' ) && $monitor->Type() == "Local" )
|
if ( canView( 'Control' ) && $monitor->Type() == "Local" )
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div id="settingsControl"><?php echo makePopupLink( '?view=settings&mid='.$monitor->Id, 'zmSettings'.$monitor->Id, 'settings', translate('Settings'), true, 'id="settingsLink"' ) ?></div>
|
<div id="settingsControl"><?php echo makePopupLink( '?view=settings&mid='.$monitor->Id(), 'zmSettings'.$monitor->Id(), 'settings', translate('Settings'), true, 'id="settingsLink"' ) ?></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -110,18 +113,18 @@ if ( canView( 'Control' ) && $monitor->Type() == "Local" )
|
||||||
<?php
|
<?php
|
||||||
if ( $streamMode == "mpeg" )
|
if ( $streamMode == "mpeg" )
|
||||||
{
|
{
|
||||||
outputVideoStream( "liveStream", $streamSrc, reScale( $monitor->Width, $scale ), reScale( $monitor->Height, $scale ), ZM_MPEG_LIVE_FORMAT, $monitor->Name );
|
outputVideoStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), ZM_MPEG_LIVE_FORMAT, $monitor->Name() );
|
||||||
}
|
}
|
||||||
elseif ( $streamMode == "jpeg" )
|
elseif ( $streamMode == "jpeg" )
|
||||||
{
|
{
|
||||||
if ( canStreamNative() )
|
if ( canStreamNative() )
|
||||||
outputImageStream( "liveStream", $streamSrc, reScale( $monitor->Width, $scale ), reScale( $monitor->Height, $scale ), $monitor->Name );
|
outputImageStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||||
elseif ( canStreamApplet() )
|
elseif ( canStreamApplet() )
|
||||||
outputHelperStream( "liveStream", $streamSrc, reScale( $monitor->Width, $scale ), reScale( $monitor->Height, $scale ), $monitor->Name );
|
outputHelperStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
outputImageStill( "liveStream", $streamSrc, reScale( $monitor->Width, $scale ), reScale( $monitor->Height, $scale ), $monitor->Name );
|
outputImageStill( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue