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"; ?>
" class="prev" href="datesel.php?form=&fday=&fmonth=&fyear=&date="> " /> |
"class="next" href="datesel.php?form=&fday=&fmonth=&fyear=&date="> " /> |
" . weekday_short_name ( 0 ) . " | \n"; for ( $i = 1; $i < 7; $i++ ) { echo "" . weekday_short_name ( $i ) . " | \n"; } if ( $WEEK_START == 1 ) echo "" . weekday_short_name ( 0 ) . " | \n"; 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 "||
| " . date ( "j", $date ) . " | \n"; } else { echo "\n"; } } echo " | |||||