diff --git a/web/zm_html_view_monitor.php b/web/zm_html_view_monitor.php index 0de97f2f1..3d3375034 100644 --- a/web/zm_html_view_monitor.php +++ b/web/zm_html_view_monitor.php @@ -30,13 +30,7 @@ $result = mysql_query( "select * from TriggersX10 where MonitorId = '$mid'" ); if ( !$result ) die( mysql_error() ); - if ( $x10_monitor = mysql_fetch_assoc( $result ) ) - { - foreach( $x10_monitor as $key=>$value ) - { - $monitor['X10'.$key] = $value; - } - } + $x10_monitor = mysql_fetch_assoc( $result ); } } else @@ -61,6 +55,12 @@ $monitor[FPSReportInterval] = 1000; $monitor[RefBlendPerc] = 10; } + if ( !isset( $new_monitor ) ) + { + $new_monitor = $monitor; + $new_monitor[Triggers] = split( ',', $monitor[Triggers] ); + $new_x10_monitor = $x10_monitor; + } $local_palettes = array( "Grey"=>1, "RGB24"=>4, "RGB565"=>3, "YUV420P"=>15 ); $remote_palettes = array( "8 bit greyscale"=>1, "24 bit colour"=>4 ); $orientations = array( "Normal"=>0, "Rotate Right"=>90, "Inverted"=>180, "Rotate Left"=>270 ); @@ -84,6 +84,13 @@ function validateForm(Form) return( true ); } +function submitTab(Form,Tab) +{ + Form.action.value = ""; + Form.tab.value = Tab; + Form.submit(); +} + function closeWindow() { window.close(); @@ -113,7 +120,7 @@ function closeWindow() else { ?> - + "> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ParameterValue @@ -136,124 +213,123 @@ function closeWindow() case 'monitor' : { ?> -Name -Function +Function -Section Length -Frame Skip -Run Mode +Frame Skip +Run Mode Triggers "; + $opt_triggers = getSetValues( 'Monitors', 'Triggers' ); + $break_count = (int)(ceil(count($opt_triggers))); + $break_count = min( 3, $break_count ); + $opt_count = 0; + foreach( $opt_triggers as $opt_trigger ) + { + if ( !ZM_OPT_X10 && $opt_trigger == 'X10' ) + continue; + if ( $opt_count && ($opt_count%$break_count == 0) ) + echo "
"; ?> - checked> + checked> None available "Local", "Remote"=>"Remote" ); + $select_name = "new_monitor[Type]"; + $source_types = array( "Local"=>"Local", "Remote"=>"Remote" ); ?> -Source Type +Source Type -Device Number (/dev/video?) -Device Channel -Device Format (0=PAL,1=NTSC etc) -Capture Palette +Device Number (/dev/video?) +Device Channel +Device Format (0=PAL,1=NTSC etc) +Capture Palette -Remote Host Name -Remote Host Port -Remote Host Path -Remote Image Colours +Remote Host Name +Remote Host Port +Remote Host Path +Remote Image Colours -Capture Width (pixels) -Capture Height (pixels) -Orientation +Capture Width (pixels) +Capture Height (pixels) +Orientation -Timestamp Label Format -Timestamp Label X -Timestamp Label Y +Timestamp Label Format +Timestamp Label X +Timestamp Label Y -Image Buffer Size (frames) -Warmup Frames -Pre Event Image Buffer -Post Event Image Buffer +Image Buffer Size (frames) +Warmup Frames +Pre Event Image Buffer +Post Event Image Buffer -Maximum FPS -FPS Report Interval -Reference Image Blend %ge +Maximum FPS +FPS Report Interval +Reference Image Blend %ge -X10 Activation String -X10 Input Alarm String -X10 Output Alarm String +X10 Activation String +X10 Input Alarm String +X10 Output Alarm String