Example #1
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";
Example #2
0
             echo "&amp;pview=1";
         }
         echo "'>" . get_vocab("match_login") . "</a>";
     } else {
         echo "<b>&gt;&gt; " . get_vocab("match_login") . " &lt;&lt;</b>";
     }
     echo "</td>";
     // Colonne "dernière modification"
     echo "<td>" . get_vocab("lastupdate") . "</td>";
     echo "</tr>";
 }
 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 ($summarize == 1 || $summarize == 3) {
         reporton($row, $dformat);
     }
     if ($summarize == 2 || $summarize == 3) {
         if ($enable_periods == 'y') {
             accumulate_periods($row, $count, $hours, $report_start, $report_end, $room_hash, $breve_description_hash, "n");
             $do_sum1 = 'y';
         } else {
             accumulate($row, $count2, $hours2, $report_start, $report_end, $room_hash2, $breve_description_hash2, "n");
             $do_sum2 = 'y';
         }
     }
 }
 if ($summarize == 1 || $summarize == 3) {
     echo "</table>";
 }
 if ($summarize == 2 || $summarize == 3) {
Example #3
0
    if (!empty($descrmatch)) {
        $sql .= " AND" . sql_syntax_caseless_contains("e.description", $descrmatch);
    }
    # Order by Area, Room, Start date/time:
    $sql .= " ORDER BY 9,10,2";
    # echo "<p>DEBUG: SQL: <tt> $sql </tt>\n";
    $res = sql_query($sql);
    if (!$res) {
        fatal_error(0, sql_error());
    }
    $nmatch = sql_count($res);
    if ($nmatch == 0) {
        echo "<P><B>" . $vocab["nothing_found"] . "</B>\n";
        sql_free($res);
    } else {
        $last_area_room = "";
        echo "<P><B>" . $nmatch . " " . ($nmatch == 1 ? $vocab["entry_found"] : $vocab["entries_found"]) . "</B>\n";
        for ($i = 0; $row = sql_row($res, $i); $i++) {
            if ($summarize & 1) {
                reporton($row, $last_area_room);
            }
            if ($summarize & 2) {
                accumulate($row, $count, $hours, $report_start, $report_end, $room_hash, $name_hash);
            }
        }
        if ($summarize & 2) {
            do_summary($count, $hours, $room_hash, $name_hash);
        }
    }
}
include "trailer.inc";