本文整理汇总了PHP中utf8_strftime函数的典型用法代码示例。如果您正苦于以下问题:PHP utf8_strftime函数的具体用法?PHP utf8_strftime怎么用?PHP utf8_strftime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了utf8_strftime函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: genslotselector
function genslotselector($area, $prefix, $first, $last, $time, $display = "block")
{
global $periods;
$html = '';
// Get the settings for this area. Note that the variables below are
// local variables, not globals.
$enable_periods = $area['enable_periods'];
$resolution = $enable_periods ? 60 : $area['resolution'];
// Check that $resolution is positive to avoid an infinite loop below.
// (Shouldn't be possible, but just in case ...)
if (empty($resolution) || $resolution < 0) {
fatal_error(FALSE, "Internal error - resolution is NULL or <= 0");
}
// If they've asked for "display: none" then we'll also disable the select so
// that there is only one select passing through the variable to the handler
$disabled = strtolower($display) == "none" ? " disabled=\"disabled\"" : "";
$date = getdate($time);
$time_zero = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']);
if ($enable_periods) {
$base = 12 * 60 * 60;
// The start of the first period of the day
} else {
$format = hour_min_format();
}
$html .= "<select style=\"display: {$display}\" id = \"{$prefix}seconds{$area['id']}\" name=\"{$prefix}seconds\" onChange=\"adjustSlotSelectors(this.form)\"{$disabled}>\n";
for ($t = $first; $t <= $last; $t = $t + $resolution) {
$timestamp = $t + $time_zero;
$slot_string = $enable_periods ? $periods[intval(($t - $base) / 60)] : utf8_strftime($format, $timestamp);
$html .= "<option value=\"{$t}\"";
$html .= $timestamp == $time ? " selected=\"selected\"" : "";
$html .= ">{$slot_string}</option>\n";
}
$html .= "</select>\n";
echo $html;
}
开发者ID:JeremyJacquemont,项目名称:SchoolProjects,代码行数:35,代码来源:edit_entry.php
示例2: mrbsCheckFree
/** mrbsCheckFree()
*
* Check to see if the time period specified is free
*
* $room_id - Which room are we checking
* $starttime - The start of period
* $endtime - The end of the period
* $ignore - An entry ID to ignore, 0 to ignore no entries
* $repignore - A repeat ID to ignore everything in the series, 0 to ignore no series
*
* Returns:
* nothing - The area is free
* something - An error occured, the return value is human readable
*/
function mrbsCheckFree($room_id, $starttime, $endtime, $ignore, $repignore)
{
global $vocab;
//SELECT any meetings which overlap ($starttime,$endtime) for this room:
$sql = "SELECT id, name, start_time FROM " . TABLE_PREFIX . "_entry WHERE start_time < '" . $endtime . "' AND end_time > '" . $starttime . "' AND room_id = '" . $room_id . "'";
if ($ignore > 0) {
$sql .= " AND id <> {$ignore}";
}
if ($repignore > 0) {
$sql .= " AND repeat_id <> {$repignore}";
}
$sql .= " ORDER BY start_time";
$res = grr_sql_query($sql);
if (!$res) {
return grr_sql_error();
}
if (grr_sql_count($res) == 0) {
grr_sql_free($res);
return "";
}
// Get the room's area ID for linking to day, week, and month views:
$area = mrbsGetRoomArea($room_id);
// Build a string listing all the conflicts:
$err = "";
for ($i = 0; $row = grr_sql_row($res, $i); $i++) {
$starts = getdate($row[2]);
$param_ym = "area={$area}&year={$starts['year']}&month={$starts['mon']}";
$param_ymd = $param_ym . "&day={$starts['mday']}";
$err .= "<li><a href=\"view_entry.php?id={$row['0']}\">{$row['1']}</a>" . " ( " . utf8_strftime('%A %d %B %Y %T', $row[2]) . ") " . "(<a href=\"day.php?{$param_ymd}\">" . get_vocab("viewday") . "</a>" . " | <a href=\"week.php?room={$room_id}&{$param_ymd}\">" . get_vocab("viewweek") . "</a>" . " | <a href=\"month.php?room={$room_id}&{$param_ym}\">" . get_vocab("viewmonth") . "</a>)\n";
}
return $err;
}
开发者ID:nicolas-san,项目名称:GRRV4,代码行数:46,代码来源:mrbs_sql.inc.php
示例3: reporton
function reporton(&$row, &$last_area_room, &$last_date, $sortby, $display)
{
global $typel;
global $enable_periods;
# Display Area/Room, but only when it changes:
$area_room = htmlspecialchars($row[8]) . " - " . htmlspecialchars($row[9]);
$date = utf8_strftime("%d-%b-%Y", $row[1]);
# entries to be sorted on area/room
if ($sortby == "r") {
if ($area_room != $last_area_room) {
echo "<hr><h2>" . get_vocab("room") . ": " . $area_room . "</h2>\n";
}
if ($date != $last_date || $area_room != $last_area_room) {
echo "<hr noshade=\"true\"><h3>" . get_vocab("date") . " " . $date . "</h3>\n";
$last_date = $date;
}
# remember current area/room that is being processed.
# this is done here as the if statement above needs the old
# values
if ($area_room != $last_area_room) {
$last_area_room = $area_room;
}
} else {
if ($date != $last_date) {
echo "<hr><h2>" . get_vocab("date") . " " . $date . "</h2>\n";
}
if ($area_room != $last_area_room || $date != $last_date) {
echo "<hr noshade=\"true\"><h3>" . get_vocab("room") . ": " . $area_room . "</h3>\n";
$last_area_room = $area_room;
}
# remember current date that is being processed.
# this is done here as the if statement above needs the old
# values
if ($date != $last_date) {
$last_date = $date;
}
}
echo "<hr><table width=\"100%\">\n";
# Brief Description (title), linked to view_entry:
echo "<tr><td class=\"BL\"><a href=\"view_entry.php?id={$row['0']}\">" . htmlspecialchars($row[3]) . "</a></td>\n";
# what do you want to display duration or end date/time
if ($display == "d") {
# Start date/time and duration:
echo "<td class=\"BR\" align=right>" . (empty($enable_periods) ? describe_span($row[1], $row[2]) : describe_period_span($row[1], $row[2])) . "</td></tr>\n";
} else {
# Start date/time and End date/time:
echo "<td class=\"BR\" align=right>" . (empty($enable_periods) ? start_to_end($row[1], $row[2]) : start_to_end_period($row[1], $row[2])) . "</td></tr>\n";
}
# Description:
echo "<tr><td class=\"BL\" colspan=2><b>" . get_vocab("description") . "</b> " . nl2br(htmlspecialchars($row[4])) . "</td></tr>\n";
# Entry Type:
$et = empty($typel[$row[5]]) ? "?{$row['5']}?" : $typel[$row[5]];
echo "<tr><td class=\"BL\" colspan=2><b>" . get_vocab("type") . "</b> {$et}</td></tr>\n";
# Created by and last update timestamp:
echo "<tr><td class=\"BL\" colspan=2><small><b>" . get_vocab("createdby") . "</b> " . htmlspecialchars($row[6]) . ", <b>" . get_vocab("lastupdate") . "</b> " . date_time_string($row[7]) . "</small></td></tr>\n";
echo "</table>\n";
}
开发者ID:jwigal,项目名称:emcommdb,代码行数:57,代码来源:report.php
示例4: cal
function cal($month, $year)
{
global $weekstarts, $display_day;
$display_day="1111111";
if (!isset($weekstarts)) $weekstarts = 0;
$s = "";
$daysInMonth = getDaysInMonth($month, $year);
$date = mktime(12, 0, 0, $month, 1, $year);
$first = (strftime("%w",$date) + 7 - $weekstarts) % 7;
$monthName = utf8_strftime("%B",$date);
$s .= "<table class=\"calendar2\" border=\"1\" cellspacing=\"3\">\n";
$s .= "<tr>\n";
$s .= "<td class=\"calendarHeader2\" colspan=\"7\">$monthName $year</td>\n";
$s .= "</tr>\n";
$d = 1 - $first;
$is_ligne1 = 'y';
while ($d <= $daysInMonth)
{
$s .= "<tr>\n";
for ($i = 0; $i < 7; $i++)
{
$basetime = mktime(12,0,0,6,11+$weekstarts,2000);
$show = $basetime + ($i * 24 * 60 * 60);
$nameday = utf8_strftime('%A',$show);
$temp = mktime(0,0,0,$month,$d,$year);
if ($i==0) $s .= "<td class=\"calendar2\" style=\"vertical-align:bottom;\"><b>S".numero_semaine($temp)."</b></td>\n";
$s .= "<td class=\"calendar2\" align=\"center\" valign=\"top\">";
if ($is_ligne1 == 'y') $s .= '<b>'.ucfirst(substr($nameday,0,1)).'</b><br />';
if ($d > 0 && $d <= $daysInMonth)
{
$s .= $d;
$day = grr_sql_query1("SELECT day FROM ".TABLE_PREFIX."_calendrier_jours_cycle WHERE day='$temp'");
$s .= "<br /><input type=\"checkbox\" name=\"$temp\" value=\"$nameday\" ";
if (!($day < 0)) $s .= "checked=\"checked\" ";
$s .= " />";
} else {
$s .= " ";
}
$s .= "</td>\n";
$d++;
}
$s .= "</tr>\n";
$is_ligne1 = 'n';
}
$s .= "</table>\n";
return $s;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:47,代码来源:admin_config_calend2.php
示例5: describe_span
function describe_span($starts, $ends)
{
global $twentyfourhour_format;
$start_date = utf8_strftime('%A %d %B %Y', $starts);
if ($twentyfourhour_format) {
$timeformat = "%T";
} else {
# This bit's necessary, because it seems %p in strftime format
# strings doesn't work
$ampm = utf8_date("a", $starts);
$timeformat = "%I:%M:%S{$ampm}";
}
$start_time = utf8_strftime($timeformat, $starts);
$duration = $ends - $starts;
if ($start_time == "00:00:00" && $duration == 60 * 60 * 24) {
return $start_date . " - " . get_vocab("all_day");
}
toTimeString($duration, $dur_units);
return $start_date . " " . $start_time . " - " . $duration . " " . $dur_units;
}
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:20,代码来源:report.php
示例6: array
$rep_day[1] = $row[3][1] != "0";
$rep_day[2] = $row[3][2] != "0";
$rep_day[3] = $row[3][3] != "0";
$rep_day[4] = $row[3][4] != "0";
$rep_day[5] = $row[3][5] != "0";
$rep_day[6] = $row[3][6] != "0";
if ($rep_type == 6) {
$rep_num_weeks = $row[4];
}
break;
default:
$rep_day = array(0, 0, 0, 0, 0, 0, 0);
}
} else {
$rep_type = $row[0];
$rep_end_date = utf8_strftime('%A %d %B %Y', $row[2]);
$rep_opt = $row[3];
}
}
} else {
# It is a new booking. The data comes from whichever button the user clicked
$edit_type = "series";
$name = getUserName();
$create_by = getUserName();
$description = "";
$start_day = $day;
$start_month = $month;
$start_year = $year;
// Avoid notices for $hour and $minute if periods is enabled
isset($hour) ? $start_hour = $hour : '';
isset($minute) ? $start_min = $minute : '';
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:edit_entry.php
示例7: checkAuthorised
<?php
// $Id: help.php 2338 2012-07-18 10:54:42Z cimorrison $
require "defaultincludes.inc";
require_once "version.inc";
// Check the user is authorised for this page
checkAuthorised();
print_header($day, $month, $year, $area, isset($room) ? $room : "");
echo "<h3>" . get_vocab("about_mrbs") . "</h3>\n";
echo "<table id=\"version_info\">\n";
echo "<tr><td><a href=\"http://mrbs.sourceforge.net\">" . get_vocab("mrbs") . "</a>:</td><td>" . get_mrbs_version() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("database") . ":</td><td>" . sql_version() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("system") . ":</td><td>" . php_uname() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("servertime") . ":</td><td>" . utf8_strftime($strftime_format['datetime'], time()) . "</td></tr>\n";
echo "<tr><td>PHP:</td><td>" . phpversion() . "</td></tr>\n";
echo "</table>\n";
echo "<p>\n" . get_vocab("browserlang") . ":\n";
echo implode(", ", array_keys($langs));
echo "\n</p>\n";
echo "<h3>" . get_vocab("help") . "</h3>\n";
echo "<p>\n";
echo get_vocab("please_contact") . '<a href="mailto:' . htmlspecialchars($mrbs_admin_email) . '">' . htmlspecialchars($mrbs_admin) . "</a> " . get_vocab("for_any_questions") . "\n";
echo "</p>\n";
require_once "site_faq" . $faqfilelang . ".html";
output_trailer();
开发者ID:koroder,项目名称:Web-portal-for-academic-institution,代码行数:25,代码来源:help.php
示例8: get_form_var
$month = get_form_var('month', 'int');
$year = get_form_var('year', 'int');
$area = get_form_var('area', 'int');
$room = get_form_var('room', 'int');
// If we dont know the right date then make it up
if (!isset($day) or !isset($month) or !isset($year)) {
$day = date("d");
$month = date("m");
$year = date("Y");
}
if (empty($area)) {
$area = get_default_area();
}
print_header($day, $month, $year, $area, isset($room) ? $room : "");
echo "<h3>" . get_vocab("about_mrbs") . "</h3>\n";
echo "<table id=\"version_info\">\n";
echo "<tr><td><a href=\"http://mrbs.sourceforge.net\">" . get_vocab("mrbs") . "</a>:</td><td>" . get_mrbs_version() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("database") . ":</td><td>" . sql_version() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("system") . ":</td><td>" . php_uname() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("servertime") . ":</td><td>" . utf8_strftime("%c", time()) . "</td></tr>\n";
echo "<tr><td>PHP:</td><td>" . phpversion() . "</td></tr>\n";
echo "</table>\n";
echo "<p>\n" . get_vocab("browserlang") . ":\n";
echo implode(", ", array_keys($langs));
echo "\n</p>\n";
echo "<h3>" . get_vocab("help") . "</h3>\n";
echo "<p>\n";
echo get_vocab("please_contact") . '<a href="mailto:' . htmlspecialchars($mrbs_admin_email) . '">' . htmlspecialchars($mrbs_admin) . "</a> " . get_vocab("for_any_questions") . "\n";
echo "</p>\n";
include "site_faq" . $faqfilelang . ".html";
include "trailer.inc";
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:help.php
示例9: sql_query
# pull the data from the db and store it. Convienently we can print the room
# headings and capacities at the same time
$sql = "select room_name, capacity, id, description from {$tbl_room} where area_id={$area} order by capacity";
$res = sql_query($sql);
# It might be that there are no rooms defined for this area.
# If there are none then show an error and dont bother doing anything
# else
if (!$res) {
fatal_error(0, sql_error());
}
if (sql_count($res) == 0) {
echo "<h1>" . get_vocab("no_rooms_for_area") . "</h1>";
sql_free($res);
} else {
#Show current date
echo "<h2 align=center>" . utf8_strftime("%A %d %B %Y", $am7) . "</h2>\n";
if ($pview != 1) {
#Show Go to day before and after links
$output = "<table width=\"100%\"><tr><td><a href=\"day.php?year={$yy}&month={$ym}&day={$yd}&area={$area}\"><<" . get_vocab("daybefore") . "</a></td>\n <td align=center><a href=\"day.php?area={$area}\">" . get_vocab("gototoday") . "</a></td>\n <td align=right><a href=\"day.php?year={$ty}&month={$tm}&day={$td}&area={$area}\">" . get_vocab("dayafter") . ">></a></td></tr></table>\n";
print $output;
}
// Include the active cell content management routines.
// Must be included before the beginnning of the main table.
if ($javascript_cursor) {
echo "<SCRIPT language=\"JavaScript\" type=\"text/javascript\" src=\"xbLib.js\"></SCRIPT>\n";
echo "<SCRIPT language=\"JavaScript\">InitActiveCell(" . ($show_plus_link ? "true" : "false") . ", " . "true, " . (FALSE != $times_right_side ? "true" : "false") . ", " . "\"{$highlight_method}\", " . "\"" . get_vocab("click_to_reserve") . "\"" . ");</SCRIPT>\n";
}
#This is where we start displaying stuff
echo "<table cellspacing=0 border=1 width=\"100%\">";
echo "<tr><th width=\"1%\">" . ($enable_periods ? get_vocab("period") : get_vocab("time")) . "</th>";
$room_column_width = (int) (95 / sql_count($res));
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:day.php
示例10: get_vocab
echo '<h4 class="titre">' . $this_area_name . ' - ' . get_vocab("all_rooms") . '<br> Du ' . utf8_strftime($dformat, $date_start) . ' au ' . utf8_strftime($dformat, $date_end) . '</h4>' . PHP_EOL;
echo '</div>' . PHP_EOL;
echo '</div>' . PHP_EOL;
echo '<div class="row">' . PHP_EOL;
echo '<div class="contenu_planning">' . PHP_EOL;
echo '<table class="table-bordered table-striped">' . PHP_EOL;
echo '<thead>' . PHP_EOL;
echo '<tr>' . PHP_EOL;
echo '<th class="jour_sem"> </th>' . PHP_EOL;
$t = $time;
$num_week_day = $weekstarts;
$ferie = getHolidays($year);
for ($weekcol = 0; $weekcol < 7; $weekcol++) {
$num_day = strftime("%d", $t);
$temp_month = utf8_encode(strftime("%m", $t));
$temp_month2 = utf8_strftime("%b", $t);
$temp_year = strftime("%Y", $t);
$tt = mktime(0, 0, 0, $temp_month, $num_day, $temp_year);
$jour_cycle = grr_sql_query1("SELECT Jours FROM " . TABLE_PREFIX . "_calendrier_jours_cycle WHERE day='{$t}'");
$t += 86400;
if (!isset($correct_heure_ete_hiver) || $correct_heure_ete_hiver == 1) {
if (heure_ete_hiver("hiver", $temp_year, 0) == mktime(0, 0, 0, $temp_month, $num_day, $temp_year)) {
$t += 3600;
}
if (date("H", $t) == "01") {
$t -= 3600;
}
}
if ($display_day[$num_week_day] == 1) {
$class = "";
$title = "";
开发者ID:JeromeDevome,项目名称:GRR,代码行数:31,代码来源:week_all.php
示例11: foreach
foreach ($ferie as $key => $value) {
if ($tt == $value) {
$ferie_true = 1;
break;
}
}
$sh = getSchoolHolidays($tt, $year_actuel);
if ($sh[0] == true) {
$class .= "vacance ";
$title = " " . $sh[1];
}
if ($ferie_true) {
$class .= "ferie ";
}
}
echo "<th style=\"width:14%;\"><a onclick=\"charger()\" class=\"lienPlanning " . $class . "\" title=\"" . $title . htmlspecialchars(get_vocab("see_all_the_rooms_for_the_day")) . "\" href=\"day.php?year={$year_actuel}&month={$month_actuel}&day={$num_day}&area={$area}\">" . utf8_strftime($dformat, $t) . "</a>";
if (Settings::get("jours_cycles_actif") == "Oui" && intval($jour_cycle) > -1) {
if (intval($jour_cycle) > 0) {
echo "<br />" . get_vocab("rep_type_6") . " " . $jour_cycle;
} else {
echo "<br />" . $jour_cycle;
}
}
echo "</th>\n";
}
if (!isset($correct_heure_ete_hiver) || $correct_heure_ete_hiver == 1) {
$num_day = strftime("%d", $t);
if (heure_ete_hiver("hiver", $year, 0) == mktime(0, 0, 0, $month, $num_day, $year)) {
$t += 3600;
}
if (date("H", $t) == "13" || date("H", $t) == "02") {
开发者ID:Birssan,项目名称:GRR,代码行数:31,代码来源:week.php
示例12: htmlspecialchars
break;
case "> > ":
// Starts after midnight, continues tomorrow
$d[$day_num]["data"][] = htmlspecialchars(utf8_strftime(hour_min_format(), $row['start_time'])) . "~====>";
break;
case "= = ":
// Starts at midnight, ends at midnight
$d[$day_num]["data"][] = $all_day;
break;
case "= > ":
// Starts at midnight, continues tomorrow
$d[$day_num]["data"][] = $all_day . "====>";
break;
case "< < ":
// Starts before today, ends before midnight
$d[$day_num]["data"][] = "<====~" . htmlspecialchars(utf8_strftime(hour_min_format(), $row['end_time']));
break;
case "< = ":
// Starts before today, ends at midnight
$d[$day_num]["data"][] = "<====" . $all_day;
break;
case "< > ":
// Starts before today, continues tomorrow
$d[$day_num]["data"][] = "<====" . $all_day . "====>";
break;
}
} else {
$start_str = period_time_string($row['start_time']);
$end_str = period_time_string($row['end_time'], -1);
switch (cmp3($row['start_time'], $midnight[$day_num]) . cmp3($row['end_time'], $midnight_tonight[$day_num] + 1)) {
case "> < ":
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:month.php
示例13: utf8_strftime
} else {
echo $start_hour;
}
?>
" maxlength="2">
<span>:</span>
<input name="minute" value="<?php
echo $start_min;
?>
" maxlength="2">
<?php
if (!$twentyfourhour_format) {
$checked = $start_hour < 12 ? "checked=\"checked\"" : "";
echo " <input name=\"ampm\" type=\"radio\" value=\"am\" {$checked}>" . utf8_strftime("%p", mktime(1, 0, 0, 1, 1, 2000));
$checked = $start_hour >= 12 ? "checked=\"checked\"" : "";
echo " <input name=\"ampm\" type=\"radio\" value=\"pm\" {$checked}>" . utf8_strftime("%p", mktime(13, 0, 0, 1, 1, 2000));
}
?>
</div>
<?php
} else {
?>
<div id="div_period">
<label for="period" ><?php
echo get_vocab("period");
?>
:</label>
<select id="period" name="period">
<?php
foreach ($periods as $p_num => $p_val) {
echo "<option value=\"{$p_num}\"";
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:edit_entry.php
示例14: affiche_heure_creneau
} 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;
for ($t = $week_start; $t <= $week_end; $t += 86400)
{
$jour_cycle = grr_sql_query1("SELECT Jours FROM ".TABLE_PREFIX."_calendrier_jours_cycle WHERE DAY='$i'");
if ($display_day[$num_week_day] == 1) {// on n'affiche pas tous les jours de la semaine
echo "<th style=\"width:14%;\">" . utf8_strftime($dformat, $t);
if (getSettingValue("jours_cycles_actif") == "Oui" and $jour_cycle>0)
echo "<br />".get_vocab("rep_type_6")." ".$jour_cycle;
echo "</th>\n";
}
$k++;
if (!isset($correct_heure_ete_hiver) or ($correct_heure_ete_hiver == 1)) {
$num_day = strftime("%d", $t);
// Si le dernier dimanche d'octobre est dans la semaine, on avance d'une heure
if (heure_ete_hiver("hiver",$year,0) == mktime(0,0,0,$month,$num_day,$year))
$t +=3600;
if ((date("H",$t) == "13") or (date("H",$t) == "02"))
$t -=3600;
}
$i += 86400;
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:week.php
示例15: minicals
}
# end select if
if ($pview != 1) {
echo "</td>\n";
#Draw the three month calendars
minicals($year, $month, $day, $area, $room, 'month');
echo "</tr></table>\n";
}
# Don't continue if this area has no rooms:
if ($room <= 0) {
echo "<h1>" . get_vocab("no_rooms_for_area") . "</h1>";
include "trailer.inc";
exit;
}
# Show Month, Year, Area, Room header:
echo "<h2 align=center>" . utf8_strftime("%B %Y", $month_start) . " - {$this_area_name} - {$this_room_name}</h2>\n";
# Show Go to month before and after links
#y? are year and month of the previous month.
#t? are year and month of the next month.
$i = mktime(12, 0, 0, $month - 1, 1, $year);
$yy = date("Y", $i);
$ym = date("n", $i);
$i = mktime(12, 0, 0, $month + 1, 1, $year);
$ty = date("Y", $i);
$tm = date("n", $i);
if ($pview != 1) {
echo "<table width=\"100%\"><tr><td>\n <a href=\"month.php?year={$yy}&month={$ym}&area={$area}&room={$room}\">\n << " . get_vocab("monthbefore") . "</a></td>\n <td align=center><a href=\"month.php?area={$area}&room={$room}\">" . get_vocab("gotothismonth") . "</a></td>\n <td align=right><a href=\"month.php?year={$ty}&month={$tm}&area={$area}&room={$room}\">\n " . get_vocab("monthafter") . ">></a></td></tr></table>";
}
if ($debug_flag) {
echo "<p>DEBUG: month={$month} year={$year} start={$weekday_start} range={$month_start}:{$month_end}\n";
}
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:31,代码来源:month.php
示例16: week_table_innerhtml
//.........这里部分代码省略.........
$header_inner .= $first_last_html;
$column_width = get_main_column_width($n_time_slots);
for ($s = $morning_slot_seconds; $s <= $evening_slot_seconds; $s += $resolution) {
// Put the seconds since the start of the day (nominal, not adjusted for DST)
// into a data attribute so that it can be picked up by JavaScript
$header_inner .= "<th data-seconds=\"{$s}\" style=\"width: {$column_width}%\">";
// We need the span so that we can apply some padding. We can't apply it
// to the <th> because that is used by jQuery.offset() in resizable bookings
$header_inner .= "<span>";
if ($enable_periods) {
$header_inner .= period_name($s);
} else {
$header_inner .= hour_min($s);
}
$header_inner .= "</span>";
$header_inner .= "</th>\n";
}
// next: line to display times on right side
if (!empty($row_labels_both_sides)) {
$header_inner .= $first_last_html;
}
} else {
// the standard view, with days along the top and times down the side
$first_last_html = '<th class="first_last" style="width: ' . $first_last_width . '%">' . ($enable_periods ? get_vocab('period') : get_vocab('time')) . ':</th>';
$header_inner .= $first_last_html;
$column_width = get_main_column_width($num_of_days, count($hidden_days));
for ($j = 0; $j <= $num_of_days - 1; $j++) {
$t = mktime(12, 0, 0, $month, $day_start_week + $j, $year);
$date = date('Y-n-d', $t);
if (is_hidden_day(($j + $weekstarts) % 7)) {
// These days are to be hidden in the display (as they are hidden, just give the
// day of the week in the header row
$style = $column_hidden_width == 0 ? 'display: none' : 'width: ' . $column_hidden_width . '%';
$header_inner .= '<th class="hidden_day" style="' . $style . '">' . utf8_strftime($strftime_format['dayname_cal'], $t) . "</th>\n";
} else {
// Put the date into a data attribute so that it can be picked up by JavaScript
$header_inner .= '<th data-date="' . $date . '" style="width: ' . $column_width . '%>' . '<a href="day.php?year=' . strftime("%Y", $t) . '&month=' . strftime("%m", $t) . '&day=' . strftime('%d', $t) . '&area=' . $area . ' title="' . get_vocab('viewday') . '">' . utf8_strftime($dformat, $t) . "</a></th>\n";
}
}
// for ($j = 0 ...
unset($j);
// Just so that we pick up any accidental attempt to use it later
// next line to display times on right side
if (!empty($row_labels_both_sides)) {
$header_inner .= $first_last_html;
}
}
// end standard view (for the header)
$header_inner .= "</tr>\n";
$thead .= $header_inner;
$thead .= "</thead>\n";
// Now repeat the header in a footer if required
$tfoot = $column_labels_both_ends ? "<tfoot>\n{$header_inner}</tfoot>\n" : '';
// TABLE BODY LISTING BOOKINGS
$tbody = "<tbody>\n";
// URL for highlighting a time. Don't use REQUEST_URI or you will get
// the timetohighlight parameter duplicated each time you click.
$base_url = "temp.php?year={$year}&month={$month}&day={$day}&area={$area}&room={$room}";
$row_class = "even_row";
// We can display the table in two ways
if ($times_along_top) {
// with times along the top and days of the week down the side
// See note above: weekday==0 is day $weekstarts, not necessarily Sunday.
for ($thisday = 0; $thisday <= $num_of_days - 1; $thisday++, $row_class = $row_class == "even_row" ? "odd_row" : "even_row") {
if (is_hidden_day(($thisday + $weekstarts) % 7)) {
// These days are to be hidden in the display: don't display a row
开发者ID:cvelayo,项目名称:worklog,代码行数:67,代码来源:temp.php
示例17: grr_sql_query
$res = grr_sql_query($sql);
// Début affichage de la première ligne
echo "<tr>";
tdcell("cell_hours");
echo " </td>\n";
//Corrige un bug avec certains fuseaux horaires (par exemple GMT-05:00 celui du Québec) :
//plusieurs mois débutent par le dernier jours du mois précédent.
//En changeant "gmmktime" par "mktime" le bug est corrigé
//$t2=gmmktime(0,0,0,$month_num,1,$year_num);
$t2 = mktime(0, 0, 0, $month_num, 1, $year_num);
for ($k = 0; $k < $days_in_month; $k++) {
$cday = date("j", $t2);
$cmonth = date("m", $t2);
$cweek = date("w", $t2);
$cyear = date("Y", $t2);
$name_day = ucfirst(utf8_strftime("%a<br />%d", $t2));
$temp = mktime(0, 0, 0, $cmonth, $cday, $cyear);
$jour_cycle = grr_sql_query1("SELECT Jours FROM " . TABLE_PREFIX . "_calendrier_jours_cycle WHERE DAY='{$temp}'");
$t2 += 86400;
// On inscrit le numéro du mois dans la deuxième ligne
if ($display_day[$cweek] == 1) {
echo tdcell("cell_hours");
echo "<div><a title=\"" . htmlspecialchars(get_vocab("see_all_the_rooms_for_the_day")) . "\" href=\"day.php?year={$year_num}&month={$month_num}&day={$cday}&area={$area}\">{$name_day}</a>";
if (Settings::get("jours_cycles_actif") == "Oui" && intval($jour_cycle) > -1) {
if (intval($jour_cycle) > 0) {
echo "<br /><b><i>" . ucfirst(substr(get_vocab("rep_type_6"), 0, 1)) . $jour_cycle . "</i></b>";
} else {
if (strlen($jour_cycle) > 5) {
$jour_cycle = substr($jour_cycle, 0, 3) . "..";
}
echo "<br /><b><i>" . $jour_cycle . "</i></b>";
开发者ID:Birssan,项目名称:GRR,代码行数:31,代码来源:year.php
示例18: filter_input_array
*/
$dataFromGet = filter_input_array(INPUT_GET);
$dataFromGet['idLastInsert'] = $idPourEvent;
$event = new EditEntryHandler($area_id, $dataFromGet, $id);
$dispatcher->dispatch(EditEntryHandlerEvent::EDITENTRYHANDLER_AFTER_DB, $event);
$area = mrbsGetRoomArea($room_id);
$_SESSION['displ_msg'] = 'yes';
if ($message_error != '') {
$_SESSION['session_message_error'] = $message_error;
}
Header('Location: ' . $page . ".php?year={$year}&month={$month}&day={$day}&area={$area}&room={$room_back}");
exit;
}
grr_sql_mutex_unlock('' . TABLE_PREFIX . '_entry');
if ($error_booking_in_past == 'yes') {
$str_date = utf8_strftime('%d %B %Y, %H:%M', $date_now);
print_header();
echo '<h2>' . get_vocab('booking_in_past') . '</h2>';
if ($rep_type != 0 && !empty($reps)) {
echo '<p>' . get_vocab('booking_in_past_explain_with_periodicity') . $str_date . '</p>';
} else {
echo '<p>' . get_vocab('booking_in_past_explain') . $str_date . '</p>';
}
echo '<a href="' . $back . '&Err=yes">' . get_vocab('returnprev') . '</a>';
include 'include/trailer.inc.php';
die;
}
if ($error_duree_max_resa_area == 'yes') {
$area_id = grr_sql_query1('SELECT area_id FROM ' . TABLE_PREFIX . "_room WHERE id='" . protect_data_sql($room_id) . "'");
$duree_max_resa_area = grr_sql_query1('SELECT duree_max_resa_area FROM ' . TABLE_PREFIX . "_area WHERE id='" . $area_id . "'");
print_header();
开发者ID:nicolas-san,项目名称:GRRV4,代码行数:31,代码来源:edit_entry_handler.php
示例19: getColor
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['accessFicheResa'] = false;
//echo PHP_EOL.'<table class="table-header"><tr>';
//tdcell($d[$cday]['color'][$i]);
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['color'] = getColor($d[$cday]['color'][$i]);
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['color'] = getColor($d[$cday]['color'][$i]);
/**
* todo refacto duplicate entre les deux choix du if
*/
if ($d[$cday]['res'][$i] != '-') {
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['empruntee'] = true;
//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;
} else {
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['empruntee'] = false;
}
if (isset($d[$cday]['option_reser'][$i]) && $d[$cday]['option_reser'][$i] != -1) {
$tplArray['rooms'][$incrementRoomAccessible]['jours'][$k]['reservations'][$i]['aConfirmerAuPlusTard'] = utf8_strftime($dformat, $d[$cday]['option_reser'][$i]);
//echo '<img src="img_grr/small_flag.png" alt="',get_vo
|
请发表评论