本文整理汇总了PHP中tdcell函数的典型用法代码示例。如果您正苦于以下问题:PHP tdcell函数的具体用法?PHP tdcell怎么用?PHP tdcell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tdcell函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tdcell_rowspan
}
if (isset($id) && !est_hors_reservation(mktime(0, 0, 0, $month, $day, $year), $area)) {
if ($compteur[$id] == 0) {
if ($cellules[$id] != 1) {
if (isset($today[$room][$t + ($cellules[$id] - 1) * $resolution]["id"])) {
$id_derniere_ligne_du_bloc = $today[$room][$t + ($cellules[$id] - 1) * $resolution]["id"];
if ($id_derniere_ligne_du_bloc != $id) {
$cellules[$id] = $cellules[$id] - 1;
}
}
}
tdcell_rowspan($c, $cellules[$id]);
}
$compteur[$id] = 1;
} else {
tdcell($c);
}
if (!isset($id) || est_hors_reservation(mktime(0, 0, 0, $month, $day, $year), $area)) {
$hour = date("H", $t);
$minute = date("i", $t);
$date_booking = mktime($hour, $minute, 0, $month, $day, $year);
if (est_hors_reservation(mktime(0, 0, 0, $month, $day, $year), $area)) {
echo '<img src="img_grr/stop.png" alt="' . get_vocab("reservation_impossible") . '" title="' . get_vocab("reservation_impossible") . '" width="16" height="16" class="' . $class_image . '" />' . PHP_EOL;
} else {
if ((authGetUserLevel(getUserName(), -1) > 1 || auth_visiteur(getUserName(), $room) == 1) && UserRoomMaxBooking(getUserName(), $room, 1) != 0 && verif_booking_date(getUserName(), -1, $room, $date_booking, $date_now, $enable_periods) && verif_delais_max_resa_room(getUserName(), $room, $date_booking) && verif_delais_min_resa_room(getUserName(), $room, $date_booking) && ($statut_room[$room] == "1" || $statut_room[$room] == "0" && authGetUserLevel(getUserName(), $room) > 2) && $_GET['pview'] != 1) {
if ($enable_periods == 'y') {
echo '<a href="edit_entry.php?room=' . $room . '&period=' . $time_t_stripped . '&year=' . $year . '&month=' . $month . '&day=' . $day . '&page=day" title="' . get_vocab("cliquez_pour_effectuer_une_reservation") . '" ><span class="glyphicon glyphicon-plus"></span></a>' . PHP_EOL;
} else {
echo '<a href="edit_entry.php?room=' . $room . '&hour=' . $hour . '&minute=' . $minute . '&year=' . $year . '&month=' . $month . '&day=' . $day . '&page=day" title="' . get_vocab("cliquez_pour_effectuer_une_reservation") . '" ><span class="glyphicon glyphicon-plus"></span></a>' . PHP_EOL;
}
} else {
示例2: tdcell
echo '<br />' . PHP_EOL;
}
if ($clef == 1) {
echo '<img src="img_grr/skey.png" alt="clef">' . PHP_EOL;
}
if (Settings::get('show_courrier') == 'y') {
if ($courrier == 1) {
echo '<img src="img_grr/scourrier.png" alt="courrier">' . PHP_EOL;
} else {
echo '<br /><img src="img_grr/hourglass.png" alt="buzy">' . PHP_EOL;
}
}
echo '</span>' . PHP_EOL;
} else {
echo PHP_EOL . '<table class="table-header"><tr>';
tdcell($d[$cday]["color"][$i]);
if ($d[$cday]["res"][$i] != '-') {
echo '<img src="img_grr/buzy.png" alt="', get_vocab("ressource actuellement empruntee"), '" title="', get_vocab("ressource actuellement empruntee"), '" width="20" height="20" class="image" />', PHP_EOL;
}
if (isset($d[$cday]["option_reser"][$i]) && $d[$cday]["option_reser"][$i] != -1) {
echo '<img src="img_grr/small_flag.png" alt="', get_vocab("reservation_a_confirmer_au_plus_tard_le"), '" title="', get_vocab("reservation_a_confirmer_au_plus_tard_le"), ' ', time_date_string_jma($d[$cday]["option_reser"][$i], $dformat), '" width="20" height="20" class="image" />', PHP_EOL;
}
if (isset($d[$cday]["moderation"][$i]) && $d[$cday]["moderation"][$i] == 1) {
echo '<img src="img_grr/flag_moderation.png" alt="', get_vocab("en_attente_moderation"), '" title="', get_vocab("en_attente_moderation"), '" class="image" />', PHP_EOL;
}
$Son_GenreRepeat = grr_sql_query1("SELECT " . TABLE_PREFIX . "_type_area.type_name FROM " . TABLE_PREFIX . "_type_area," . TABLE_PREFIX . "_entry WHERE " . TABLE_PREFIX . "_entry.type=" . TABLE_PREFIX . "_type_area.type_letter AND " . TABLE_PREFIX . "_entry.id = '" . $d[$cday]["id"][$i] . "';");
if ($Son_GenreRepeat == -1) {
echo '<span class="small_planning">', PHP_EOL, '<b>', $d[$cday]["data"][$i], '</b><br>';
} else {
echo '<span class="small_planning">' . $d[$cday]["data"][$i] . '<br>' . $Son_GenreRepeat . '<br>' . PHP_EOL;
}
示例3: elseif
echo "<script type=\"text/javascript\">\n<!--\n";
echo "EndActiveCell();\n";
echo "// -->\n</script>";
}
} else {
echo ' ';
}
} elseif ($descr != "") {
#if it is booked then show
echo " <a href=\"view_entry.php?id={$id}" . "&area={$area}&day={$wday}&month={$wmonth}&year={$wyear}\" " . "title=\"{$long_descr}\">{$descr}</a>";
} else {
echo " \" ";
}
echo "</td>\n";
}
# next lines to display times on right side
if (FALSE != $times_right_side) {
if ($enable_periods) {
tdcell("red");
$time_t_stripped = preg_replace("/^0/", "", $time_t);
echo "<a href=\"{$hilite_url}={$time_t}\" title=\"" . get_vocab("highlight_line") . "\">" . $periods[$time_t_stripped] . "</a></td>";
} else {
tdcell("red");
echo "<a href=\"{$hilite_url}={$time_t}\" title=\"" . get_vocab("highlight_line") . "\">" . utf8_strftime(hour_min_format(), $t) . "</a></td>";
}
}
echo "</tr>\n";
}
echo "</table>";
show_colour_key();
include "trailer.inc";
示例4: cell_html
//.........这里部分代码省略.........
$class .= " multiday_start";
}
if ($is_multiday_end) {
$class .= " multiday_end";
}
$html .= "<tr>\n";
$html .= "<td class=\"{$class}\"" . ($n == 0 ? " style=\"border-top-width: 0\"" : "") . ">\n";
$html .= "<div class=\"celldiv slots1\">\n";
// we want clipping of overflow
$html .= "<a href=\"view_entry.php?id={$id}&" . $query_strings['booking'] . "\" title=\"{$long_descr}\">";
$html .= $is_repeat ? "<img class=\"repeat_symbol\" src=\"images/repeat.png\" alt=\"" . get_vocab("series") . "\" title=\"" . get_vocab("series") . "\" width=\"10\" height=\"10\">" : '';
$html .= "{$descr}</a>\n";
$html .= "</div>\n";
$html .= "</td>\n";
$html .= "</tr>\n";
}
$html .= "</tbody>\n";
$html .= "</table>\n";
$html .= "</div>\n";
$html .= "</td>\n";
} else {
if (isset($cell[0]["id"])) {
$id = $cell[0]["id"];
$is_repeat = $cell[0]["is_repeat"];
$is_multiday_start = $cell[0]["is_multiday_start"];
$is_multiday_end = $cell[0]["is_multiday_end"];
$status = $cell[0]["status"];
$color = $cell[0]["color"];
$descr = isset($cell[0]["data"]) ? htmlspecialchars($cell[0]["data"]) : NULL;
$long_descr = htmlspecialchars($cell[0]["long_descr"]);
$slots = $cell[0]["slots"];
} else {
unset($id);
$slots = 1;
}
// $c is the colour of the cell that the browser sees. Zebra stripes normally,
// row_highlight if we're highlighting that line and the appropriate colour if
// it is booked (determined by the type).
// We tell if its booked by $id having something in it
if (isset($id)) {
$c = $color;
if ($status & STATUS_PRIVATE) {
$c .= " private";
}
if ($approval_enabled && $status & STATUS_AWAITING_APPROVAL) {
$c .= " awaiting_approval";
}
if ($confirmation_enabled && $status & STATUS_TENTATIVE) {
$c .= " tentative";
}
if ($is_multiday_start) {
$c .= " multiday_start";
}
if ($is_multiday_end) {
$c .= " multiday_end";
}
// Add a class to bookings that this user is allowed to edit so that the
// JavaScript can turn them into resizable bookings
/*if (getWritable($cell[0]['create_by'], $user, $cell[0]['room_id']))
{
$c .= " writable";
if ($is_repeat)
{
$c .= " series";
}
}*/
} else {
$c = $is_invalid ? "invalid" : "new";
}
// Don't put in a <td> cell if the slot is booked and there's no description.
// This would mean that it's the second or subsequent slot of a booking and so the
// <td> for the first slot would have had a rowspan that extended the cell down for
// the number of slots of the booking.
if (!isset($id) || isset($descr)) {
$html .= tdcell($c, $slots);
// If the room isn't booked then allow it to be booked
if (!isset($id)) {
// Don't provide a link if the slot doesn't really exist
if (!$is_invalid) {
$html .= "<div class=\"celldiv slots1\">\n";
// a bookable slot is only one unit high
$html .= "<a href=\"edit_entry.php?" . ($enable_periods ? $query_strings['new_periods'] : $query_strings['new_times']) . "\">\n";
if ($show_plus_link) {
$html .= "<img src=\"images/new.gif\" alt=\"New\" width=\"10\" height=\"10\">\n";
}
$html .= "</a>\n";
$html .= "</div>\n";
}
} else {
$html .= "<div data-id=\"{$id}\" class=\"celldiv slots" . ($times_along_top ? "1" : $slots) . "\">\n";
$html .= "<a href=\"view_entry.php?id={$id}&" . $query_strings['booking'] . "\" title=\"{$long_descr}\">";
$html .= $is_repeat ? "<img class=\"repeat_symbol {$c}\" src=\"images/repeat.png\" alt=\"" . get_vocab("series") . "\" title=\"" . get_vocab("series") . "\" width=\"10\" height=\"10\">" : '';
$html .= "{$descr}</a>\n";
$html .= "</div>\n";
}
$html .= "</td>\n";
}
}
return $html;
}
示例5: count
}
//Anything to display for this day?
if (isset($d[$cday][$cmonth][$cyear]["id"][0])) {
$n = count($d[$cday][$cmonth][$cyear]["id"]);
//Show the start/stop times, 2 per line, linked to view_entry.
//If there are 12 or fewer, show them, else show 11 and "...".
for ($i = 0; $i < $n; $i++) {
if ($i == 11 && $n > 12) {
echo " ...\n";
break;
}
for ($i = 0; $i < $n; $i++) {
if ($d[$cday][$cmonth][$cyear]["room"][$i] == $row[0]) {
//if ($i > 0 && $i % 2 == 0) echo "<br />"; else echo " ";
echo "\n<br />\n<table width=\"100%\" border=\"0\" ><tr>\n";
tdcell($d[$cday][$cmonth][$cyear]["color"][$i]);
if ($d[$cday][$cmonth][$cyear]["res"][$i] != '-') {
echo " <img src=\"img_grr/buzy.png\" alt=\"" . get_vocab("ressource actuellement empruntee") . "\" title=\"" . get_vocab("ressource actuellement empruntee") . "\" width=\"20\" height=\"20\" class=\"image\" /> \n";
}
// si la réservation est à confirmer, on le signale
if (isset($d[$cday][$cmonth][$cyear]["option_reser"][$i]) && $d[$cday][$cmonth][$cyear]["option_reser"][$i] != -1) {
echo " <img src=\"img_grr/small_flag.png\" alt=\"" . get_vocab("reservation_a_confirmer_au_plus_tard_le") . "\" title=\"" . get_vocab("reservation_a_confirmer_au_plus_tard_le") . " " . time_date_string_jma($d[$cday][$cmonth][$cyear]["option_reser"][$i], $dformat) . "\" width=\"20\" height=\"20\" class=\"image\" /> \n";
}
// si la réservation est à modérer, on le signale
if (isset($d[$cday][$cmonth][$cyear]["moderation"][$i]) && $d[$cday][$cmonth][$cyear]["moderation"][$i] == 1) {
echo " <img src=\"img_grr/flag_moderation.png\" alt=\"" . get_vocab("en_attente_moderation") . "\" title=\"" . get_vocab("en_attente_moderation") . "\" class=\"image\" /> \n";
}
if ($acces_fiche_reservation) {
echo "<a title=\"" . htmlspecialchars($d[$cday][$cmonth][$cyear]["data"][$i]) . "\" href=\"view_entry.php?id=" . $d[$cday][$cmonth][$cyear]["id"][$i] . "&page=month\">" . $d[$cday][$cmonth][$cyear]["who1"][$i][0] . "</a>";
} else {
echo $d[$cday][$cmonth][$cyear]["who1"][$i][0];
示例6: get_vocab
} else {
if (($authGetUserLevel > 1 || $auth_visiteur == 1) && $UserRoomMaxBooking != 0 && verif_booking_date(getUserName(), -1, $room, $date_booking, $date_now, $enable_periods) && verif_delais_max_resa_room(getUserName(), $room, $date_booking) && verif_delais_min_resa_room(getUserName(), $room, $date_booking) && ($this_statut_room == "1" || $this_statut_room == "0" && authGetUserLevel(getUserName(), $room) > 2) && $_GET['pview'] != 1) {
if ($enable_periods == 'y') {
echo "<a href=\"edit_entry.php?room={$room}" . "&period={$time_t_stripped}&year={$wyear}&month={$wmonth}" . "&day={$wday}&page=week\" title=\"" . get_vocab("cliquez_pour_effectuer_une_reservation") . "\"><span class=\"glyphicon glyphicon-plus\"></span>";
echo "</a>";
} else {
echo "<a href=\"edit_entry.php?room={$room}" . "&hour={$hour}&minute={$minute}&year={$wyear}&month={$wmonth}" . "&day={$wday}&page=week\" title=\"" . get_vocab("cliquez_pour_effectuer_une_reservation") . "\"><span class=\"glyphicon glyphicon-plus\"></span>";
echo "</a>";
}
} else {
echo " ";
}
}
} else {
if (est_hors_reservation(mktime(0, 0, 0, $wmonth, $wday, $wyear), $area)) {
echo tdcell($empty_color) . "<img src=\"img_grr/stop.png\" alt=\"" . get_vocab("reservation_impossible") . "\" title=\"" . get_vocab("reservation_impossible") . "\" width=\"16\" height=\"16\" class=\"" . $class_image . "\" />";
} else {
if (isset($d[$weekday][$slot - $decale_slot * $nb_case]["id"])) {
if ($enable_periods == 'y') {
// Nb de case pour crénau
$nbrow = ($d[$weekday][$slot - $decale_slot * $nb_case]['horaireFin'] - $d[$weekday][$slot - $decale_slot * $nb_case]['horaireDebut']) / 60;
} else {
$nbrow = $d[$weekday][$slot - $decale_slot * $nb_case]["duree"];
}
tdcell_rowspan($d[$weekday][$slot - $decale_slot * $nb_case]["color"], $nbrow);
if ($acces_fiche_reservation) {
if (Settings::get("display_level_view_entry") == 0) {
$currentPage = 'week';
$id = $d[$weekday][$slot - $decale_slot * $nb_case]["id"];
echo "<a title=\"" . htmlspecialchars($d[$weekday][$slot - $decale_slot * $nb_case]["who"]) . "\" data-width=\"675\" onclick=\"request({$id},{$wday},{$wmonth},{$wyear},'{$currentPage}',readData);\" data-rel=\"popup_name\" class=\"poplight\">";
} else {
示例7: show_colour_key
function show_colour_key($area_id)
{
echo '<table class="legende"><caption class="titre">Légendes des réservations</caption>' . PHP_EOL;
$sql = "SELECT DISTINCT t.id, t.type_name, t.type_letter FROM " . TABLE_PREFIX . "_type_area t\n\tLEFT JOIN " . TABLE_PREFIX . "_j_type_area j on j.id_type=t.id\n\tWHERE (j.id_area IS NULL or j.id_area != '" . $area_id . "')\n\tORDER BY t.order_display";
$res = grr_sql_query($sql);
if ($res) {
$nct = -1;
for ($i = 0; $row = grr_sql_row($res, $i); $i++) {
// La requête sql précédente laisse passer les cas où un type est non valide dans le domaine concerné ET au moins dans un autre domaine, d'où le test suivant
$test = grr_sql_query1("SELECT id_type FROM " . TABLE_PREFIX . "_j_type_area WHERE id_type = '" . $row[0] . "' and id_area='" . $area_id . "'");
if ($test == -1) {
$type_name = $row[1];
$type_letter = $row[2];
if ($nct == -1) {
echo '<tr>' . PHP_EOL;
}
if (++$nct == 2) {
$nct = 0;
echo '</tr>' . PHP_EOL, '<tr>' . PHP_EOL;
}
tdcell($type_letter);
echo $type_name, '</td>' . PHP_EOL;
}
}
if ($i % 2 == 1) {
echo '<td></td>', PHP_EOL, '</tr>' . PHP_EOL;
}
echo '</table>' . PHP_EOL;
}
}
示例8: date
$wday = date("d", $wt);
$wmonth = date("m", $wt);
$wyear = date("Y", $wt);
if (!isset($d[$weekday][$slot]["color"])) {
tdcell($empty_color);
$hour = date("H", $wt);
$minute = date("i", $wt);
echo "<center>";
if ($pview != 1) {
echo "<a href=\"edit_entry.php?room={$room}&area={$area}" . "&hour={$hour}&minute={$minute}&year={$wyear}&month={$wmonth}" . "&day={$wday}\"><img src=new.gif width=10 height=10 border=0>";
} else {
echo ' ';
}
echo "</a></center>";
} else {
tdcell($d[$weekday][$slot]["color"]);
if (!isset($d[$weekday][$slot]["id"])) {
echo " \" ";
} else {
echo " <a href=\"view_entry.php?id=" . $d[$weekday][$slot]["id"] . "&area={$area}&day={$wday}&month={$wmonth}&year={$wyear}\">" . htmlspecialchars($d[$weekday][$slot]["data"]) . "</a>";
}
}
echo "</td>\n";
$wt += 86400;
}
echo "</tr>\n";
$t += $resolution;
}
echo "</table>";
if ($pview != 1) {
show_colour_key();
示例9: tdcell
}
if ($d[$weekday][$slot-$decale_slot*$nb_case]["description"]!= "")
echo "<br /><i>".$d[$weekday][$slot-$decale_slot*$nb_case]["description"]."</i>";
}
}
}
echo "</td>\n";
}
$wt += 86400;
$num_week_day++;// Pour le calcul des jours à afficher
$num_week_day = $num_week_day % 7;// Pour le calcul des jours à afficher
}
// répétition de la première colonne
tdcell("cell_hours");
if($enable_periods=='y'){
$time_t = date("i", $t);
$time_t_stripped = preg_replace( "/^0/", "", $time_t );
echo $periods_name[$time_t_stripped] . "</td>\n";
} else {
echo affiche_heure_creneau($t,$resolution)."</td>\n";
}
echo "</tr>\n";
$t += $resolution;
}
// répétition de la première ligne
echo "<tr>\n<th> </th>\n";
$num_week_day = $weekstarts;
$i=$time;
示例10: tdcell
echo "//]]>\n";
echo "</script>\n";
}
echo "</div>\n";
} else {
echo "<div class=\"celldiv" . $slots . "\">\n";
// we want clipping of overflow
echo " <a class=\"booking\" href=\"view_entry.php?id={$id}" . "&area={$area}&day={$wday}&month={$wmonth}&year={$wyear}\" " . "title=\"{$long_descr}\">{$descr}</a>\n";
echo "</div>\n";
}
echo "</td>\n";
}
}
// next lines to display times on right side
if (FALSE != $times_right_side) {
tdcell("times", 1);
echo "<div class=\"celldiv1\">\n";
if ($enable_periods) {
$time_t_stripped = preg_replace("/^0/", "", $time_t);
echo "<a href=\"{$hilite_url}={$time_t}\" title=\"" . get_vocab("highlight_line") . "\">" . $periods[$time_t_stripped] . "</a>";
} else {
echo "<a href=\"{$hilite_url}={$time_t}\" title=\"" . get_vocab("highlight_line") . "\">" . utf8_strftime(hour_min_format(), $t) . "</a>";
}
echo "</div></td>\n";
}
echo "</tr>\n";
}
echo "</tbody>\n";
echo "</table>\n";
print $before_after_links_html;
show_colour_key();
示例11: grr_sql_query
$res = grr_sql_query($sql);
if (!$res) {
fatal_error(0, grr_sql_error());
}
$row4 = grr_sql_row($res, 0);
$description = $row4[0];
$sql = "SELECT nom, prenom from " . TABLE_PREFIX . "_utilisateurs where login = '" . $row4[1] . "'";
$res = grr_sql_query($sql);
if (!$res) {
fatal_error(0, grr_sql_error());
}
$row5 = grr_sql_row($res, 0);
$nom_modo = $row5[1] . ' ' . $row5[0];
if (authGetUserLevel(getUserName(), -1) > 1) {
echo '<tr><td><b>' . get_vocab("moderation") . get_vocab("deux_points") . '</b></td>';
tdcell("avertissement");
echo '<strong>' . get_vocab("moderation_refusee") . '</strong> par ' . $nom_modo;
if ($description != "") {
echo ' : <br />(' . $description . ')';
}
echo '</td>', PHP_EOL, '</tr>', PHP_EOL;
}
}
}
if (getWritable($beneficiaire, getUserName(), $id) && verif_booking_date(getUserName(), $id, $room_id, -1, $date_now, $enable_periods) && verif_delais_min_resa_room(getUserName(), $room_id, $row[10]) && !$was_del) {
?>
<tr>
<td colspan="2">
<?php
echo "<input class=\"btn btn-primary\" type=\"button\" onclick=\"location.href='edit_entry.php?id={$id}&day={$day}&month={$month}&year={$year}&page={$page}'\" value=\"" . get_vocab("editentry") . "\">";
echo "<input class=\"btn btn-info\" type=\"button\" onclick=\"location.href='edit_entry.php?id={$id}&day={$day}&month={$month}&year={$year}&page={$page}&copier'\" value=\"" . get_vocab("copyentry") . "\">";
示例12: grr_sql_query1
echo '<img src="img_grr/skey.png" alt="clef">';
}
$courrier = grr_sql_query1("SELECT courrier FROM " . TABLE_PREFIX . "_entry WHERE " . TABLE_PREFIX . "_entry.id= " . $d[$weekday][$slot - $decale_slot * $nb_case]['id'] . "");
if (Settings::get('show_courrier') == 'y') {
if ($courrier == 1) {
echo '<img src="img_grr/scourrier.png" alt="courrier">' . PHP_EOL;
} else {
echo '<img src="img_grr/hourglass.png" alt="buzy">' . PHP_EOL;
}
}
if ($acces_fiche_reservation) {
echo "</a>";
}
}
if (!isset($d[$weekday][$slot - $decale_slot * $nb_case]["id"])) {
echo tdcell($empty_color) . "";
}
if (isset($d[$weekday][$slot - $decale_slot * $nb_case]["statut"]) && $d[$weekday][$slot - $decale_slot * $nb_case]["statut"] != '-') {
echo '<img src="img_grr/buzy.png" alt="' . get_vocab("ressource actuellement empruntee") . '" title="' . get_vocab("ressource actuellement empruntee") . '" width="20" height="20" class="image" />' . PHP_EOL;
}
if ($this_delais_option_reservation > 0 && isset($d[$weekday][$slot - $decale_slot * $nb_case]["option_reser"]) && $d[$weekday][$slot - $decale_slot * $nb_case]["option_reser"] != -1) {
echo '<img src="img_grr/small_flag.png" alt="' . get_vocab("reservation_a_confirmer_au_plus_tard_le") . '" title="' . get_vocab("reservation_a_confirmer_au_plus_tard_le") . ' ' . time_date_string_jma($d[$weekday][$slot - $decale_slot * $nb_case]["option_reser"], $dformat) . '" width="20" height="20" class="image" />' . PHP_EOL;
}
if (isset($d[$weekday][$slot - $decale_slot * $nb_case]["moderation"]) && $d[$weekday][$slot - $decale_slot * $nb_case]["moderation"] == '1') {
echo '<img src="img_grr/flag_moderation.png" alt="' . get_vocab("en_attente_moderation") . '" title="' . get_vocab("en_attente_moderation") . '" class="image" />' . PHP_EOL;
}
}
}
}
$wt += 86400;
$num_week_day++;
示例13: elseif
}
} elseif ($moderate == 3) {
// Modération refusée
// recupération des infos de moderation
$sql = "select motivation_moderation, login_moderateur from ".TABLE_PREFIX."_entry_moderate where id=".$id;
$res = grr_sql_query($sql);
if (! $res) fatal_error(0, grr_sql_error());
$row4 = grr_sql_row($res, 0); $description = $row4[0];
// recuperation du nom du moderateur
$sql ="select nom, prenom from ".TABLE_PREFIX."_utilisateurs where login = '".$row4[1]."'";
$res = grr_sql_query($sql);
if (! $res) fatal_error(0, grr_sql_error());
$row5 = grr_sql_row($res, 0); $nom_modo = $row5[1]. ' '. $row5[0];
if (authGetUserLevel(getUserName(),-1) > 1) { // les visiteurs n'ont pas accès à cette information
echo '<tr><td><b>'.get_vocab("moderation").get_vocab("deux_points").'</b></td>'; tdcell("avertissement"); echo '<strong>'.get_vocab("moderation_refusee").'</strong> par '.$nom_modo;
if ($description != "") echo ' : <br />('.$description.')';
echo "</td></tr>";
}
}
if ((getWritable($beneficiaire, getUserName(),$id)) and verif_booking_date(getUserName(), $id, $room_id, -1, $date_now, $enable_periods) and verif_delais_min_resa_room(getUserName(), $room_id, $row[10]) and (!$was_del)) { ?>
<tr>
<td colspan="2">
<?php
echo "<a href=\"edit_entry.php?id=$id&day=$day&month=$month&year=$year&page=$page\">".get_vocab("editentry")."</a>";
echo " - <a href=\"edit_entry.php?id=$id&day=$day&month=$month&year=$year&page=$page&copy\">".get_vocab("copyentry")."</a>";
if ($can_delete_or_create=="y") {
$message_confirmation = str_replace ( "'" , "\\'" , get_vocab("confirmdel").get_vocab("deleteentry"));
?>
示例14: show_colour_key
function show_colour_key($area_id)
{
echo "<table border=\"0\"><tr>\n";
$nct = 0;
$sql = "SELECT DISTINCT t.id, t.type_name, t.type_letter FROM ".TABLE_PREFIX."_type_area t
LEFT JOIN ".TABLE_PREFIX."_j_type_area j on j.id_type=t.id
WHERE (j.id_area IS NULL or j.id_area != '".$area_id."')
ORDER BY t.order_display";
$res = grr_sql_query($sql);
if ($res) {
for ($i = 0; ($row = grr_sql_row($res, $i)); $i++)
{
// La requête sql précédente laisse passer les cas où un type est non valide dans le domaine concerné ET au moins dans un autre domaine, d'où le test suivant
$test = grr_sql_query1("select id_type from ".TABLE_PREFIX."_j_type_area where id_type = '".$row[0]."' and id_area='".$area_id."'");
if ($test == -1) {
$id_type = $row[0];
$type_name = $row[1];
$type_letter = $row[2];
if (++$nct > 10)
{
$nct = 0;
echo "</tr><tr>";
}
tdcell($type_letter);
echo "$type_name</td>\n";
}
}
echo "</tr></table>\n";
}
}
示例15: show_colour_key
function show_colour_key()
{
global $typel;
echo "<table border=0><tr>\n";
$nct = 0;
for ($ct = "A"; $ct <= "Z"; $ct++) {
if (!empty($typel[$ct])) {
if (++$nct > 5) {
$nct = 0;
echo "</tr><tr>";
}
tdcell($ct);
echo "{$typel[$ct]}</td>\n";
}
}
echo "</tr></table>\n";
}