av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

PHP自動(dòng)生成月歷代碼

瀏覽:4日期:2023-12-26 10:31:10

<?php/*; Function Written by Nelson Neoh @3/2004.; For those who wants to utilize this code, please do not remove this remark.; If you have done any enhancement to this code, please post the copy at http://www.dev-club.com PHP board.; Thank you.

Function usage: calendar(Month,Year)*/ function calendar($MM,$YYYY){ if($MM=='') $MM = date('m'); if($YYYY=='') $YYYY = date('Y'); if(checkdate($MM,1,$YYYY)){ $stringDate = strftime('%d %b %Y',mktime (0,0,0,$MM,1,$YYYY)); $days = strftime('%d',mktime (0,0,0,$MM+1,0,$YYYY)); $firstDay = strftime('%w',mktime (0,0,0,$MM,1,$YYYY)); $lastDay = strftime('%w',mktime (0,0,0,$MM,$days,$YYYY)); $printDays = $days; $preMonth = strftime('%m',mktime (0,0,0,$MM-1,1,$YYYY)); $preYear = strftime('%Y',mktime (0,0,0,$MM-1,1,$YYYY)); $nextMonth = strftime('%m',mktime (0,0,0,$MM+1,1,$YYYY)); $nextYear = strftime('%Y',mktime (0,0,0,$MM+1,1,$YYYY)); print('<table border='1' cellpadding='1' cellspacing='1'>'); print('<tr><th valign='top'><a href='http://m.4tl426be.cn/bcjs/21074.html'.$_SERVER['PHP_SELF'].'?NB='.$_GET['NB'].'&MM='.$preMonth.'&YY='.$preYear.''>P</a></th>'); print('<th colspan='5' valign='top'>'.strftime('%b %Y',mktime (0,0,0,$MM,1,$YYYY)).'</th>'); print('<th valign='top'><a href='http://m.4tl426be.cn/bcjs/21074.html'.$_SERVER['PHP_SELF'].'?NB='.$_GET['NB'].'&MM='.$nextMonth.'&YY='.$nextYear.''>N</a></th></tr>'); print('<tr style='font-family: Verdana; font-size:x-small'>'); print('<th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr>'); $currentDays = 1; for($a=1;$a<=5;$a++){ print('<tr valign='top' style='font-family: Verdana; font-size:x-small'>'); $diffDays = $firstDay-$lastDay; if($firstDay>$lastDay && $currentDays ==1 && ($diffDays<>1)){ for($x=$lastDay;$x>=0;$x--){ $printDays = $days-$x; print('<td>$printDays</td>'); } for($z=1;$z<$firstDay-$lastDay;$z++){ print('<td>&nbsp;</td>'); } for($y=$firstDay;$y<7;$y++){ print('<td>$currentDays</td>'); $currentDays++; } } elseif($firstDay!=0 && $currentDays==1){ for($z=1;$z<=$firstDay;$z++){ print('<td>&nbsp;</td>'); } for($y=$firstDay;$y<7;$y++){ print('<td>$currentDays</td>'); $currentDays++; } } else { for($u=1;$u<=7 && $currentDays<=$days;$u++){ print('<td>$currentDays</td>'); $currentDays++; } } print('</tr>'); } print('</table>'); }}?>

標(biāo)簽: PHP
主站蜘蛛池模板: 国产一极毛片 | 亚洲欧美中文日韩在线v日本 | 无码一区二区三区视频 | 欧美亚洲网站 | 亚洲欧美一区二区三区在线 | 亚洲一区视频在线 | 玖玖视频网 | av中文字幕在线观看 | 四虎影 | 中文字幕免费视频 | 国家一级黄色片 | 日韩久久成人 | 97久久超碰| 精品日韩一区 | 日韩在线不卡视频 | 欧美国产一区二区 | 中文字幕人成人 | 日韩av高清在线 | 久久精品黄色 | 在线伊人 | 亚洲草草视频 | 国产综合久久 | 国产视频久久 | 欧美视频一区 | 亚洲免费观看视频 | 婷婷综合网 | 一区二区欧美在线 | 一级黄片一级毛片 | 又爽又黄axxx片免费观看 | 亚洲一区二区久久久 | 国产成人一区二区 | 超碰成人免费观看 | 夜夜爽99久久国产综合精品女不卡 | 久久久久中文字幕 | 国产一区亚洲二区三区 | 国产在线精品一区二区三区 | 91精品国产一区二区三区香蕉 | 午夜影视免费片在线观看 | 日韩欧美国产精品 | 91在线色视频| 午夜免费网站 |