<% Set RS = Server.CreateObject("ADODB.Recordset") %> ´Þ·Â <% if request("year") > 0 then intThisYear = cint(request("year"))' ""³âµµ ¾ò±â else intThisYear = Year(date()) end if if request("month") > 0 then intThisMonth = cint(request("month"))' ""¿ù ¾ò±â else intThisMonth = Month(date) end if %>
Today: <% strMonthName = MonthName(intThisMonth) '""´Þ À̸§ ¾ò±â datFirstDay = DateSerial(intThisYear, intThisMonth, 1) ' ´ç¿ù 1ÀÏ ³¯Â¥ Æ÷¸Ë ¸¸µç´Ù. intFirstWeekDay = WeekDay(datFirstDay, vbSunday) ' ´ç¿ù 1ÀÏÀÇ ¿äÀÏÀ» ¾ò´Â´Ù. ' ÇØ´ç¿ùÀÇ ¸¶Áö¸· ³¯ÀÚ¸¦ ±¸ÇÑ´Ù.(28ÀÏ ºÎÅÍ 31ÀÏ Áß¿¡ ÇϳªÀε¥ ½Ã½ºÅÛ¿¡¼­ Á¦°øÇÏ´Â ³¯Â¥ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© ±¸ÇÑ´Ù) intLastDay = 28 For i = 29 To 31 step 1 'up to the 31st ÇϷ羿 Áõ°¡ ½ÃÅ°¸ç ³¯Â¥ Æ÷¸ËÀ» ¸¸µé¾î °°Àº´ÞÀΰ¡ °Ë»çÇÑ´Ù. calMonth = Month(DateSerial(intThisYear,intThisMonth, i)) 'response.write calMonth & "
" 'response.write intThisMonth & "
" If cint(calMonth) = cint(intThisMonth) Then ' °°Àº ´ÞÀΰæ¿ì ¸¶Áö¸· ³¯Â¥ ¼³Á¤ÇÏ°í ·çÇÁ °è¼Ó intLastDay = i 'response.write intLastDay & "
" else exit for '°°Àº´ÞÀÌ ¾Æ´Ï¸é for¹®À» ³¡³½´Ù. End If Next intPrintDay = 1 '·çÇÁ¸¦ µ¹±â À§ÇÑ º¯¼ö %>
<% While intPrintDay <= intLastDay %> <% For intLoopDay = 1 To 7 ' If intFirstWeekDay > 1 Then 'ù³¯ÀÇ ¿äÀÏÀÌ ÀÏÄ¡ÇÒ¶§ ±îÁö ""-""·Î ä¿ò %> <% intFirstWeekDay = intFirstWeekDay - 1 Else If intPrintDay > intLastDay Then %> <% Else thisDate = DateSerial(intThisYear,intThisMonth, intPrintDay)%> <% 'ÀÏÁ¤ °ü¸®¸¦ À§Çؼ­ µðºñ¿¡ ¿¬°áÇÏ°í ÇØ´ç ³¯Â¥ÀÇ ¸Þ¸ð¸¦ Àд´Ù. sql = "select * from diary where date='" & thisDate & "'" RS.Open sql, Conn,3 if rs.eof then 'ÇØ´ç ³¯Â¥ÀÇ ¼¿ÀÇ ¹è°æ»öÀ» ÁöÁ¤ÇÑ´Ù. %> <% End If %> <% intPrintDay = intPrintDay + 1 End If %> <% Next %> <% Wend %>
<% if intThisMonth > Month(date) then %>  <  <% else %>  <  <% end if %> <% = intThisYear %> ”N <% = intThisMonth %> ŒŽ <% if intThisMonth = Month(date) then %>  >  <% else %>  >  <% end if %>
SUN MON TUE WED THU FRI SAT
-- <%else%> "> <%end if%> <% if rs.eof then 'ÀÔ·ÂÇÑ °ÍÀÌ ¾øÀ¸¸é ¿äÀÏ¿¡ µû¶ó¼­ »öÀ» ÆÇ´ÜÇÑ´Ù. if intLoopDay = 1 then 'ÀÏ¿äÀÏÀÌ¸é »¡°£»ö%>
<%=intPrintDay%>
<% elseif intLoopDay = 7 then 'Åä¿äÀÏÀ̸é ÆĶõ»ö%>
<%=intPrintDay%>
<% else 'ÁÖÀÏÀÌ¸é °ËÁ¤»ö%>
<%=intPrintDay%>
<% end if '¿äÀÏÆÇ´Ü ³¡%> <% elseif rs("holiday") = false then '±â·ÏÀÌ ÀÖ°í ÈÞÀÏÀÌ ¾Æ´Ï¸é À§¿Í °°´Ù if intLoopDay = 1 then 'ÀÏ¿äÀÏÀÌ¸é »¡°£»ö%>
<%=intPrintDay%>
<% elseif intLoopDay = 7 then 'Åä¿äÀÏÀ̸é ÆĶõ»ö%>
<%=intPrintDay%>
<% else 'ÁÖÀÏÀÌ¸é °ËÁ¤»ö%>
<%=intPrintDay%>
<% end if '¿äÀÏÆÇ´Ü ³¡%> <% else 'ÈÞÀÏÀ̸é%>
<%=intPrintDay%>
<% end if 'ÈÞÀÏÆÇ´Ü ³¡%> <% if not rs.eof then response.write rs("title1") & "
" ' ¿©±â¿¡ ÇØ´ç ÀÏÀÚÀÇ ³»¿ëÀ» ÇÁ¸°Æ®ÇÑ´Ù response.write rs("title2") & "
" response.write rs("title3") & "
" response.write rs("title4") end if RS.close %>
<% set rs=nothing conn.close set conn=nothing %>