<%@ 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:hanmaum","postgres",""); } catch(Exception e) { System.out.println("

JDCConnectionDriver Error : " + e.toString()); } } %> <% String passkey = request.getParameter("passkey"); String[] chk = request.getParameterValues("chk"); String[] appYn = request.getParameterValues("appYn"); String[] seqNo = request.getParameterValues("seqNo"); String cmd = request.getParameter("cmd"); String arrNum = ""; int totalCnt = 0; Connection conn = DriverManager.getConnection("jdbc:jdc:jdcpool"); Statement stmt = conn.createStatement(); ResultSet rs = null; try { StringBuffer query = new StringBuffer(); if(cmd != null && cmd.equals("D")) {//¼±ÅÃ±Û »èÁ¦ if(chk != null && chk.length > 0) { for(int i=0; chk.length>i; i++) { if(i == 0) { arrNum = "'" + chk[i] + "'"; } else { arrNum += ",'" + chk[i] + "'"; } } query.append(" delete from application_installation "); query.append(" where no in (").append(arrNum).append(")"); totalCnt = stmt.executeUpdate(query.toString()); query = new StringBuffer(); query.append(" delete from application "); query.append(" where no in (").append(arrNum).append(")"); totalCnt = stmt.executeUpdate(query.toString()); } } else if(cmd != null && cmd.equals("U")) { for(int i=0; seqNo.length>i; i++) { query = new StringBuffer(); query.append(" UPDATE APPLICATION_INSTALLATION "); query.append(" SET APP_YN = '").append(appYn[i]).append("'"); query.append(" WHERE NO = '").append(seqNo[i]).append("'"); totalCnt = stmt.executeUpdate(query.toString()); } } if(totalCnt > 0) { %> <% } else { %> <% } } catch (Exception e) { out.println("JSP >> Slight Exception in /Accou/accou05_list.jsp : " + e.toString()); %> <% } finally { if(rs != null) rs.close(); if(stmt != null) stmt.close(); if(conn != null) conn.close(); } %>