<%@ codepage="65001" language="VBScript" %> <% call sm_header() %> <% ''****************************************************************************** ''* ''* IndexNo.#123 ''* Name : fncRtnSubjInfo ''* input parameter : ps_col - 원하는 코드 ''* Date / Author : 2010.3.11 / David.J ''* ''******************************************************************************* function fncRtnSubjInfo(ps_col) dim f_Qry, f_Rs f_Qry = "SELECT KNAME FROM WP_COMMON WHERE CODE = '"& ps_col &"'" set f_Rs = server.CreateObject("ADODB.Recordset") f_Rs.Open f_Qry, o_Cn, 1 if f_Rs.eof Then fncRtnSubjInfo = "" else fncRtnSubjInfo = trim(f_Rs(0)) end if f_Rs.Close Set f_Rs = Nothing end function %> <% dim PID : PID = fncRequest(request("PID"),1) dim DPID : DPID = fncRequest(request("DPID"),1) dim THMCATE : THMCATE = fncRequest(request("THMCATE"),1) dim o_MRs dim s_MQry dim MainImg : MainImg = "" dim s_AirTime : s_AirTime = "" dim s_LFACEPIC : s_LFACEPIC = "" dim s_LFACEPIC_PATH : s_LFACEPIC_PATH = "" dim s_LNAMEPIC : s_LNAMEPIC = "" dim s_LNAMEPIC_PATH : s_LNAMEPIC_PATH = "" dim s_CNAMEPIC : s_CNAMEPIC = "" dim s_CNAMEPIC_PATH : s_CNAMEPIC_PATH = "" dim s_THEME : s_THEME = "" dim s_LECTUREDATE : s_LECTUREDATE = "" dim s_WORDS : s_WORDS = "" dim s_Clauses : s_Clauses = "" dim s_Content : s_Content = "" dim s_MOV_A : s_MOV_A = "" dim s_MOV_A_PATH : s_MOV_A_PATH = "" dim s_MOV_B : s_MOV_B = "" dim s_MOV_B_PATH : s_MOV_B_PATH = "" dim s_MOV_C : s_MOV_C = "" dim s_MOV_C_PATH : s_MOV_C_PATH = "" dim s_MOV_P : s_MOV_P = "" dim s_MOV_P_PATH : s_MOV_P_PATH = "" dim s_PDF : s_PDF = "" dim s_PDF_PATH: s_PDF_PATH = "" dim s_HOMEPAGE: s_HOMEPAGE = "" dim s_BRIEF_PROF : s_BRIEF_PROF = "" dim s_EMAIL : s_EMAIL = "" dim s_LNAME : s_LNAME = "" dim div : div=request("div") dim bible : bible=request("bible") dim chapter : chapter=request("chapter") dim rs, sql if bible<>"" then sql="select code from wp_common where kname='" & bible & "' and (pcode='THMOLD' or pcode='THMNEW')" set rs=o_Cn.execute(sql) if not (rs.eof or rs.bof) then THMCATE=rs("code") end if set rs=nothing end if if THMCATE="" then dim cc randomize cc=int((2*rnd)+1) if cc=1 then THMCATE="THMOLD" num=39 else THMCATE="THMNEW" num=27 end if randomize cc=int((num*rnd)+1) if cc<10 then cc="0" & cc end if THMCATE=THMCATE & cc end if if div="" then sql="select kname, pcode from wp_common where code='" & THMCATE & "' and (pcode='THMOLD' or pcode='THMNEW')" 'response.write sql set rs=o_Cn.execute(sql) if not (rs.eof or rs.bof) then bible=rs("kname") if rs("pcode")="THMOLD" then div="구약" else div="신약" end if end if set rs=nothing end if dim where_str(2), where_sql, item_str select case bible case "창세기" where_str(0)="%창" where_str(1)="%창세기" case "출애굽기" where_str(0)="%출" where_str(1)="%출애굽기" case "레위기" where_str(0)="%레" where_str(1)="%레위기" case "민수기" where_str(0)="%민" where_str(1)="%민수기" case "신명기" where_str(0)="%신" where_str(1)="%신명기" case "여호수아" , "여호수아기" where_str(0)="%수" where_str(1)="%여호수아" case "사사기" , "판관기" where_str(0)="%삿" where_str(1)="%사사기" case "룻기" where_str(0)="%룻" where_str(1)="%룻기" case "사무엘상" , "사무엘기상" where_str(0)="%삼상" where_str(1)="%사무엘상" case "사무엘하" , "사무엘기하" where_str(0)="%삼하" where_str(1)="%사무엘하" case "열왕기상" where_str(0)="%왕상" where_str(1)="%열왕기상" case "열왕기하" where_str(0)="%왕하" where_str(1)="%열왕기하" case "역대상" , "역대지상" , "역대기상" where_str(0)="%대상" 'where_str(1)="%역대상" case "역대하" , "역대지하" , "역대기하" where_str(0)="%대하" 'where_str(1)="%역대하" case "에스라" , "에스라기" , "에즈라" where_str(0)="%스" where_str(1)="%에스라" case "느헤미야" , "느헤미야기" where_str(0)="%느" where_str(1)="%느헤미야" case "에스더" , "에스더기" , "에스델" where_str(0)="%에" where_str(1)="%에스더" case "욥기" where_str(0)="%욥" where_str(1)="%욥기" case "시편" where_str(0)="%시" where_str(1)="%시편" case "잠언" where_str(0)="%잠" where_str(1)="%잠언" case "전도서" where_str(0)="%전" where_str(1)="%전도서" case "아가" where_str(0)="%아" where_str(1)="%아가" case "이사야" , "이사야서" where_str(0)="%사" where_str(1)="%이사야" case "예레미야" , "예레미야서" where_str(0)="%렘" where_str(1)="%예레미야" case "예레미야애가" , "애가" where_str(0)="%애" where_str(1)="%예레미야애가" case "에스겔" , "에스겔서" , "에제키엘" where_str(0)="%겔" 'where_str(1)="%에스겔" case "다니엘" , "다니엘서" where_str(0)="%단" where_str(1)="%다니엘" case "호세아" , "호세아서" where_str(0)="%호" where_str(1)="%호세아" case "요엘" , "요엘서" where_str(0)="%욜" where_str(1)="%요엘" case "아모스" , "아모스서" where_str(0)="%암" where_str(1)="%아모스" case "오바댜" , "오바댜서" , "오바디야" where_str(0)="%옵" where_str(1)="%오바댜" case "요나" , "요나서" where_str(0)="%욘" where_str(1)="%요나" case "미가" , "미가서" where_str(0)="%미" where_str(1)="%미가" case "나훔" , "나훔서" where_str(0)="%나" where_str(1)="%나훔" case "하박국" , "하박국서" , "하바꾹" where_str(0)="%합" where_str(1)="%하박국" case "스바냐" , "스바냐서" , "스바니야" where_str(0)="%습" where_str(1)="%스바냐" case "학개" , "학개서" , "하깨" where_str(0)="%학" where_str(1)="%학개" case "스가랴" , "스가랴서" , "즈가리야" where_str(0)="%슥" where_str(1)="%스가랴" case "말라기" , "말라기서" where_str(0)="%말" where_str(1)="%말라기" case "마태복음" , "마태복음서" , "마태오의복음서" where_str(0)="%마" where_str(1)="%마태복음" case "마가복음" , "마가복음서" , "마르코의복음서" where_str(0)="%막" where_str(1)="%마가복음" case "누가복음" , "누가복음서" , "루가의복음서" where_str(0)="%눅" where_str(1)="%누가복음" case "요한복음" , "요한복음서" , "요한의복음서" where_str(0)="%요" where_str(1)="%요한복음" case "사도행전" where_str(0)="%행" where_str(1)="%사도행전" case "로마서" , "로마인들에게보낸편지" where_str(0)="%롬" where_str(1)="%로마서" case "고린도전서" , "고린토인들에게보낸첫째편지" where_str(0)="%고전" where_str(1)="%고린도전서" case "고린도후서" , "고린토인들에게보낸둘째편지" where_str(0)="%고후" where_str(1)="%고린도후서" case "갈라디아서" , "갈라디아인들에게보낸편지" where_str(0)="%갈" where_str(1)="%갈라디아서" case "에베소서" , "에페소인들에게보낸편지" where_str(0)="%엡" where_str(1)="%에베소서" case "빌립보서" , "필립비인들에게보낸편지" where_str(0)="%빌" where_str(1)="%빌립보서" case "골로새서" , "골로사이인들에게보낸편지" where_str(0)="%골" where_str(1)="%골로새서" case "데살로니가전서" , "데살로니카인들에게보낸첫째편지" where_str(0)="%살전" where_str(1)="%데살로니가전서" case "데살로니가후서" , "데살로니카인들에게보낸둘째편지" where_str(0)="%살후" where_str(1)="%데살로니가후서" case "디모데전서" , "디모테오에게보낸첫째편지" where_str(0)="%딤전" where_str(1)="%디모데전서" case "디모데후서" , "디모테오에게보낸둘째편지" where_str(0)="%딤후" where_str(1)="%디모데후서" case "디도서" , "디도에게보낸편지" where_str(0)="%딛" where_str(1)="%디도서" case "빌레몬서" , "필레몬에게보낸편지" where_str(0)="%몬" where_str(1)="%빌레몬서" case "히브리서" , "히브리인들에게보낸편지" where_str(0)="%히" where_str(1)="%히브리서" case "야고보서" , "야고보의편지" where_str(0)="%약" where_str(1)="%야고보서" case "베드로전서" , "베드로의첫째편지" where_str(0)="%벧전" where_str(1)="%베드로전서" case "베드로후서" , "베드로의둘째편지" where_str(0)="%벧후" where_str(1)="%베드로후서" case "요한일서" , "요한1서" , "요한의첫째편지" where_str(0)="%요일" where_str(1)="%요한1서" where_str(2)="%요한일서" case "요한이서" , "요한2서" , "요한의둘째편지" where_str(0)="%요이" where_str(1)="%요한2서" where_str(2)="%요한이서" case "요한삼서" , "요한3서" , "요한의세째편지" where_str(0)="%요삼" where_str(1)="%요한3서" where_str(2)="%요한삼서" case "유다서" , "유다의편지" where_str(0)="%유" where_str(1)="%유다서" case "요한계시록" , "요한의묵시록" where_str(0)="%계" where_str(1)="%요한계시록" case else where_str(0)="" where_str(1)="" end select if where_str(0)="" then where_sql="" else if chapter="" then where_str(0)=where_str(0) & "%" where_str(1)=where_str(1) & "%" else where_str(0)=where_str(0) & chapter & ":%" where_str(1)=where_str(1) & chapter & ":%" end if where_sql=" and (" i=1 for each item_str in where_str if item_str<>"" then if i>1 then where_sql=where_sql & " or " end if where_sql=where_sql & "replace(words,' ','') like '" & item_str & "'" end if i=i+1 next where_sql=where_sql & " )" end if 'response.write where_sql %>
 
<% call sm_top() %>
<% ''**************************************************************************************** '' 페이지셋팅(pageno) ''**************************************************************************************** CookiesPageNo = request.cookies(PID & "SONGLIST" & gs_UID)("Pageno") CookiesSkip = request.cookies(PID & "SONGLIST" & gs_UID)("skip") if CookiesPageNo = "" then ''// pageno = request("pageno")''페이지 넘버 else pageno = CookiesPageNo end if if pageno = "" or pageno < 0 then pageno = 1 else pageno = Cint(pageno) end if ''**************************************************************************************** '' 페이지셋팅(skip) ''**************************************************************************************** if CookiesSkip = "" then ''// skip = request("skip") else skip = CookiesSkip end if if skip = "" or skip < 0 then '' skip = 0 else skip = Cint(skip) end if ''// 검색을 위한 쿠키 셋팅 dim CookiesSearchMenu, CookiesSearchText CookiesSearchMenu = request.cookies(PID & "SONGLIST" & gs_UID)("SearchMenu") CookiesSearchText = request.cookies(PID & "SONGLIST" & gs_UID)("SearchText") If fncRtnSubjInfo(THMCATE) <> "" Then CookiesSearchText = fncRtnSubjInfo(THMCATE) End If ''//response.write "CookiesPageNo: " & CookiesPageNo & "
" ''//response.write "CookiesSkip: " & CookiesSkip & "
" ''//response.write "CookiesSearchMenu: " & CookiesSearchMenu & "
" ''//response.write "CookiesSearchText: " & CookiesSearchText & "
" ''**************************************************************************************** '' 본문내용 ''**************************************************************************************** i = fncDPIDRcdCntByPID(PID) j = 5 s_MQry = " SELECT A.PID, A.DPID, A.THEME, A.LID, A.LECTUREDATE, A.SONGTITLE, B.CID, C.KNAME AS CKNAME, D.KNAME AS LKNAME, MOV_A, MOV_A_PATH, MOV_B, MOV_B_PATH, MOV_C, MOV_C_PATH, MOV_E, MOV_E_PATH, mp3, mp3_path, WORDS, CLAUSES, CONTENT, C.AID, C.ADDRESS1, THMCATE10, THMCATE11, THMCATE12, THMCATE14, THMCATE15, THMCATE16 " s_MQry = s_MQry & " FROM " s_MQry = s_MQry & " (SELECT PID, DPID, THEME, LID, LECTUREDATE, SONGTITLE, MOV_A, MOV_A_PATH, MOV_B, MOV_B_PATH, MOV_C, MOV_C_PATH, MOV_E, MOV_E_PATH, mp3, mp3_path, WORDS, CLAUSES, CONTENT, THMCATE5, THMCATE10, THMCATE11, THMCATE12, THMCATE14, THMCATE15, THMCATE16 FROM WP_PROGDETAIL " s_MQry = s_MQry & " WHERE PID IN ( SELECT PID FROM WP_PROG WHERE DELFLAG = 'N' AND MOV_B = 'Y' ) AND DELFLAG = 'N' " s_MQry = s_MQry & " AND LEN(MOV_B_PATH) > 0 ) " s_MQry = s_MQry & " A, " s_MQry = s_MQry & " (SELECT CID, LID, PID FROM WP_PROG " s_MQry = s_MQry & " WHERE PID IN ( SELECT PID FROM WP_PROG WHERE DELFLAG = 'N' AND MOV_B = 'Y' ) AND CATE1 = 'CATSM') " s_MQry = s_MQry & " B, " s_MQry = s_MQry & " (SELECT CID, KNAME, AID, ADDRESS1 FROM WP_CHURCH) " s_MQry = s_MQry & " C, " s_MQry = s_MQry & " (SELECT LID, KNAME FROM WP_LECTURER) " s_MQry = s_MQry & " D " s_MQry = s_MQry & " WHERE A.PID = B.PID " s_MQry = s_MQry & " AND B.CID = C.CID " s_MQry = s_MQry & " AND B.LID = D.LID " If THMCATE <> "" then s_MQry = s_MQry & " AND THMCATE5 = '"& THMCATE &"' " 's_MQry = s_MQry & " AND (THMCATE5 = '"& THMCATE &"' OR THMCATE7 = '"& THMCATE &"' OR THMCATE9 = '"& THMCATE &"') " End If if CookiesSearchMenu = "TITLE" then s_MQry = s_MQry & " AND A.THEME LIKE '%" & CookiesSearchText & "%' " elseif CookiesSearchMenu = "CHURCH" then s_MQry = s_MQry & " AND C.KNAME LIKE '%" & CookiesSearchText & "%' " elseif CookiesSearchMenu = "LECTURER" then s_MQry = s_MQry & " AND D.KNAME LIKE '%" & CookiesSearchText & "%' " elseif CookiesSearchMenu = "THMCATE5" then s_MQry = s_MQry & " AND WORDS LIKE '%" & CookiesSearchText & "%' " 's_MQry = s_MQry & " AND (THMCATE10 = '" & fncRtnInfoSubj(CookiesSearchText) & "' OR THMCATE11 = '" & fncRtnInfoSubj(CookiesSearchText) & "' OR THMCATE12 = '" & fncRtnInfoSubj(CookiesSearchText) & "') " end if s_MQry = s_MQry & where_sql s_MQry = s_MQry & " ORDER BY A.LECTUREDATE DESC " 'response.write "s_MQry : " & s_MQry & "
" ''//response.end set o_Rs = server.CreateObject("ADODB.Recordset") o_Rs.PageSize = 5 PageSize = o_Rs.PageSize o_Rs.Open s_MQry, o_Cn, 1 %>

<%= CookiesSearchText %> 검색결과   <%=o_Rs.recordcount%> 건 검색되었습니다.

<% if o_Rs.eof then ''***************************************************************************** '' 레코드가 없을때 ''***************************************************************************** response.write "" response.write "
등록된 내용이 없습니다.
" else ''***************************************************************************** '' 레코드가 하나 이상일때 ''***************************************************************************** b_RsExist = true TotRecord = o_Rs.recordcount ''전체레코드 TotPage = o_Rs.PageCount ''전체페이지수 o_Rs.Absolutepage = pageno ''절대 페이지 ''***************************************************************************** '' 최종페이지 이동을 위해서 : 10 페이지씩 이동할때 ''***************************************************************************** i_mod = int(TotPage / 10) i_divide = TotPage mod 10 if i_divide = 0 and i_mod > 0 then i_Eskip = (i_mod - 1) * 10 i_Epage = i_Eskip + 1 else i_Eskip = i_mod * 10 i_Epage = i_Eskip + 1 end if ''//response.write TotPage / 10 & "
" ''//response.write TotPage mod 10 & "
" if pageno = 1 or pageno < 1 then '' 현재페이지가 첫 페이지 일때 i = TotRecord elseif pageno = TotPage or pageno > TotPage then ''현재 페이지가 마지막 페이지일때 if TotRecord mod pagesize = 0 then ''마지막페이지에서 전체레코드에서 pagesize로 나눈 나머지가 0일때 i = pagesize else ''마지막페이지에서 전체레코드에서 pagesize로 나눈 나머지가 0아닐때 i = TotRecord mod pagesize end if else '' 나머지 대부분의 경우 i = TotRecord - (pagesize * (pageno-1)) end if ''***************************************************************************** j = 1 do until o_Rs.eof or j > PageSize %>
&DPID=<%=o_Rs("DPID")%>" style="color:#CC66CC"><%=fncTruncStr(o_Rs("theme"),27,2)%> <%=o_Rs("WORDS")%> <%=o_Rs("lecturedate")%>
<%=o_Rs("LKNAME")%> 목사 <%=left(o_Rs("ADDRESS1"),2)%>,<%=fncIdToKname(o_Rs("AId"),"A")%> <% if not (o_Rs("MOV_E")="" or o_Rs("MOV_E_PATH")="") then %> ','full','SM')"class="A00" alt="고화질"> <% end if%> <% if o_Rs("MOV_B") <> "" or o_Rs("MOV_B_PATH") <> "" then %> ','300','SM')"class="A00" alt="표준"> <% end if%> <% if o_Rs("MOV_C") <> "" or o_Rs("MOV_C_PATH") <> "" then %> ','56','SM')"class="A00" alt="저화질"> <% end if%> <% if o_Rs("MOV_A") <> "" or o_Rs("MOV_A_PATH") <> "" then %> ','700','SM')"class="A00" alt="저화질"> <% end if%> <% if not (o_Rs("MP3")="" or o_Rs("MP3_PATH")="") then %> ','mp3','')"class="A00" alt="저화질"> <% end if%>
<% If o_Rs("CONTENT") = "" then %> <%=fncTruncStr(Replace(o_Rs("CLAUSES"),"
"," "),300,2)%> <% Else %><%=fncTruncStr(o_Rs("CONTENT"),300,2)%><% End If %>
주제이미지 <% dim thm_string, thm_string1, thm_string2, thm_string3 dim chm_string, chm_string1, chm_string2 if trim(o_Rs("THMCATE10"))<>"" then thm_string1="" & fncRtnSubjInfo(o_RS("THMCATE10")) & "" end if if trim(o_Rs("THMCATE11"))<>"" then thm_string2="" & fncRtnSubjInfo(o_RS("THMCATE11")) & "" end if if trim(o_Rs("THMCATE12"))<>"" then thm_string3="" & fncRtnSubjInfo(o_RS("THMCATE12")) & "" end if thm_string=thm_string1 & ", " & thm_string2 & ", " & thm_string3 thm_string=replace(thm_string,", , ",", ") if right(thm_string,2)=", " then thm_string=mid(thm_string,1,len(thm_string)-2) end if if trim(o_Rs("THMCATE15"))<>"" then chm_string1="" & fncRtnSubjInfo(o_RS("THMCATE15")) & "" end if if trim(o_Rs("THMCATE16"))<>"" then chm_string2="" & fncRtnSubjInfo(o_RS("THMCATE16")) & "" end if chm_string=chm_string1 & ", " & chm_string2 if left(chm_string,2)=", " then chm_string=mid(chm_string,3,len(chm_string)) end if if right(chm_string,2)=", " then chm_string=mid(chm_string,1,len(chm_string)-2) end if %> <%= thm_string %><%= chm_string %> "><%=fncRtnSubjInfo(o_RS("THMCATE14"))%> ','<%=o_Rs("DPID")%>');" onFocus="this.blur()" class="B00">

선

<% i = i - 1 j = j + 1 o_Rs.movenext loop end if %>
<% if b_RsExist = true then ''*[레코드가 하나도 없을때]* %>
<% if skip = "" or skip = 1 then skip = 0 absoluteskip = skip skip = 1 + skip kk = skip + 9 if skip + 9 > TotPage then kk = TotPage '' skip변수값에 4를 더한 값이 전체페이지수보다 크면 전체페이지수 %> <% if kk > 10 then absoluteskip = absoluteskip - 10 '' 이전 10페이지로 가기 위해 skip변수에 넣을 값을 -10 해준다. %> | |   <% absoluteskip = absoluteskip + 10 '' 다시 현재 10 페이지에서 계속 유지하기 위해 다시 +10를 해준다. end if %> <% for k = skip to kk '' skip변수 값에서 순차적으로 1씩 증가해서 skip + 4 까지 보여주도록 한다. %> <% response.write " | " %> <% if pageno = k then response.write " " & k & " " else response.write " " & k & " " end if %> <% next %> <% response.write " | " %> <% if kk <> TotPage then '' kk가 전체페이지수가 아닐때만 다음의 내용을 보여준다. absoluteskip = absoluteskip + 10 '' 다음 10페이지로 가기 위해 skip변수에 넣을 값을 +10 해준다. next10page = 10 if (kk + (TotPage mod 10)) = TotPage then next10page = TotPage mod 10 '' kk 값에 전체페이지의 나머지값을 더한 것이 전체페이지와 같다면 다음 10페이지가 아니라 전체페이지를 나눈 나머지값만큼의 페이지 수가 된다. %>   | | <% end if %>    
<% end if %>
<% call sm_left() %> <% call sm_plus() %>
<% call sm_copy() %> <% call sm_bottom() %>