当前位置: 首页>>代码示例>>PHP>>正文


PHP php_Month_num函数代码示例

本文整理汇总了PHP中php_Month_num函数的典型用法代码示例。如果您正苦于以下问题:PHP php_Month_num函数的具体用法?PHP php_Month_num怎么用?PHP php_Month_num使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了php_Month_num函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: php_showevent

function php_showevent()
{
    global $wpdb;
    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");
    }
    if (isset($_GET['calendar_id'])) {
        $calendar = $_GET['calendar_id'];
    } else {
        $calendar = 0;
    }
    $year = substr($date, 0, 4);
    $month = substr($date, 5, 2);
    $eventID = $_GET['eventID'];
    $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE id=%d', $eventID));
    $all_files_spider_cal['row'] = $row;
    $all_files_spider_cal['option'] = $option;
    return array($all_files_spider_cal);
}
开发者ID:andripriyanto,项目名称:WebTKJ-BPI,代码行数:25,代码来源:functions_spidercalendarbig.php

示例2: php_showevent

function php_showevent()
{
    global $wpdb;
    if (isset($_GET['calendar_id'])) {
        $calendar = $_GET['calendar_id'];
    } else {
        $calendar = 0;
    }
    if (isset($_GET['date'])) {
        if (IsDate_inputed($_GET['date'])) {
            $date = $_GET['date'];
        } else {
            $date = date("Y-m-d");
        }
    } else {
        $date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
    }
    $year = substr($date, 0, 4);
    $month = substr($date, 5, 2);
    $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event where calendar=%d", $calendar);
    $rows = $wpdb->get_results($query);
    $all_spider_files['rows'] = $rows;
    $all_spider_files['option'] = $option;
    return array($all_spider_files);
}
开发者ID:andripriyanto,项目名称:WebTKJ-BPI,代码行数:25,代码来源:functions_spidercalendarbig_seemore.php

示例3: 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;
开发者ID:kxt5258,项目名称:fullcircle,代码行数:67,代码来源:bigcalendarlist_widget.php

示例4: spiderbigcalendar

function spiderbigcalendar()
{
    require_once "front_end/frontend_functions.php";
    $calendar_id = isset($_GET['calendar_id']) ? (int) $_GET['calendar_id'] : 0;
    $date = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
    $ev_ids_inline = isset($_GET['ev_ids']) ? esc_html($_GET['ev_ids']) : '';
    $eventID = isset($_GET['eventID']) ? (int) $_GET['eventID'] : '';
    $widget = isset($_GET['widget']) && (int) $_GET['widget'] ? (int) $_GET['widget'] : 0;
    $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1;
    global $wpdb;
    if ($widget) {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
    } else {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
    }
    $title_color = '#' . str_replace('#', '', $theme->title_color);
    $title_size = $theme->title_font_size;
    $title_font = $theme->title_font;
    $title_style = $theme->title_style;
    $date_color = '#' . str_replace('#', '', $theme->date_color);
    $date_size = $theme->date_size;
    $date_font = $theme->date_font;
    $date_style = $theme->date_style;
    $next_prev_event_bgcolor = '#' . str_replace('#', '', $theme->next_prev_event_bgcolor);
    $next_prev_event_arrowcolor = '#' . str_replace('#', '', $theme->next_prev_event_arrowcolor);
    $show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor);
    $popup_width = $theme->popup_width;
    $popup_height = $theme->popup_height;
    $date_format = $theme->date_format;
    $show_repeat = $theme->show_repeat;
    $date_format_array = explode('/', $date_format);
    for ($i = 0; $i < count($date_format_array); $i++) {
        if ($date_format_array[$i] == 'w') {
            $date_format_array[$i] = 'l';
        }
        if ($date_format_array[$i] == 'm') {
            $date_format_array[$i] = 'F';
        }
        if ($date_format_array[$i] == 'y') {
            $date_format_array[$i] = 'Y';
        }
    }
    $all_files_cal = php_showevent($calendar_id, $date, $eventID);
    $row = $all_files_cal[0]['row'];
    $datte = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : date("Y-m-d");
    $activedate = explode('-', $datte);
    $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
    $activedatestr = '';
    for ($i = 0; $i < count($date_format_array); $i++) {
        $activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp), 'sp_calendar') . ' ';
    }
    $date = $datte;
    $day = substr($date, 8);
    $ev_id = explode(',', $ev_ids_inline);
    ?>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  <script>
    function next(day_events, ev_id, theme_id, calendar_id, date, day, ev_ids) {
      var p = 0;
      for (var key in day_events) {
        p = p + 1;
        if (day_events[key] == ev_id && day_events[parseInt(key) + 1]) {
          window.location = '<?php 
    echo admin_url('admin-ajax.php?action=spidercalendarbig');
    ?>
&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) + 1] + '&date=' + date + '&day=' + day + '&widget=<?php 
    echo $widget;
    ?>
';
        }
      }
    }
    function change() {
      jQuery('#dayevent').ready(function () {
        jQuery('#dayevent').animate({
          opacity:1,
          marginLeft:"0in"
        }, 1000, function () {
        });
      });
    }
    jQuery(document).ready(function() {
      change();
    });
    // window.onload = change();
    function prev(array1, ev_id, theme_id, calendar_id, date, day, ev_ids) {
      var day_events = array1;
      for (var key in day_events) {
        if (day_events[key] == ev_id && day_events[parseInt(key) - 1]) {
          window.location = '<?php 
    echo admin_url('admin-ajax.php?action=spidercalendarbig');
    ?>
&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) - 1] + '&date=' + date + '&day=' + day + '&widget=<?php 
    echo $widget;
    ?>
';
        }
      }
    }
    document.onkeydown = function (evt) {
//.........这里部分代码省略.........
开发者ID:dorkyhuman,项目名称:things,代码行数:101,代码来源:functions_for_xml_and_ajax.php

示例5: 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";
    }
开发者ID:krievley,项目名称:todo,代码行数:67,代码来源:bigcalendarday.php

示例6: php_getdays

function php_getdays()
{
    global $wpdb;
    $id = $_GET['id'];
    $calendar = $_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 = $_GET['theme_id'];
    if (isset($_GET['widget'])) {
        $widget = 1;
    } else {
        $widget = 0;
    }
    $show_time = 1;
    if (!$_GET['calendar']) {
        $calendar = 0;
    }
    $rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ( ( (date<=%s or date like %s) and  date_end>=%s) or ( date_end is Null and date like %s ) ) and calendar=%d  ", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", $calendar));
    //echo	"SELECT date,date_end,text_for_date from #__spidercalendar where published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and  date_end>='".substr( $date,0,7)."-01' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) )  ";
    $id_array = array();
    $s = count($rows);
    $id_array = array();
    $array_days = array();
    $array_days1 = array();
    $title = array();
    $ev_ids = array();
    ///mec FOR
    for ($i = 1; $i <= $s; $i++) {
        $date_month = (int) substr($rows[$i - 1]->date, 5, 2);
        $date_end_month = (int) substr($rows[$i - 1]->date_end, 5, 2);
        $date_day = (int) substr($rows[$i - 1]->date, 8, 2);
        $date_end_day = (int) substr($rows[$i - 1]->date_end, 8, 2);
        //echo $date_day;
        $date_year_month = (int) (substr($rows[$i - 1]->date, 0, 4) . substr($rows[$i - 1]->date, 5, 2));
        $date_end_year_month = (int) (substr($rows[$i - 1]->date_end, 0, 4) . substr($rows[$i - 1]->date_end, 5, 2));
        $year_month = (int) ($year . $month);
        $repeat = $rows[$i - 1]->repeat;
        if ($repeat == "") {
            $repeat = 1;
        }
        $start_date = $rows[$i - 1]->date;
        //echo $date_month.'<br>' ;
        //echo (int)$month.'<br>';
        $weekly = $rows[$i - 1]->week;
        $weekly_array = explode(',', $weekly);
        $date_days = array();
        $weekdays_start = array();
        $weekdays = array();
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////                NO Repeat                /////////////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if ($rows[$i - 1]->repeat_method == 'no_repeat') {
            $date_days[] = $date_day;
        }
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////               Repeat   Daily             /////////////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if ($rows[$i - 1]->repeat_method == 'daily') {
            $t = php_daysDifference($rows[$i - 1]->date, $rows[$i - 1]->date_end);
            for ($k = 1; $k <= $t / $repeat; $k++) {
                $next_date = php_GetNextDate($start_date, $repeat);
                $next_date_array = explode('/', $next_date);
                if ((int) $month == $date_month && (int) substr($date_year_month, 0, 4) == (int) $year) {
                    $date_days[0] = $date_day;
                }
                if ((int) $month == $next_date_array[0] && (int) $year == $next_date_array[2]) {
                    $date_days[] = $next_date_array[1];
                }
                $start_date = date("Y-m-d", mktime(0, 0, 0, $next_date_array[0], $next_date_array[1], $next_date_array[2]));
            }
        }
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////               Repeat   Weekly             ///////////////////////////////////////////////////////////////////////////////////////////
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if ($rows[$i - 1]->repeat_method == 'weekly') {
            for ($j = 0; $j <= 6; $j++) {
                if (in_array(date("D", mktime(0, 0, 0, $date_month, $date_day + $j, substr($rows[$i - 1]->date, 0, 4))), $weekly_array)) {
                    $weekdays_start[] = $date_day + $j;
                }
            }
            for ($p = 0; $p < count($weekly_array) - 1; $p++) {
                $start_date = substr($rows[$i - 1]->date, 0, 8) . $weekdays_start[$p];
                $t = php_daysDifference($rows[$i - 1]->date, $rows[$i - 1]->date_end);
                $r = 0;
                for ($k = 1; $k < $t / $repeat; $k++) {
                    $start_date_array[] = $start_date;
                    $next_date = php_GetNextDate($start_date, $repeat * 7);
                    $next_date_array = explode('/', $next_date);
                    if ((int) $month == $date_month && (int) substr($date_year_month, 0, 4) == (int) $year) {
                        $date_days[0] = $weekdays_start[$p];
                    }
//.........这里部分代码省略.........
开发者ID:andripriyanto,项目名称:WebTKJ-BPI,代码行数:101,代码来源:functions_bigcalendar.php

示例7: 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";
开发者ID:kxt5258,项目名称:fullcircle,代码行数:67,代码来源:bigcalendarmonth.php

示例8: elseif

    } elseif (file_exists($path . 'wp-load.php')) {
        define('WP_LOAD_PATH', $path);
    } else {
        exit("Could not find wp-load.php");
    }
}
// Load WordPress.
require_once WP_LOAD_PATH . 'wp-load.php';
if (!current_user_can('manage_options')) {
    die('Access Denied');
}
require_once "front_end/frontend_functions.php";
// $month = date('m');
// $year = date('Y');
$date_REFERER = date("Y-m");
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
$year_REFERER = substr($date_REFERER, 0, 4);
// var_dump(date("F", mktime(0, 0, 0, 7, 1, 0)));
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
$day_REFERER = substr($date_REFERER, 8, 2);
$year = substr($date, 0, 4);
// var_dump($date);
$month = Month_name(substr($date, 5, 2));
$day = substr($date, 8, 2);
?>
<script>
  var cal_width = window.parent.document.getElementById('width').value;
  var calendar_bg = '#' + window.parent.document.getElementById('footer_bgcolor').value;
  var year_font_size = window.parent.document.getElementById('year_font_size').value;
  var text_color_month = '#' + window.parent.document.getElementById('text_color_month').value;
  var weekdays_bg_color = '#' + window.parent.document.getElementById('weekdays_bg_color').value;
开发者ID:kxt5258,项目名称:fullcircle,代码行数:31,代码来源:preview_widget.php


注:本文中的php_Month_num函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。