diff --git a/web/zm_funcs.php b/web/zm_funcs.php index 162e2795c..515622ff5 100644 --- a/web/zm_funcs.php +++ b/web/zm_funcs.php @@ -759,7 +759,7 @@ function deScale( $dimension, $dummy ) return( $dimension ); } -function parseSort( $save_to_session=false ) +function parseSort( $save_to_session=false, $term_sep='&' ) { global $sort_field, $sort_asc; // Inputs global $sort_query, $sort_column, $sort_order; // Outputs @@ -815,7 +815,7 @@ function parseSort( $save_to_session=false ) } $sort_order = $sort_asc?"asc":"desc"; if ( !$sort_asc ) $sort_asc = 0; - $sort_query = "&sort_field=$sort_field&sort_asc=$sort_asc"; + $sort_query = $term_sep."sort_field=".$sort_field.$term_sep."sort_asc=".$sort_asc; if ( $save_to_session ) { $_SESSION['sort_field'] = $sort_field; @@ -823,7 +823,7 @@ function parseSort( $save_to_session=false ) } } -function parseFilter( $save_to_session=false ) +function parseFilter( $save_to_session=false, $term_sep='&' ) { global $trms; // Inputs global $filter_query, $filter_sql, $filter_fields; // Outputs @@ -842,7 +842,7 @@ function parseFilter( $save_to_session=false ) { $_SESSION['trms'] = $trms; } - $filter_query .= "&trms=$trms"; + $filter_query .= $term_sep."trms=".$trms; $filter_fields .= ''."\n"; for ( $i = 1; $i <= $trms; $i++ ) @@ -858,7 +858,7 @@ function parseFilter( $save_to_session=false ) if ( isset($$conjunction_name) ) { - $filter_query .= "&$conjunction_name=".$$conjunction_name; + $filter_query .= $term_sep.$conjunction_name."=".$$conjunction_name; $filter_sql .= " ".$$conjunction_name." "; $filter_fields .= ''."\n"; if ( $save_to_session ) @@ -868,7 +868,7 @@ function parseFilter( $save_to_session=false ) } if ( isset($$obracket_name) ) { - $filter_query .= "&$obracket_name=".$$obracket_name; + $filter_query .= $term_sep.$obracket_name."=".$$obracket_name; $filter_sql .= str_repeat( "(", $$obracket_name ); $filter_fields .= ''."\n"; if ( $save_to_session ) @@ -878,7 +878,7 @@ function parseFilter( $save_to_session=false ) } if ( isset($$attr_name) ) { - $filter_query .= "&$attr_name=".$$attr_name; + $filter_query .= $term_sep.$attr_name."=".$$attr_name; $filter_fields .= ''."\n"; switch ( $$attr_name ) { @@ -972,9 +972,9 @@ function parseFilter( $save_to_session=false ) break; } - $filter_query .= "&$op_name=".urlencode($$op_name); + $filter_query .= $term_sep.$op_name."=".urlencode($$op_name); $filter_fields .= ''."\n"; - $filter_query .= "&$value_name=".urlencode($$value_name); + $filter_query .= $term_sep.$value_name."=".urlencode($$value_name); $filter_fields .= ''."\n"; if ( $save_to_session ) { @@ -985,7 +985,7 @@ function parseFilter( $save_to_session=false ) } if ( isset($$cbracket_name) ) { - $filter_query .= "&$cbracket_name=".$$cbracket_name; + $filter_query .= $term_sep.$cbracket_name."=".$$cbracket_name; $filter_sql .= str_repeat( ")", $$cbracket_name ); $filter_fields .= ''."\n"; if ( $save_to_session ) diff --git a/web/zm_html_view_events.php b/web/zm_html_view_events.php index 92031602b..573bae06f 100644 --- a/web/zm_html_view_events.php +++ b/web/zm_html_view_events.php @@ -268,9 +268,14 @@ function viewEvents( form, name ) if ( $page > 1 ) { + if ( false && $page > 2 ) + { ?> - << - < +<< + +< - > - >> +> +>> + diff --git a/web/zm_html_view_timeline.php b/web/zm_html_view_timeline.php index 9dc140e9a..aa59c98fa 100644 --- a/web/zm_html_view_timeline.php +++ b/web/zm_html_view_timeline.php @@ -1157,9 +1157,9 @@ div.zoom {
- <<   + <   -   - >> + >
No Event
diff --git a/web/zm_xhtml_view_event.php b/web/zm_xhtml_view_event.php index 5c3e9dbd8..efd96d903 100644 --- a/web/zm_xhtml_view_event.php +++ b/web/zm_xhtml_view_event.php @@ -60,8 +60,8 @@ elseif ( isset( $fid ) ) $fid = $frame['FrameId']; } -parseSort(); -parseFilter(); +parseSort( true, '&' ); +parseFilter( true, '&' ); $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'); $result = mysql_query( $sql ); @@ -127,8 +127,13 @@ if ( $paged && !empty($page) ) if ( $page > 1 ) { + if ( false && $page > 2 ) + { ?> << + < > + >> diff --git a/web/zm_xhtml_view_events.php b/web/zm_xhtml_view_events.php index 112426b1b..960d10100 100644 --- a/web/zm_xhtml_view_events.php +++ b/web/zm_xhtml_view_events.php @@ -69,8 +69,8 @@ else $events_sql .= " 1"; } -parseSort( true ); -parseFilter( true ); +parseSort( true, '&' ); +parseFilter( true, '&' ); if ( $filter_sql ) { @@ -127,14 +127,15 @@ if ( !empty($limit) && $n_events > $limit ) 1 ) { - if ( $page ) - { ?> -

+ + $pages ) @@ -142,6 +143,15 @@ if ( !empty($limit) && $n_events > $limit ) if ( $page > 1 ) { + if ( false && $page > 2 ) + { +?> + + + + $limit ) foreach ( $new_pages as $new_page ) { ?> -  + --  - + $limit ) foreach ( $new_pages as $new_page ) { ?> -  + + + + + -

- + +
<<< >>>
+