<% db.open dbcon admin_cidx = 13 ' 행사일정 db2.open dbcon dates = chk_insert(request("dates")) IF dates = "" then dates = Date End IF preyear = dateadd("m",-12, dates) nextyear = dateadd("m",12, dates) premonth = dateadd("m",-1, dates) nextmonth = dateadd("m",1, dates) schedul1 = left(dates,7)&"-01" '@[20120529] 마지막날짜 @' 'schedul2 = dateadd("m", 1, dateadd("d",-1, schedul1)) schedul2 = dateadd("d",-1,dateadd("m", 1, schedul1)) Dim chk_schedulkrs(12,31) Dim chk_schedultitles(12,31) '@ 달력 일정 가져오기 @' sql = "select idx, ChkDate, Title from "&DBLeft&"_Board where C_idx="& admin_cidx &" and ChkDate between '"& schedul1 & "' and '"& schedul2 & "' order by ChkDate asc" '@[20120529] @' 'response.write "sql= "&sql&"
" rs2.Open sql, db2, 1 if rs2.EOF or rs2.BOF Then schedulkrc = -1 else schedulkrs = Rs2.GetRows schedulkrc = Ubound(schedulkrs,2) For i = 0 to schedulkrc IF i = 0 and yy ="" then dates = schedulkrs(1,0) End IF ' 첫날 가져오기 m1 = int(mid(schedulkrs(1,i),6,2)) d1 = int(right(left(schedulkrs(1,i),10),2)) IF chk_schedulkrs(m1, d1) <>"" then chk_schedulkrs(m1, d1) = chk_schedulkrs(m1, d1) & "
" & schedulkrs(2,i) '"Y" Else chk_schedulkrs(m1, d1) = schedulkrs(2,i) '"Y" End IF 'response.Write m1&"-"&d1 &"="&chk_schedulkrs(m1, d1)&"
" Next end if rs2.close db2.close YYYY = left(dates,4) MM = int(Mid(dates,6,2)) DD = int(right(dates,2)) db.close %>
농어촌청소년의 든든한 동반자가 되겠습니다.

행사/일정

Foundation for the Rural Youth

전달 <%=MM%>월 다음달 <%IF session("siteadmin") = "7" then%>행사·일정 등록<%End IF%>
<% ' 주 가져오기..' last_ymd = dateadd("d",-1,dateadd("m", 1, schedul1)) ' 해당 월의 마지막날짜.. first_ymd = schedul1 ' 해당 월의 첫 날짜 temp_ymd = DateAdd( "d", 7 - WeekDay(first_ymd), first_ymd) ' 해당 ymd = DateAdd( "d", 7 - WeekDay(last_ymd), last_ymd) ' 해당월의 첫 날짜의 weekday와 같은 익월 첫 날짜 For Weeks = 1 To 7 If temp_ymd >= ymd Then Exit For End If temp_ymd = DateAdd( "d", 7, temp_ymd) Next start_weeks = weekday(first_ymd) dday = 0 ' 일자' i = 0 ' 일수....??' lastday = int(right(last_ymd,2)) chk_m1 = int(month(dates)) 'response.Write "last_ymd="&last_ymd&"
first_ymd="&first_ymd&"
temp_ymd="&temp_ymd&"
ymd="&ymd&"
Weeks ="&Weeks&"
start_weeks ="&start_weeks&"
lastday="&lastday For W = 1 to Weeks For DDDD = 1 to 7 iii = iii + 1 IF iii = start_weeks then dday = 1 End IF IF 1 = iii mod 7 then response.Write "" End IF IF dday >= 1 and dday =< lastday then now_leftdates = left(dates,8)& right("0"&dday,2) MM = mid(now_leftdates,6,2) chk_d1 = int(dday) bg = "#FFFFFF" class1 = "day" background = "" bb = "" daytitle = "" IF datediff("d",date, now_leftdates) = 0 then classToday = "today" Else classToday = "" End IF lunar = "" IF dday=5 or dday=15 or dday=25 then lunar = gf_lun2sol(year(now_leftdates), month(now_leftdates), day(now_leftdates), 11) End If %> <% dday = dday + 1 Else %> <% End IF Next Next %>
이번달의 행사일정 달력
Sun Mon Tue Wed Thu Fri Sat
<%IF chk_schedulkrs(chk_m1, chk_d1) <> "" then %>

<%=dday%>

<%=lunar%>

<%=chk_schedulkrs(chk_m1, chk_d1)%>

<% Else %>

<%=dday%>

<%=lunar%> <% End If %>