'."\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 ( $$conjunction_name ) { $filter_query .= "&$conjunction_name=".$$conjunction_name; $filter_sql .= " ".$$conjunction_name." "; $filter_fields .= ''."\n"; } if ( $$obracket_name ) { $filter_query .= "&$obracket_name=".$$obracket_name; $filter_sql .= str_repeat( "(", $$obracket_name ); $filter_fields .= ''."\n"; } if ( $$attr_name ) { $filter_query .= "&$attr_name=".$$attr_name; $filter_fields .= ''."\n"; switch ( $$attr_name ) { case 'DateTime': $dt_val = strtotime( $$value_name ); $filter_sql .= "E.StartTime ".$$op_name." from_unixtime( $dt_val )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Date': $dt_val = strtotime( $$value_name ); $filter_sql .= "to_days( E.StartTime ) ".$$op_name." to_days( from_unixtime( $dt_val ) )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Time': $dt_val = strtotime( $$value_name ); $filter_sql .= "extract( hour_second from E.StartTime ) ".$$op_name." extract( hour_second from from_unixtime( $dt_val ) )"; $filter_query .= "&$op_name=".urlencode($$op_name); $filter_fields .= ''."\n"; break; case 'Weekday': $dt_val = strtotime( $$value_name ); $filter_sql .= "weekday( E.StartTime ) ".$$op_name." weekday( from_unixtime( $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 ( $$cbracket_name ) { $filter_query .= "&$cbracket_name=".$$cbracket_name; $filter_sql .= str_repeat( ")", $$cbracket_name ); $filter_fields .= ''."\n"; } } if ( $filter_sql ) { $sql .= " and ( $filter_sql )"; } $sql .= " order by $sort_column $sort_order"; //echo $sql; $result = mysql_query( $sql ); if ( !$result ) { die( mysql_error() ); } $n_rows = mysql_num_rows( $result ); //echo $filter_query; ?> ZM - <?= $monitor[Name] ?> - Events
- events   Close
 
Refresh Show Filter Window Check All 
 
>
Id Name Time Duration Frames Alarm
Frames
Total
Score
Avg.
Score
Max.
Score
Mark
disabled>