From 865f8e3816d664bb388657db96bff03ef0ae7593 Mon Sep 17 00:00:00 2001 From: stan Date: Sun, 16 Oct 2005 21:26:49 +0000 Subject: [PATCH] Bug 172 - Added disable alarms funcitonality to watch view git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1508 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_html_view_watchstatus.php | 63 +++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 14 deletions(-) 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