<%@ codepage="65001" language="VBScript" %> <% 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 cd : cd=request("cd") '// 교회주소 퍼가기용 : 100722 (영신) dim PID : PID = fncRequest(request("PID"),1) dim DPID : DPID = fncRequest(request("DPID"),1) dim Order : Order = request("Order") dim o_MRs dim s_MQry dim MainImg : MainImg = "" dim s_AirTime : s_AirTime = "" if pid="" then response.redirect "main.asp" end if if DPID = "" then s_MQry = " SELECT ISNULL(MAX(DPID),0) AS MX_DPID FROM WP_PROGDETAIL " s_MQry = s_MQry & " WHERE PID = '" & PID & "' " s_MQry = s_MQry & " AND DELFLAG <> 'Y' " set o_MRs = server.CreateObject("ADODB.Recordset") o_MRs.Open s_MQry, o_Cn, 1 DPID = o_MRs("MX_DPID") o_MRs.Close Set o_MRs = Nothing end if 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_D : s_MOV_D = "" dim s_MOV_D_PATH : s_MOV_D_PATH = "" dim s_MOV_E : s_MOV_E = "" dim s_MOV_E_PATH : s_MOV_E_PATH = "" dim s_MOV_P : s_MOV_P = "" dim s_MOV_P_PATH : s_MOV_P_PATH = "" dim s_MP3 : s_MP3 = "" dim s_MP3_PATH : s_MP3_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 sm_chekbuyflag : sm_chekbuyflag = "" ''// 구매체크 dim s_MOTTO : s_MOTTO = "" '//교회표어 dim s_SERVICEINFO : s_SERVICEINFO = "" '//예배시간 dim s_CHRPHONE : s_CHRPHONE = "" dim s_FAX : s_FAX = "" dim s_CHRADDRESS : s_CHRADDRESS = "" dim s_AID : s_AID = "" dim s_CNAME : s_CNAME = "" dim s_VISION : s_VISION = "" dim s_MapImg : s_MapImg = "" dim s_BRIEF_RECORD : s_BRIEF_RECORD = "" dim s_PROF : s_PROF = "" dim LID : LID = "" s_MQry = " SELECT top 1 A.BUYING_FLAG, A.LFACEPIC, A.LFACEPIC_PATH, A.LNAMEPIC, A.LNAMEPIC_PATH, A.CNAMEPIC, CNAMEPIC_PATH, A.AIRTIME, A.LID," s_MQry = s_MQry & " B.THEME, B.LECTUREDATE, B.WORDS, ISNULL(B.Clauses,'') AS CLAUSES, ISNULL(B.CONTENT,'') AS CONTENT," s_MQry = s_MQry & " B.MOV_A, B.MOV_A_PATH, " s_MQry = s_MQry & " B.MOV_B, B.MOV_B_PATH, B.MOV_C, B.MOV_C_PATH, B.MOV_D, B.MOV_D_PATH, B.MOV_E, B.MOV_E_PATH, B.MOV_P, B.MOV_P_PATH, b.mp3, b.mp3_path, B.PDF, B.PDF_PATH, " s_MQry = s_MQry & " b.thmcate5, b.thmcate7, b.thmcate9, b.thmcate10, b.thmcate11, b.thmcate12, b.thmcate14, b.thmcate15, b.thmcate16," s_MQry = s_MQry & " c.kname as church_name, C.HOMEPAGE, C.MOTTO, C.SERVICEINFO, C.PHONE AS CHRPHONE, C.ADDRESS1 + ' ' + C.ADDRESS2 AS CHRADDRESS, C.FAX, C.AID, C.VISION,C.MAP_PATH + C.MAP AS MAPIMG, D.PROF, D.BRIEF_RECORD, D.BRIEF_PROF, D.EMAIL, D.KNAME, D.JIKBUN " s_MQry = s_MQry & " FROM WP_PROG A, WP_PROGDETAIL B, WP_CHURCH C, WP_LECTURER D " s_MQry = s_MQry & " WHERE A.PID = B.PID " s_MQry = s_MQry & " AND A.PID = '" & PID & "' " s_MQry = s_MQry & " AND B.DPID = " & DPID & " " s_MQry = s_MQry & " AND A.CID *= C.CID " s_MQry = s_MQry & " AND A.LID *= D.LID " s_MQry = s_MQry & " AND A.DELFLAG <> 'Y' " s_MQry = s_MQry & " AND B.DELFLAG <> 'Y' " s_MQry = s_MQry & " ORDER BY B.LECTUREDATE DESC " ''//response.write "s_MQry : " & s_MQry & "
" ''//response.end set o_MRs = server.CreateObject("ADODB.Recordset") o_MRs.Open s_MQry, o_Cn, 1 if Not(o_MRs.eof) then LID = trim(o_MRs("LID")) s_LFACEPIC = trim(o_MRs("LFACEPIC")) s_LFACEPIC_PATH = trim(o_MRs("LFACEPIC_PATH")) s_LNAMEPIC = trim(o_MRs("LNAMEPIC")) s_LNAMEPIC_PATH = trim(o_MRs("LNAMEPIC_PATH")) s_CNAMEPIC = trim(o_MRs("CNAMEPIC")) s_CNAMEPIC_PATH = trim(o_MRs("CNAMEPIC_PATH")) s_THEME = trim(o_MRs("THEME")) s_LECTUREDATE = trim(o_MRs("LECTUREDATE")) s_WORDS = trim(o_MRs("WORDS")) s_Clauses = trim(o_MRs("Clauses")) s_Clauses = fncTruncStr(s_Clauses,500,0) ''// 글자수 제한 s_Content = trim(o_MRs("CONTENT")) s_Content = fncTruncStr(s_Content,500,0) ''// 글자수 제한 s_MOV_A = trim(o_MRs("MOV_A")) s_MOV_A_PATH = trim(o_MRs("MOV_A_PATH")) s_MOV_B = trim(o_MRs("MOV_B")) s_MOV_B_PATH = trim(o_MRs("MOV_B_PATH")) s_MOV_C = trim(o_MRs("MOV_C")) s_MOV_C_PATH = trim(o_MRs("MOV_C_PATH")) s_MOV_D = trim(o_MRs("MOV_D")) s_MOV_D_PATH = trim(o_MRs("MOV_D_PATH")) s_MOV_E = trim(o_MRs("MOV_E")) s_MOV_E_PATH = trim(o_MRs("MOV_E_PATH")) s_MOV_P = trim(o_MRs("MOV_P")) s_MOV_P_PATH = trim(o_MRs("MOV_P_PATH")) s_MP3 = trim(o_MRs("MP3")) s_MP3_PATH = trim(o_MRs("MP3_PATH")) s_PDF = trim(o_MRs("PDF")) s_PDF_PATH = trim(o_MRs("PDF_PATH")) s_HOMEPAGE = trim(o_MRs("HOMEPAGE")) s_BRIEF_PROF = trim(o_MRs("BRIEF_PROF")) s_EMAIL = trim(o_MRs("EMAIL")) s_LNAME = o_MRs("KNAME") & " "& fncCMNKname(o_MRs("JIKBUN")) s_AirTime = trim(o_MRs("AIRTIME")) sm_chekbuyflag = o_MRs("BUYING_FLAG") s_MOTTO = trim(o_MRs("MOTTO")) s_SERVICEINFO = trim(o_MRs("SERVICEINFO")) s_CHRPHONE = trim(o_MRs("CHRPHONE")) s_FAX = trim(o_MRs("FAX")) s_CHRADDRESS = trim(o_MRs("CHRADDRESS")) s_AID = trim(o_MRs("AID")) s_CNAME=o_MRs("church_name") s_VISION = trim(o_MRs("VISION")) s_MapImg = trim(o_MRs("MAPIMG")) s_PROF = trim(o_MRs("PROF")) s_BRIEF_RECORD = trim(o_MRs("BRIEF_RECORD")) s_LECTUREDATE=left(s_LECTUREDATE,10) '-----------------테마별추천검색어 노출-------------------------------- dim thm_string, thm_string1, thm_string2, thm_string3 dim chm_string, chm_string1, chm_string2 dim bible_string, bible_string1, bible_string2, bible_string3 dim per_string if trim(o_MRs("THMCATE10"))<>"" then thm_string1="" & fncRtnSubjInfo(o_MRs("THMCATE10")) & "" end if if trim(o_MRs("THMCATE11"))<>"" then thm_string2="" & fncRtnSubjInfo(o_MRs("THMCATE11")) & "" end if if trim(o_MRs("THMCATE12"))<>"" then thm_string3="" & fncRtnSubjInfo(o_MRs("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_MRs("THMCATE15"))<>"" then chm_string1="" & fncRtnSubjInfo(o_MRs("THMCATE15")) & "" end if if trim(o_MRs("THMCATE16"))<>"" then chm_string2="" & fncRtnSubjInfo(o_MRs("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 if trim(o_MRs("THMCATE5"))<>"" then bible_string1="" & fncRtnSubjInfo(o_MRs("THMCATE5")) & "" end if if trim(o_MRs("THMCATE7"))<>"" then bible_string2="" & fncRtnSubjInfo(o_MRs("THMCATE7")) & "" end if if trim(o_MRs("THMCATE9"))<>"" then bible_string3="" & fncRtnSubjInfo(o_MRs("THMCATE9")) & "" end if bible_string=bible_string1 & ", " & bible_string2 & ", " & bible_string3 bible_string=replace(bible_string,", , ",", ") if right(bible_string,2)=", " then bible_string=mid(bible_string,1,len(bible_string)-2) end if if trim(o_MRs("THMCATE14"))<>"" then per_string="" & fncRtnSubjInfo(o_MRs("THMCATE14")) & "" end if '-----------------테마별추천검색어 노출-------------------------------- end if o_MRs.Close Set o_MRs = Nothing %> <% call sm_header() %>
<% if cd<>"home" then %>
 
<% call sm_top() %>
교회소개버튼 목사님소개버튼 교회즐겨찾기버튼

<%= s_CNAME %>

<%= s_LNAME %>

구분선

프로필 <%= s_BRIEF_PROF %>
<% s_SbQry = " SELECT KNAME FROM WP_ASSOCIATION WHERE AID = '" & s_AID & "'" set o_SbRs = server.CreateObject("ADODB.Recordset") o_SbRs.Open s_SbQry,o_Cn,1 if Not(o_SbRs.eof or o_SbRs.bof) then Dim s_AIDKname : s_AIDKname = o_SbRs("KNAME") else s_AIDKname = "" end if o_SbRs.Close Set o_SbRs = Nothing %>
교단 <%=s_AIDKname%>
교회표어 <%= s_MOTTO %>
예배시간 <%= s_SERVICEINFO %>
홈페이지 <% if s_HOMEPAGE<>"" then %><%= s_HOMEPAGE %><% end if %>
교회연락처 <%= s_CHRPHONE %>
지역 <%= s_CHRADDRESS %>

<% if pid="P583" then %> <% end if %> <% if pid="P1102" then %> <% end if %>
버튼 예시
접힌종이
<% ''**************************************************************************************** '' 페이지셋팅(pageno) ''**************************************************************************************** CookiesPageNo = request.cookies(PID & "VIEWPROGSM" & gs_UID)("Pageno") CookiesSkip = request.cookies(PID & "VIEWPROGSM" & 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 ''// dpid 값을 가지고 처음 들어올 경우 해당 리스트 페이지로 가도록 pageno를 찾는 작업 ******************************** if request.cookies(PID & "VIEWPROGSM" & gs_UID)("PageViewCount") = "" AND DPID <> "" then s_MQry = " SELECT COUNT(*) / 10 + 1 AS CNT FROM WP_PROGDETAIL WHERE PID = '" & PID & "' AND DPID > " & DPID set o_Rs = o_Cn.execute(s_MQry) pageno = o_Rs("CNT") set o_Rs = Nothing end if ''// dpid 값을 가지고 처음 들어올 경우 해당 리스트 페이지로 가도록 pageno를 찾는 작업 ********************************// ''**************************************************************************************** '' 페이지셋팅(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 & "VIEWPROGSM" & gs_UID)("SearchMenu") CookiesSearchText = request.cookies(PID & "VIEWPROGSM" & gs_UID)("SearchText") ''**************************************************************************************** '' 본문내용 ''**************************************************************************************** i = fncDPIDRcdCntByPID(PID) j = 5 s_MQry = " SELECT A.*, B.KNAME, C.TITLE " s_MQry = s_MQry & " FROM WP_PROGDETAIL A, WP_LECTURER B, WP_PROG C " s_MQry = s_MQry & " WHERE A.LID *= B.LID AND A.PID= C.PID AND A.DELFLAG <> 'Y' " s_MQry = s_MQry & " AND A.PID = '" & PID & "' " if CookiesSearchText <> "" then if CookiesSearchMenu = "TITLE" then s_MQry = s_MQry & " and a.theme like '%" & CookiesSearchText & "%'" elseif CookiesSearchMenu = "CONTENT" then s_MQry = s_MQry & " and a.content like '%" & CookiesSearchText & "%'" elseif CookiesSearchMenu = "TITLECONTENT" then s_MQry = s_MQry & " and (a.theme like '%" & CookiesSearchText & "%' or a.content like '%" & CookiesSearchText & "%')" end if end if if Order = "" then s_MQry = s_MQry & " ORDER BY A.LECTUREDATE DESC " else s_MQry = s_MQry & " ORDER BY " & Order end if set o_Rs = server.CreateObject("ADODB.Recordset") o_Rs.PageSize = 11 PageSize = o_Rs.PageSize o_Rs.Open s_MQry, o_Cn, 1 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 %> <% i = i - 1 j = j + 1 o_Rs.movenext loop end if %>
선택 번호 설교자 설교제목 설교일 VOD
등록된 내용이 없습니다.
"> "> "> <% if DPID = trim(o_Rs("DPID")) then%> <%=i%> <% else %> <%=i%> <% end if %> ');" class="B01"><%=o_Rs("KNAME")%> ');" class="B01"><%=fncTruncStr(o_Rs("theme"),27,2)%> ');" class="B01"><%=left(o_Rs("lecturedate"),10)%> <%' if not (o_Rs("MOV_E")="" or o_Rs("MOV_E_PATH")="") then %> <% if o_Rs("MOV_E")<>"" or o_Rs("MOV_E_PATH")<>"" then %> ','full','SM')"class="A00">고화질 <%else%> <% end if%> <% if trim(o_Rs("MOV_B")) <> "" or trim(o_Rs("MOV_B_PATH")) <> "" then %> ','300','SM')"class="A00">동영상(250K) <%else%> <% end if%> <% if o_Rs("MOV_C") <> "" or o_Rs("MOV_C_PATH") <> "" then %> ','56','SM')"class="A00">AOD <%else%> <% end if%> <% if o_Rs("MOV_A") <> "" or o_Rs("MOV_A_PATH") <> "" then %> ','700','SM')"class="A00">성가 <%else%> <% end if%> <% if o_Rs("MP3")<>"" or o_Rs("MP3_PATH")<>"" then %> ','mp3','')"class="A00">기도 <%else%> <% 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() %>
<% end if 'home %> <% if cd="home" then %> <% end if %> <% call sm_copy() %> <% call sm_bottom() %>