日历程序
时间:2006-07-10 来源:apachephp
万年月历
if(!$year) {$year = date( 'Y');} // 逞绢坷绰 斥档啊 绝栏搁 扁夯蔼 瘤陛
if(!$month) {$month = date( 'm');} // 逞绢坷绰 崔捞 绝栏搁 扁夯蔼 瘤陛
$toyear = date('Y'); // 坷疵狼 斥档
$tomonth = date('m'); // 坷疵狼 崔
$today = date('d'); // 坷疵狼 老
/* 涝仿蔼 裹困 眉农 矫累*/
if($year>9999 or $year
alert('肋给等 楷措涝聪促. 0斥 ~ 9999斥 荤捞狼 斥档甫 涝仿窍绞矫夸.')
history.go(-1)
";
exit;
}
if($month>12 or $month
alert('肋给等 涝仿涝聪促. 1 ~ 12 荤捞狼 箭磊甫 涝仿窍绞矫夸.')
history.go(-1)
";
exit;
}
/* 涝仿蔼 裹困 眉农 场*/
while (checkdate($month,$date,$year)):
$date++;
endwhile;
/* 崔仿 惑窜 */
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " 日 \n";
echo " 一 \n";
echo " 二 \n";
echo " 三 \n";
echo " 四 \n";
echo " 五 \n";
echo " 六 \n";
echo " \n";
echo " \n";
/* 崔仿 个眉 */
while ($day$day \n";
$off = '01';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Monday'){
echo " $day \n";
$off= '02';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Tuesday'){
echo "  $day \n";
$off= '03';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Wednesday'){
echo "   $day \n";
$off= '04';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Thursday'){
echo "    $day \n";
$off= '05';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Friday') {
echo "     $day \n";
$off= '06';
}
elseif ($day == '01' and date( 'l', mktime(0,0,0,$month,$day,$year)) == 'Saturday') {
echo "      $day \n";
$off= '07';
}
else {
echo "$day \n";
}
$day++;
$off++;
if ($off>7) {
echo " \n";
$off= '01';
} else {
echo "";
}
endwhile;
for($i=$off ; $i  \n"; }
echo " \n";
echo " \n";
echo " 《01世界》 \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
/* PHP 场 */
?>
相关阅读 更多 +