-
-
header("content-type:text/html;charset=utf-8");
- ? >
-
-
- 表格{
- 邊距:0px;
- 內邊距:0px;
- }
- td{
- 文字對齊:中心;
- 寬度:80px;
- }
- 樣式>
-
}
- 樣式>
-
}
- 樣式>
-
}
- 樣式>
-
}
- 樣式>
-
/**
- * 簡單實用的php日曆程式碼
- * edit: bbs.it-home.org
- */
- if(!emptyempty($_GET)){
- $year = $_GET['year'];
- $month = $_GET['month'];
- }
- if(emptyempty($year)){
- $year = date('Y');
- }
- if(emptyempty($month)){
- $month = date('m');
- }
- $start_weekday = date('w',mktime(0,0,0,$month,1,$year));
- //echo $start_weekday ;
- $days = date('t',mktime(0,0,0,$月,1,$年));
- //回顯$days;
- $week = array('星期日','星期一','星期二','星期三','星期四','星期五','星期六');
- $i = 0;
- $k = 1;
- $j = 0;
- echo '';
- echo '
'.$year.'年'. $month.'月'.' | '; - 回顯'
'; - for($i = 0;$i echo '
'.$week[$i].' | ';
- }
- echo '
';
- 回顯'
'; - for($j = 0;$j echo '
'.$j.' | ; ';
- }
- while($k if($k == date('d')){
- echo '
'.$k .' | ';
- }else{
- echo '
'.$k.' | ';
- }
- if(($j+1) % 7 == 0){
- echo '
'; - }
- $j++;
- $k++;
- }
- while($j % 7 ! = 0){
- echo '
'.$j.' | ';
- $j++;
- }
- echo '
';
-
- 回顯'
'; - echo "
".' | ' ;
- echo "
".' td>'; - echo '
'; - echo '';
- echo '';
- for($start_year = 1970;$start_year echo ''.$start_year.' ';
- }
- echo ''.'年';
- echo '';
- for($start_month = 1;$start_month echo ''.$start_month.'' ;
- }
- echo '' ;
- 回顯「月」;
- echo '';
- echo '';
- 回顯'
| ';
- echo "
".'>>'.' | ' ;
- echo "
".'>'.' | ';
- 回顯'
|
';
- echo '
|