<%@page contentType="text/html;charset=KSC5601"%> <%@include file='/main02/include/jsp/inc_env.jsp'%> <%@include file='/include/jsp/header.jsp'%> <%@ page import="java.util.Vector" %> <%@ page import="com.util.collection.*" %> <%! private static final int MAX_PAGE = 10; private static final int MAX_LINE = 10; private static int nPage; //페이지수 private static int nScrPerPage; //Max_page당 수 private static int limit; private static int nRegnoSize; //등록번호 벡터크기 private static int nPageSize; //등록번호 나누기 MAX_LINE의 몫 private static int nRemain; //조회된 데이터 나누기 MAX_LINE의 나머지 private static int nTotPage; //전체 페이지수 f private static int nPagePerScreen; //화면당의 페이지수 전체페이지 /MAX_PAGE private static int nPageRemain; //화면당의 페이지수 나머지 페이지 h private static int wid = 0; private static int level = 0; private static String equal; %> <% //String home_dir = ""; //----------------Login---------------------------------- String tmpStrID = arg.getUserID(); if(tmpStrID == null) tmpStrID = ""; //------------------------------------------------------- String strField = (request.getParameter("selSearch") == null ? "" : request.getParameter("selSearch").trim()); String strWords = fromDB(request.getParameter("words") == null ? "" : request.getParameter("words").trim()); int nComId2 = 1; String sPage = (request.getParameter("page") == null ? "0" : request.getParameter("page").trim()); if(request.getParameter("page")== null ){ nPage=0; nScrPerPage=0; }else{ nPage = Integer.parseInt(request.getParameter("page")); nScrPerPage = Integer.parseInt(request.getParameter("scrperpage")); } %> <% XVectorBox box = null; int join_gb =0; try{ box = qnaForum1.KEIQnAForumDaoList(nComId2, strField, strWords, nPage+1); }catch(Exception e){ throw new Exception(e.getMessage()); } if (box == null){ box = new XVectorBox(); } Vector vTotCnt = box.getVector("TOTCNT"); Vector vQNA_REGNO = box.getVector("QNA_REGNO"); Vector vCOM_GBN = box.getVector("COM_GBN"); Vector vMBR_ID = box.getVector("MBR_ID"); Vector vNAME = box.getVector("NAME"); Vector vQNA_SUBJECT = box.getVector("QNA_SUBJECT"); Vector vQNA_CONTENTS = box.getVector("QNA_CONTENTS"); Vector vQNA_REGDATE = box.getVector("QNA_REGDATE"); Vector vQNA_COUNT = box.getVector("QNA_COUNT"); Vector vQNA_REF = box.getVector("QNA_REF"); Vector vQNA_RESEQ = box.getVector("QNA_RESEQ"); Vector vQNA_RELEVEL = box.getVector("QNA_RELEVEL"); Vector vQNA_FILENAME = box.getVector("QNA_FILENAME"); Vector vQNA_FILESIZE = box.getVector("QNA_FILESIZE"); Vector vQNA_FILETYPE = box.getVector("QNA_FILETYPE"); System.out.println(")))))))))))))))))))))))))" + vTotCnt.size()); nRegnoSize = 0; if(vTotCnt.size() > 0) { nRegnoSize = Integer.parseInt(vTotCnt.elementAt(0).toString()); } nPageSize = nRegnoSize / MAX_LINE; nRemain = nRegnoSize % MAX_LINE; //나머지가 0이 아닐경우 페이지 추가 0일 경우 나눈 몫이 전체 페이지 nTotPage = (nRemain !=0) ? nPageSize + 1 : nPageSize; nPagePerScreen = (nTotPage / MAX_PAGE); nPageRemain = (nTotPage % MAX_PAGE); //나머지가 0이 아닐경우 총 화면당 페이지에 추가 nPageRemain = (nPageRemain != 0) ? nPagePerScreen + 1 : nPagePerScreen; %> 한국국제전시포럼 <%@include file="cmn/top_sub.htm"%>
<%@include file="cmn/menu.htm"%>
 
<% int Num = 0; int ipage = Integer.parseInt(sPage)+1; limit = Math.min(MAX_LINE, nRegnoSize-nPage*MAX_LINE); for (int nCnt=0; nCnt < vQNA_REGNO.size(); nCnt++) { Num = (nRegnoSize - (ipage-1) * MAX_PAGE) - nCnt; %> > > > > <% } if(nRegnoSize == 0) { %> <% } %>
번호 제목 작성자 등록일 조회
<%= Num %> <% if(vQNA_RELEVEL.elementAt(nCnt)!=null) { //System.out.println("-------------------------"+ vQNA_REGNO.size()); level = Integer.parseInt(vQNA_RELEVEL.elementAt(nCnt).toString()); if (level >0 ) { wid = 5 * level; %> <% } } %> <%=(String) vQNA_SUBJECT.elementAt(nCnt)%> <% if(vMBR_ID.elementAt(nCnt).equals("admin")) { %> 관리자 <% }else if(vNAME.elementAt(nCnt)==null || vNAME.elementAt(nCnt).equals("")) { %> <%=vMBR_ID.elementAt(nCnt) %> <% }else { %> <%=vNAME.elementAt(nCnt) %> <% } %> <%=vQNA_REGDATE.elementAt(nCnt) %> <%=vQNA_COUNT.elementAt(nCnt) %>
자료가 존재하지 않습니다.
<% int Tmp_End_P=nScrPerPage*MAX_PAGE; if (nScrPerPage > 0 ) { out.println("이전 | "); }else { out.println("이전 | "); } for( int nCnt=nScrPerPage*MAX_PAGE; nCnt < MAX_PAGE*(nScrPerPage+1) ; nCnt++) { if (nCnt < nTotPage) { if (nCnt == nPage) { out.write(""+ Integer.toString(nCnt+1)+" | "); }else{ out.write(""+ Integer.toString(nCnt+1)+" | "); } } } if (nRegnoSize > MAX_LINE) { if (nPageRemain != nScrPerPage+1) { if (nRegnoSize > MAX_PAGE*(nScrPerPage)) { out.println("다음"); } }else { out.println("다음"); } }else { out.println("다음"); } %>