/** * Prints out 3 calendars (prev month, this month, next month) at the top of the schedule * @param none */ function print_calendars() { $prev = new Calendar(false, false, $this->_date['month'] - 1, $this->_date['year']); $curr = new Calendar(false, false, $this->_date['month'], $this->_date['year']); $next = new Calendar(false, false, $this->_date['month'] + 1, $this->_date['year']); $prev->scheduleid = $curr->scheduleid = $next->scheduleid = $this->scheduleid; startNavCalTable(); print_calendars($prev, $curr, $next, $this->_date['current']); print_calendar_jump_links($this->_date['firstDayTs']); endNavCalTable(); }
/** * Create previous/current/next month calendars and print the proper ones * @param string $javascript javascript string to assign to the calendars */ function print_calendars($javascript) { list($month, $year) = explode('-', date('m-Y', $this->actualDate)); $prev = new Calendar(false, true, $month - 1, $year, null); $curr = new Calendar(false, true, $month, $year, null); $next = new Calendar(false, true, $month + 1, $year, null); $prev->javascript = $curr->javascript = $next->javascript = $javascript; if ($this->type == MYCALENDARTYPE_MONTH) { $curr = null; } // No need to print out the current month if we are in month view print_calendars($prev, $next, $curr); }