diff --git a/web/zm_funcs.php b/web/zm_funcs.php index 50b6b1034..b7615bd46 100644 --- a/web/zm_funcs.php +++ b/web/zm_funcs.php @@ -507,10 +507,10 @@ function parseSort() case 'Name' : $sort_column = "E.Name"; break; - case 'StartTime' : + case 'DateTime' : $sort_column = "E.StartTime"; break; - case 'Secs' : + case 'Length' : $sort_column = "E.Length"; break; case 'Frames' : @@ -595,6 +595,8 @@ function parseFilter() case 'Weekday': $filter_sql .= "weekday( E.StartTime )"; break; + case 'Id': + case 'Name': case 'MonitorId': case 'Length': case 'Frames': diff --git a/web/zm_html_view_event.php b/web/zm_html_view_event.php index 9013007d9..033ff19a2 100644 --- a/web/zm_html_view_event.php +++ b/web/zm_html_view_event.php @@ -49,7 +49,7 @@ $event = mysql_fetch_assoc( $result ); parseSort(); parseFilter(); -$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'<=':'>=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column ".($sort_order=='asc'?'desc':'asc'); +$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'<=':'>=')." '".$event[preg_replace( '/^.*\./', '', $sort_column )]."'$filter_sql$mid_sql order by $sort_column ".($sort_order=='asc'?'desc':'asc'); $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); @@ -62,7 +62,7 @@ while ( $row = mysql_fetch_assoc( $result ) ) } } -$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'>=':'<=')." '".$event[$sort_field]."'$filter_sql$mid_sql order by $sort_column $sort_order"; +$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sort_column ".($sort_order=='asc'?'>=':'<=')." '".$event[preg_replace( '/^.*\./', '', $sort_column )]."'$filter_sql$mid_sql order by $sort_column $sort_order"; $result = mysql_query( $sql ); if ( !$result ) die( mysql_error() ); @@ -120,6 +120,19 @@ function newWindow(Url,Name,Width,Height) { var Name = window.open(Url,Name,"resizable,width="+Width+",height="+Height); } + +var timeout_id = window.setTimeout( "window.location.replace( '?view=&mode=&eid=&limit=&page=&rate=&scale=&play=1' );", ); + @@ -432,10 +445,11 @@ else ?> - - - - + + + + +
         
diff --git a/web/zm_html_view_events.php b/web/zm_html_view_events.php index ce54e7e8d..74a36a99c 100644 --- a/web/zm_html_view_events.php +++ b/web/zm_html_view_events.php @@ -90,37 +90,6 @@ function closeWindow() var filterWindow = window.open( "?view=none", 'zmFilter', 'width=1,height=1' ); filterWindow.close(); } -function checkAll(form,name) -{ - for (var i = 0; i < form.elements.length; i++) - if (form.elements[i].name.indexOf(name) == 0) - form.elements[i].checked = 1; - form.delete_btn.disabled = false; - - form.learn_btn.disabled = false; - form.learn_state.disabled = false; - -} -function configureButton(form,name) -{ - var checked = false; - for (var i = 0; i < form.elements.length; i++) - { - if ( form.elements[i].name.indexOf(name) == 0) - { - if ( form.elements[i].checked ) - { - checked = true; - break; - } - } - } - form.delete_btn.disabled = !checked; - - form.learn_btn.disabled = !checked; - form.learn_state.disabled = !checked; - -} window.focus(); +function checkAll(form,name) +{ + for (var i = 0; i < form.elements.length; i++) + if (form.elements[i].name.indexOf(name) == 0) + form.elements[i].checked = 1; + form.view_btn.disabled = false; + form.delete_btn.disabled = false; + + form.learn_btn.disabled = false; + form.learn_state.disabled = false; + +} +function configureButton(form,name) +{ + var checked = false; + for (var i = 0; i < form.elements.length; i++) + { + if ( form.elements[i].name.indexOf(name) == 0) + { + if ( form.elements[i].checked ) + { + checked = true; + break; + } + } + } + form.view_btn.disabled = !checked; + form.delete_btn.disabled = !checked; + + form.learn_btn.disabled = !checked; + form.learn_state.disabled = !checked; + +} +function viewEvents( form, name ) +{ + var events = new Array(); + for (var i = 0; i < form.elements.length; i++) + { + if ( form.elements[i].name.indexOf(name) == 0) + { + if ( form.elements[i].checked ) + { + events[events.length] = form.elements[i].value; + } + } + } + if ( events.length > 0 ) + { + eventWindow( '?view=event&eid='+events[0]+'&trms=1&attr1=Id&op1=%3D%5B%5D&val1='+events.join('%2C')+'&page=1&play=1', 'zmEvent', , ); + } +} @@ -270,9 +301,7 @@ else -     +       diff --git a/web/zm_html_view_filter.php b/web/zm_html_view_filter.php index 571d5fd6f..5938b37ef 100644 --- a/web/zm_html_view_filter.php +++ b/web/zm_html_view_filter.php @@ -63,6 +63,8 @@ for ( $i = 1; $i <= ceil(($trms-1)/2); $i++ ) $attr_types = array( 'MonitorId' => $zmSlangAttrMonitorId, 'MonitorName' => $zmSlangAttrMonitorName, + 'Id' => $zmSlangAttrId, + 'Name' => $zmSlangAttrName, 'DateTime' => $zmSlangAttrDateTime, 'Date' => $zmSlangAttrDate, 'Time' => $zmSlangAttrTime, diff --git a/web/zm_lang_en_gb.php b/web/zm_lang_en_gb.php index de9e15481..d7c392d47 100644 --- a/web/zm_lang_en_gb.php +++ b/web/zm_lang_en_gb.php @@ -161,6 +161,7 @@ $zmSlangEtc = 'etc'; $zmSlangEvent = 'Event'; $zmSlangEventFilter = 'Event Filter'; $zmSlangEventId = 'Event Id'; +$zmSlangEventName = 'Event Name'; $zmSlangEvents = 'Events'; $zmSlangExclude = 'Exclude'; $zmSlangFeed = 'Feed'; @@ -263,6 +264,7 @@ $zmSlangParameter = 'Parameter'; $zmSlangPassword = 'Password'; $zmSlangPasswordsDifferent = 'The new and confirm passwords are different'; $zmSlangPaths = 'Paths'; +$zmSlangPlayAll = 'Play All'; $zmSlangPhoneBW = 'Phone B/W'; $zmSlangPixels = 'pixels'; $zmSlangPleaseWait = 'Please Wait';