if ($output_format == OUTPUT_ICAL) { // We set $keep_private to FALSE here because we excluded all private // events in the SQL query export_icalendar($res, FALSE, $report_end); exit; } if ($output_format == OUTPUT_HTML && !$ajax) { echo "<p class=\"report_entries\"><span id=\"n_entries\">" . $nmatch . "</span> " . ($nmatch == 1 ? get_vocab("entry_found") : get_vocab("entries_found")) . "</p>\n"; } // Report if ($output == REPORT) { open_report(); report_header(); $body_rows = array(); for ($i = 0; $row = sql_row_keyed($res, $i); $i++) { report_row($body_rows, $row); } output_body_rows($body_rows, $output_format); close_report(); } else { open_summary(); if ($nmatch > 0) { for ($i = 0; $row = sql_row_keyed($res, $i); $i++) { accumulate($row, $count, $hours, $report_start, $report_end, $room_hash, $name_hash); } do_summary($count, $hours, $room_hash, $name_hash); } else { // Excel doesn't seem to like an empty file with just a BOM, so give // it an empty row as well to keep it happy $values = array(); output_row($values, $output_format);
if ($output_format == OUTPUT_ICAL) { // We set $keep_private to FALSE here because we excluded all private // events in the SQL query export_icalendar($res, FALSE, $report_end); exit; } if ($output_format == OUTPUT_HTML && !$ajax) { echo "<p class=\"report_entries\"><span id=\"n_entries\">" . $nmatch . "</span> " . ($nmatch == 1 ? get_vocab("entry_found") : get_vocab("entries_found")) . "</p>\n"; } // Report if ($output == REPORT) { open_report(); report_header(); $body_rows = array(); for ($i = 0; $row = sql_row_keyed($res, $i); $i++) { report_row($body_rows, $row, $sortby); } output_body_rows($body_rows, $output_format); close_report(); } else { open_summary(); if ($nmatch > 0) { for ($i = 0; $row = sql_row_keyed($res, $i); $i++) { accumulate($row, $count, $hours, $report_start, $report_end, $room_hash, $name_hash); } do_summary($count, $hours, $room_hash, $name_hash); } else { // Excel doesn't seem to like an empty file with just a BOM, so give // it an empty row as well to keep it happy $values = array(); output_row($values, $output_format);