<% Response.Expires = 0 %> 게시판 리스트 marginwidth=<%=leftmargin%> topmargin=<%=topmargin%> marginheight=<%=topmargin%>>
<% Response.Write header page = Request.QueryString("page") if page <> "" Then curPage = page if curPage < 1 Then curPage = 1 end if else curPage = 1 end if if Request.QueryString("startpage") = "" then startpage = 1 else startpage = Request.QueryString("startpage") end if ''set cm = server.CreateObject("ADODB.Command") ''cm.ActiveConnection = conn ''cm.CommandType = adCmdStoredProc ''cm.CommandText = "missBoard_GetCnt" ''cm.Parameters.Append cm.CreateParameter("@boardtable", adVarChar, adParamInput, 25, boardtable) ''cm.Parameters.Append cm.CreateParameter("@idx", adVarChar, adParamInput, 10, idx) ''cm.Parameters.Append cm.CreateParameter("@TotalCount", adInteger, adParamOutput, 8) ''cm.Execute ''r_count = cm.Parameters("@TotalCount").Value ''set cm = nothing sqlstr = "select count(no) from " & boardtable & " where idx = '" & idx & "'" set rs = conn.execute( sqlstr ) r_count = rs(0) set rs = server.CreateObject("ADODB.RecordSet") strSQL = "SELECT top " & ps * curPage & "*" strSQL = strSQL & " FROM " & boardtable & " where idx='" & idx & _ "' order by group_id desc, group_order asc" rs.CursorLocation = adUseClient rs.open strSQL, conn, adOpenForwardOnly, adLockReadOnly %>
<% if titleview then %> <%= title %> <% end if%> <% if groupview then set rs2 = server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM viewmissBoardAdminList " strSQL = strSQL & " where groupstr='" & groupstr & "'" rs2.CursorLocation = adUseClient rs2.open strSQL, conn, adOpenForwardOnly, adLockReadOnly %> <% set rs2 = nothing end if write_able = false '사용자 아이디 user_id = Request.Cookies("user")("user_id") '운영자 로그인 아이디 LoginAdminid = session("LoginAdminid") response.write "" ' 동호회의 경우 ==================== if clubidx <> "" then ' 로그인한 경우 ==================== if(user_id <> "") then temp = getability(user_id, idx) if temp = "2" or temp = "3" then write_able = true writeStr = "frm_write.asp?idx=" & idx end if end if ' 동호회가 아닌 경우 ==================== else if onlyadmin then if (LoginAdminid = adminid) or session("missBoardadminLogin") then write_able = true writestr = "frm_write.asp?idx=" & idx end if else if onlymember then if (user_id <> "") then write_able = true writestr = "frm_write.asp?idx=" & idx end if else write_able = true writestr = "frm_write.asp?idx=" & idx end if end if end if if ( session("missBoardAdminLogin") )then write_able=true writestr = "frm_write.asp?idx=" & idx end if if onlymember or (clubidx <> "") then namefield = "ID/이름" else namefield = "이름" end if %>
<% viewcol = 5 if(viewtype) then viewcol = viewcol + 1 if(boardtype = Pds_Type or boardtype = Pds_AType) then viewcol = viewcol + 1 %>
  게시물: <%= r_count %>개 [<%=curPage%>/<%=TotPage%>]
제목 글쓴이 내용   
<% if (titleline) then %> <% end if %> <% if typeview then%> <% end if%> <% if boardtype = Pds_Type or boardtype = Pds_AType then %> <% end if %> <% if (titleline) then %> <% end if %> <% if rs.EOF then %> <% else dim bg redim bg(pagesize) select case lineeffect case "0" for i = 0 to pagesize - 1 bg(i) = listbg1 next case "1" for i = 0 to pagesize - 1 if(i mod 2 = 0) then bg(i) = listbg1 else bg(i) = listbg2 end if next case "2" hexrbg1 = hex2int(left(listbg1,2)) hexgbg1 = hex2int(mid(listbg1,3,2)) hexbbg1 = hex2int(right(listbg1,2)) hexrbg2 = hex2int(left(listbg2,2)) hexgbg2 = hex2int(mid(listbg2,3,2)) hexbbg2 = hex2int(right(listbg2,2)) rdelta = (hexrbg2 - hexrbg1) / pagesize gdelta = (hexgbg2 - hexgbg1) / pagesize bdelta = (hexbbg2 - hexbbg1) / pagesize r = hexrbg1 g = hexbbg1 b = hexgbg1 for i = 0 to pagesize - 1 bg(i) = hex(r) + hex(g) + hex(b) r = r + rdelta g = g + gdelta b = b + bdelta next end select rs.PageSize = ps RS.AbsolutePage = curPage totPage = r_count \ rs.PageSize if not totPage * rs.PageSize = r_count then totPage = totPage+1 i = 0 do while not rs.EOF and rs.PageSize > i fimage = fileicon(rs("filename")) blank = "" for cnt = 0 to rs("msglevel") blank = blank & "  " next content = rs("content") If Len(content) > 150 Then content = Mid(content, 1, 150) & "..." content = replace(content, """", """) content = replace(content, "'", """) subject = rs("subject") If Len(subject) > 30 Then subject = Mid(subject, 1, 30) & "..." subject = replace(subject, """", """) ' writedate = timestr(rs("writedate")) writedate = datestr(rs("writedate")) if (trim(listbg3) <> "") then actStr = " onMouseOver=this.style.backgroundColor='#" + trim(listbg3) actStr = actStr + "' onMouseOut=this.style.backgroundColor='" + bg(i) + "'" end if %> bgcolor="#<%=bg(i)%>"> <% if typeview then %> <% end if %> <% if onlymember or (clubidx <> "") then namefield = rs("writeid") & "(" & rs("writer") & ")" else namefield = rs("writer") end if if rs("email") <> "" then namefield = "" & namefield & "" end if %> <% if boardtype = Pds_Type or boardtype = Pds_AType then %> <% end if %> <% i = i + 1 rs.MoveNext loop %> <% if (titleline) then %> <% end if %> <% end if ''자료 없을 때의 끝.. %>
height=1 bgcolor="#<%=tlinecolor%>">
번호   제    목 <%=namefield%> 날짜 조회 다운
height=1 bgcolor="#<%=tlinecolor%>">
align=center height=30>아직 등록된 자료가 없습니다.
<%= (r_count - i - (curPage - 1) * rs.PageSize) %>> <% if rs("msglevel") > 0 then %> <%=blank%> <% end if %> <% tempstr = "view.asp?no=" & rs("no") & "&page=" & curpage & "&idx=" & idx if newtarget then tempstr = "'#null' onclick=newwin('" & tempstr & "');" end if %> title="<%=content%>"><%=subject%> <% if now() < dateadd("d",1,rs("writedate")) then %> <% End If %> <%=namefield%> <%= writedate %> <%= rs("readno")%> <%=rs("downno")%>
height=1 bgcolor="#<%=tlinecolor%>">
border=0 cellspacing=0 cellpadding=0 >
<% if totpage > skippage then %> <% if startpage = 1 then %> <% else %> <% end if %> <% ' if ((startpage\skippage) = (totpage\skippage)) then %> <% else %> <% end if ' else %> <% end if %>
     <% ' For i = startpage to startpage + skippage - 1 if i > totpage then exit for else if i = Cint(curpage) then tempStr = "" & i & " " else tempStr = "" & i & " " end if %> <%=tempStr%> <% end if Next %>       <% For i = startpage to totpage if i = Cint(curpage) then %> ><%=i%>   <% else %> ><%=i%>   <% end if next %>
align="<%=aligns%>">
  <% if write_able then %> 글쓰기 <% end if if clubidx = "" then if LoginAdminid <> adminid then %> &opt=1>관리자모드로 <% else %> &boardkind=<%=boardkind%>>로그아웃 <% end if end if %>
<% set rs = nothing set conn = nothing Response.Write footer %>