<% /*============================================================================================== * Project Title : lovehb(ÇѸ¶À½¿¬¼ö¿ø) * File Name : csnot03.jsp * Include : * Used DB Table : notice * Used Class : * Description : °Ô½ÃÆÇ µî·Ï * Programmer : °­ÁÖ¿ë * First Write : 2010.04.29 * Last Update : ==============================================================================================*/ %> <%@ page contentType="text/html;charset=euc-kr" %> <%@ include file="/include/in_Import.jsp" %> <%@ include file="/include/in_Function.jsp" %> <%! static { try { new kr.co.slight.jinhae.pool.JDCConnectionDriver("org.postgresql.Driver","jdbc:postgresql:jinhae","postgres",""); } catch(Exception e) { System.out.println("

JDCConnectionDriver Error : " + e.toString()); } } %> <% String spage = request.getParameter("spage"); String no = request.getParameter("no"); String menuId = request.getParameter("menuId"); if(menuId == null || menuId.equals("")) menuId = "42"; if(spage == null) spage = "1"; if(no == null || no == "") no = "0"; int seq_no = Integer.parseInt(no); int iPage = Integer.parseInt(spage); String keytype = request.getParameter("keytype"); String keyword = request.getParameter("keyword"); String password = request.getParameter("password"); String cmd = request.getParameter("cmd"); if(keytype == null || keytype.equals("")) keytype = "subject"; if(cmd == null || cmd.equals("")) cmd = "I"; if(keyword == null || keyword.equals("")) { keyword = ""; } else { keyword = sutil.toEucKr(keyword); } java.text.SimpleDateFormat tformat = new java.text.SimpleDateFormat("yyyyMMdd"); try { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String query = null; String org_pwd = null; String subject = ""; String contents = ""; String contentsRpl = ""; String name = ""; conn = DriverManager.getConnection("jdbc:postgresql:hanmaum", "postgres", ""); query = " SELECT * FROM NOTICE WHERE NO = ? "; pstmt = conn.prepareStatement(query); pstmt.setInt(1, seq_no); if(seq_no > 0) { rs = pstmt.executeQuery(); } if(rs != null) { while(rs.next()) { subject = rs.getString("subject"); contents = sutil.convertDBtoWEBComp(rs.getString("contents")); name = rs.getString("name"); } } query = " SELECT * FROM NOTICE_RPL WHERE NO = ? "; pstmt = conn.prepareStatement(query); pstmt.setInt(1, seq_no); if(seq_no > 0) { rs = pstmt.executeQuery(); } if(rs != null) { while(rs.next()) { contentsRpl = sutil.convertDBtoWEBComp(rs.getString("contents")); } } String view_content = replace(contents, " ", " "); view_content = replace(view_content, "\n", "
"); %> ¹«Á¦ ¹®¼­ <%@ include file="/hanmaum/Cs/04_subimg.jsp" %>
<%@ include file="/hanmaum/Cs/left_menu.jsp" %>
Ȩ > °í°´¼¾ÅÍ > °øÁö»çÇ×
 
<% if(cmd.equals("I")) {%> <%} %>
<% if(cmd != null && !cmd.equals("RU") && !cmd.equals("R")) { %>
<% } else { %>

<%= view_content %>
<% } %>
<%@ include file="/hanmaum/bottom.jsp" %> <% if(rs != null) rs.close(); if(pstmt != null) pstmt.close(); if(conn != null) conn.close(); } catch (Exception e) { // ¿¡·¯ÆäÀÌÁö·Î À̵¿............ out.println("JSP >> Slight Exception in /Cs/csnot03.jsp : " + e.toString()); } %>