本文整理汇总了PHP中month_name函数的典型用法代码示例。如果您正苦于以下问题:PHP month_name函数的具体用法?PHP month_name怎么用?PHP month_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了month_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_week
function display_week()
{
global $vars;
$heading_html = tag('tr');
$heading_html->add(tag('th', __p('Week', 'W')));
for ($i = 0; $i < 7; $i++) {
$d = ($i + day_of_week_start()) % 7;
$heading_html->add(tag('th', day_name($d)));
}
if (!isset($vars['week']) || !isset($vars['year'])) {
soft_error(__('Invalid date.'));
}
$week_of_year = intval($vars['week']);
$year = intval($vars['year']);
$day_of_year = 1 + ($week_of_year - 1) * 7 - day_of_week(1, 1, $year);
$from_stamp = mktime(0, 0, 0, 1, $day_of_year, $year);
$start_month = date("n", $from_stamp);
$start_year = date("Y", $from_stamp);
$last_day = $day_of_year + 6;
$to_stamp = mktime(23, 59, 59, 1, $last_day, $year);
$end_month = date("n", $to_stamp);
$end_year = date("Y", $to_stamp);
$heading = month_name($start_month) . " {$start_year}";
if ($end_month != $start_month) {
$heading .= " - " . month_name($end_month) . " {$end_year}";
}
return tag('', tag("div", attributes('id="phpc-summary-view"'), tag("div", attributes('id="phpc-summary-head"'), tag("div", attributes('id="phpc-summary-title"'), ''), tag("div", attributes('id="phpc-summary-author"'), ''), tag("div", attributes('id="phpc-summary-category"'), ''), tag("div", attributes('id="phpc-summary-time"'), '')), tag("div", attributes('id="phpc-summary-body"'), '')), tag('table', attributes('class="phpc-main phpc-calendar"'), tag('caption', $heading), tag('colgroup', tag('col', attributes('class="phpc-week"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"'))), tag('thead', $heading_html), create_week($week_of_year, $from_stamp, $to_stamp, $year)));
}
开发者ID:php-calendar,项目名称:php-calendar,代码行数:28,代码来源:display_week.php
示例2: display_month
function display_month()
{
global $phpc_month, $phpc_year, $phpc_home_url, $phpcid;
$months = array();
for ($i = 1; $i <= 12; $i++) {
$m = month_name($i);
$months["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$i}&year={$phpc_year}"] = $m;
}
$years = array();
for ($i = $phpc_year - 5; $i <= $phpc_year + 5; $i++) {
$years["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$phpc_month}&year={$i}"] = $i;
}
$next_month = $phpc_month + 1;
$next_year = $phpc_year;
if ($next_month > 12) {
$next_month -= 12;
$next_year++;
}
$prev_month = $phpc_month - 1;
$prev_year = $phpc_year;
if ($prev_month < 1) {
$prev_month += 12;
$prev_year--;
}
$heading = tag('', tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$prev_month}&year={$prev_year}\""), tag('span', attrs('class="fa fa-chevron-left"'), '')), create_dropdown_list(month_name($phpc_month), $months), create_dropdown_list($phpc_year, $years), tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$next_month}&year={$next_year}\""), tag('span', attrs('class="fa fa-chevron-right"'), '')));
return create_display_table($heading, create_month($phpc_month, $phpc_year));
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:27,代码来源:display_month.php
示例3: display_small_month
function display_small_month($thismonth, $thisyear, $showyear)
{
global $WEEK_START, $user, $login;
if ($user != $login && !empty($user)) {
$u_url = "&user={$user}";
} else {
$u_url = "";
}
echo "<TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"2\">";
if ($WEEK_START == "1") {
$wkstart = get_monday_before($thisyear, $thismonth, 1);
} else {
$wkstart = get_sunday_before($thisyear, $thismonth, 1);
}
$monthstart = mktime(2, 0, 0, $thismonth, 1, $thisyear);
$monthend = mktime(2, 0, 0, $thismonth + 1, 0, $thisyear);
echo "<TR><TD COLSPAN=\"7\" ALIGN=\"center\">" . "<A HREF=\"month.php?year={$thisyear}&month={$thismonth}" . $u_url . "\" CLASS=\"monthlink\">";
echo month_name($thismonth - 1) . "</A></TD></TR>";
echo "<TR>";
if ($WEEK_START == 0) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
for ($i = 1; $i < 7; $i++) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name($i) . "</TD>";
}
if ($WEEK_START == 1) {
echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>";
}
for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) {
echo "<TR>";
for ($j = 0; $j < 7; $j++) {
$date = $i + $j * 24 * 3600;
if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) {
echo "<TD ALIGN=\"right\"><A HREF=\"day.php?date=" . date("Ymd", $date) . $u_url . "\" CLASS=\"dayofmonthyearview\">";
echo "<FONT SIZE=\"-1\">" . date("j", $date) . "</A></FONT></TD>";
} else {
echo "<TD></TD>";
}
}
// end for $j
echo "</TR>";
}
// end for $i
echo "</TABLE>";
}
开发者ID:neuroidss,项目名称:virtuoso-opensource,代码行数:45,代码来源:year.php
示例4: display_month
function display_month()
{
global $month, $year, $phpc_home_url, $phpcid;
$heading_html = tag('tr');
$heading_html->add(tag('th', __p('Week', 'W')));
for ($i = 0; $i < 7; $i++) {
$d = ($i + day_of_week_start()) % 7;
$heading_html->add(tag('th', day_name($d)));
}
$months = array();
for ($i = 1; $i <= 12; $i++) {
$m = month_name($i);
$months["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$i}&year={$year}"] = $m;
}
$years = array();
for ($i = $year - 5; $i <= $year + 5; $i++) {
$years["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$month}&year={$i}"] = $i;
}
return tag('', tag("div", attributes('id="phpc-summary-view"'), tag("div", attributes('id="phpc-summary-head"'), tag("div", attributes('id="phpc-summary-title"'), ''), tag("div", attributes('id="phpc-summary-author"'), ''), tag("div", attributes('id="phpc-summary-category"'), ''), tag("div", attributes('id="phpc-summary-time"'), '')), tag("div", attributes('id="phpc-summary-body"'), '')), tag('table', attributes('class="phpc-main phpc-calendar"'), tag('caption', create_dropdown_list(month_name($month), $months), create_dropdown_list($year, $years)), tag('colgroup', tag('col', attributes('class="phpc-week"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"'))), tag('thead', $heading_html), create_month($month, $year)));
}
开发者ID:bluewarest,项目名称:gameboard,代码行数:20,代码来源:display_month.php
示例5: create_day_menu
function create_day_menu()
{
global $phpc_month, $phpc_day, $phpc_year;
$html = tag('div', attrs('class="phpc-bar ui-widget-content"'));
$monthname = month_name($phpc_month);
$lasttime = mktime(0, 0, 0, $phpc_month, $phpc_day - 1, $phpc_year);
$lastday = date('j', $lasttime);
$lastmonth = date('n', $lasttime);
$lastyear = date('Y', $lasttime);
$lastmonthname = month_name($lastmonth);
$last_args = array('year' => $lastyear, 'month' => $lastmonth, 'day' => $lastday);
menu_item_prepend($html, "{$lastmonthname} {$lastday}", 'display_day', $last_args);
$nexttime = mktime(0, 0, 0, $phpc_month, $phpc_day + 1, $phpc_year);
$nextday = date('j', $nexttime);
$nextmonth = date('n', $nexttime);
$nextyear = date('Y', $nexttime);
$nextmonthname = month_name($nextmonth);
$next_args = array('year' => $nextyear, 'month' => $nextmonth, 'day' => $nextday);
menu_item_append($html, "{$nextmonthname} {$nextday}", 'display_day', $next_args);
return $html;
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:21,代码来源:display_day.php
示例6: display_week
function display_week()
{
global $vars, $phpc_home_url, $phpcid, $phpc_year, $phpc_month, $phpc_day;
if (!isset($vars['week'])) {
$week_of_year = week_of_year($phpc_month, $phpc_day, $phpc_year);
} else {
if (!is_numeric($vars['week'])) {
soft_error(__('Invalid date.'));
}
$week_of_year = $vars['week'];
}
$day_of_year = 1 + ($week_of_year - 1) * 7 - day_of_week(1, 1, $phpc_year);
$from_stamp = mktime(0, 0, 0, 1, $day_of_year, $phpc_year);
$start_day = date("j", $from_stamp);
$start_month = date("n", $from_stamp);
$start_year = date("Y", $from_stamp);
$last_day = $day_of_year + 6;
$to_stamp = mktime(23, 59, 59, 1, $last_day, $phpc_year);
$end_day = date("j", $to_stamp);
$end_month = date("n", $to_stamp);
$end_year = date("Y", $to_stamp);
$title = month_name($start_month) . " {$start_year}";
if ($end_month != $start_month) {
$title .= " - " . month_name($end_month) . " {$end_year}";
}
$prev_week = $week_of_year - 1;
$prev_year = $phpc_year;
if ($prev_week < 1) {
$prev_year--;
$prev_week = week_of_year($start_month, $start_day - 7, $start_year);
}
$next_week = $week_of_year + 1;
$next_year = $phpc_year;
if ($next_week > weeks_in_year($phpc_year)) {
$next_week = week_of_year($end_month, $end_day + 1, $end_year);
$next_year++;
}
$heading = tag('', tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_week&phpcid={$phpcid}&week={$prev_week}&year={$prev_year}\""), tag('span', attrs('class="fa fa-chevron-left"'), '')), $title, tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_week&phpcid={$phpcid}&week={$next_week}&year={$next_year}\""), tag('span', attrs('class="fa fa-chevron-right"'), '')));
return create_display_table($heading, create_week($from_stamp, $phpc_year, get_events($from_stamp, $to_stamp)));
}
开发者ID:hubandbob,项目名称:php-calendar,代码行数:40,代码来源:display_week.php
示例7: switch
switch ($cal_type) {
case "daily":
$rep_str .= translate("Day");
break;
case "weekly":
$rep_str .= translate("Week");
for ($i = 0; $i <= 7; $i++) {
if (substr($cal_days, $i, 1) == "y") {
$rep_str .= ", " . weekday_short_name($i);
}
}
break;
case "monthlyByDay":
case "monthlyByDayR":
if ($cal_frequency == 12) {
$rep_str .= month_name($thismonth - 1) . " / ";
} else {
$rep_str .= translate("Month") . " / ";
}
$days_this_month = $thisyear % 4 == 0 ? $ldays_per_month[$thismonth] : $days_per_month[$thismonth];
if ($cal_type == 'monthlyByDay') {
$dow1 = date("w", mktime(3, 0, 0, $thismonth, 1, $thisyear));
$days_in_first_week = 7 - $dow1;
$whichWeek = ceil($thisday / 7);
} else {
$whichWeek = floor(($days_this_month - $thisday) / 7);
$whichWeek++;
}
$rep_str .= ' ';
switch ($whichWeek) {
case 1:
开发者ID:BackupTheBerlios,项目名称:fhnreposit,代码行数:31,代码来源:view_entry.php
示例8: date
$wkend = $wkstart + 86400 * 6;
$startdate = date('Ymd', $wkstart);
$enddate = date('Ymd', $wkend);
/* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events($login, $startdate, $enddate, '');
/* Pre-load the non-repeating events for quicker access */
$events = read_events($login, $startdate, $enddate);
$first_hour = $WORK_DAY_START_HOUR;
$last_hour = $WORK_DAY_END_HOUR;
$untimed_found = false;
$tmpOut1 = $tmpOut2 = '';
for ($i = 0; $i < 7; $i++) {
$days[$i] = $wkstart + 86400 * $i;
$date = date('Ymd', $days[$i]);
$tmpOut1 .= '
<th style="width: 13%; background: ' . (date('Ymd', $days[$i]) == date('Ymd', $today) ? $TODAYCELLBG : $THBG) . ';">' . weekday_name(($i + $WEEK_START) % 7, $DISPLAY_LONG_DAYS) . '<br />' . month_name(date('m', $days[$i]) - 1, 'M') . ' ' . date('d', $days[$i]) . '</th>';
$tmpOut2 .= '
<td style="vertical-align: top; width: 75px; height: 75px; ' . 'background: ' . ($date == date('Ymd') ? $TODAYCELLBG : $CELLBG) . print_date_entries($date, $login, true, true) . ' </td>';
}
echo '
<table width="100%">
<tr>
<td style="background: ' . $TABLEBG . ';">
<table style="border: 0; width: 100%;" cellspacing="1" cellpadding="2">
<tr>' . $tmpOut1 . '
</tr>
<tr>' . $tmpOut2 . '
</tr>
</table>
</td>
</tr>
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:week_ssi.php
示例9: etranslate
etranslate("Previous");
?>
" /></a>
<a title="<?php
etranslate("Next");
?>
" class="next" href="<?php
echo $next_url;
?>
"><img src="rightarrow.gif" class="prevnext" alt="<?php
etranslate("Next");
?>
" /></a>
<div class="title">
<span class="date"><?php
printf("%s, %s %d, %d", weekday_name($wday), month_name($month - 1), $day, $year);
?>
</span><br />
</div></div>
<br />
<form action="availability.php" method="post">
<?php
daily_matrix($date, $users);
?>
</form>
<?php
print_trailer(false, true, true);
?>
开发者ID:neymanna,项目名称:fusionforge,代码行数:30,代码来源:availability.php
示例10: big_calendar_week
//.........这里部分代码省略.........
$prev_month = '12';
}
$view = 'bigcalendarweek';
$views = explode(',', $view_select);
$defaultview = 'week';
array_pop($views);
$display = '';
if (count($views) == 0) {
$display = "display:none";
}
if (count($views) == 1 && $views[0] == $defaultview) {
$display = "display:none";
}
$activedate = explode('/', $header_format);
for ($i = 0; $i < count($activedate); $i++) {
if ($activedate[$i] == 'w') {
$activedate[$i] = 'l';
}
if ($activedate[$i] == 'm') {
$activedate[$i] = 'F';
}
if ($activedate[$i] == 'y') {
$activedate[$i] = 'Y';
}
}
$activedatestr = "";
for ($i = 0; $i < count($activedate); $i++) {
$activedatestr .= $activedate[$i];
}
$weekstartday = substr($week_days[0], 8, 2);
$weekendday = substr($week_days[6], 8, 2);
$startmonth = substr($week_days[0], 5, 2);
$endmonth = substr($week_days[6], 5, 2);
$startmonth_name = month_name($startmonth);
$endmonth_name = month_name($endmonth);
$dateformat_arrays = array("dFY", "dYF", "FYd", "FdY", "YdF", "YFd");
$dates_formats = array($weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), $weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday, __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday, $weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday);
for ($i = 0; $i < count($dateformat_arrays); $i++) {
if (strpos($activedatestr, $dateformat_arrays[$i]) !== false) {
$weekdays = $dates_formats[$i];
}
}
?>
<style type='text/css'>
.week_list:last-child{
border-top-left-radius: <?php
echo $border_radius2;
?>
px !important;
border-top-right-radius: <?php
echo $border_radius2;
?>
px !important;
border-radius:<?php
echo $border_radius2;
?>
px !important;
border-bottom-left-radius: <?php
echo $border_radius2;
?>
px !important;
}
#TB_iframeContent{
background-color: <?php
echo $show_event_bgcolor;
?>
开发者ID:fnguyen20,项目名称:CECS-300-Genesis-Site,代码行数:67,代码来源:bigcalendarweek.php
示例11: etranslate
<a title="<?php
etranslate("Next");
?>
" class="next" href="view_d.php?id=
<?php
echo $id . "&date=" . $nextdate;
?>
"><img src="rightarrow.gif"
class="prevnext" alt="<?php
etranslate("Next");
?>
" /></a>
<div class="title">
<span class="date"><?php
printf("%s, %s %d, %d", weekday_name($wday), month_name($thismonth - 1), $thisday, $thisyear);
?>
</span><br />
<span class="viewname"><?php
echo $view_name;
?>
</span>
</div></div>
<?php
daily_matrix($date, $participants);
?>
<br />
<!-- Hidden form for booking events -->
<form action="edit_entry.php" method="post" name="schedule">
开发者ID:noikiy,项目名称:owaspbwa,代码行数:30,代码来源:view_d.php
示例12: elseif
} elseif (empty($month)) {
echo str_replace('XXX', translate('month'), $noXStr);
exit;
} elseif (empty($day)) {
echo str_replace('XXX', translate('day'), $noXStr);
exit;
}
print_header(array('js/availability.php/false/' . "{$month}/{$day}/{$year}/" . getGetValue('form')), '', 'onload="focus();"', true, false, true);
$next_url = $prev_url = '?users=' . $users;
$time = mktime(0, 0, 0, $month, $day, $year);
$date = date('Ymd', $time);
$next_url .= strftime('&year=%Y&month=%m&day=%d', $time + 86400);
$prev_url .= strftime('&year=%Y&month=%m&day=%d', $time - 86400);
$span = ($WORK_DAY_END_HOUR - $WORK_DAY_START_HOUR) * 3 + 1;
$users = explode(',', $users);
$nextStr = translate('Next');
$prevStr = translate('Previous');
echo '
<div style="width:99%;">
<a title="' . $prevStr . '" class="prev" href="' . $prev_url . '"><img src="images/leftarrow.gif" class="prev" alt="' . $prevStr . '" /></a>
<a title="' . $nextStr . '" class="next" href="' . $next_url . '"><img src="images/rightarrow.gif" class="next" alt="' . $nextStr . '" /></a>
<div class="title">
<span class="date">';
printf("%s, %s %d, %d", weekday_name(strftime("%w", $time)), month_name($month - 1), $day, $year);
echo '</span><br />
</div>
</div><br />
<form action="availability.php" method="post">
' . daily_matrix($date, $users) . '
</form>
' . print_trailer(false, true, true);
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:availability.php
示例13: getGetValue
$fyear = getGetValue('fyear');
$form = getGetValue('form');
$date = getGetValue('date');
if (strlen($date) > 0) {
$thisyear = substr($date, 0, 4);
$thismonth = substr($date, 4, 2);
} else {
$thisyear = date('Y');
$thismonth = date('m');
}
$href = 'href="datesel.php?form=' . $form . '&fday=' . $fday . '&fmonth=' . $fmonth . '&fyear=' . $fyear . '&date=';
$nextdate = $href . date('Ym01"', mktime(0, 0, 0, $thismonth + 1, 1, $thisyear));
$nextStr = translate('Next');
$prevdate = $href . date('Ym01"', mktime(0, 0, 0, $thismonth - 1, 1, $thisyear));
$previousStr = translate('Previous');
$monthStr = month_name($thismonth - 1);
$wkstart = get_weekday_before($thisyear, $thismonth);
$monthstartYmd = date('Ymd', mktime(0, 0, 0, $thismonth, 1, $thisyear));
$monthendYmd = date('Ymd', mktime(23, 59, 59, $thismonth + 1, 0, $thisyear));
print_header('', '', '', true, false, true, true, true);
//build weekday names
$wkdys = '';
for ($i = 0; $i < 7; $i++) {
$wkdys .= '<td>' . weekday_name(($i + $WEEK_START) % 7, 'D') . '</td>';
}
//build month grid
$mdays = '';
for ($i = $wkstart; date('Ymd', $i) <= $monthendYmd; $i += 604800) {
$mdays .= '
<tr>';
for ($j = 0; $j < 7; $j++) {
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:datesel.php
示例14: navbar
function navbar()
{
global $vars, $action, $config, $year, $month, $day;
$html = tag('div', attributes('class="phpc-navbar"'));
if (can_add_event() && $action != 'add') {
menu_item_append($html, _('Add Event'), 'event_form', $year, $month, $day);
}
if ($action != 'search') {
menu_item_append($html, _('Search'), 'search', $year, $month, $day);
}
if (!empty($vars['day']) || !empty($vars['id']) || $action != 'display') {
menu_item_append($html, _('Back to Calendar'), 'display', $year, $month);
}
if ($action != 'display' || !empty($vars['id'])) {
menu_item_append($html, _('View date'), 'display', $year, $month, $day);
}
if (is_user()) {
menu_item_append($html, _('Log out'), 'logout', empty($vars['year']) ? false : $year, empty($vars['month']) ? false : $month, empty($vars['day']) ? false : $day, $action);
} else {
menu_item_append($html, _('Log in'), 'login', empty($vars['year']) ? false : $year, empty($vars['month']) ? false : $month, empty($vars['day']) ? false : $day, $action);
}
if (is_admin() && $action != 'admin') {
menu_item_append($html, _('Admin'), 'admin');
}
if (isset($var['display']) && $var['display'] == 'day') {
$monthname = month_name($month);
$lasttime = mktime(0, 0, 0, $month, $day - 1, $year);
$lastday = date('j', $lasttime);
$lastmonth = date('n', $lasttime);
$lastyear = date('Y', $lasttime);
$lastmonthname = month_name($lastmonth);
$nexttime = mktime(0, 0, 0, $month, $day + 1, $year);
$nextday = date('j', $nexttime);
$nextmonth = date('n', $nexttime);
$nextyear = date('Y', $nexttime);
$nextmonthname = month_name($nextmonth);
menu_item_prepend($html, "{$lastmonthname} {$lastday}", 'display', $lastyear, $lastmonth, $lastday);
menu_item_append($html, "{$nextmonthname} {$nextday}", 'display', $nextyear, $nextmonth, $nextday);
}
return $html;
}
开发者ID:noprom,项目名称:cryptdb,代码行数:41,代码来源:calendar.php
示例15: etranslate
<a title="<?php
etranslate("Next");
?>
" class="next" href="view_m.php?id=<?php
echo $id;
?>
&date=<?php
echo $nextdate;
?>
"><img src="rightarrow.gif" alt="<?php
etranslate("Next");
?>
" /></a>
<div class="title">
<span class="date"><?php
printf("%s %d", month_name($thismonth - 1), $thisyear);
?>
</span><br />
<span class="viewname"><?php
echo $view_name;
?>
</span>
</div>
</div><br />
<?php
// The table has names across the top and dates for rows. Since we need
// to spit out an entire row before we can move to the next date, we'll
// save up all the HTML for each cell and then print it out when we're
// done....
// Additionally, we only want to put at most 6 users in one table since
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:view_m.php
示例16: sort
$title = $all_title[1];
$ev_ids = $all_ev_ids[1];
break;
case $next_month:
$array_days = $all_array_days[2];
$array_days1 = $all_array_days1[2];
$title = $all_title[2];
$ev_ids = $all_ev_ids[2];
break;
}
sort($array_days, SORT_NUMERIC);
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
echo '<table style="width:100%;border-spacing:0;">
<tr>
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">';
echo '<span style="font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span> <span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . JText::_(month_name($month)) . ' ' . (int) $day . ')</span>
</td>
';
echo '<tr><td>';
if (in_array((int) $day, $array_days)) {
foreach ($title as $key => $value) {
if ($key == (int) $day) {
$ev_id = explode('<br>', $ev_ids[$key]);
array_pop($ev_id);
$ev_ids_inline = implode(',', $ev_id);
$ev_title = explode('</p>', $value);
array_pop($ev_title);
for ($j = 0; $j < count($ev_title); $j++) {
$query = "SELECT #__spidercalendar_event_category.color AS color FROM #__spidercalendar_event JOIN #__spidercalendar_event_category\n\t ON #__spidercalendar_event.category=#__spidercalendar_event_category.id WHERE #__spidercalendar_event.calendar=" . $calendar . " AND \n\t #__spidercalendar_event.published='1' AND #__spidercalendar_event_category.published='1' AND #__spidercalendar_event.id=" . $ev_id[$j];
$db->setQuery($query);
$cat_color = $db->loadResult();
开发者ID:ankaau,项目名称:GathBandhan,代码行数:31,代码来源:default.php
示例17: display_day
function display_day($day, $month, $year)
{
global $db, $config, $phpc_script;
$tablename = date('Fy', mktime(0, 0, 0, $month, 1, $year));
$monthname = month_name($month);
$result = get_events_by_date($day, $month, $year);
$today_epoch = mktime(0, 0, 0, $month, $day, $year);
if ($row = $result->FetchRow()) {
$html_table = tag('table', attributes('class="phpc-main"'), tag('caption', "{$day} {$monthname} {$year}"), tag('thead', tag('tr', tag('th', _('Title')), tag('th', _('Time')), tag('th', _('Duration')), tag('th', _('Description')))));
if (is_user() || $config['anon_permission'] >= 2) {
$html_table->add(tag('tfoot', tag('tr', tag('td', attributes('colspan="4"'), create_hidden('action', 'event_delete'), create_hidden('day', $day), create_hidden('month', $month), create_hidden('year', $year), create_submit(_('Delete Selected'))))));
}
$html_body = tag('tbody');
for (; $row; $row = $result->FetchRow()) {
$subject = htmlspecialchars(strip_tags(stripslashes($row['subject'])));
if (empty($subject)) {
$subject = _('(No subject)');
}
$desc = parse_desc($row['description']);
$time_str = formatted_time_string($row['starttime'], $row['eventtype']);
$dur_str = get_duration($row['duration'], $row['eventtype']);
$html_subject = tag('td', attributes('class="phpc-list"'));
if (check_user($row['uid']) || $config['anon_permission'] >= 2) {
$html_subject->add(create_checkbox('id', $row['id']));
}
$html_subject->add(create_id_link(tag('strong', $subject), 'display', $row['id']));
if (check_user($row['uid']) || $config['anon_permission'] >= 2) {
$html_subject->add(' (');
$html_subject->add(create_id_link(_('Modify'), 'event_form', $row['id']));
$html_subject->add(')');
}
$html_body->add(tag('tr', $html_subject, tag('td', attributes('class="phpc-list"'), $time_str), tag('td', attributes('class="phpc-list"'), $dur_str), tag('td', attributes('class="phpc-list"'), $desc)));
}
$html_table->add($html_body);
if (is_user() || $config['anon_permission'] >= 2) {
$output = tag('form', attributes("action=\"{$phpc_script}\""), $html_table);
} else {
$output = $html_table;
}
} else {
$output = tag('h2', _('No events on this day.'));
}
return $output;
}
开发者ID:noprom,项目名称:cryptdb,代码行数:44,代码来源:display.php
示例18: format_date_ina
function format_date_ina($tgl, $spr = ' ', $outputspr = false)
{
$ex = explode($spr, $tgl);
if (count($ex) != 3) {
return $tgl;
}
$month = strtolower($ex[1]);
$strmonth = month_name($month);
if ($outputspr or $outputspr == ' ') {
$spr = $outputspr;
}
if (strlen($ex[0]) == 4) {
$strmonth = $ex[2] . $spr . ucfirst($strmonth) . $spr . $ex[0];
} else {
$strmonth = $ex[0] . $spr . ucfirst($strmonth) . $spr . $ex[2];
}
return $strmonth;
}
开发者ID:Garybaldy,项目名称:rotio,代码行数:18,代码来源:func_helper.php
示例19: elseif
if ($_REQUEST['start_mon'] != '' && $_REQUEST['recur_mon'] == '') {
$_REQUEST['recur_mon'] = $_REQUEST['start_mon'];
} elseif ($_REQUEST['recur_mon'] == '') {
$_REQUEST['recur_mon'] = SELECTED_DATE_MONTH;
}
for ($i = 1; $i <= 12; $i++) {
// Defined 1-12
?>
<option value="<?php
echo $i;
?>
"<?php
echo $_REQUEST['recur_mon'] + 0 == $i ? ' selected="selected"' : '';
?>
><?php
echo month_name($i);
?>
</option>
<?php
}
?>
</select>
<select name="recur_day">
<?php
if ($_REQUEST['start_day'] != '' && $_REQUEST['recur_day'] == '') {
$_REQUEST['recur_day'] = $_REQUEST['start_day'];
} elseif ($_REQUEST['recur_day'] == '') {
$_REQUEST['recur_day'] = SELECTED_DATE_DAY;
}
for ($i = 1; $i <= 31; $i++) {
?>
开发者ID:haganbt,项目名称:N27-Booking,代码行数:31,代码来源:add_event.php
示例20: date_to_str
function date_to_str($indate, $format = '', $show_weekday = true, $short_months = false, $forceTranslate = false)
{
global $DATE_FORMAT;
if (strlen($indate) == 0) {
$indate = date('Ymd');
}
// If they have not set a preference yet...
if ($DATE_FORMAT == '' || $DATE_FORMAT == 'LANGUAGE_DEFINED') {
$DATE_FORMAT = translate('__month__ __dd__, __yyyy__');
} else {
if ($DATE_FORMAT == 'LANGUAGE_DEFINED' && $forceTranslate && $format != '' && translation_exists($format)) {
$format = translate($format);
}
}
if (empty($format)) {
$format = $DATE_FORMAT;
}
$y = intval($indate / 10000);
$m = intval($indate / 100) % 100;
$d = $indate % 100;
$wday = strftime("%w", mktime(0, 0, 0, $m, $d, $y));
if ($short_months) {
$month = month_name($m - 1, 'M');
$weekday = weekday_name($wday, 'D');
} else {
$month = month_name($m - 1);
$weekday = weekday_name($wday);
}
$ret = str_replace('__dd__', $d, $format);
$ret = str_replace('__j__', intval($d), $ret);
$ret = str_replace('__mm__', $m, $ret);
$ret = str_replace('__mon__', $month, $ret);
$ret = str_replace('__month__', $month, $ret);
$ret = str_replace('__n__', sprintf("%02d", $m), $ret);
$ret = str_replace('__yy__', sprintf("%02d", $y % 100), $ret);
$ret = str_replace('__yyyy__', $y, $ret);
return $show_weekday ? "{$weekday}, {$ret}" : $ret;
}
开发者ID:GetInTheGo,项目名称:JohnsonFinancialService,代码行数:38,代码来源:functions.php
注:本文中的month_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论