0 ) { $thisyear = substr ( $date, 0, 4 ); $thismonth = substr ( $date, 4, 2 ); } else { $thismonth = date("m"); $thisyear = date("Y"); } $next = mktime ( 3, 0, 0, $thismonth + 1, 1, $thisyear ); $nextyear = date ( "Y", $next ); $nextmonth = date ( "m", $next ); $nextdate = date ( "Ym", $next ) . "01"; $prev = mktime ( 3, 0, 0, $thismonth - 1, 1, $thisyear ); $prevyear = date ( "Y", $prev ); $prevmonth = date ( "m", $prev ); $prevdate = date ( "Ym", $prev ) . "01"; ?>
"; if ( $WEEK_START == 0 ) echo ""; for ( $i = 1; $i < 7; $i++ ) { echo ""; } if ( $WEEK_START == 1 ) echo ""; echo "\n"; if ( $WEEK_START == "1" ) $wkstart = get_monday_before ( $thisyear, $thismonth, 1 ); else $wkstart = get_sunday_before ( $thisyear, $thismonth, 1 ); $monthstart = mktime ( 3, 0, 0, $thismonth, 1, $thisyear ); $monthend = mktime ( 3, 0, 0, $thismonth + 1, 0, $thisyear ); 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 ) ) { echo ""; } else { echo "\n"; } } echo "\n"; } ?>
<?php etranslate("> <?php etranslate(">
" . weekday_short_name ( 0 ) . "" . weekday_short_name ( $i ) . "" . weekday_short_name ( 0 ) . "
" . date ( "d", $date ) . "