<%@ page contentType="text/html;charset=euc-kr" %> <%@ include file="/include/in_Import.jsp" %> <%@ include file="/include/in_Function.jsp" %> <% String menuId = request.getParameter("menuId"); if(menuId == null || menuId.equals("")) menuId = "35"; %> <%! static { try { new kr.co.slight.jinhae.pool.JDCConnectionDriver("org.postgresql.Driver","jdbc:postgresql:hanmaum","postgres",""); } catch(Exception e) { System.out.println("

JDCConnectionDriver Error : " + e.toString()); } } %> <% /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SESSION ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ String spage = request.getParameter("spage"); if (spage == null) spage = "1"; int iPage = Integer.parseInt(spage); String keytype = request.getParameter("keytype"); String keyword = request.getParameter("keyword"); String passkey = request.getParameter("passkey"); String appYn = ""; if ( keytype == null || keytype.equals("") ) { keytype = "subject"; } if ( keyword == null || keyword.equals("") ) { keyword = ""; } else { keyword = sutil.toEucKr(keyword); } if(passkey == null) passkey = ""; int totalCnt = 0; //±ÛÀÇ ÃÑ °¹¼ö int totalPage; //ÃÑ ÆäÀÌÁö °¹¼ö int pageSize = 10; //ÇÑÆäÀÌÁö¿¡ º¸¿©ÁÙ ±ÛÀÇ ÃÖ´ë °¹¼ö int blockSize = 10; //ÇÑ È­¸é¿¡ º¸¿©ÁÙ ÃÖ´ë ÆäÀÌÁö °¹¼ö int blockPage; //ÇÑ È­¸é¿¡ º¸¿©Áö´Â ÆäÀÌÁö Áß Ã¹¹ø° ÆäÀÌÁö ¹øÈ£ int start_no = (iPage-1)*pageSize + 1; //ÇØ´ç ÆäÀÌÁöÀÇ Ã¹¹ø° row number int end_no = iPage*pageSize; //ÇØ´ç ÆäÀÌÁöÀÇ ¸¶Áö¸· row number(ÃÖ´ë°ª) Connection conn = null; Statement stmt = null; ResultSet rs = null; ResultSet rtList = null; try { StringBuffer query = new StringBuffer(); StringBuffer query_cnt = new StringBuffer(); query_cnt.append("select count(*) from application_installation a, application b where a.no = b.no"); query.append("select * from application_installation a, application b where a.no = b.no"); query.append(" order by a.no desc "); query.append(" limit ").append(pageSize).append(" offset ").append(start_no-1); conn = DriverManager.getConnection("jdbc:jdc:jdcpool"); stmt = conn.createStatement(); rs = stmt.executeQuery(query_cnt.toString()); while ( rs.next() ) { totalCnt = rs.getInt(1); } rs.close(); totalPage = ((int) (totalCnt - 1)/pageSize ) + 1; blockPage = ((int) (iPage -1)/blockSize ) * blockSize + 1; rtList = stmt.executeQuery(query.toString()); int loopSize = Math.min(blockPage + blockSize, totalPage + 1); int rowNum = ((loopSize - iPage) * 10) + (totalCnt % 10) - 10; %> <%@ page contentType="text/html;charset=euc-kr" %> ¹«Á¦ ¹®¼­ <%@ include file="/hanmaum/Cs/04_subimg.jsp" %>
<%@ include file="/hanmaum/Accou/left_menu.jsp" %>
Ȩ > ÀÌ¿ë¾È³» > ½Åû¼­ÀÛ¼º
 
<% if (totalCnt > 0) { int i = totalCnt; int no = 0; String subject = ""; String regdate = ""; while (rtList.next()) { no = rtList.getInt("no"); subject = rtList.getString("company_name"); regdate = rtList.getString("reg_dt").toString().substring(0, 10); appYn = rtList.getString("app_yn").toString(); subject = cutoffString(subject, 80); %> <% } } else { %> <% } %>
<%= rowNum-- %> <%= subject %> <%= regdate %>
µî·ÏµÈ °Ô½Ã¹°ÀÌ ¾ø½À´Ï´Ù.
<% //ÀÌÀü ÆäÀÌÁö if ( iPage == 1 ) { %> <% } else { %> <% } // ÆäÀÌÁö Loop for ( int j=blockPage; j [<%=j%>] <% } else { %> [<%=j%>] <% } } /*----------------------------------------- ´ÙÀ½ ÆäÀÌÁö -----------------------------------------*/ if ( iPage == totalPage ) { %> <% } else { %> <% } %>
   
<%@ include file="/hanmaum/bottom.jsp" %> <% if ( rs != null ) rs.close(); if ( stmt != null ) stmt.close(); if ( conn != null ) conn.close(); } catch (Exception e) { if ( rs != null ) rs.close(); if ( stmt != null ) stmt.close(); if ( conn != null ) conn.close(); // ¿¡·¯ÆäÀÌÁö·Î À̵¿............ out.println("JSP >> Slight Exception in /Cs/csnot01.jsp : " + e.toString()); } %>