月曆

STYLE TYPE="text/css">
a{text-decoration:none}
<!–
BODY {
font-size: 12px;
color:gray;
text-decoration: none;
font-family: Arial, Verdana, Helvetica, sans-serif;
SCROLLBAR-FACE-COLOR: #fcfcd8;
SCROLLBAR-HIGHLIGHT-COLOR: #fcfcd8;
SCROLLBAR-SHADOW-COLOR: #fcd8b4;
SCROLLBAR-3DLIGHT-COLOR: #fcd890;
SCROLLBAR-ARROW-COLOR: #fcd800;
SCROLLBAR-TRACK-COLOR: #fcfcd8;
SCROLLBAR-DARKSHADOW-COLOR: #fcd8b4;
SCROLLBAR-BASE-COLOR: #fcfcd8}
A:link { font-size: 12px; color=#66ccff;}
A:alink { font-size: 12px; color=#66ccff;}
A:visited { font-size: 12px; color=#333333;}
A:hover{ font-size: 12px; color=#fcd800; text-decoration: underline overline}
TABLE {
font-size: 12px
}

TD {
font-size: 12px
}
–>
</STYLE>
<?php
$y = date(“Y")
;?>
<table width="100%" border="0″ cellspacing="2″ cellpadding="1″>
<tr bgcolor="skyblue">
<td align="center" colspan="4″><font color="white"><?php echo $y." 年";?></font></td>
</tr>
<tr>
<?php
for ($m=1;$m<=12;$m++) {
$aa = (++$a % 4) ? " : ‘</tr><tr>’;
?>
<td align="center" valign="top" bgcolor="#ffffff">
<table width="100%" border="0″ cellspacing="1″ cellpadding="1″>
<tr>
<td bgcolor="#99FF66″ colspan="7″ align="center"><font color="white"><?php echo “$m 月";?></font></td>
</tr>
<tr align="center">
<td bgcolor="white"><font color="red">日</font></td>
<td bgcolor="white"><font color="#0099FF">一</font></td>
<td bgcolor="white"><font color="#0099FF">二</font></td>
<td bgcolor="white"><font color="#0099FF">三</font></td>
<td bgcolor="white"><font color="#0099FF">四</font></td>
<td bgcolor="white"><font color="#0099FF">五</font></td>
<td bgcolor="white"><font color="red">六</font></td>
</tr>
<tr>
<?php
for ($d=1;$d<=32;$d++) {
if(checkdate($m,$d,$y)=="1″){
$b = date (“w",mktime(0,0,0,$m,$d,$y));
if($d==1){$cc = str_repeat(“<td></td>",$b);} else {$cc = “";}
$bb = (++$b % 7) ? " : ‘</tr><tr>’;
if($b==1){$bg = “#FFFFCC";} else {$bg = “#FFFFCC";}
echo “$cc"."<td align=\"center\" bgcolor=\"$bg\">$d</td>"."$bb";
}
else{break;}
}
?>
</tr>
</table>
<?php
echo “</td>$aa";
}
?>
</td>
<td></td>
<td></td>
<td></td>

</tr>
</table>

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *