本文整理匯總了PHP中Month_num函數的典型用法代碼示例。如果您正苦於以下問題:PHP Month_num函數的具體用法?PHP Month_num怎麽用?PHP Month_num使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Month_num函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showcalendar
echo $category->color;
?>
"> </p><p id="category<?php
echo $id;
?>
-<?php
echo $category->id;
?>
" style="color:#<?php
echo $category->color;
?>
" onclick=" showcalendar( 'calendar_<?php
echo $id;
?>
','<?php
echo JRoute::_('index.php?option=com_spidercalendar&view=AJAXcalendar&calendar=' . $calendar_id . '&module_id=' . $id . '&cat_id=' . $category->id . '&cat_ids=' . $cat_ids) . '&format=row&Itemid=' . JRequest::getVar("Itemid", "") . '&date' . $id . '=' . $year . '-' . add_0(Month_num($month));
?>
')" > <?php
echo $category->title;
?>
</p></div>
<?php
}
?>
<?php
示例2: big_calendar_list_widget
//.........這裏部分代碼省略.........
$calendar_width = $theme->width;
$calendar_bg = '#' . str_replace('#', '', $theme->footer_bgcolor);
$weekdays_bg_color = '#' . str_replace('#', '', $theme->weekdays_bg_color);
$weekday_su_bg_color = '#' . str_replace('#', '', $theme->su_bg_color);
$cell_border_color = '#' . str_replace('#', '', $theme->cell_border_color);
$year_font_size = $theme->year_font_size;
$year_font_color = '#' . str_replace('#', '', $theme->year_font_color);
$year_tabs_bg_color = '#' . str_replace('#', '', $theme->year_tabs_bg_color);
$font_year = $theme->font_year;
$font_month = $theme->font_month;
$font_day = $theme->font_day;
$font_weekday = $theme->font_weekday;
$show_cat = 1;
$ev_title_color = '#' . str_replace('#', '', $theme->ev_title_color);
$popup_width = $theme->popup_width;
$popup_height = $theme->popup_height;
$show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor);
__('January', 'sp_calendar');
__('February', 'sp_calendar');
__('March', 'sp_calendar');
__('April', 'sp_calendar');
__('May', 'sp_calendar');
__('June', 'sp_calendar');
__('July', 'sp_calendar');
__('August', 'sp_calendar');
__('September', 'sp_calendar');
__('October', 'sp_calendar');
__('November', 'sp_calendar');
__('December', 'sp_calendar');
if ($date != '') {
$date_REFERER = $date;
} else {
$date_REFERER = date("Y-m");
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
}
$year_REFERER = substr($date_REFERER, 0, 4);
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
$day_REFERER = substr($date_REFERER, 8, 2);
$year = substr($date, 0, 4);
$month = Month_name(substr($date, 5, 2));
$day = substr($date, 8, 2);
$this_month = substr($year . '-' . add_0(Month_num($month)), 5, 2);
$prev_month = add_0((int) $this_month - 1);
$next_month = add_0((int) $this_month + 1);
$cell_width = $calendar_width / 7;
$cell_width = (int) $cell_width - 2;
$view = 'bigcalendarlist_widget';
$views = explode(',', $view_select);
$defaultview = 'list';
array_pop($views);
$display = '';
if (count($views) == 0) {
$display = "display:none";
}
if (count($views) == 1 && $views[0] == $defaultview) {
$display = "display:none";
}
?>
<style type='text/css'>
#calendar_<?php
echo $many_sp_calendar;
?>
table {
border-collapse: initial;
border:0px;
margin: 0;
示例3: big_calendarr
//.........這裏部分代碼省略.........
$month_font_size = '14';
$arrow_size = '10';
$arrow_size_hover = $arrow_size + 5;
$next_month_text_color = '#' . 'FFFFFF';
$prev_month_text_color = '#' . 'FFFFFF';
$next_month_arrow_color = '#' . 'FFFFFF';
$prev_month_arrow_color = '#' . 'FFFFFF';
$next_month_font_size = '';
$prev_month_font_size = '';
$month_type = 2;
$all_days_border_width = '1';
}
__('January', 'sp_calendar');
__('February', 'sp_calendar');
__('March', 'sp_calendar');
__('April', 'sp_calendar');
__('May', 'sp_calendar');
__('June', 'sp_calendar');
__('July', 'sp_calendar');
__('August', 'sp_calendar');
__('September', 'sp_calendar');
__('October', 'sp_calendar');
__('November', 'sp_calendar');
__('December', 'sp_calendar');
function php_getdays()
{
global $wpdb;
$id = $_GET['id'];
$calendar = (int) $_GET['calendar'];
if (isset($_GET['date'])) {
if (IsDate_inputed($_GET['date'])) {
$date = $_GET['date'];
} else {
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
}
} else {
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
}
$year = substr($date, 0, 4);
$month = substr($date, 5, 2);
$theme_id = (int) $_GET['theme_id'];
if (isset($_GET['widget'])) {
$widget = 1;
} else {
$widget = 0;
}
function php_GetNextDate($beginDate, $repeat)
{
//explode the date by "-" and storing to array
$date_parts1 = explode("-", $beginDate);
//gregoriantojd() Converts a Gregorian date to Julian Day Count
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
return jdtogregorian($start_date + $repeat);
}
function php_daysDifference($beginDate, $endDate)
{
//explode the date by "-" and storing to array
$date_parts1 = explode("-", $beginDate);
$date_parts2 = explode("-", $endDate);
//gregoriantojd() Converts a Gregorian date to Julian Day Count
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
$end_date = gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
return $end_date - $start_date;
}
$show_time = 1;
if (!$_GET['calendar']) {
示例4: big_calendar_day
//.........這裏部分代碼省略.........
$views_tabs_text_color = '#' . str_replace('#', '', $theme->views_tabs_text_color);
$views_tabs_font_size = $theme->views_tabs_font_size;
$date_bg_color = '#' . str_replace('#', '', $theme->date_bg_color);
$event_bg_color1 = '#' . str_replace('#', '', $theme->event_bg_color1);
$event_bg_color2 = '#' . str_replace('#', '', $theme->event_bg_color2);
$event_num_bg_color1 = '#' . str_replace('#', '', $theme->event_num_bg_color1);
$event_num_bg_color2 = '#' . str_replace('#', '', $theme->event_num_bg_color2);
$event_num_color = '#' . str_replace('#', '', $theme->event_num_color);
$date_font_size = $theme->date_font_size;
$event_num_font_size = $theme->event_num_font_size;
$show_numbers_for_events = $theme->day_start;
__('January', 'sp_calendar');
__('February', 'sp_calendar');
__('March', 'sp_calendar');
__('April', 'sp_calendar');
__('May', 'sp_calendar');
__('June', 'sp_calendar');
__('July', 'sp_calendar');
__('August', 'sp_calendar');
__('September', 'sp_calendar');
__('October', 'sp_calendar');
__('November', 'sp_calendar');
__('December', 'sp_calendar');
if ($cell_height == '') {
$cell_height = 70;
}
if ($cal_width == '') {
$cal_width = 700;
}
if ($date != '') {
$date_REFERER = $date;
} else {
$date_REFERER = date("Y-m");
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
}
$year_REFERER = substr($date_REFERER, 0, 4);
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
$day_REFERER = substr($date_REFERER, 8, 2);
$year = substr($date, 0, 4);
$month = Month_name(substr($date, 5, 2));
$day = substr($date, 8, 2);
$cell_width = $cal_width / 7;
$month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
$prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
if ($day > $month_day_count) {
$month = Month_name(Month_num($month) + 1);
$day = '01';
}
if ((int) $day < 1) {
$month = Month_name(Month_num($month) - 1);
$day = $prev_month_day_count;
}
$this_month = substr($year . '-' . add_0(Month_num($month)), 5, 2);
$prev_month = add_0((int) $this_month - 1);
$next_month = add_0((int) $this_month + 1);
$view = 'bigcalendarday';
$views = explode(',', $view_select);
$defaultview = 'day';
array_pop($views);
$display = '';
if (count($views) == 0) {
$display = "display:none";
}
if (count($views) == 1 && $views[0] == $defaultview) {
$display = "display:none";
}
示例5: add_0
?>
<li style="float:left;"><p class="categories1" style="background-color:#<?php
echo $category->color;
?>
"> </p><p class="categories2" id="category<?php
echo $category->id;
?>
" style="color:#<?php
echo $category->color;
?>
" onclick="showbigcalendar( 'bigcalendar<?php
echo $id;
?>
','<?php
echo JRoute::_('index.php?option=com_spidercalendar&view=bigcalendar&def_view=' . $defaultview . '&views=' . $viewselect . '&rand=' . $id . '&theme_id=' . $theme_id . '&calendar=' . $calendar_id . '&cat_id=' . $category->id . '&cat_ids=' . $cat_ids) . '&format=row&tmpl=component&Itemid=' . JRequest::getVar("Itemid", "") . '&date=' . $year . '-' . add_0(Month_num($month));
?>
','<?php
echo $id;
?>
')" > <?php
echo $category->title;
?>
</p></li>
<?php
}
echo '</ul><br><br>';
$db = JFactory::getDBO();
$query = "SELECT * FROM #__spidercalendar_calendar where id=" . $calendar_id . "";
$db->setQuery($query);
示例6: plugins_url
} else {
if (in_array($i, $array_days)) {
if ($widget) {
if ($k != 1) {
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="font-size:11px !important;background:none !important;color:' . $event_title_color . ' !important;text-align:center !important;" href="' . plugins_url("spidercalendarbig_seemore.php", __FILE__) . '?theme_id=' . $theme_id . '&ev_ids=' . $ev_ids_inline . '&calendar_id=' . $calendar_id . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . $i . '&Itemid=' . $Itemid . '&cur_page_url=' . $path_sp_cal . ($widget ? '&widget=1' : '') . '&TB_iframe=1&tbWidth=' . $popup_width . '&tbHeight=' . $popup_height . '" ' . $dayevent . '><b style="color:' . $evented_color . ' !important;font-size:' . $other_days_font_size . 'px !important;">' . $i . '</b></a></b>';
} else {
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="font-size:11px !important;background:none !important;color:' . $event_title_color . ' !important;text-align:center !important;" href="' . plugins_url("spidercalendarbig.php", __FILE__) . '?theme_id=' . $theme_id . '&calendar_id=' . $calendar_id . '&ev_ids=' . $ev_ids_inline . '&eventID=' . $ev_id[0] . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . $i . '&cur_page_url=' . $path_sp_cal . ($widget ? '&widget=1' : '') . '&TB_iframe=1&tbWidth=' . $popup_width . '&tbHeight=' . $popup_height . '" ' . $dayevent . '><b style="color:' . $evented_color . ' !important;font-size:' . $other_days_font_size . 'px !important;">' . $i . '</b></a></b>';
}
} else {
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><b style="color:' . $evented_color . ' !important;font-size:' . $other_days_font_size . 'px !important;">' . $i . '</b>';
$r = 0;
for ($j = 0; $j < $k; $j++) {
if ($r < $number_of_shown_evetns) {
echo '<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="background:none !important;color:' . $event_title_color . ' !important; " href="' . plugins_url("spidercalendarbig.php", __FILE__) . '?theme_id=' . $theme_id . '&calendar_id=' . $calendar_id . '&ev_ids=' . $ev_ids_inline . '&eventID=' . $ev_id[$j] . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . $i . '&cur_page_url=' . $path_sp_cal . ($widget ? '&widget=1' : '') . '&TB_iframe=1&tbWidth=' . $popup_width . '&tbHeight=' . $popup_height . '" ><b>' . $ev_title[$j] . '</b></a>';
} else {
echo '<p><a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="font-size:11px !important;background:none !important;color:' . $event_title_color . ' !important;text-align:center !important;" href="' . plugins_url("spidercalendarbig_seemore.php", __FILE__) . '?theme_id=' . $theme_id . '&ev_ids=' . $ev_ids_inline . '&calendar_id=' . $calendar_id . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . $i . '&Itemid=' . $Itemid . '&cur_page_url=' . $path_sp_cal . ($widget ? '&widget=1' : '') . '&TB_iframe=1&tbWidth=' . $popup_width . '&tbHeight=' . $popup_height . '" ' . $dayevent . '> <b>' . __('See more...', 'sp_calendar') . '</b></a></p>';
break;
}
$r++;
}
echo '</td>';
}
} else {
echo '<td style=" color:' . $text_color_this_month_unevented . ' !important;padding:0 !important; margin:0 !important; line-height:15px !important;border: ' . ($widget ? $all_days_border_width : '1') . 'px solid ' . $cell_border_color . ' !important; ' . ($widget ? 'vertical-align:middle !important; text-align: center' : 'vertical-align:top') . ' !important;"><b style="font-size:' . $other_days_font_size . 'px">' . $i . '</b></td>';
}
}
}
}
if ($weekday_i % 7 == 0 && $i != $month_days) {
echo '</tr><tr height="' . $cell_height . '" style="!important;line-height:15px">';
$weekday_i = 0;
示例7: array_pop
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();
if (($j + 1) % 2 == 0) {
$color = $event_num_bg_color2;
$table_color = $event_bg_color2;
} else {
$color = $event_num_bg_color1;
$table_color = $event_bg_color1;
}
if ($cat_color != '') {
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '"><tr><td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color . ';color:' . $event_num_color . '">' . ($j + 1) . '</td><td ><a class="modal' . $id . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . '; " href="' . JRoute::_('index.php?option=com_spidercalendar&view=spidercalendarbig&theme_id=' . $theme_id . '&calendar_id=' . $calendar_id . '&ev_ids=' . $ev_ids_inline . '&eventID=' . $ev_id[$j] . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . (int) $day) . '&tmpl=component&Itemid=' . $Itemid . '" ><b>' . $ev_title[$j] . '</b></a></td></tr></table>';
} else {
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '"><tr><td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . ($j + 1) . '</td><td ><a class="modal' . $id . '" rel="{handler: \'iframe\', size: {x: ' . $popup_width . ', y: ' . $popup_height . '}}" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . '; " href="' . JRoute::_('index.php?option=com_spidercalendar&view=spidercalendarbig&theme_id=' . $theme_id . '&calendar_id=' . $calendar_id . '&ev_ids=' . $ev_ids_inline . '&eventID=' . $ev_id[$j] . '&date=' . $year . '-' . add_0(Month_num($month)) . '-' . (int) $day) . '&tmpl=component&Itemid=' . $Itemid . '" ><b>' . $ev_title[$j] . '</b></a></td></tr></table>';
}
}
}
}
} else {
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '"><tr><td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td><td ><h1 style="color:' . $event_title_color . '; border:none;font-size: 15px;padding: 0;margin: 0;"> ' . JText::_('THERE_IS_NO_EVENT_IN_THIS_DAY') . '</h1> </td></tr></table>';
}
echo '</td></tr>';
echo '</table>';
}
?>
</td>
</tr>
</table>
</tr>
示例8: big_calendar_month
//.........這裏部分代碼省略.........
$week_font_size = $theme->week_font_size;
$day_month_font_color = '#' . str_replace('#', '', $theme->day_month_font_color);
$week_font_color = '#' . str_replace('#', '', $theme->week_font_color);
$views_tabs_bg_color = '#' . str_replace('#', '', $theme->views_tabs_bg_color);
$views_tabs_text_color = '#' . str_replace('#', '', $theme->views_tabs_text_color);
$views_tabs_font_size = $theme->views_tabs_font_size;
$show_numbers_for_events = $theme->day_start;
$show_cat = '1';
$text_color_year = '#' . str_replace('#', '', $theme->text_color_year);
$ev_color = $theme->event_title_color;
$show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor);
__('January', 'sp_calendar');
__('February', 'sp_calendar');
__('March', 'sp_calendar');
__('April', 'sp_calendar');
__('May', 'sp_calendar');
__('June', 'sp_calendar');
__('July', 'sp_calendar');
__('August', 'sp_calendar');
__('September', 'sp_calendar');
__('October', 'sp_calendar');
__('November', 'sp_calendar');
__('December', 'sp_calendar');
if ($cell_height == '') {
$cell_height = 70;
}
if ($cal_width == '') {
$cal_width = 700;
}
if ($date != '') {
$date_REFERER = $date;
} else {
$date_REFERER = date("Y-m");
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
}
$year_REFERER = substr($date_REFERER, 0, 4);
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
$day_REFERER = substr($date_REFERER, 8, 2);
$year = substr($date, 0, 4);
$month = Month_name(substr($date, 5, 2));
$day = substr($date, 8, 2);
$cell_width = $cal_width / 7;
$cell_width = (int) $cell_width - 2;
$this_month = substr($year . '-' . add_0(Month_num($month)), 5, 2);
$prev_month = add_0((int) $this_month - 1);
$next_month = add_0((int) $this_month + 1);
$view = 'bigcalendarmonth';
$views = explode(',', $view_select);
$defaultview = 'month';
array_pop($views);
$display = '';
if (count($views) == 0) {
$display = "display:none";
echo '<style>
@media only screen and (max-width : 640px) {
#views_tabs_select
{
display:none !important;
}
}
</style>';
}
if (count($views) == 1 and $views[0] == $defaultview) {
$display = "display:none";
示例9: date
</td>
<td class="cell_body_mo" style="margin:0; padding:0">
<div class="calbottom_border" style="text-align:center; margin:0; padding:0;"><b> Fr </b></div>
</td>
<td class="cell_body_mo" style="margin:0; padding:0">
<div class="calbottom_border" style="text-align:center; margin:0; padding:0;"><b> Sa </b></div>
</td>
</tr>
<?php
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
$month_first_weekday++;
if ($month_first_weekday == 8) {
$month_first_weekday = 1;
}
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
$weekday_i = $month_first_weekday;
$last_month_days = $last_month_days - $weekday_i + 2;
$percent = 1;
$sum = $month_days - 8 + $month_first_weekday;
if ($sum % 7 != 0) {
$percent = $percent + 1;
}
$sum = $sum - $sum % 7;
$percent = $percent + $sum / 7;
$weekstart = 'su';
$percent = 107 / $percent;
$array_days = array(11);
$array_days1 = $array_days;
$title = array(11 => '<br>
1. Event1<br>