<% /*============================================================================================== * Project Title : * File Name : csnot01.jsp * Include : * Used DB Table : notice, notice_ath * Used Class : * Description : °Ô½ÃÆÇ ¸®½ºÆ® * Programmer : °­ÁÖ¿ë * First Write : 2010.04.28 * Last Update : ==============================================================================================*/ %> <%@ page contentType="text/html;charset=euc-kr" %> <%@ include file="/include/in_Import.jsp" %> <%@ include file="/include/in_Function.jsp" %> <% int PageAuth = 1; String menuId = request.getParameter("menuId"); if(menuId == null || menuId.equals("")) menuId = "41"; %> <%! 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()); } } %> <% String spage = request.getParameter("spage"); int no = Integer.parseInt(request.getParameter("no")); if (spage == null) spage = "1"; int iPage = Integer.parseInt(spage); String keytype = request.getParameter("keytype"); String keyword = request.getParameter("keyword"); if ( keytype == null || keytype.equals("") ) { keytype = "subject"; } if ( keyword == null || keyword.equals("") ) { keyword = ""; } else { keyword = sutil.toEucKr(keyword); } java.text.SimpleDateFormat tformat = new java.text.SimpleDateFormat("yyyyMMdd"); String cur_year = tformat.format(new java.util.Date()).substring(0,4); Connection conn = null; Statement stmt = null; ResultSet rs = null; try { StringBuffer query = new StringBuffer(); query.append("select * "); query.append(" from notice "); query.append(" where no = ").append(no); conn = DriverManager.getConnection("jdbc:postgresql:hanmaum", "postgres", ""); stmt = conn.createStatement(); rs = stmt.executeQuery(query.toString()); if ( rs != null) { while ( rs.next() ) { String subject = rs.getString("subject"); String content = sutil.convertDBtoWEB(rs.getString("contents")); String name = rs.getString("name"); String reg_dt = rs.getString("reg_dt"); String file_nm = rs.getString("file_name"); String com_ids = rs.getString("com_ids"); // int state = rs.getInt("state"); if ( file_nm == null) { file_nm = ""; } String view_content = replace(content, " ", " "); view_content = replace(view_content, "\n", "
"); %> ¹«Á¦ ¹®¼­ <%@ include file="/hanmaum/Cs/04_subimg.jsp" %>
<%@ include file="/hanmaum/Cs/left_menu.jsp" %>
Ȩ > °í°´¼¾ÅÍ > °øÁö»çÇ×
 
<%= subject %> <%= reg_dt %>
<%= view_content %>
<%@ include file="/hanmaum/bottom.jsp" %> <% } } rs.close(); stmt.close(); 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/csnot02.jsp : " + e.toString()); } %>