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

您的位置:首頁技術文章
文章詳情頁

PHP自動生成月歷代碼

瀏覽:3日期: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>'); }}?>

標簽: PHP
主站蜘蛛池模板: 国产日韩精品一区二区 | va在线| 国内精品视频在线观看 | 91观看 | 亚洲精品乱码久久久久v最新版 | 国产香蕉视频 | 日韩中文字幕久久 | 天堂视频免费 | 日本亚洲精品成人欧美一区 | 久久精品亚洲精品国产欧美 | 91福利影院 | 国产精品成人69xxx免费视频 | 日韩中文字幕网 | 91亚洲国产精品 | 国产精品不卡一区 | 最近中文字幕免费 | 狠狠躁夜夜躁人人爽天天高潮 | 亚洲成人三区 | 免费高清av| 交专区videossex农村 | 国产日韩亚洲欧美 | 欧美自拍第一页 | 国产成人99久久亚洲综合精品 | 欧美性猛片aaaaaaa做受 | 九色一区 | 国内自拍偷拍 | 日韩视频一区 | 青青久草 | 亚洲高清av在线 | 国产成人免费视频网站高清观看视频 | 在线观看免费av网 | 99视频在线免费观看 | 99re在线视频观看 | 欧美久久久久 | 日韩精品久久一区二区三区 | 日韩欧美一级片 | 奇米av| 亚洲国产一区二区三区在线观看 | 午夜影院在线免费观看视频 | 精品二区 | 日本久久久一区二区三区 |