<?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);
<?php $curr_user_id = get_current_user_id(); $obj_gym = new Gym_management($curr_user_id); $obj_reservation = new Gmgtreservation(); $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'reservationlist'; if (isset($_POST['save_group'])) { if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') { $result = $obj_reservation->gmgt_add_reservation($_POST); if ($result['msg'] != 'reserved') { wp_redirect(home_url() . '?dashboard=user&page=reservation&tab=reservationlist&message=2'); } else { if (isset($result['msg'])) { $_REQUEST['reservation_id'] = $result['id']; ?> <div id="message" class="updated below-h2"> <p><p><?php _e('This Date is Allready Reserved.', 'gyml_mgt'); ?> </p></p> </div> <?php } } } else { $result = $obj_reservation->gmgt_add_reservation($_POST); if ($result != "reserved") { wp_redirect(home_url() . '?dashboard=user&page=reservation&tab=reservationlist&message=1'); } else { ?> <div id="message" class="updated below-h2">