'."\n"; } for ( $i = 1; $i <= $trms; $i++ ) { $conjunction_name = "cnj$i"; $obracket_name = "obr$i"; $cbracket_name = "cbr$i"; $attr_name = "attr$i"; $op_name = "op$i"; $value_name = "val$i"; if ( isset($$conjunction_name) ) { $filter_query .= "&$conjunction_name=".$$conjunction_name; $filter_sql .= " ".$$conjunction_name." "; $filter_fields .= ''."\n"; } if ( isset($$obracket_name) ) { $filter_query .= "&$obracket_name=".$$obracket_name; $filter_sql .= str_repeat( "(", $$obracket_name ); $filter_fields .= ''."\n"; } if ( isset($$attr_name) ) { $filter_query .= "&$attr_name=".$$attr_name; $filter_fields .= ''."\n"; switch ( $$attr_name ) { case 'DateTime': $dt_val = strftime( "%Y-%m-%d %H:%M:%S", strtotime( $$value_name ) ); $filter_sql .= "E.StartTime ".$$op_name." '$dt_val'"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Date': $dt_val = strftime( "%Y-%m-%d %H:%M:%S", strtotime( $$value_name ) ); $filter_sql .= "to_days( E.StartTime ) ".$$op_name." to_days( '$dt_val' )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Time': $dt_val = strftime( "%Y-%m-%d %H:%M:%S", strtotime( $$value_name ) ); $filter_sql .= "extract( hour_second from E.StartTime ) ".$$op_name." extract( hour_second from '$dt_val' )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Weekday': $dt_val = strftime( "%Y-%m-%d %H:%M:%S", strtotime( $$value_name ) ); $filter_sql .= "weekday( E.StartTime ) ".$$op_name." weekday( '$dt_val' )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Length': case 'Frames': case 'AlarmFrames': case 'TotScore': case 'AvgScore': case 'MaxScore': $filter_sql .= "E.".$$attr_name." ".$$op_name." ".$$value_name; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Archived': $filter_sql .= "E.Archived = ".$$value_name; break; } $filter_query .= "&$value_name=".urlencode($$value_name); $filter_fields .= ''."\n"; } if ( isset($$cbracket_name) ) { $filter_query .= "&$cbracket_name=".$$cbracket_name; $filter_sql .= str_repeat( ")", $$cbracket_name ); $filter_fields .= ''."\n"; } } if ( $filter_sql ) { $count_sql .= " and ( $filter_sql )"; $events_sql .= " and ( $filter_sql )"; } $events_sql .= " order by $sort_column $sort_order"; if ( $page ) { $events_sql .= " limit ".(($page-1)*EVENT_HEADER_LINES).", ".EVENT_HEADER_LINES; } ?> ZM - <?= $monitor['Name'] ?> - <?= $zmSlangEvents ?>
-     $pages ) $page = $pages; if ( $page > 1 ) { $new_pages = array(); $pages_used = array(); $lo_exp = max(2,log($page-1)/log($max_shortcuts)); for ( $i = 0; $i < $max_shortcuts; $i++ ) { $new_page = round($page-pow($lo_exp,$i)); if ( isset($pages_used[$new_page]) ) continue; if ( $new_page <= 1 ) break; $pages_used[$new_page] = true; array_unshift( $new_pages, $new_page ); } if ( !isset($pages_used[1]) ) array_unshift( $new_pages, 1 ); foreach ( $new_pages as $new_page ) { ?>    - $pages ) break; $pages_used[$new_page] = true; array_push( $new_pages, $new_page ); } if ( !isset($pages_used[$pages]) ) array_push( $new_pages, $pages ); foreach ( $new_pages as $new_page ) { ?>    
 
 
 
>
Mark
disabled>