Example #1
0
    }
}
// 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>';
echo '<td valign="top" align="center" width="220">' . $minical->show() . '</td>';
echo '<td valign="top" align="center" width="75%">&nbsp;</td>';
$minical->setDate($cal->next_month);
$first_time = new w2p_Utilities_Date($cal->next_month);
Example #2
0
echo w2PfindImage('next.gif');
?>
" width="16" height="16" alt="next" title="next" border="0"></a>
				                </td>
				            </tr>
				        </table>
				    </td>
				</tr>
			</table>
			<?php 
$minical = new CMonthCalendar($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%">&nbsp;</td>';
    for ($i = 0; $i <= 3; $i++) {
        // prepare time period for minical'events'
        $first_time = new CDate($date);
        $first_time->setDay(1);
        $first_time->setTime(0, 0, 0);
        $last_time = new CDate($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