
<%
/************************************************************@@
  * Program Name	: popup_copy_form.jsp
  * Description		: /집계자/내문서함/등록함/복사양식 첨부
  * Author				: 강원중
  * Create Date		: 2004-11-05
  * History				:
@@************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8"
	import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong"
	import="kr.co.kihyun.text.html.TagFilter"
	import="kr.co.kihyun.lang.StringConverter"
	import="kr.co.kihyun.moumi.Moumi"
	import="kr.co.kihyun.beans.user.UserGroupList"
	import="kr.co.kihyun.beans.user.UserGroup"
	import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction"
	import="kr.co.kihyun.beans.entity.util.*"
	import="kr.co.kihyun.beans.entity.TotDoc"%>

<%
PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
Transaction tx = pm.currentTransaction();
try{
	/********** get Parameter *************/
	Long reuseDocID = MLong.parseLong(request.getParameter("reuseDocID"), null);

	/*********** doc value *****************/
	String repDocForm = "";
	if(reuseDocID != null){
		TotDoc totDoc = pm.getObjectById(TotDoc.class, reuseDocID);
		repDocForm = totDoc.getForm();
		repDocForm = TagFilter.convertSingle(repDocForm);
		repDocForm = StringConverter.toOneLine(repDocForm);
	}
%>
<html>
<head>
<title><%=Moumi.getTitle()%></title>
<link rel="stylesheet" href="/totsys/common/css/text.css"
	type="text/css">
<link rel="stylesheet" href="/totsys/common/css/kecttep.css"
	type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
<script language=javascript>
			<%if(reuseDocID != null){%>
			function initForm(){
				opener.EditCtrl.document.body.innerHTML = '<%= repDocForm %>';
				//disable 사용안함
				//opener.EditCtrl.document.body.disabled = true;
				window.close();
			}
			<%}%>
		</script>
</head>

<body style='' bgcolor="#FFFFFF" text="#000000" leftmargin="0"
	topmargin="0" marginwidth="0" marginheight="0">
<SCRIPT FOR=window EVENT=onload LANGUAGE="javascript">
		<%if(reuseDocID != null){%>
			initForm();
		<%}%>
		</SCRIPT>
</body>
</html>
<%
}catch(Exception ex){
        //38.오류메세지를 통한 정보 노출(getMessage)_CWE-209 : Update by YOUNGJUN,CHO
	//out.println(ex);
	ex.printStackTrace();
	//out.println("<html><body style='overflow=auto' bgcolor='white'><h1>Can't contact servlet runner</h1><br><br>Message : "+ex.getMessage()+"</body></html>");
	//out.println("<META HTTP-EQUIV='refresh' CONTENT='0.1; URL=/error/exception.jsp'>");
        //================================================
}finally{
    if(tx.isActive())
    tx.rollback();
	pm.close();
}
%>
