/** * @access public * @global type $registry * @return render Calendar with Appointments */ public function index() { global $registry; $boardroom_id = isset($_GET['boardroom_id']) ? $_GET['boardroom_id'] : 1; if (isset($_GET['year']) && isset($_GET['month'])) { $calendar_date['year'] = $_GET['year']; $calendar_date['month'] = $_GET['month']; } else { $calendar_date['year'] = date('Y'); $calendar_date['month'] = date('m'); } $date = new Calendar($calendar_date['year'], $calendar_date['month'], $boardroom_id); $boardroom_object = new Boardroom(); $this->registry['template']->data('title', 'Schedule for ' . date('F', mktime(0, 0, 0, $calendar_date['month'])) . ' ' . $calendar_date['year']); $this->registry['template']->render('header'); $boardrooms = $boardroom_object->listBoardrooms(); $month_calendar = $date->generateCalendar($date->year, $date->month); $this->registry['template']->data('boardrooms', $boardrooms); $this->registry['template']->data('boardroom_id', $boardroom_id); $this->registry['template']->data('month_calendar', $month_calendar); $this->registry['template']->render('schedule/schedule'); $this->registry['template']->render('footer'); }
public function renderSettingsInOptions() { $html = '<tr class="day-subsettings"> <td class="calendar-block" colspan="2">'; $html .= Calendar::generateCalendar(date('Y'), date('m'), FALSE, FALSE, $_POST['calendarid']); $html .= '</td> <td class="appointment-block">'; $html .= '<p id="select-date">Select Date</p> </td>'; $html .= '</tr>'; echo $html; die; }
</ul> <div class="tab-content"> <?php foreach ($calendars as $key => $calendar) { ?> <div id="<?php echo $calendar->calendar_id; ?> " class="tab-pane fade in <?php if ($key == 0) { echo "active"; } ?> "> <?php echo Calendar::generateCalendar(date('Y'), date('m'), FALSE, FALSE, $calendar->calendar_id); ?> </div> <?php } ?> </div> <div class="right-side"> <div class="another-time-sign button"> <?php echo isset($settings->text_another_date) ? html_entity_decode(stripslashes($settings->text_another_date)) : 'Register to another date'; ?> </div> </div> <div class="clear"></div> </div>