午夜剧场伦理_日本一道高清_国产又黄又硬_91黄色网战_女同久久另类69精品国产_妹妹的朋友在线

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

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

瀏覽:15日期: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://www.leifengta.com.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://www.leifengta.com.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
主站蜘蛛池模板: 久久久精品在线观看 | 99综合网 | 天堂岛av | 伊人网综合在线 | 欧美一级片免费在线观看 | 亚洲精品小说 | 四虎成人在线观看 | 国内激情视频 | 亚洲成人激情小说 | 成人aaa视频 | 中日韩欧美在线观看 | 精品欧美黑人一区二区三区 | 日韩一区二区在线播放 | 亚洲三级在线观看 | 亚洲天堂第一区 | 超碰丝袜 | 在线观看毛片网站 | 亚洲黄色在线看 | 超碰在线免费观看97 | aaa黄色片| 久久久精品久久久 | 九一在线免费观看 | 日本色网址| 亚洲日本黄色 | 日韩精品1 | 欧美三级一级 | 中文字幕有码在线 | 国产特黄 | 亚洲永久网站 | 亚洲视频国产精品 | 在线免费看av网站 | 一本到在线视频 | 一区二区在线免费观看 | 不卡中文字幕 | 99青青 | 亚洲综合成人网 | 亚洲综合网站 | 日日夜夜拍 | 午夜影视在线观看 | 欧美午夜精品久久久久久人妖 | 97综合视频|