<%@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 = qnaForum.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; %> Korea Exhibition Forum <%@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) { %> <% } %>
No. Title Name Date Read
<%= 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")) { %> 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) %>
No data.
<% int Tmp_End_P=nScrPerPage*MAX_PAGE; if (nScrPerPage > 0 ) { out.println("Previous | "); }else { out.println("Previous | "); } 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("Next"); } }else { out.println("Next"); } }else { out.println("Next"); } %>