<% dim tb '관리자 테이블을 엽니다. tb=Request("tb") if trim(tb)="" Then tb = "custom_1" end if if tb<>"" then DBSQL="SELECT * from board_admin where tb = '"&tb&"'" Set dbrs=Server.CreateObject("ADODB.Recordset") dbrs.Open DBSQL,dbconn if dbrs.BOF or dbrs.EOF then Response.Redirect "list_error.asp" else '관리자 테이블에서 게시판을 설정한 정보들을 가지고 옵니다. '그리고는 각 변수에 저장을 하죠. admin_name = dbrs("admin_name") admin_pin = dbrs("admin_pin") admin_email = dbrs("admin_email") admin_url = dbrs("admin_url") table_name = dbrs("table_name") admin_smtp = dbrs("admin_smtp") admin_ip = dbrs("admin_ip") admin_comment = dbrs("admin_comment") admin_notice = dbrs("admin_notice") admin_auth = dbrs("admin_auth") admin_read = dbrs("admin_read") board_type = dbrs("board_type") upload_type = dbrs("upload_type") title_img = dbrs("title_img") left_title_img = dbrs("left_title_img") notice_num = dbrs("notice_num") newimg = dbrs("newimg") recordset = dbrs("recordset") pageset = dbrs("pageset") relation = dbrs("relation") maxsize = dbrs("maxsize") reply = dbrs("reply") reply = dbrs("reply") top_show_act = dbrs("top_show_act") '이젠 관리자 테이블을 열었던걸 닫아줍니다. dbrs.Close Set dbrs=nothing end if else Response.Redirect "list_error.asp" end If %> <% search = request("search") sn = request("sn") st = request("st") sc = request("sc") page = request("page") id = request("id") UpdateSQL = "Update "&tb&" Set visit = visit+1 where id = " & id dbconn.Execute UpdateSQL SQL = "SELECT * from "&tb&" where id = " & id Set rs = Server.CreateObject("ADODB.Recordset") rs.Open SQL,dbconn id = rs("id") name = rs("name") title = rs("title") content = rs("content") writeday = left(rs("writeday"),8) visit = rs("visit") re = rs("re") reid = rs("reid") resame = rs("resame") filename = rs("filename") filesize = rs("filesize") down = rs("down") filename2 = rs("filename2") filesize2 = rs("filesize2") down2 = rs("down2") tag = rs("tag") if tag = "tag_ok" then title = CheckWord(title) content = CheckWord(content) else title = replace(title,""","'") content = replace(content,""","'") content = replace(content, "&", "&" ) content = replace(content, Chr(13)&Chr(10),"
" ) end if ' if trim(session("m_id")) = "" Then ' response.write("") ' response.end ' end If %>
<% if tb = "custom_1" then %> <% elseif tb = "custom_2" then %> <% elseif tb = "news_letter" then %> <% end if %>
  고객센터 > 협회공지/행사
  고객센터 > News/정보
  고객센터 > 뉴스레터
<% 'View Page Close rs.close '하단 LIST OPEN intNowPage = Request.QueryString("page") '해당 페이지 intPageSize = recordset '한페이지에 보여줄 수 intBlockPage = pageset '페이지 단위 If Len(intNowPage) = 0 Then intNowPage = 1 End If search = trim(request("search"))'검색할 단어 key = request("key")'검색조건 If request("search") <> "" then st=request("st") sc=request("sc") sn=request("sn") search = trim(request("search")) search = replace(search,"'","''") if st="on" then SQL2="(title LIKE '%"& search &"%')" if sc="on" or sn="on" then SQL2=SQL2 & " or " end if else st="off" end if if sc="on" then if st="on" then SQL2=SQL2 & "(content LIKE '%"& search &"%')" else SQL2="(content LIKE '%"& search &"%')" end If if sn="on" then SQL2=SQL2 & " or " end if else sc="off" end if if sn="on" then if st="on" or sc="on" then SQL2=SQL2 & "(name LIKE '%"& search &"%')" else SQL2="(name LIKE '%"& search &"%')" end if else sn="off" end if strSQL = "Select Count(*)" strSQL = strSQL & ",CEILING(CAST(Count(*) AS FLOAT)/" & intPageSize & ")" strSQL = strSQL & " from "&tb&" where "& sql2 &"" else strSQL = "Select Count(*)" strSQL = strSQL & ",CEILING(CAST(Count(*) AS FLOAT)/" & intPageSize & ")" strSQL = strSQL & " from "&tb&"" end if rs.Open strSQL,Dbconn intTotalCount = rs(0) '총 게시물 intTotalPage = rs(1) '총 페이지 rs.Close If request("search") <> "" then query ="Select Top " & intNowPage * intPageSize & " id,title,name,writeday,num,re,resame,reid,visit,down,ip from "& tb &"" query = query&" where "& sql2 If top_show_act = "Y" Then '상단고정게시물은 제외 query = query& " AND top_show='N' " End if query = query&" order by re DESC, reid ASC, num DESC" else query ="Select Top " & intNowPage * intPageSize & " id,title,name,writeday,num,re,resame,reid,visit,down,ip from "& tb &"" If top_show_act = "Y" Then '상단고정게시물은 제외 query = query& " WHERE top_show='N' " End if query = query&" order by re DESC, reid ASC, num DESC" end If rs.Open query, Dbconn %>
<% '############################# ' 첨부파일 다운로드 I '############################# If board_type="bbs" and filename<>"" Then %> <% End If %> <% '############################# ' 첨부파일 다운로드 II '############################# If board_type="bbs" and filename2<>"" Then %> <% End If %> <% '############################# ' 첨부파일 다운로드 II '############################# If board_type="images" and filename<>"" Then %> <% End If %>
 제   목 : <%=title%>
 작성일 : <%=writeday%>  작성자 : <%=name%>  조회수 : <%=visit%>
 파일첨부 : <%=filename%>(<%=filesize%>Byte) [Down:<%=down%>]
 파일첨부 : <%=filename2%>(<%=filesize2%>Byte) [Down:<%=down2%>]
 파일첨부 : <%=filename%>(<%=filesize%>Byte) [Down:<%=down%>]
 내   용 :
<%If board_type="images" and filename<>"" then %> <% End If %>
<%=content%>
 총 <%=intTotalCount%> 건의 글이 등록되어 있습니다.
<% '////////////////////////////////////////////////////////////////////// ' 상단 고정게시물 리스트 START '////////////////////////////////////////////////////////////////////// Set rs_top = Server.CreateObject("ADODB.Recordset") '상단고정게시물 '상단 고정게시물 리스트 If top_show_act = "Y" Then query_top = "Select id,title,name,writeday,num,re,resame,reid,visit,down,ip from "& tb &"" query_top = query_top&" where top_show='Y' order by re DESC, reid ASC, num DESC" rs_top.Open query_top, Dbconn End if i = 1 Do Until rs_top.EOF %> <% rs_top.MoveNext i = i+1 Loop %> <% '////////////////////////////////////////////////////////////////////// ' 상단 고정게시물 리스트 START '////////////////////////////////////////////////////////////////////// %> <% '################################## If rs.BOF or rs.EOF Then '################################## %> <% '################################## Else '################################## num = intTotalCount - (intnowpage - 1) * intPageSize rs.Move (intNowPage - 1) * intPageSize i = 1 '단순히 라인구분자를 위해 num값을 보존함 line_gubun = num Do Until rs.EOF id = rs("id") title = rs("title") title = CheckWord(title) title = cutStr(title, 55) writeday = left(rs("writeday"),8) re = rs("re") resame = rs("resame") reid = rs("reid") name = rs("name") name = cutStr(name,14) visit = rs("visit") ip = rs("ip") blank = 4*resame if num=0 then num="-" end if %> <% '라인구분 Print If i < line_gubun and line_gubun > 1 And i < 10 Then %> <% End If num = num - 1 i =i+1 rs.MoveNext Loop ' rs.close ' set rs = nothing ' Dbconn.close ' set Dbconn = nothing '################################## End if '################################## %>
NO 제목 작성자 작성일 조회
TOP &sn=<%=sn%>&st=<%=st%>&sc=<%=sc%>&search=<%=search%>&page=<%=intnowpage%>"><%=cutStr(CheckWord(rs_top("title")), 60)%> <%=rs_top("name")%> 20<%=left(rs_top("writeday"),8)%> <%=rs_top("visit")%>
등록된 게시물이 없습니다.
<%=num%> <%=title%> <%=name%> 20<%=writeday%> <%=visit%>
checked <%end if%> value="on"> 이름 checked <%end if%> value="on"> 제목 checked <%end if%> value="on"> 내용
<% '################################## ' 페이징처리 '################################## intTemp = Int((intNowPage - 1) / intBlockPage) * intBlockPage + 1 '이전페이징 처리 If intTemp = 1 Then Response.Write"처음  " Response.Write "10개이전   l " Else Response.Write"처음  " Response.Write"10개이전   l " End If intLoop = 1 Do Until intLoop > intBlockPage Or intTemp > intTotalPage If intTemp = CInt(intNowPage) Then Response.Write "" & intTemp &" l " Else Response.Write"" & intTemp & " l " End If intTemp = intTemp + 1 intLoop = intLoop + 1 Loop If intTemp > intTotalPage Then Response.Write "  10개다음" Response.Write"  마지막" Else Response.Write"  10개다음" Response.Write"  마지막" End If %>