<%-- ¢Ã JSP ±â´É : HVS21 English News Board List ¢Ã ±¸ÇöÀÏÀÚ : 2001-06-18 4:42 PM ¢Ã ±¸ÇöÀÚ : Oh Ji Hui(minerva@402lab.com) --%> <%@ page import="com.lab402.*" %> <%@ page import="java.sql.*" %> <%-- Init Variable Area --%> <%@ include file = "/common/initVariable.inc" %> <%-- Init DB Variable Area --%> <%@ include file="/common/initDBVariable.inc" %> <%-- Init List Variable Area --%> <%@ include file="/common/initGetList.inc" %> <% String isNew = Utility.removeStrNull(request.getParameter("isNew")); if( isNew.equals("yes") ) { if(session.getAttribute("search") != null) { session.removeAttribute("search"); } } // °Ô½ÃÆÇÀÇ »öÀ» ÁöÁ¤. thisPageMenu = "hvsNewsEng"; String division = Utility.removeStrNull(request.getParameter("division")); String searchName = Utility.removeStrNull(request.getParameter("searchName")); SearchOption option = null; urlJSP = "/english/news/list.jsp?"; try { if( division.equals("") || searchName.equals("") ) { // ¼¼¼Ç Á¤º¸¸¦ °¡Á®¿Â´Ù. option = (SearchOption) session.getAttribute("search"); if(option == null) throw new Exception(); if( !option.name.equals("hvsNews") ) { session.removeAttribute("search"); } else { division = option.division; searchName = option.searchName[0]; } } }catch(Exception e){ division = ""; } try{ //¸®½ºÆ®¿¡ »Ñ·ÁÁÙ Äõ¸®¹® ÀÛ¼º sql = "select SEQNO, TITLE, WRITER, WRITE_DATE, COUNT, CONTENT from HVS_NEWS_ENG"; //°Ë»öÀ» À§ÇÑ ºÎºÐ. title, writer,content, dateº°·Î °Ë»öÇÑ´Ù. if(division.equals("title")) { sql += " where TITLE like '%" + searchName + "%'"; } else if(division.equals("writer")) { sql += " where WRITER like '%" + searchName + "%'"; } else if(division.equals("content")) { sql += " where CONTENT like '%" + searchName + "%'"; } else if(division.equals("date")) { sql += " where WRITE_DATE like '%" + searchName + "%'"; } sql += " order by SEQNO DESC"; currentPage = Utility.removeIntNull(request.getParameter("pg")); if(option == null && currentPage <= 0) { currentPage = 1; }else if(currentPage <= 0) { if(option.currentPage > 0) { currentPage = option.currentPage; } else { currentPage = (option.currentPage <= 0) ? 1 : option.currentPage; } } // out.println(Utility.debugCommentString(" sql : " + sql)); // out.println(Utility.debugScriptString(" totalPage : " + totalPage)); option = new SearchOption(); option.name = "hvsNews"; option.division = division; option.searchName = new String[1]; option.searchName[0] = searchName; option.currentPage = currentPage; session.setAttribute("search", option); colSize = 6; // listSize = 10; conn = DBConnectionBean.getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(sql); %> <%@ include file="/common/getList.inc" %> <% //} catch(BusinessException be) { // errMsg = be.errMsg; } catch(SQLException se) { errMsg = "DB Server ¿¡ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù."; } catch(Exception e) { errMsg = "Server ¿¡ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù."; } finally { try { if(rs != null) rs.close(); if(stmt != null) stmt.close(); if(conn != null) conn.close(); } catch(Exception e) { errMsg = "ÀÚ¿øÀ» ¹Ý³³ÇÏ´Â Áß Server ¿¡ ¿À·ù°¡ ¹ß»ýÇß½À´Ï´Ù."; } } %> ¨Ô¨â¨ß : The worldwide Leader in Ship-Repairing Industry : ¨Ô¨â¨ß
Home / News
         
 
<%@ include file = "/common/pageNoListHead.inc" %>
 
 
<% if( list.size() <= 0 && errMsg.equals("") ) { errMsg = "°Ô½Ã±ÛÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."; } String[] bgColor = new String[2]; //String imageTag = ""; //int levelImage = 0; //int levelImageMax = 40; for(int i=0; i < listSize; i++) { if( i % 2 == 0 ) { bgColor[0] = "EBEBEB"; bgColor[1] = "#F0E4BB"; } else { bgColor[0] = "FFFFFF"; bgColor[1] = "#F9F1DF"; } if(i < list.size() ) { listObj = (String[]) list.get(i); // SEQNO, TITLE, WRITER, WRITE_DATE, COUNT from HVS_NEWS %> <% } else { %> <% } } %>
<%= count %>
<%= DateTool.printDate(listObj[3]) %>
   <%= Utility.ksc2iso(Utility.byteSubstring(listObj[1], 46)) %>
<%= Utility.ksc2iso(listObj[2]) %>
<%= listObj[4] %>
   <%= (i==0) ? errMsg : "" %>
<%@ include file = "/common/pageNoList.inc" %>