Example #1
0
        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);
            }
            close_summary();
        }
    }
}
if ($cli_mode) {
    exit(0);
}
if ($output_form) {
    output_trailer();
Example #2
0
                    // pour le décompte des créneaux
                    accumulate_periods($row, $count1, $hours1, $report_start, $report_end, $room_hash1, $breve_description_hash1, "y");
                    $do_sum1 = 'y';
                } else {
                    // pour le décompte des heures
                    accumulate($row, $count2, $hours2, $report_start, $report_end, $room_hash2, $breve_description_hash2, "y");
                    $do_sum2 = 'y';
                }
                // pour le décompte des réservations
                accumulate($row, $count, $hours, $report_start, $report_end, $room_hash, $breve_description_hash, "y");
            }
            // Décompte des heures (cas ou $enable_periods != 'y')
            if (isset($do_sum1)) {
                echo "\r\n" . html_entity_decode($vocab["summary_header"]) . "\r\n";
                do_summary($count1, $hours1, $room_hash1, $breve_description_hash1, "n", "heure", "y");
            }
            // Décompte des créneaux (cas ou $enable_periods == 'y')
            if (isset($do_sum2)) {
                echo "\r\n" . html_entity_decode($vocab["summary_header_per"]) . "\r\n";
                do_summary($count2, $hours2, $room_hash2, $breve_description_hash2, "y", "heure", "y");
            }
            // Décompte des réservations
            echo "\r\n\r\n\r\n" . html_entity_decode($vocab["summary_header_resa"]) . "\r\n";
            do_summary($count, $hours, $room_hash, $breve_description_hash, "", "resa", "y");
        }
    }
}
if ($summarize != 4 && $summarize != 5) {
    echo "</div>";
    include "include/trailer.inc.php";
}