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( '= $PHP_SELF ?>?view== $view ?>&mode== $mode ?>&eid== $next_event['Id'] ?>= $filter_query ?>= $sort_query ?>&limit== $limit ?>&page== $page ?>&rate== $rate ?>&scale== $scale ?>&play=1' );", = (((($frame_data[Duration]*1000)+1000)*($rate))/RATE_SCALE) ?> );
+