* Licensed under the GNU GPL. For full terms see the file COPYING. * * Displays the main calendar page (month view). * * $Id$ */ require_once('calendar_data.php'); require_once('functions.php'); chdir('..'); require_once('../src/validate.php'); require_once('../functions/strings.php'); require_once('../functions/date.php'); require_once('../config/config.php'); require_once('../functions/page_header.php'); require_once('../src/load_prefs.php'); //display upper part of month calendar view function startcalendar() { global $year, $month, $day, $color; $prev_date = mktime(0, 0, 0, $month - 1, 1, $year); $act_date = mktime(0, 0, 0, $month, 1, $year); $next_date = mktime(0, 0, 0, $month + 1, 1, $year); $prev_month = date( 'm', $prev_date ); $next_month = date( 'm', $next_date); $prev_year = date( 'Y', $prev_date); $next_year = date( 'Y', $next_date ); echo "
<< ".($year-1)." | \n". "< " . date_intl( 'M', $prev_date). " | \n". "" . date_intl( 'F Y', $act_date ) . " | \n" . "" . date_intl( 'M', $next_date) . " > | ". "".($year+1)." >> | ". '||
---|---|---|---|---|---|---|
" . _("Sunday") . ' | '. "" . _("Monday") . ' | '. "" . _("Tuesday") . ' | '. "" . _("Wednesday") . ' | '. "" . _("Thursday") . ' | '. "" . _("Friday") . ' | '. "" . _("Saturday") . ' | '. '
\n" .
" ";
echo(($cdate==$todayis) ? "[ " . _("TODAY") . " ] " : "");
echo "$aday ";
} else {
echo " | \n".
" ";
}
if (isset($calendardata[$cdate])){
$i=0;
while ($calfoo = each($calendardata[$cdate])) {
$calbar = $calendardata[$cdate][$calfoo[key]];
echo ($calbar[priority]==1) ? "$calbar[title] \n" : "$calbar[title] \n"; $i=$i+1; if($i==2){ break; } } } echo "\n | \n";
$aday++;
}
echo '|||||
\n". " \n". " |