<% '////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ' 'PAGE_TITLE : info_examnews.htm 'Author : 최강식 'WRITE_DATE : 2005-11-28 'MODIFY_DATE : 'COMMANT : 수험정보중 이그잼뉴스 리스트를 보여준다 ' '/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// '==================================================================================== ' INITIALIZATION '==================================================================================== '데이터베이스 오픈 Call dbOpen() '==================================================================================== '페이지 변수 선언 '==================================================================================== Dim gotoPage '이동 페이지 Dim RecordCount '총레코드수 Dim Total_page '총페이지수 Dim blockSize '페이지묶음사이즈 blockSize = 10 '페이지 사이즈 Dim PageSize PageSize = 20 '==================================================================================== '검색 변수 선언 '==================================================================================== Dim SearchMode, SearchString Dim SearchQuery '==================================================================================== ' SECURITY & AUTHORIZATION '==================================================================================== route=1:mNum=0:sNum=3 '==================================================================================== ' GET PARAMETERS & PARAMETER VALIDATION '==================================================================================== gotoPage = Trim(Request("gotoPage")) IF gotoPage = "" Then gotoPage = 1 END IF SearchMode = Trim(Request("SearchMode")) SearchString = Trim(Request("SearchString")) '데이터를 가져오기 위한 변수 Dim cmd, mRs, arrList, DataCnt IF SearchMode <> "" THEN IF SearchMode = 1 THEN 'Response.Write SearchMode&"
" 'Response.Write SearchString&"
" SearchQuery = " AND NOTICE_CODE ='A' AND NOTICE_TITLE LIKE '%"& SearchString &"%'" ELSEIF SearchMode = 2 THEN 'Response.Write SearchMode&"
" 'Response.Write SearchString&"
" SearchQuery = "AND NOTICE_CODE ='I' AND NOTICE_TITLE LIKE '%"& SearchString &"%'" ELSEIF SearchMode = 3 THEN 'Response.Write SearchMode&"
" 'Response.Write SearchString&"
" SearchQuery = "AND NOTICE_CODE ='B' AND NOTICE_TITLE LIKE '%"& SearchString &"%'" ELSEIF SearchMode = 4 THEN 'Response.Write SearchMode&"
" 'Response.Write SearchString&"
" SearchQuery = "AND NOTICE_CODE ='V' AND NOTICE_TITLE LIKE '%"& SearchString &"%'" ELSEIF SearchMode = 5 THEN 'Response.Write SearchMode&"
" 'Response.Write SearchString&"
" SearchQuery = "AND NOTICE_CODE ='T' AND NOTICE_TITLE LIKE '%"& SearchString &"%'" END IF ELSE SearchQuery = "AND NOTICE_CODE <>'D'" END If SearchQuery = SearchQuery & " AND NOTICE_OPEN = 'Y'" Dim SortQuery1, SortQuery2, SortQuery3 If Request("lineup")<>"" Then Lineup = Request("lineup") Else Lineup = "" End If SortQuery1 = "" SortQuery2 = "" SortQuery3 = "" If Lineup <> "" Then SortQuery1 = SortQuery1 & " Order By "&Lineup&" DESC, NOTICE_REGDATE DESC" SortQuery2 = SortQuery2 & " Order By "&Lineup&" , NOTICE_REGDATE " SortQuery3 = SortQuery3 & " Order By "&Lineup&" DESC, NOTICE_REGDATE DESC" else SortQuery1 = SortQuery1 & " ORDER BY NOTICE_REGDATE DESC " SortQuery2 = SortQuery2 & " ORDER BY NOTICE_REGDATE " SortQuery3 = SortQuery3 & " ORDER BY NOTICE_REGDATE DESC " end if ' Response.Write SearchQuery&"
" '==================================================================================== ' SQL DEFINITION '==================================================================================== SET cmd = Server.CreateObject("ADODB.Command") With cmd .ActiveConnection = strConnect .CommandText = "PROC_EXAM_SERVICE_NOTICE_LIST" .CommandType = adCmdStoredProc .Parameters.Append .CreateParameter("@GotoPage",adInteger,adParamInput,,GotoPage) .Parameters.Append .CreateParameter("@PageSize",adInteger,adParamInput,,PageSize) .Parameters.Append .CreateParameter("@SearchQuery",adVarChar,adParamInput, 500, SearchQuery) .Parameters.Append .CreateParameter("@SortQuery1",adVarChar,adParamInput, 500, SortQuery1) .Parameters.Append .CreateParameter("@SortQuery2",adVarChar,adParamInput, 500, SortQuery2) .Parameters.Append .CreateParameter("@SortQuery3",adVarChar,adParamInput, 500, SortQuery3) .Parameters.Append .CreateParameter("@RecordCount",adInteger,adParamOutput) .Parameters.Append .CreateParameter("@Total_Page",adInteger,adParamOutput) .Execute RecordCount = .Parameters("@RecordCount").value Total_Page = .Parameters("@Total_Page").value SET mRs = .Execute End With SET cmd = Nothing '==================================================================================== ' JAVASCRIPT '==================================================================================== '==================================================================================== ' DATA VALIDATION '==================================================================================== '==================================================================================== ' MAIN LOGIC '==================================================================================== '시험공고 리스트를 가져온다 IF mRs.BOF AND mRs.EOF THEN 'Response.Write "데이터없음" DataCnt = 0 ELSE 'Response.Write "데이터있음" DataCnt = 1 arrList = mRs.GetRows() END IF '==================================================================================== ' PRESENTATION (HTML) '==================================================================================== MenuName = "> 공지사항" %>
공지사항 <%=Func_LineMap(" 수험정보> 공지사항")%>
이그잼의 온/오프라인 서비스와 관련한 통합 새소식을 전해 드립니다.
사이트 공지, e-러닝 신규 강좌 소식, 인터넷서점 및 학원가 그리고 기타 패밀리 사이트 소식을 전해 드립니다.
<% '************************************** ' 리스트 시작 '************************************** '데이타가 없을 경우 IF DataCnt = 0 THEN %> <% Else Dim i Dim NOTICE_IDX, NOTICE_CODE, NOTICE_TITLE, NOTICE_READCOUNT, NOTICE_REGDATE Dim NOTICE_CODE_NAME FOR i=0 TO Ubound(arrList, 2) NOTICE_IDX = Trim(arrList(0,i)) NOTICE_CODE = Trim(arrList(1,i)) NOTICE_TITLE = Trim(arrList(2,i)) NOTICE_READCOUNT = Trim(arrList(3,i)) NOTICE_REGDATE = Trim(arrList(4,i)) NOTICE_TITLE = checkValid_cut_in(NOTICE_TITLE) Dim ListNo ListNo = (RecordCount- ((GotoPage-1) * PageSize)) - i SELECT CASE NOTICE_CODE CASE "B" NOTICE_CODE_NAME = "이그잼북스" CASE "I" NOTICE_CODE_NAME = "이그잼" CASE "V" NOTICE_CODE_NAME = "오픈강좌" CASE "A" NOTICE_CODE_NAME = "동영상" CASE "T" NOTICE_CODE_NAME = "테이프" END Select NOTICE_REGDATE = LEFT(NOTICE_REGDATE,10) %> <% IF i <> Ubound(arrList, 2) Then%> <% ELSE %> <% END IF %> <% NEXT END IF Dim NextImg, PreImg PreImg = "" NextImg = "" %>
<%=ListNo%> <%=NOTICE_CODE_NAME%> <%=NOTICE_TITLE%>  <%if datediff("d",NOTICE_REGDATE,now()) < 2 then response.write "" %> <%=NOTICE_REGDATE%> <%=NOTICE_READCOUNT%>
<%=young_paging(gotoPage,blockSize,Total_Page,PreImg,NextImg,"","")%>