public function __construct($date = null) { parent::__construct($date); trigger_error("CMonthCalendar has been deprecated in v3.0 and will be removed by v4.0. Please use w2p_Output_MonthCalendar instead.", E_USER_NOTICE); }
<td> <a href="<?php echo '?m=events&a=year_view&date=' . $next_year; ?> "><img src="<?php echo w2PfindImage('next.gif'); ?> " alt="next" title="next" /></a> </td> </tr> </table> </td> </tr> </table> <?php $minical = new w2p_Output_MonthCalendar($date); $minical->setStyles('minititle', 'minical'); $minical->showArrows = false; $minical->showWeek = true; $minical->clickMonth = true; $minical->setLinkFunctions('clickDay', 'clickWeek'); $s = ''; for ($j = 0; $j < 3; $j++) { $s .= '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>'; $s .= '<td valign="top" align="center" width="20%"> </td>'; for ($i = 0; $i <= 3; $i++) { // prepare time period for minical'events' $first_time = new w2p_Utilities_Date($date); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($date);
/* $Id$ $URL$ */ if (!defined('W2P_BASE_DIR')) { die('You should not call this file directly.'); } $callback = isset($_GET['callback']) ? w2PgetParam($_GET, 'callback', '') : 0; $date = w2PgetParam($_GET, 'date', null); $prev_date = w2PgetParam($_GET, 'uts', null); // if $date is empty, set to null $date = $date !== '' ? $date : null; $this_month = new w2p_Utilities_Date($date); $uistyle = $AppUI->getPref('UISTYLE') ? $AppUI->getPref('UISTYLE') : w2PgetConfig('host_style'); ?> <a href="javascript: void(0);" onclick="clickDay('', '');">clear date</a> <?php $cal = new w2p_Output_MonthCalendar($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" type="text/javascript"> /** * @param string Input date in the format YYYYMMDD * @param string Formatted date
</table> <?php // tabbed information boxes $tabBox = new CTabBox('?m=events&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), W2P_BASE_DIR . '/modules/events/', $tab); $tabBox->add('vw_day_events', 'Events'); $tabBox->add('vw_day_tasks', 'Tasks'); $tabBox->show(); ?> </td> <?php if ($w2Pconfig['cal_day_view_show_minical']) { ?> <td valign="top" width="175"> <?php $minical = new w2p_Output_MonthCalendar($this_day); $minical->setStyles('minititle', 'minical'); $minical->showArrows = false; $minical->showWeek = false; $minical->clickMonth = true; $minical->setLinkFunctions('clickDay'); $first_time = new w2p_Utilities_Date($minical->prev_month); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($minical->prev_month); $last_time->setDay($minical->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, true); $minical->setEvents($links);
public function __construct($date = null) { parent::__construct($date); }
} $user_filter = $event_filter == 'my' ? $AppUI->user_id : 0; $links = getTaskLinks($first_time, $last_time, array(), 20, $company_id, false, $user_filter); $links += getEventLinks($first_time, $last_time, array(), 20); $hooks = new w2p_System_HookHandler($AppUI); $hooks->links = $links; $links = $hooks->calendar_links(); // create the main calendar $cal = new w2p_Output_MonthCalendar($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 w2p_Output_MonthCalendar($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 = getTaskLinks($first_time, $last_time, array(), 20, $company_id, true); $links += getEventLinks($first_time, $last_time, array(), 20); $minical->setEvents($links); echo '<table class="std"><tr>';