<% /*============================================================================================== * Project Title : ÃæÁÖÇѸ¶À½¿¬¼ö¿ø * File Name : accou05_ok.jsp * Include : * Used DB Table : application, application_installation * Used Class : * Description : ½Åû¼­ÀÛ¼º * Programmer : °­ÁÖ¿ë * First Write : 2010.05.13 * Last Update : ==============================================================================================*/ %> <%@ page contentType="text/html;charset=euc-kr" %> <%@ include file="/include/in_Import.jsp" %> <%@ include file="/include/in_Function.jsp" %> <%@ page import="kr.co.slight.jinhae.mail.*" %> <%! 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()); } } %> <% myUpload.initialize(pageContext); myUpload.upload(); int no = 0; String menuId = myUpload.getRequest().getParameter("menuId"); String html_contents = ""; String companyNm = sutil.toNullStr(myUpload.getRequest().getParameter("companyNm")); String companyCd = sutil.toNullStr(myUpload.getRequest().getParameter("companyCd")); String userNm = sutil.toNullStr(myUpload.getRequest().getParameter("userNm")); String postNo1 = sutil.toNullStr(myUpload.getRequest().getParameter("postNo1")); String postNo2 = sutil.toNullStr(myUpload.getRequest().getParameter("postNo2")); String postNo = postNo1 + "," + postNo2; String addr = sutil.toNullStr(myUpload.getRequest().getParameter("addr")); String upte = sutil.toNullStr(myUpload.getRequest().getParameter("upte")); String jongmok = sutil.toNullStr(myUpload.getRequest().getParameter("jongmok")); String deptNm = sutil.toNullStr(myUpload.getRequest().getParameter("deptNm")); String charge = sutil.toNullStr(myUpload.getRequest().getParameter("charge")); String telNo1 = sutil.toNullStr(myUpload.getRequest().getParameter("telNo1")); String telNo2 = sutil.toNullStr(myUpload.getRequest().getParameter("telNo2")); String telNo3 = sutil.toNullStr(myUpload.getRequest().getParameter("telNo3")); String telNo = telNo1 + "," + telNo2 + "," + telNo3; String mbNo1 = sutil.toNullStr(myUpload.getRequest().getParameter("mbNo1")); String mbNo2 = sutil.toNullStr(myUpload.getRequest().getParameter("mbNo2")); String mbNo3 = sutil.toNullStr(myUpload.getRequest().getParameter("mbNo3")); String mbNo = mbNo1 + "," + mbNo2 + "," + mbNo3; String faxNo1 = sutil.toNullStr(myUpload.getRequest().getParameter("faxNo1")); String faxNo2 = sutil.toNullStr(myUpload.getRequest().getParameter("faxNo2")); String faxNo3 = sutil.toNullStr(myUpload.getRequest().getParameter("faxNo3")); String faxNo = faxNo1 + "," + faxNo2 + "," + faxNo3; String email = sutil.toNullStr(myUpload.getRequest().getParameter("email")); String curmNm = sutil.toNullStr(myUpload.getRequest().getParameter("curmNm")); String stYear = sutil.toNullStr(myUpload.getRequest().getParameter("strYear")); String strMonth = sutil.toNullStr(myUpload.getRequest().getParameter("strMonth")); String strDay = sutil.toNullStr(myUpload.getRequest().getParameter("strDay")); String startDate = stYear + ","+ strMonth + ","+ strDay; String endYear = sutil.toNullStr(myUpload.getRequest().getParameter("endYear")); String endMonth = sutil.toNullStr(myUpload.getRequest().getParameter("endMonth")); String endDay = sutil.toNullStr(myUpload.getRequest().getParameter("endDay")); String endDate = endYear + ","+ endMonth + ","+ endDay; String chInTime = sutil.toNullStr(myUpload.getRequest().getParameter("chInTime")); String chOutTime = sutil.toNullStr(myUpload.getRequest().getParameter("chOutTime")); String totalCnt = sutil.toNullStr(myUpload.getRequest().getParameter("totalCnt")); String studentCnt = sutil.toNullStr(myUpload.getRequest().getParameter("studentCnt")); String otherCnt = sutil.toNullStr(myUpload.getRequest().getParameter("otherCnt")); String menCnt = sutil.toNullStr(myUpload.getRequest().getParameter("menCnt")); String girlCnt = sutil.toNullStr(myUpload.getRequest().getParameter("girlCnt")); String userCnt = totalCnt + "," + studentCnt + "," + otherCnt + "," + menCnt + "," + girlCnt; String totalMeal = sutil.toNullStr(myUpload.getRequest().getParameter("totalMeal")); String mealUserCnt = sutil.toNullStr(myUpload.getRequest().getParameter("mealUserCnt")); String mealCnt = sutil.toNullStr(myUpload.getRequest().getParameter("mealCnt")); String totalMealCnt = totalMeal + "," + mealUserCnt + "," + mealCnt; String totaluSpMeal = sutil.toNullStr(myUpload.getRequest().getParameter("totaluSpMeal")); String SpMealUserCnt = sutil.toNullStr(myUpload.getRequest().getParameter("SpmealUserCnt")); String SpMealCnt = sutil.toNullStr(myUpload.getRequest().getParameter("SpmealCnt")); String totalSpMealCnt = totaluSpMeal + "," + SpMealUserCnt + "," + SpMealCnt; String roomCnt01 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt01")); String roomCnt02 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt02")); String roomCnt03 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt03")); String roomCnt04 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt04")); String roomCnt05 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt05")); String roomCnt06 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt06")); String roomCnt07 = sutil.toNullStr(myUpload.getRequest().getParameter("roomCnt07")); String dayCnt01 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt01")); String dayCnt02 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt02")); String dayCnt03 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt03")); String dayCnt04 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt04")); String dayCnt05 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt05")); String dayCnt06 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt06")); String dayCnt07 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt07")); String dayCnt08 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt08")); String dayCnt09 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt09")); String dayCnt10 = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt10")); String dayCnt = sutil.toNullStr(myUpload.getRequest().getParameter("dayCnt")); String todate = sutil.toNullStr(myUpload.getRequest().getParameter("todate")); String data01 = roomCnt01 + "," + dayCnt01; String data02 = roomCnt02 + "," + dayCnt02; String data03 = roomCnt03 + "," + dayCnt03; String data04 = roomCnt04 + "," + dayCnt04; String data05 = roomCnt05 + "," + dayCnt05; String data06 = roomCnt06 + "," + dayCnt06; String data07 = roomCnt07 + "," + dayCnt07; String atcFile01 = ""; String atcFile02 = ""; String fileName1 = ""; String fileName2 = ""; String sikGubun = sutil.toNullStr(myUpload.getRequest().getParameter("sikGubun")); String file_nm = sutil.toNullStr(request.getParameter("file_nm")); String file_nm_new = request.getParameter("file_nm_new"); String file_gubun = sutil.toNullStr(request.getParameter("file_gubun")); try { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String query = null; Statement stmt = null; int i_rtn = 0; conn = DriverManager.getConnection("jdbc:jdc:jdcpool"); /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Start (°Ô½ÃÆÇ ¼öÁ¤ Á¤º¸ Update) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ //÷ºÎÆÄÀϽÃÀÛ String file_name = null; com.jspsmart.upload.File myFile = myUpload.getFiles().getFile(0); com.jspsmart.upload.File myFile1 = myUpload.getFiles().getFile(1); if (!myFile.isMissing()) { try { File photo = new File("/project/scgoneheart/hanmaum/Accou/atcFile/"+fileName1); if (photo.exists()) { photo.delete(); } } catch (Exception e) { } String f_name = todate.substring(0,4) + todate.substring(5,7) + todate.substring(8,10) + todate.substring(20,26) + "_1." + myFile.getFileExt(); myFile.saveAs("/project/scgoneheart/hanmaum/Accou/atcFile/" + f_name); atcFile01 = f_name; } if (!myFile1.isMissing()) { try { File photo1 = new File("/project/scgoneheart/hanmaum/Accou/atcFile/"+fileName2); if (photo1.exists()) { photo1.delete(); } } catch (Exception e) { } String f_name1 = todate.substring(0,4) + todate.substring(5,7) + todate.substring(8,10) + todate.substring(20,26) + "_2." + myFile1.getFileExt(); myFile1.saveAs("/project/scgoneheart/hanmaum/Accou/atcFile/" + f_name1); atcFile02 = f_name1; } //÷ºÎÆÄÀÏ ³¡ stmt = conn.createStatement(); rs = stmt.executeQuery("select nextval('public.application_no_seq')"); int seqNO = 0;//µî·Ï¿¡¸¸ ¾²´Â º¯¼ö while ( rs.next() ) { seqNO = rs.getInt(1); } String query_insert = "INSERT INTO public.application "; query_insert += " (no, company_name, company_code, representative, post_no, "; query_insert += " addr, conditions, event, dept_name, charge, "; query_insert += " tel_no, mb_no, fax_no, email, curm_name, "; query_insert += " start_training_date, end_training_date, check_in_time, check_out_time, user_cnt, "; query_insert += " meal_cnt, atch_file_01, atch_file_02, sp_meal_cnt, reg_dt) "; query_insert += "VALUES "; query_insert += " (?, ?, ?, ?, ?, "; query_insert += " ?, ?, ?, ?, ?, "; query_insert += " ?, ?, ?, ?, ?, "; query_insert += " ?, ?, ?, ?, ?, "; query_insert += " ?, ?, ?, ?, now()) "; pstmt = conn.prepareStatement(query_insert); pstmt.setInt(1, seqNO); pstmt.setString(2, companyNm ); pstmt.setString(3, companyCd ); pstmt.setString(4, userNm ); pstmt.setString(5, postNo ); pstmt.setString(6, addr ); pstmt.setString(7, upte); pstmt.setString(8, jongmok ); pstmt.setString(9, deptNm ); pstmt.setString(10, charge ); pstmt.setString(11, telNo ); pstmt.setString(12, mbNo ); pstmt.setString(13, faxNo ); pstmt.setString(14, email ); pstmt.setString(15, curmNm ); pstmt.setString(16, startDate ); pstmt.setString(17, endDate ); pstmt.setString(18, chInTime ); pstmt.setString(19, chOutTime ); pstmt.setString(20, userCnt); pstmt.setString(21, totalMealCnt ); pstmt.setString(22, atcFile01); pstmt.setString(23, atcFile02); pstmt.setString(24, totalSpMealCnt); i_rtn = pstmt.executeUpdate(); pstmt.close(); query_insert = "INSERT INTO public.application_installation "; query_insert += "(no, hall_150, class_room_80, class_room_40, seminar_room_20, "; query_insert += "seminar_room_10, stay_5, stay_18, playground_50, playground_100, "; query_insert += "playground_200, campfire ) "; query_insert += "VALUES "; query_insert += "(?, ?, ?, ?, ?, "; query_insert += "?, ?, ?, ?, ?, "; query_insert += "?, ?)"; pstmt = conn.prepareStatement(query_insert); pstmt.setInt(1, seqNO); pstmt.setString(2, data01 ); pstmt.setString(3, data02 ); pstmt.setString(4, data03 ); pstmt.setString(5, data04 ); pstmt.setString(6, data05 ); pstmt.setString(7, data06 ); pstmt.setString(8, data07 ); pstmt.setString(9, dayCnt08 ); pstmt.setString(10, dayCnt09 ); pstmt.setString(11, dayCnt10 ); pstmt.setString(12, dayCnt ); i_rtn = pstmt.executeUpdate(); if ( i_rtn > 0) { if(!email.equals("") && email != null) { html_contents += ""; html_contents += ""; html_contents += ""; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += "
"; html_contents += " "; html_contents += "
"; html_contents += "
"; html_contents += "
"; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += "
ȸ»ç¸í»ç¾÷ÀÚµî·Ï¹øÈ£
´ëÇ¥ÀÚ¿ìÆí¹øÈ£ "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += "
ÁÖ¼Ò
¾÷ÅÂÁ¾¸ñ
ºÎ¼­¸í´ã´çÀÚ
ÀüÈ­¹øÈ£ "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += " À̵¿ÀüÈ­ "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += "
Æѽº¹øÈ£ "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += " - "; html_contents += " "; html_contents += " E-Mail "; html_contents += " "; html_contents += "
°úÁ¤¸í
±³À°±â°£ "; html_contents += " "; html_contents += " ³â "; html_contents += " "; html_contents += " ¿ù "; html_contents += " "; html_contents += " ÀÏ ~ "; html_contents += " "; html_contents += " ³â "; html_contents += " "; html_contents += " ¿ù "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "
ÀԼҽð£ "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " Åð¼Ò½Ã°£
Àοø "; html_contents += " ÃÑ "; html_contents += " "; html_contents += " ¸í (±³À°»ý : "; html_contents += " "; html_contents += " ¸í, ±âŸ : "; html_contents += " "; html_contents += " ¸í)   ³²ÀÚ : "; html_contents += " "; html_contents += " ¸í, ¿©ÀÚ : "; html_contents += " "; html_contents += " ¸í "; html_contents += "
½Ä»ç "; html_contents += " ÃÑ "; html_contents += " "; html_contents += " ½Ä ( "; html_contents += " "; html_contents += " ¸í x "; html_contents += " "; html_contents += " ½Ä) "; html_contents += "
"; html_contents += "

"; html_contents += "
"; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += "
½Ã¼³¸í±¸ºÐ½Ã¼³ÇöȲ¼ö·®»ç¿ëÀϺñ°í
±³À°½Ã¼³°­´ç150¸í (1½Ç) "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
Áß°­ÀǽÇ80¸í (1½Ç) "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
¼Ò°­ÀǽÇ40¸í (4½Ç) "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
¼¼¹Ì³ª½Ç(Áß)20¸í (1½Ç) "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
¼¼¹Ì³ª½Ç(¼Ò)10¸í (4½Ç) "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
¼÷¹Ú½Ã¼³2ÀνÇ5½Ç "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
4 • 6ÀνÇ18½Ç "; html_contents += " ½Ç "; html_contents += " "; html_contents += " ÀÏ "; html_contents += "  
ºÎ´ë½Ã¼³Àܵð¿îµ¿Àå50ÀÎ ÀÌÇÏ "; html_contents += " ÀÏ "; html_contents += " ´Üü¼÷¹Ú½Ã
¹«·áÀÌ¿ë
100ÀÎ ÀÌÇÏ "; html_contents += " ÀÏ "; html_contents += "
200ÀÎ ÀÌÇÏ "; html_contents += " ÀÏ "; html_contents += "
Ä·ÇÁÆÄÀÌ¾î  "; html_contents += " ȸ1ȸ ±âÁØ
°­ÀÇÀå¼¼Æà "; if(sikGubun.equals("S")) html_contents += " Çб³½Ä "; else html_contents += " ºÐÀÓ½Ä "; html_contents += "
÷ºÎÆÄÀÏ "; html_contents += " 1. »ç¾÷ÀÚµî·ÏÁß  "; html_contents += "
"; html_contents += " 2. ±³À°ÀÏÁ¤Ç¥     "; html_contents += "
ÇùÁ¶»çÇ× "; html_contents += " 1. »ç¾÷ÀÚµî·ÏÁõ°ú ±³À°ÀÏÁ¤Ç¥´Â ÷ºÎÇϽðųª Æѽº·Î ¼ÛºÎ¹Ù¶ø´Ï´Ù.
"; html_contents += " 2. ½Ä»çÀοø º¯µ¿½Ã 4ÀÏÀü Å뺸ÇÏ¿© Áֽðí, ¹ÌÅ뺸½Ã ¿¹¾à½Åû ÀοøÀ¸·Î Á¤»êµË´Ï´Ù.
"; html_contents += "    (´Ü, ¿¹¾àÀοø ÃÊ°ú½Ã ½ÇÁ¦ÀοøÀ¸·Î Á¤»ê)
"; html_contents += " 3. º» ½Åû¼­ Á¢¼ö·Î »ç¿ë°è¾àÀÌ Ã¼°áµË´Ï´Ù.
"; html_contents += "    (´Ü, º°µµ °è¾àÀÌ ÇÊ¿ä½Ã ¿¬¼ö¿øÀ¸·Î ¿¬¶ôÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.)
"; html_contents += " 4. ½Ã¼³¹° »ç¿ëºÎÁÖÀÇ·Î ÀÎÇÑ °íÀå ¼ö¸®ºñ´Â »ç¿ëÀÚ°¡ ºÎ´ãÇÕ´Ï´Ù.
"; html_contents += " 5. ±âŸ º¯µ¿»çÇ×ÀÌ ¹ß»ý½Ã ±³À°ÀÏ 2ÁÖÀü±îÁö ¿¬¶ô¹Ù¶ø´Ï´Ù.
"; html_contents += " 6. ±×¿Ü ¸ðµç »çÇ×Àº ÀÌ¿ë¾à°üÀ» ÂüÁ¶ÇϽñ⠹ٶø´Ï´Ù.
"; html_contents += "
"; html_contents += "
"; html_contents += "
"; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += " "; html_contents += "
"; html_contents += " "; html_contents += " "; html_contents += " " + todate.substring(0,4) + " ³â " + todate.substring(5,7) + " ¿ù " + todate.substring(8,10) + " ÀÏ"; html_contents += " "; html_contents += " "; html_contents += "
"; html_contents += "
"; html_contents += " SCG ±×·ì ÃæÁÖ ÇѸ¶À½ ¿¬¼ö¿øÀå ±ÍÁß
"; html_contents += "
"; html_contents += "
"; SendMail sm = new SendMail (); sm.addToUser("cys@seoulgas.co.kr"); sm.setFromUser("cys@seoulgas.co.kr","ÇѸ¶À½¿¬¼ö¿ø"); sm.setSubject(companyNm + " ÇѸ¶À½¿¬¼ö¿ø ½Åû¼­"); sm.setContent(html_contents); if (sm.Send()) { %> <% } else { %> <% } sm.close(); } %> <% } else { %> <% } } catch (Exception e) { // ¿¡·¯ÆäÀÌÁö·Î À̵¿............ out.println("JSP >> Exception : " + e.toString()); } %>