<% /************************************************************@@ * Program Name : popup_inform_preview.jsp * Description : Áý°è¹®¼­ ¹Ì¸®º¸±â(µî·Ï°ú, º¯°æ¿¡¼­ °°ÀÌ »ç¿ë * Author : °­¿øÁß * Create Date : 2004.10.11 * History : @@************************************************************/ %> <%@ page contentType="text/html; charset=euc-kr" import="java.net.URLEncoder" import="kr.co.kihyun.beans.user.HttpSSOLogin" import="kr.co.kihyun.moumi.MoumiConfig" import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.beans.totsys.doc.Doc" import="kr.co.kihyun.text.html.ServletUtil" import="java.net.URLDecoder" import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.beans.entity.*" import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction" import="kr.co.kihyun.beans.entity.util.*" %> <%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%> <% PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager()); Transaction tx = pm.currentTransaction(); try{ /*********** parameter value ***********/ String usID = HttpSSOLogin.getLoginID(request); int sysAuth = HttpSSOLogin.getSysAuth(request); String docUserID = ""; Long docID = MLong.parseLong(request.getParameter("docID"), null); String modify = MString.checkNull(request.getParameter("modify")); String docName = Encoder.toJava(MString.checkNull(request.getParameter("docName"))); int accAuth = MInteger.parseInt(request.getParameter("accAuth"), 0); TotDoc totDoc = pm.getObjectById(TotDoc.class, docID); if(modify.equals("modify")){ tx.begin(); if(sysAuth == MoumiConfig.TOTPER && !usID.equals(totDoc.getUser(pm).getId())){ out.println(ServletUtil.alert("Á¤»óÀûÀÎ ¹æ¹ýÀ¸·Î ÀÌ¿ëÇØÁֽñ⠹ٶø´Ï´Ù.")); out.println(ServletUtil.getJavaScript("parent.opener.window.location.reload();")); out.println(ServletUtil.getJavaScript("self.close();")); return; } totDoc.setName(docName); totDoc.setAccessAuth(AccessAuth.asAccessAuth(accAuth)); pm.makePersistent(totDoc); tx.commit(); out.println(ServletUtil.getJavaScript("parent.opener.window.location.reload();")); out.println(ServletUtil.getJavaScript("self.close();")); } docName = totDoc.getName(); accAuth = totDoc.getAccessAuth().ordinal(); docUserID = totDoc.getUser(pm).getId(); %> <%=TotDocProcess.FORM%>Å×½ºÆ®
<%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%>¸í <%=MoumiConfig.getMessageBundle().getString("moumi.message.doc")%>°ø°³¿©ºÎ <%if(accAuth == 0){%> °ø°³ ºñ°ø°³ <%}else if(accAuth == 1){%> °ø°³ ºñ°ø°³ <%}%>
<%if(usID.equals(docUserID) || sysAuth == MoumiConfig.SYSADM){ %> <%}%>
<% } catch (Exception ex) { ex.printStackTrace(); ex.printStackTrace(); out.println(ServletUtil.alert("º¯°æÀÌ ½ÇÆÐ µÇ¾ú½À´Ï´Ù.")); } finally { if(tx.isActive()) tx.rollback(); pm.close(); } %>