59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
<!--#include virtual="/common/lib/dbcon.asp"-->
|
|
<!--#include virtual="/common/lib/func.asp"-->
|
|
<%
|
|
v_year = InputValue( request("p_year") )
|
|
v_month = InputValue( request("p_month") )
|
|
|
|
if v_year = "" then
|
|
intThisYear = Year(now)
|
|
else
|
|
intThisYear = v_year
|
|
End if
|
|
|
|
if v_month = "" then
|
|
intThisMonth = Right( "0" & Month(now), 2 )
|
|
else
|
|
intThisMonth = Right( "0" & v_month, 2 )
|
|
End if
|
|
|
|
intThisMonth2 = intThisMonth '//1~9숫자 앞에 0붙이기
|
|
|
|
|
|
|
|
gday = Right("0"&Day(now), 2) '//오늘날짜
|
|
datFirstDay = Weekday( DateSerial( intThisYear, intThisMonth, 1 ) ) '//요일 구하기 (num)
|
|
intLastDay = Day( DateSerial( intThisYear, intThisMonth+1, 1-1 ) ) '//마지막날 구하기
|
|
jucnt = Round( ( ( datFirstDay + intLastDay) / 7 ) + 0.5, 0 )
|
|
|
|
'cal = CInt(a_width) / 7
|
|
day1 = (-1 * datFirstDay)+2 '//날수1
|
|
|
|
For ju = 1 to jucnt '//주간 7개 돌리공..
|
|
%>
|
|
|
|
<tr>
|
|
<%
|
|
for i = 1 to 7
|
|
'//날짜계산
|
|
If day1 > 0 and day1 <= intLastDay then
|
|
cday = day1
|
|
|
|
nowdate = CDate( v_year & "-" & intThisMonth & "-" & cday )
|
|
If Date() <= nowdate Then
|
|
cday_str = "<a href='#select_data' style='font-weight:bold;' onclick=""selectDateTemp('" & v_year & "','" & intThisMonth & "','" & Right("0" & cday, 2) &"');"">" & cday & "</a>"
|
|
Else
|
|
cday_str = cday
|
|
End if
|
|
else
|
|
cday_str = ""
|
|
End If
|
|
%>
|
|
<td><%=cday_str%></td>
|
|
<%
|
|
day1 = day1 + 1
|
|
next
|
|
%>
|
|
</tr>
|
|
<%
|
|
Next
|
|
%> |