반응형
require_once "Calendar/Month/Weekdays.php";
// 달력그리기
$Month = & new Calendar_Month_Weekdays(date("Y"), date("m"),0);
$Month->build();
$Month = & new Calendar_Month_Weekdays(date("Y"), date("m"),0);
$Month->build();
echo "<table>";
while ($Day = & $Month->fetch()) {
$cal_viewday=$Day->thisDay();
if(date("d",$viewday)==$cal_viewday) $bgcolor=" bgcolor=F3F3F3 ";
elseif(date("Ymd")==date("Ym".$cal_viewday,$viewday)) $bgcolor=" bgcolor=C2C6CA ";
else $bgcolor="";
if($Day->isFirst()) echo "<tr>";
while ($Day = & $Month->fetch()) {
$cal_viewday=$Day->thisDay();
if(date("d",$viewday)==$cal_viewday) $bgcolor=" bgcolor=F3F3F3 ";
elseif(date("Ymd")==date("Ym".$cal_viewday,$viewday)) $bgcolor=" bgcolor=C2C6CA ";
else $bgcolor="";
if($Day->isFirst()) echo "<tr>";
if($Day->isEmpty()) echo " <td width=22 height=20 align=center><font size='-2'></font></td>";
else echo " <td width=22 height=20 align=center $bgcolor><a href=''><font size='-2' color=000000>".$cal_viewday."</font></a></td>";
if($Day->isLast())
echo "</tr>";
}
echo "</table>";
else echo " <td width=22 height=20 align=center $bgcolor><a href=''><font size='-2' color=000000>".$cal_viewday."</font></a></td>";
if($Day->isLast())
echo "</tr>";
}
echo "</table>";
반응형
'Story > php' 카테고리의 다른 글
다날 핸드폰 결제 모듈 결제 취소방법 (linux + php) (0) | 2009.06.04 |
---|---|
utf-8 메일 발송 (0) | 2009.01.31 |
apache + php 환경에서 mssql connection 하기 (0) | 2009.01.19 |
아이디만들때 제약사항 체크 (0) | 2009.01.03 |
PEAR 를 이용하여 달력 만들기 (0) | 2009.01.03 |