diff --git a/web/zm_html_view_watchstatus.php b/web/zm_html_view_watchstatus.php index 6810602b3..28af39f19 100644 --- a/web/zm_html_view_watchstatus.php +++ b/web/zm_html_view_watchstatus.php @@ -25,9 +25,16 @@ if ( !canView( 'Stream' ) ) } $zmu_command = getZmuCommand( " -m $mid -s -f" ); -if ( canEdit( 'Monitors' ) && isset($force) ) +if ( canEdit( 'Monitors' ) ) { - $zmu_command .= ($force?" -a":" -c"); + if ( isset($force) ) + { + $zmu_command .= ($force?" -a":" -c"); + } + elseif ( isset($disable) ) + { + $zmu_command .= ($disable?" -n":" -c"); + } } $zmu_output = exec( escapeshellcmd( $zmu_command ) ); @@ -57,8 +64,8 @@ $fps_string = sprintf( "%.2f", $fps ); $new_alarm = ( $status > STATE_PREALARM && $last_status <= STATE_PREALARM ); $old_alarm = ( $status <= STATE_PREALARM && $last_status > STATE_PREALARM ); -$refresh = (isset($force)||$forced||(($status>=STATE_PREALARM)&&($status<=STATE_ALERT)))?1:ZM_WEB_REFRESH_STATUS; -$url = "$PHP_SELF?view=watchstatus&mid=$mid&last_status=$status".(($force||$forced)?"&forced=1":""); +$refresh = (isset($force)||$forced||isset($disable)||$disabled||(($status>=STATE_PREALARM)&&($status<=STATE_ALERT)))?1:ZM_WEB_REFRESH_STATUS; +$url = "$PHP_SELF?view=watchstatus&mid=$mid&last_status=$status".(($force||$forced)?"&forced=1":"").(($disable||$disabled)?"&disabled=1":""); if ( ZM_WEB_REFRESH_METHOD == "http" ) header("Refresh: $refresh; URL=$url" ); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past @@ -83,7 +90,10 @@ top.window.focus(); if ( $old_alarm ) { ?> -window.parent.MonitorEvents.location.reload(true); +if ( window.parent.MonitorEvents != null ) +{ + window.parent.MonitorEvents.location.reload(true); +} ' )", - - - + - + - + + + + + + + + +
  -  fps    -  fps