diff --git a/calendar/day.php b/calendar/day.php index 363263d284..26989d2da2 100644 --- a/calendar/day.php +++ b/calendar/day.php @@ -44,15 +44,7 @@ $thisyear = $year; } - $now = $phpgw->calendar->splitdate(mktime (2, 0, 0, $thismonth, $thisday, $thisyear)); - - $next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth,$thisday + 1,$thisyear)); - - $month_ago = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,$thisday,$thisyear)); - - $prev = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,1,$thisyear)); - - $month_ahead = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth + 1,$thisday,$thisyear)); + $now = $phpgw->calendar->splitdate(mktime (2, 0, 0, $thismonth, $thisday, $thisyear)); if ($friendly) { echo ""; @@ -60,112 +52,51 @@ ?> - -
- - - + +
"> - +
+
+ + + - -
+ "> + - - -"> -
+ +
+ ">
common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]); ?> -
-
- - - - + -
"> - - calendar->print_day_at_a_glance($now); ?> + + + +
+ + + + +
"> + + calendar->print_day_at_a_glance($now); ?> + + +
+
+
+calendar->pretty_small_calendar($now["day"],$now["month"],$now["year"],"day.php"); ?>
-
-
- -
- -
- - - - - - - -"; - if ($WEEK_START == 0) - echo ""; -for ($i = 1; $i < 7; $i++) { - echo ""; -} -if ($WEEK_START == 1) - echo ""; -echo "\n"; - -// generate values for first day and last day of month -$monthstart = mktime(2, 0, 0, $thismonth, 1, $thisyear); -$monthend = mktime(2, 0, 0, $thismonth + 1, 0, $thisyear); - -if ($WEEK_START == "1") - $wkstart = get_monday_before($thisyear, $thismonth, 1) + 7200; -else - $wkstart = get_sunday_before($thisyear, $thismonth, 1) + 7200; - -$wkend = $wkstart + (3600 * 24 * 7); - -for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += (24 * 3600 * 7)) { - for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += (24 * 3600 * 7)) { - echo "\n"; - for ($j = 0; $j < 7; $j++) { - $date = $i + ($j * 24 * 3600); - if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) { - if (date("Ymd", $date) == date("Ymd", $now)) - echo "\n"; - } else { - print "\n"; - } - } - echo "\n"; - } -} -?> - -
" CLASS="monthlink"><" CLASS="monthlink">>
" . - -substr($weekday_names[0], 0, 2) . "" . - substr($weekday_names[$i], 0, 2) . "" . - substr($weekday_names[0], 0, 2) . "
"; - else - echo ""; - echo ""; - echo "link("day.php","date=".date("Ymd",$date)); - echo "\" CLASS=\"monthlink\">" . - date("d", $date) . " 
-
-
- -
- "; - echo $phpgw->calendar->display_small_month($prev["month"],$prev["year"],True,"edit_entry.php"); -// } + echo ""; + echo $phpgw->calendar->pretty_small_calendar($thisday,$prev["month"],$prev["year"],"edit_entry.php"); + echo ""; ?> @@ -85,10 +84,9 @@ ?> "; - echo $phpgw->calendar->display_small_month($next["month"],$next["year"],True,"edit_entry.php"); -// } + echo ""; + echo $phpgw->calendar->pretty_small_calendar($thisday,$next["month"],$next["year"],"edit_entry.php"); + echo ""; ?>