* 日歷
*
* Copyright(c)
* To contact the author write to {@link mailto:shenkong@php
* @author 陳毅鑫(深空)
*/
if (function_exists(
date_default_timezone_set(
}
$date = isset($_GET[
$date = getdate(strtotime($date));
$end = getdate(mktime(
$start = getdate(mktime(
$pre = date(
$next = date(
$html =
$html
$html
$html
$html
$html
$arr_tpl = array(
$date_arr = array();
$j =
for ($i =
if (!isset($date_arr[$j])) {
$date_arr[$j] = $arr_tpl;
}
$date_arr[$j][($i+$start[
if ($date_arr[$j][
$j++;
}
}
foreach ($date_arr as $value) {
$html
foreach ($value as $v) {
if ($v) {
if ($v == $date[
$html
} else {
$html
}
} else {
$html
}
}
$html
}
$html
echo $html;
From:http://tw.wingwit.com/Article/program/PHP/201311/20942.html