게시판 본문 ASP, ASP.NET, IIS & Script - Read Only
죄송합니다만... |
---|
작성자: 정보문
작성일시: 2005-07-15 11:41,
조회수: 6,035
|
// Decompiled by DJ v3.4.4.74 Copyright 2003 Atanas Neshkov Date: 2005-01-28 오후 7:47:50
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version! // Decompiler options: packimports(3) // Source File Name: OrgnSvSimpleLogin.java package com.enrise.share.orgn.servlet; import com.enrise.framework.reuse.*; import com.enrise.framework.servicelocator.ServiceLocator; import com.enrise.office.apvl.common.ApvlCoNtfyQueueSender; import com.enrise.office.apvl.common.ApvlNtfyMessageDTO; import com.enrise.office.http.UserInfo; import com.enrise.office.http.UserInfoUtil; import com.enrise.office.logger.Log; import com.enrise.office.logger.RoleLogRecorder; import com.enrise.office.sso.common.ESP; import com.enrise.office.util.*; import com.enrise.office.util.ejb.NtfySeAlarmBean.NtfySeAlarm; import com.enrise.office.util.ejb.NtfySeAlarmBean.NtfySeAlarmHome; import com.enrise.share.orgn.common.*; import com.enrise.share.orgn.javabean.delegate.OrgnPersonDelegate; import com.enrise.share.orgn.javabean.delegate.OrgnUnitDelegate; import java.io.*; import java.rmi.RemoteException; import java.util.List; import javax.ejb.CreateException; import javax.servlet.*; import javax.servlet.http.*; public class OrgnSvSimpleLogin extends HttpServlet { public OrgnSvSimpleLogin() { } public void init() throws ServletException { } public void destroy() { } public void doGet(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException { doPost(httpservletrequest, httpservletresponse); } public void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException { String s = httpservletrequest.getParameter("id"); String s1 = httpservletrequest.getParameter("lat"); String s2 = checkNull(httpservletrequest.getParameter("pki")); String s3 = httpservletrequest.getParameter("log_mod"); if(s3 == null) s3 = ""; if(s3.equals("y")) { do_log(httpservletrequest, httpservletresponse); return; } String s4 = ""; s4 = httpservletrequest.getParameter("loginByAdmin"); if(s4 == null) s4 = "NO"; else if(s4.equals("YES")) s2 = "Y"; Object obj = null; Object obj1 = null; Object obj2 = null; Object obj3 = null; Object obj4 = null; Object obj5 = null; String s11 = ""; String s13 = ""; String s14 = ""; try { FacadeImpl facadeimpl = new FacadeImpl(); OrgnPersonDTO orgnpersondto = (OrgnPersonDTO)facadeimpl.getValueObject("OrgnPersonDTO"); orgnpersondto.setProperty("KID", s); OrgnPersonDelegate orgnpersondelegate = new OrgnPersonDelegate(); orgnpersondto = orgnpersondelegate.retrieve(orgnpersondto); if(orgnpersondto.isPersistent()) { String s6 = orgnpersondto.getString("KID"); if(s2.equals("Y") || s4.equals("YES") || ESP.DecomposeAndVerify(s1, s6, orgnpersondto.getString("USERPASSWORD"))) { if(orgnpersondto.isApproved()) { String s5 = orgnpersondto.getString("USERID"); String s7 = orgnpersondto.getString("CN"); String s8 = orgnpersondto.getString("OU"); String s9 = orgnpersondto.getString("OUKID"); String s10 = orgnpersondto.getString("ORGUNITCODE"); String s12 = orgnpersondelegate.getAllGrantedRoles(orgnpersondto); String s15 = orgnpersondto.getString("IPADDRESS"); if(s6.equals(orgnpersondto.getString("CHIEFKID"))) s12 = s12 + ",DEPT_CHIEF"; if(orgnpersondto.getString("OURECEIVEDOCUMENTYN").equals("Y")) { if(orgnpersondto.isDocsMgr()) s12 = s12 + ",DEPT_DOCSMGR"; if(orgnpersondto.getString("KID").equals(orgnpersondto.getString("DOCSARCHIVISTKID"))) s12 = s12 + ",DEPT_DOCSARCH"; } else { OrgnUnitDelegate orgnunitdelegate = new OrgnUnitDelegate(); OrgnUnitDTO orgnunitdto1 = (OrgnUnitDTO)facadeimpl.getValueObject("OrgnUnitDTO"); orgnunitdto1.setProperty("KID", s9); orgnunitdto1 = orgnunitdelegate.getDocsUnit(orgnunitdto1); if(orgnpersondto.getString("KID").equals(orgnunitdto1.getString("DOCSMGRKID"))) s12 = s12 + ",DEPT_DOCSMGR"; if(orgnpersondto.getString("KID").equals(orgnunitdto1.getString("DOCSARCHIVISTKID"))) s12 = s12 + ",DEPT_DOCSARCH"; } OrgnUnitDTO orgnunitdto = orgnpersondelegate.getDocsUnit(orgnpersondto); if(orgnunitdto != null) s13 = orgnunitdto.getKID(); Cookie cookie = new Cookie("userKID", s6); cookie.setMaxAge(0x93a80); cookie.setPath("/"); httpservletresponse.addCookie(cookie); cookie = new Cookie("userID", s5); cookie.setMaxAge(0x93a80); cookie.setPath("/"); httpservletresponse.addCookie(cookie); javax.servlet.http.HttpSession httpsession = httpservletrequest.getSession(true); UserInfo userinfo = new UserInfo(s6, s5, s7, s12, s9, s10, s8, s13, s2, s4); UserInfoUtil.setUserInfo(httpservletrequest, userinfo); if(Globals.IP_SETTING.equals("YES")) { String s16 = httpservletrequest.getRemoteAddr(); if(s15 == null || s15.equals("") || !s4.equals("YES") && !s15.equals(s16)) { OrgnPersonDTO orgnpersondto1 = (OrgnPersonDTO)facadeimpl.getValueObject("OrgnPersonDTO"); orgnpersondto1.setProperty("KID", s); orgnpersondto1.setProperty("IPADDRESS", s16); if(!orgnpersondelegate.updateColumns(orgnpersondto1)) Log.roleInfo.println("====IP update fail!===="); else Log.roleInfo.println("====IP update success!===="); } } if(s4.equals("YES") && Globals.CAN_ROOT_LOGIN.equals("NO")) { String s17 = "\uC804\uC790\uACB0\uC7AC\uC11C\uBC84\uC5D0 \uC758\uD574 System\uC774 \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4."; if(Globals.ALARM_MODE.equals("ON")) if(EnriseProperties.getProperty("Globals.MESSENGER_KIND").equals("2")) { ApvlNtfyMessageDTO apvlntfymessagedto = (ApvlNtfyMessageDTO)facadeimpl.getValueObject("ApvlNtfyMessageDTO"); apvlntfymessagedto.setProperty("MODE", Globals.ADMIN_ALARM); apvlntfymessagedto.setProperty("TITLE", s17); apvlntfymessagedto.setProperty("SENDERKID", Globals.ROOTKID); apvlntfymessagedto.setProperty("RECEIVERKID", s6); ApvlCoNtfyQueueSender.sender(apvlntfymessagedto); } else if(EnriseProperties.getProperty("Globals.MESSENGER_KIND").equals("1")) { NtfySeAlarm ntfysealarm = null; try { ServiceLocator servicelocator = ServiceLocator.getFactory(); NtfySeAlarmHome ntfysealarmhome = (NtfySeAlarmHome)servicelocator.lookUpHome("NtfySeAlarmHome", com.enrise.office.util.ejb.NtfySeAlarmBean.NtfySeAlarmHome.class); ntfysealarm = ntfysealarmhome.create(); } catch(RemoteException remoteexception) { remoteexception.printStackTrace(); } catch(CreateException createexception) { createexception.printStackTrace(); } ntfysealarm.notify(Globals.ADMIN_ALARM, s17, Globals.ROOTKID, s6); } } changeAbsenceInfo(orgnpersondto, orgnpersondelegate); String s18 = httpservletrequest.getParameter("send_url"); String s19 = httpservletrequest.getParameter("send_target"); String s20 = httpservletrequest.getParameter("LOGIN_MOD"); if(s20 == null) s20 = "null"; if(s18 == null) httpservletresponse.sendRedirect(MAIN_PAGE_URL + "?LOGIN_MOD=" + s20); else httpservletresponse.sendRedirect(MAIN_PAGE_URL + "?send_url=" + s18 + "&send_target=" + s19 + "&LOGIN_MOD=" + s20); return; } else { httpservletresponse.sendRedirect(Globals.JSP_DIR + "/Error.jsp?ERR_CODE=LOGIN_FAIL"); return; } } else { httpservletresponse.sendRedirect(Globals.JSP_DIR + "/Error.jsp?ERR_CODE=LOGIN_FAIL"); return; } } else { httpservletresponse.sendRedirect(Globals.JSP_DIR + "/Error.jsp?ERR_CODE=LOGIN_FAIL"); return; } } catch(Exception exception) { OrgnCoLogger.log.error("OrgnSvSimpleLogin : " + exception.getMessage(), exception); } httpservletresponse.sendRedirect(Globals.JSP_DIR + "/Error.jsp?ERR_CODE=LOGIN_FAIL"); } public void do_log(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse) throws ServletException, IOException { PrintWriter printwriter = httpservletresponse.getWriter(); String s = "FAILED"; String s1 = httpservletrequest.getParameter("id"); String s2 = httpservletrequest.getParameter("lat"); try { FacadeImpl facadeimpl = new FacadeImpl(); OrgnPersonDTO orgnpersondto = (OrgnPersonDTO)facadeimpl.getValueObject("OrgnPersonDTO"); orgnpersondto.setProperty("KID", s1); OrgnPersonDelegate orgnpersondelegate = new OrgnPersonDelegate(); orgnpersondto = orgnpersondelegate.retrieve(orgnpersondto); String s3 = orgnpersondto.getString("KID"); String s5 = orgnpersondto.getString("OUKID"); if(orgnpersondto.isPersistent()) { String s4 = orgnpersondto.getString("KID"); if(ESP.DecomposeAndVerify(s2, s4, orgnpersondto.getString("USERPASSWORD"))) s = s4 + ":" + s5; } } catch(Exception exception) { exception.printStackTrace(); } System.out.println(s); printwriter.print(s); } private String locateUnit(OrgnUnitDTO orgnunitdto) throws OrgnDelegateException { OrgnUnitDelegate orgnunitdelegate = new OrgnUnitDelegate(); List list = orgnunitdelegate.retrieveByOU(orgnunitdto); StringBuffer stringbuffer = new StringBuffer(); for(int i = 0; i < list.size(); i++) { OrgnUnitDTO orgnunitdto1 = (OrgnUnitDTO)list.get(i); List list1 = orgnunitdelegate.getHierarchyInfos(orgnunitdto1); for(int j = list1.size() - 2; j > -1; j--) { OrgnUnitDTO orgnunitdto2 = (OrgnUnitDTO)list1.get(j); stringbuffer.append(orgnunitdto2.getKID()); if(j != 0) stringbuffer.append(":"); } } return stringbuffer.toString(); } private void changeAbsenceInfo(OrgnPersonDTO orgnpersondto, OrgnPersonDelegate orgnpersondelegate) { Object obj = null; try { String s = ""; if(orgnpersondto.isAbsence()) { FacadeImpl facadeimpl = new FacadeImpl(); OrgnAbsenceAlDTO orgnabsencealdto = (OrgnAbsenceAlDTO)facadeimpl.getValueObject("OrgnAbsenceAlDTO"); orgnabsencealdto.setProperty("KID", orgnpersondto.getKID()); orgnabsencealdto = orgnpersondelegate.selectApprovalInfo(orgnabsencealdto); String s1 = checkNull(orgnabsencealdto.getString("ABSENCEENDDATE")); if(!s1.equals("")) { DateUtility dateutility = new DateUtility(); if(dateutility.compareDate(s1) > 0) { orgnabsencealdto.setProperty("ISABSENCE", "N"); orgnabsencealdto.setProperty("ABSENCESTARTDATE", ""); orgnabsencealdto.setProperty("ABSENCEENDDATE", ""); orgnabsencealdto = orgnpersondelegate.setApprovalInfo(orgnabsencealdto); } } } } catch(Exception exception) { OrgnCoLogger.log.error("OrgnSvSimpleLogin : " + exception.getMessage(), exception); } } private String checkNull(String s) { if(s == null) s = ""; return s; } private static final int HOURES_COOKIE_ALIVE = 168; private static String MAIN_PAGE_URL; private static final boolean VIEW_LOGIN_RESULT = true; static { MAIN_PAGE_URL = Globals.JSP_DIR + "/ekp_main.jsp"; } } |
IP 주소: 211.251.224.193
|
정보문 |
충남 도교육청은 전자결재 시스템을 운영하고 있습니다. 쌍용에서 만든거죠.
|
2005-07-15 11:42 |
정보문 |
그런데 결재/수신해야 할 공문이 왔는지를 웹에서 확인해야만 합니다. 문서알리미 기능이 없다는 거죠. 그래서 서버를 관리하는 분에게 부탁하여 아이디만 던지면, 수신/결재할 문서의 카운트는 리턴해주는 JSP를 만들어서 넣어달라고 하여서 잘 쓰고 있답니다. ^^
|
2005-07-15 11:43 |
정보문 |
그런데 지역 교육청이 문제예요. 그 JSP를 지역 교육청 서버에 넣을 수가 없으니 말입니다. 서버관리자에게 요 JSP를 심어달라고 이야기하는 것 자체가 어렵더군요.
|
2005-07-15 11:44 |
정보문 |
그래서...아이디와 암호를 입력받아 일정시간마다 로그인하여, 결재/수신할 문서의 카운트를 참조하는 방법도 생각해보았는데요...문제가 있어요. 비번변경독촉 메시지가 뜨는 경우, 이미 접속된 사용자입니다. 재접속하시겠습니까? 라는 메시지. 가끔 뜨는 공지사항의 메시지에 대처하기 어렵습니다.
|
2005-07-15 11:45 |
정보문 |
또한 단일로그인만 지원하므로, 사용자에게 불편을 줄 수 있습니다. 제 프로그램이 접속된 상태라면, 재접속 여부를 묻는 메시지가 뜨므로 싫어하겠죠. 그래서 방법을 찾던 중에...인터넷 임시파일에 첨부한 내용이 있더군요. 아...쌍용에서 만든 메신저가 있어요. 테스트용으로 구해서 사용해다가 구하게 된 정보입니다.
|
2005-07-15 11:47 |
정보문 |
아마...쌍용에서 자기회사 메신저를 위해서 별도의 애플릿(?)을 서버에 심어놓은 것 같습니다. 저것을 활용하면 쉽게 로그인하고 문서의 카운트 자료에 접근할 수 있을 것 같은데요...문제는 제가 자바를 전혀 모른다는 겁니다. 저 자바를 어떻게 익스플로어와 연결해야 할까요? 질문이 너무 이상하죠? 저도 답답합니다. 감사합니다.
|
2005-07-15 11:49 |
게시물 | ||||
---|---|---|---|---|
1,232 | 2005-07-20 | 5,113 | ||
1,231 | 2005-07-19 | 3,064 | ||
1,230 |
re: 파일큐브에서요... [1] |
2005-07-19 | 2,958 | |
1,229 |
궁금이 |
2005-07-15 | 1,344 | |
1,228 | 2005-07-15 | 2,995 | ||
죄송합니다만... [6] |
2005-07-15 | 6,035 | ||
1,226 |
re: 죄송합니다만... [1] |
2005-07-15 | 2,959 | |
1,225 | 2005-07-14 | 5,797 | ||
1,224 |
re: 스크립트 제거 [2] |
2005-07-15 | 3,367 | |
1,223 |
궁금이 |
2005-07-14 | 955 | |
1,222 | 2005-07-14 | 3,962 | ||
1,221 | 2005-07-12 | 2,878 | ||
1,220 | 2005-07-12 | 3,186 | ||
1,219 | 2005-07-12 | 3,018 | ||
1,216 | 2005-07-12 | 2,902 | ||
1,215 | 2005-07-12 | 2,796 | ||
1,214 | 2005-07-11 | 2,884 | ||
1,213 | 2005-07-11 | 2,826 | ||
1,212 |
getByTagNAME( ) [1] |
정보문 |
2005-07-09 | 951 |
1,211 | 2005-07-07 | 2,876 | ||
1,210 | 2005-07-07 | 2,977 | ||
1,209 |
맞춤법 검사 [1] |
2005-07-06 | 2,951 | |
1,208 | 2005-07-06 | 2,889 | ||
1,207 | 2005-07-06 | 3,129 | ||
1,206 | 2005-07-06 | 3,047 |