<% 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" '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" 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)) %>
농어촌청소년의 든든한 동반자가 되겠습니다.

행사/일정

Foundation for the Rural Youth

<%=year(request("dates"))%>. <%=int(month(request("dates")))%>

<% ' 주 가져오기..' 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)) 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 D = 1 to 7 i = i + 1 IF i = start_weeks then dday = 1 End IF IF 1 = i 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) d1 = int(dday) bg = "#FFFFFF" class1 = "day" background = "" bb = "" daytitle = "" IF datediff("d",date, now_leftdates) = 0 then bgcolors = "#FFFFE0" Else bgcolors = "#FFFFFF" End IF Select Case weekday(now_leftdates) Case 1 : bgbg = "FF0000" Case 7 : bgbg = "0000FF" Case else : bgbg = "666666" End Select IF chk_schedulkrs(m1, d1) <> "" then %> <% Else %> <% END IF dday = dday + 1 Else %> <% End IF Next Next %>
이번달의 달력
Sun Mon Tue Wed Thu Fri Sat
<%=dday%><%=dday%> 

<%=year(request("dates"))%>년 <%=int(month(request("dates")))%>월 <%=int(day(request("dates")))%>일

<% sql = "select idx, Title, Contents, ChkDate, Board_Etc1 from "&DBLeft&"_Board where C_idx="& admin_cidx &" and ChkDate = '"& request("dates") & "' order by ChkDate asc" rs.open sql,db,1 IF rs.eof or rs.bof then grc = -1 Else grs = rs.getrows grc = Ubound(grs,2) End IF rs.close db.close For i =0 to grc idx = grs(0,i) Title = grs(1,i) Contents = grs(2,i) ChkDate = grs(3,i) Board_Etc1 = grs(4,i) %>

<%=chk_view(Title)%> <%=dotDate(ChkDate) %> <%=Board_Etc1%>

<%=Replace(chk_view(Contents),Chr(13)&Chr(10),"
") %> <%IF cstr(session("siteadmin")) = "7" then%>
행사·일정 수정 행사·일정 삭제
<%End IF%>
<%Next%>

목록