예제 #1
0
             if ($_GET["sumby"] == "5") {
                 echo html_entity_decode($vocab["summarize_by"]) . " " . html_entity_decode($vocab["type"]) . " - {$day} {$month} {$year};";
             } else {
                 $fieldname = grr_sql_query1("SELECT fieldname FROM " . TABLE_PREFIX . "_overload WHERE id='" . $_GET["sumby"] . "'");
                 echo html_entity_decode($vocab["summarize_by"]) . " " . html_entity_decode($fieldname) . " - {$day} {$month} {$year};";
             }
         }
     }
     echo "\r\n";
 }
 for ($i = 0; $row = grr_sql_row($res, $i); $i++) {
     // Récupération des données concernant l'affichage du planning du domaine
     get_planning_area_values($row[11]);
     if ($enable_periods == 'y') {
         // 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')
예제 #2
0
    } else {
        // Order by Start date/time, Area, Room
        $sql .= " ORDER BY 2,9,10";
    }
    // echo "<p>DEBUG: SQL: <tt> $sql </tt></p>\n";
    $res = sql_query($sql);
    if (!$res) {
        fatal_error(0, sql_error());
    }
    $nmatch = sql_count($res);
    if ($nmatch == 0) {
        echo "<p class=\"report_entries\">" . get_vocab("nothing_found") . "</p>\n";
        sql_free($res);
    } else {
        $last_area_room = "";
        $last_date = "";
        echo "<p class=\"report_entries\">" . $nmatch . " " . ($nmatch == 1 ? get_vocab("entry_found") : get_vocab("entries_found")) . "</p>\n";
        for ($i = 0; $row = sql_row_keyed($res, $i); $i++) {
            if ($summarize & 1) {
                reporton($row, $last_area_room, $last_date, $sortby, $display);
            }
            if ($summarize & 2) {
                empty($enable_periods) ? accumulate($row, $count, $hours, $report_start, $report_end, $room_hash, $name_hash) : accumulate_periods($row, $count, $hours, $report_start, $report_end, $room_hash, $name_hash);
            }
        }
        if ($summarize & 2) {
            do_summary($count, $hours, $room_hash, $name_hash);
        }
    }
}
require_once "trailer.inc";