$first_time = new w2p_Utilities_Date($date); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($date); $last_time->setDay($date->getDaysInMonth()); $last_time->setTime(23, 59, 59); $links = array(); // assemble the links for the tasks // assemble the links for the events //Pedro A. getTaskLinks($first_time, $last_time, $links, 20, $company_id, true); getEventLinks($first_time, $last_time, $links, 20, true); $minical->setEvents($links); $minical->setDate($date); $s .= '<td valign="top" align="center"> </td>'; $s .= '<td valign="top" align="center" width="200">' . $minical->show() . '</td>'; $date->addMonths(1); } $s .= '<td valign="top" align="center" width="20%"> </td>'; $s .= '</tr></table>'; } echo $s; ?> <table width="100%" class="minical"> <tr> <td valign="top" align="center" width="20%"> </td> <td nowrap="nowrap"><?php echo $AppUI->_('Key'); ?> :</td> <td> </td>
$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); $minical->setDate($minical->prev_month); echo '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>'; echo '<td align="center" >' . $minical->show() . '</td>'; echo '</tr></table><hr noshade size="1">'; $first_time = new w2p_Utilities_Date($minical->next_month); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($minical->next_month); $last_time->setDay($minical->next_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); $minical->setDate($minical->next_month); echo '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>'; echo '<td align="center" >' . $minical->show() . '</td>'; echo '</tr></table><hr noshade size="1">';
$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 */ function clickDay( idate, fdate ) { window.opener.<?php echo $callback; ?> (idate,fdate); window.close(); } </script> <table border="0" cellspacing="0" cellpadding="3" width="100%">
$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>'; echo '<td valign="top" align="center" width="220">' . $minical->show() . '</td>'; echo '<td valign="top" align="center" width="75%"> </td>'; $minical->setDate($cal->next_month); $first_time = new w2p_Utilities_Date($cal->next_month); $first_time->setDay(1); $first_time->setTime(0, 0, 0); $last_time = new w2p_Utilities_Date($cal->next_month); $last_time->setDay($cal->next_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, true); $minical->setEvents($links); echo '<td valign="top" align="center" width="220">' . $minical->show() . '</td>'; echo '</tr></table>'; ?> </td></tr></table>