示例#1
0
<?php

require_once GMS_PLUGIN_DIR . '/lib/chart/GoogleCharts.class.php';
$GoogleCharts = new GoogleCharts();
$obj_dashboard = new Gmgtdashboard();
$obj_reservation = new Gmgtreservation();
$reservationdata = $obj_reservation->get_all_reservation();
$cal_array = array();
if (!empty($reservationdata)) {
    foreach ($reservationdata as $retrieved_data) {
        $cal_array[] = array('title' => $retrieved_data->event_name, 'start' => $retrieved_data->event_date, 'end' => $retrieved_data->event_date);
    }
}
$birthday_boys = get_users(array('role' => 'member'));
$boys_list = "";
if (!empty($birthday_boys)) {
    foreach ($birthday_boys as $boys) {
        //$boys_list.=$boys->display_name." ";
        $cal_array[] = array('title' => $boys->display_name . "'s Birthday", 'start' => mysql2date('Y-m-d', $boys->birth_date), 'end' => mysql2date('Y-m-d', $boys->birth_date), 'backgroundColor' => '#F25656');
    }
}
$all_notice = "";
$args['post_type'] = 'gmgt_notice';
$args['posts_per_page'] = -1;
$args['post_status'] = 'public';
$q = new WP_Query();
$all_notice = $q->query($args);
if (!empty($all_notice)) {
    foreach ($all_notice as $notice) {
        $notice_start_date = get_post_meta($notice->ID, 'gmgt_start_date', true);
        $notice_end_date = get_post_meta($notice->ID, 'gmgt_end_date', true);