$dateIndex = str_replace('/', '', $item['startDate']); $links[$dateIndex][] = $object->getCalendarLink($AppUI, $item); } } } } // create the main calendar $cal = new CMonthCalendar($date); $cal->setStyles('motitle', 'mocal'); $cal->setLinkFunctions('clickDay', 'clickWeek'); $cal->setEvents($links); echo $cal->show(); //echo '<pre>';print_r($cal);echo '</pre>'; // create the mini previous and next month calendars under $minical = new CMonthCalendar($cal->prev_month); $minical->setStyles('minititle', 'minical'); $minical->showArrows = false; $minical->showWeek = false; $minical->clickMonth = true; $minical->setLinkFunctions('clickDay'); $first_time = new w2p_Utilities_Date($cal->prev_month); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($cal->prev_month); $last_time->setDay($cal->prev_month->getDaysInMonth()); $last_time->setTime(23, 59, 59); $links = array(); getTaskLinks($first_time, $last_time, $links, 20, $company_id, true); getEventLinks($first_time, $last_time, $links, 20); $minical->setEvents($links); echo '<table class="std" cellspacing="0" cellpadding="0" border="0" width="100%"><tr>';
/* PUBLIC $Id: calendar.php,v 1.7 2006/04/10 15:34:24 Attest sw-libre@attest.es Exp $ */ /* PUBLIC $Id: calendar.php,v 1.6 2005/04/03 19:33:48 gregorerhardt Exp $ */ require_once "{$baseDir}/classes/ui.class.php"; require_once "{$baseDir}/modules/calendar/calendar.class.php"; $callback = isset($_GET['callback']) ? $_GET['callback'] : 0; $date = dpGetParam($_GET, 'date', null); $prev_date = dpGetParam($_GET, 'uts', null); // if $date is empty, set to null $date = $date !== '' ? $date : null; $this_month = new CDate($date); $uistyle = $AppUI->getPref('UISTYLE') ? $AppUI->getPref('UISTYLE') : $dPconfig['host_style']; ?> <a href="javascript: void(0);" onClick="clickDay('', '');">borrar fecha</a> <?php $cal = new CMonthCalendar($this_month); $cal->setStyles('poptitle', 'popcal'); $cal->showWeek = false; $cal->callback = $callback; $cal->setLinkFunctions('clickDay'); if (isset($prev_date)) { $highlights = array($prev_date => "#FF8888"); $cal->setHighlightedDays($highlights); $cal->showHighlightedDays = true; } echo $cal->show(); ?> <script language="javascript"> /** * @param string Input date in the format YYYYMMDD * @param string Formatted date */