<%@ page import="java.sql.*" %> <%! public String toParamStr(String oldStr, String newStr) { try { if (oldStr == null || oldStr.equals("")) { return newStr; } else { return oldStr.trim(); } } catch (Exception e) { return oldStr; } } public String toEucKr(String s) { try { return new String(s.getBytes("iso-8859-1"), "EUC-KR"); } catch (Exception e) { return s; } } %> <% String menuId = request.getParameter("menuId"); if(menuId == null || menuId.equals("")) menuId = "11"; %> <%@ page contentType="text/html;charset=euc-kr" %> <% Connection conn = null; try { // Ŭ·¡½º ·Îµå Class.forName("org.postgresql.Driver"); conn = DriverManager.getConnection("jdbc:postgresql:hanmaum", "postgres", ""); } catch(Exception e) { } PreparedStatement ps = null; ResultSet rs = null; ResultSet rsList = null; String searchPage = toParamStr(request.getParameter("searchPage"), "1"); String searchType = toParamStr(request.getParameter("searchType"), "01"); String searchWord = toEucKr(toParamStr(request.getParameter("searchWord"), "")); String searchLine = toParamStr(request.getParameter("searchLine"), "10"); //ÇÑÆäÀÌÁö¿¡ º¸¿©ÁÙ ±ÛÀÇ ÃÖ´ë °¹¼ö String todate = ""; String galtype = toParamStr(request.getParameter("galtype"), "2"); String galseason = toParamStr(request.getParameter("galseason"), "1"); int totalCnt = 0; //±ÛÀÇ ÃÑ °¹¼ö int totalPage; //ÃÑ ÆäÀÌÁö °¹¼ö int blockSize = 10; //ÇÑ È­¸é¿¡ º¸¿©ÁÙ ÃÖ´ë ÆäÀÌÁö °¹¼ö int blockPage; //ÇÑ È­¸é¿¡ º¸¿©Áö´Â ÆäÀÌÁö Áß Ã¹¹ø° ÆäÀÌÁö ¹øÈ£ int start_no = (Integer.parseInt(searchPage)-1)*Integer.parseInt(searchLine) + 1; //ÇØ´ç ÆäÀÌÁöÀÇ Ã¹¹ø° row number int end_no = Integer.parseInt(searchPage)*Integer.parseInt(searchLine); //ÇØ´ç ÆäÀÌÁöÀÇ ¸¶Áö¸· row number(ÃÖ´ë°ª) String query = "select now() as sysdate "; ps = conn.prepareStatement(query); rs = ps.executeQuery (); while ( rs.next() ) { todate = rs.getString("sysdate"); } rs.close(); String sql = ""; sql = " select count(*) as cnt from gallery where type = '1' "; try { ps = conn.prepareStatement(sql); rs = ps.executeQuery (); if ( rs.next() ) { totalCnt = rs.getInt ("cnt"); } } catch (Exception e) { System.out.println("tqna_List Error : " + e.toString()); } finally { try { if (rs != null) rs.close(); if (ps != null) ps.close(); } catch (Exception e) { System.out.println("Close Error : " + e.toString()); } } totalPage = ( (int) (totalCnt - 1)/Integer.parseInt(searchLine) ) + 1; blockPage = ( (int) (Integer.parseInt(searchPage) -1)/blockSize ) * blockSize + 1; /*try { sql = " select no, type, title, article, writer, wdate, ip, passwd, hitcnt, state "; sql += " from qna where type = '1' and state = '1' "; ps = conn.prepareStatement(sql); rsList = ps.executeQuery (); } catch (Exception e) { if ( rs != null ) rs.close(); if ( ps != null ) ps.close(); if ( conn != null ) conn.close(); }*/ %> ¹«Á¦ ¹®¼­
<%@ include file="/hanmaum/Intro/01_subimg.jsp" %>
<%@ include file="/hanmaum/gallery/left_menu.jsp" %>
Ȩ > °¶·¯¸® > <% if(galtype.equals("1")) { %>ÁÖº¯Ç³°æ<% } else if(galtype.equals("2")) { %>ÇѸ¶À½¿¬¼ö¿ø Àü°æ<% } else if(galtype.equals("3")) { %>½Ç³»ÀÎÅ׸®¾î<% } else if(galtype.equals("4")) { %>»ç¿ëÀÚ°¶·¯¸®<% } %><% if(galtype.equals("1") || galtype.equals("2")) { %> > <% if(galseason.equals("1")) { %>º½<% } else if(galseason.equals("2")) { %>¿©¸§<% } else if(galseason.equals("3")) { %>°¡À»<% } else if(galseason.equals("4")) { %>°Ü¿ï<% } %><% } %>
<% if(galtype.equals("1")) { %> <% } else if(galtype.equals("2")) { %> <% } else if(galtype.equals("3")) { %> <% } else if(galtype.equals("4")) { %> <% } %>
 
<% if(galtype.equals("1") || galtype.equals("2")) { %> <% } else { %> <% } %>
»çÁø ¾÷·Îµå 1
»çÁø ¾÷·Îµå 2
»çÁø ¾÷·Îµå 3
À̹ÌÁö´Â 3Àå±îÁö °¡´ÉÇϸç Àå´ç 5120KB ÀÌÇÏ·Î µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. À̹ÌÁö µî·ÏÀº JPG, GIF, BMP¸¸ °¡´ÉÇÕ´Ï´Ù.
 
<%@ include file="/hanmaum/bottom.jsp" %>