
<%@page import="java.util.Date"%>
<%@page import="kr.co.kihyun.util.Base64_2"%>
<%@page import="kr.co.kihyun.util.Base64"%>
<%@page import="java.net.URLDecoder"%>
<%/************************************************************@@
 * Program Name	: report_view.jsp
 * Description		: /보고자/내문서함/임시보고함/보고자료 보기
 * Author			: 기현테크
 * Create Date		: 2010.11.26
 * History			:
 @@************************************************************/%>

<%@ page contentType="text/html; charset=UTF-8"
	import="java.net.URLEncoder" import="javax.jdo.PersistenceManager"
	import="javax.jdo.Query" import="kr.co.kihyun.beans.entity.util.*"
	import="kr.co.kihyun.beans.user.HttpSSOLogin"
	import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong"
	import="kr.co.kihyun.moumi.MoumiConfig"
	import="kr.co.kihyun.beans.entity.MUser"
        import="kr.co.kihyun.beans.user.DeptAdd"
	import="kr.co.kihyun.beans.entity.TotDoc"
	import="kr.co.kihyun.beans.entity.TotReport"
	import="kr.co.kihyun.beans.entity.TotReportProcess"
	import="kr.co.kihyun.beans.user.*"
	import="kr.co.kihyun.moumi.report.MReport"
	import="kr.co.kihyun.beans.totsys.report.Report"
	import="kr.co.kihyun.lang.MInteger"
	import="kr.co.kihyun.beans.totsys.repoper.RepoadmList"
	import="kr.co.kihyun.beans.totsys.report.ReportView"
	import="kr.co.kihyun.beans.totsys.report.ReportViewManager"
	import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction"
	import="kr.co.kihyun.beans.entity.util.*"
	import="kr.co.kihyun.beans.entity.TotDoc" import="org.slf4j.Logger"
	import="org.slf4j.LoggerFactory"
	import="kr.co.kihyun.beans.entity.Board"
	import="kr.co.kihyun.text.html.TagFilter"
	import="kr.co.kihyun.beans.entity.*"%>
<%@ page import="java.util.Map.Entry"%>
<%@ page import="java.util.List"%>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
	PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
	Transaction tx = pm.currentTransaction();
	try {
		/********** session내의 userId **********/
		String usID = HttpSSOLogin.getLoginID(request);
		String dtID = HttpSSOLogin.getDeptID(request);
                DeptAdd dept = new DeptAdd();
                int grade = dept.getGrade(usID, dtID);
                int foundation = dept.getFoundation(usID, dtID);

                //String rootDept = dept.getRootDept(usID);

		/********** Parameter **********/
		Long reportID = MLong.parseLong(request.getParameter("reportID"));
		String totperInfo = clearXSS(MString.checkNull(request.getParameter("totperInfo")),"");
		String reportType = clearXSS(request.getParameter("reportType"),null);
		Long repoadminID = MLong.parseLong(request.getParameter("repoadminID"));                

		session.setAttribute("compSuccTargetURI", "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType="+reportType);

		Repoadm repoadm = null;
		TotReport totReport = (TotReport)pm.getObjectById(TotReport.class, reportID);
                String accDocCd = clearXSS(MString.checkNull(request.getParameter("accDocCd")),"");
                String daegu = totReport.getTotDoc().getDept().substring(0, 2);


                boolean closedFlag=false;
                
                TotDoc td=totReport.getSlaveTotDoc();
                if(td==null) closedFlag=true;
                else
                {
                  Date date=td.getEndDate();
                  long time=System.currentTimeMillis();
                  if(date.getTime()<=System.currentTimeMillis()) closedFlag=true;
                }



String docName = totReport.getTotDoc().getName();
 Long downDocId=null;
        try{
        downDocId=totReport.getSlaveTotDoc().getId();
        }
        catch(Exception ex) { downDocId=null; }


                String doctName=totReport.getTotDoc().getName();
                String doctName2=totReport.getTotDoc().getName();

                /*
                doctName=Base64.Base64encoding(doctName); 
                doctName=doctName.replaceAll("\n"," ");
                */
                doctName=Base64_2.encode(doctName);
                doctName=URLEncoder.encode(doctName,"UTF-8");
                //doctName=doctName.replaceAll("\n","");
                
//System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :"+doctName);
//System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ :"+new String(Base64_2.decode(doctName)));
                
                String doctName4=new String(Base64_2.decode(doctName));
                
		if(repoadminID != null)
			repoadm = pm.getObjectById(Repoadm.class, repoadminID);

		tx.begin();

		pm.refresh(totReport);
		pm.makePersistent(totReport);
        
		int totRange = totReport.getTotDoc().getTotRange().ordinal();
                tx.commit();
		
                
                //String slav = clearXSS(MString.checkNull(totReport.getTotDoc().getSlaveTotDocs().toString()),"");

                String slav="";
                if(totReport.getSlaveTotDoc()==null) slav="[]";
                else
                {
                    Long tmpLong=totReport.getSlaveTotDoc().getId();
                    slav=clearXSS(MString.checkNull(tmpLong.toString()),"[]");
                }
                
		String boardGroupID = Category.ID_TOT_DOC_COMMENT;
		String url = clearXSS(request.getParameter("url"),"");

		if(url == null){ url = ""; }

		String boardContents = "";
		String svrFilenames = "";
		int visit = 0;

		Board totperComment = totReport.getTotDoc().getBoard();

		if(totperComment != null){

			tx.begin();
			boardContents=TagFilter.convertSpace(totperComment.getContents());

			for (Entry<String, List<Byte>> entry : totperComment.getAttachments().entrySet()) {                               
				svrFilenames += entry.getKey() + ";";
			}
			visit = totperComment.getVisit();
			totperComment.setVisit(visit+1);
			pm.makePersistent(totperComment);
			tx.commit();
		}

        
		String titleName = URLEncoder.encode(MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.recog") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.box")+doctName2, "UTF-8");

		tx.begin();
%>


<html>
<head>
<title><%=MoumiConfig.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">
<link rel="stylesheet" href="/totsys/common/css/tabs.css"
	type="text/css">
<link rel="stylesheet" href="/totsys/common/css/SquareButtons.css"
	type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
<script src="/totsys/common/js/popup.js"></script>
<script>
			function reportComp(){
if(<%=closedFlag%>==false)
              {
                  alert('집계가 종료되지않았습니다. 먼저 집계를 종료하신후 승인상신하셔야 합니다');
                  return false;
              }

                                var uri = '/totsys/memo/rereport/pop_accDocCd.jsp';
				sendReport = getOpener(uri, 'sendReport', 300, 200, 'center', 'middle', 'yes', 'yes');
				sendReport.focus();
                                ////window.open('/totsys/memo/rereport/pop_refin.jsp?reportID=<%=reportID%>','refin','width=601, height=300,toolbar=no, directories=no, status=no, menubar=no, resizable=no');
				//if(!confirm("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSubmitTotdoc") %>")){
				//	return;
				//}
				//compForm.prss.value = '<%=MReport.COMP%>';
				//compForm.submit();

			}

			// 재입력 상태로 만들어 목록에서 더 이상 나타나지 않게 하고
			// 집계가 재진행 될 경우 재입력요청 상태로 접수함에 나타남.
			function reportDel(){
				if(!confirm("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.deletion") %>")){
					return;
				}
				compForm.prss.value = '<%=MReport.RETURN%>';
				compForm.submit();
			}

			function printReport() {
				var uri = '/totsys/common/inc/documents/report/report_view_print.jsp?reportID=<%=reportID%>';
				sendReport = getOpener(uri, 'sendReport', 600, 650, 'center', 'middle', 'yes', 'yes');
				sendReport.focus();
			}

			function NotDocGO(){
				var bool = confirm("<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.notTrans")%>");
				if(bool){
					NotDoc.submit();
				}else return;
			}

			function prssForm(){
				if(confirm("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.collectInit") %>")){
					prssChange.submit();
				}
			}

			function deptRegist(){
                
				var height = screen.height;
				var width = screen.width;
				var leftpos = width / 2 - 350;
				var toppos = height / 2 - 350;
				var urlname = "/totsys/common/web/report_dept/edit_dept_list.jsp?reportID=<%=reportID%>&usedType=RECOG";

				post= window.open(urlname, "post","width=713, height=425, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
				post.focus();
			}

			function recogSet(){
				<%if(totReport.getRepoadms().size() > 0){%>
				if(confirm("<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.recogUp")%>")){
					dform.submit();
				}
				<%}else{%>
					alert('<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.approvalRecogUp")%>');
				<%}%>
			}
                        function acptdoc(){
                                if(confirm("<%=MoumiConfig.getMessageBundle().getString("moumi.message.popup.deletion")%>")){
					acptdocform.submit();
                               }
			}
			function recogProccessChagne(repoadmType)
            {                                
				dform.repoadmType.value = repoadmType;
				if(repoadmType == "<%=Recog.RETURN_RECOG.ordinal()%>")
                {
					window.open('/totsys/memo/rereport/pop_rereport.jsp?isRecog=RECOG&docID=<%=totReport.getTotDoc().getId()%>&deptID=<%=totReport.getTotDoc().getDept(pm).getId()%>&userID=<%=usID%>','rereport','width=601, height=300,toolbar=no, directories=no, status=no, menubar=no, resizable=no');
				}else
                {
					dform.action = "/servlet/kr.co.kihyun.beans.totsys.repoadm.HttpRecogUpdate";
					dform.submit();
				}
			}
                        //LJH 
			function sendDraft(){ // 엑셀 결재하기 버튼을 눌렀을 시
				var height = screen.height;
				var width = screen.width;
				var leftpos = width / 2 - 350;
				var toppos = height / 2 - 350;
				frm=document.payForm;
				frm.action='/servlet/kr.co.kihyun.beans.totsys.repoper.HttpExcelDown';
				frm.target='payform';
				frm.method='post';
				win=window.open('','payform',"width=830,height=570,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left="+leftpos+",top="+toppos);
				win.focus();
				frm.submit(); 
				//location.href="./moumi_ex.jsp?reportID=<%= reportID %>";
			}

			function sendNeisRecog(){
				var target_win = null;
                /*
               document.reuseForm.reportID.value='<%=reportID%>';
               document.reuseForm.USER_ID.value='<%=usID%>';
               document.reuseForm.DEPT_CODE.value='<%=dtID%>';
                document.reuseForm.doctName.value='<%=doctName%>';               
               window.open ("","NEIS_POPUP","width=835px, height=555px, top=0px, left=0px, toolbar=no, scrollbars=no, resizable=no, status=no, location=no, menubar=no, fullscreen=no");
               document.reuseForm.target="NEIS_POPUP";
               document.reuseForm.action="http://<%= request.getServerName().replace("ats", "eis") %>/displayXUI.jsp?mipid=cm.bcm.cfm.rt::bcm_cfmrt00_m01.xfdl";
               document.reuseForm.submit();
               */
              //alert('<%=doctName4%>');
              if(<%=closedFlag%>==false)
              {
                  alert('집계가 종료되지않았습니다. 먼저 집계를 종료하신후 승인상신하셔야 합니다');
                  return false;
              }
              target_win = window.open ("http://<%= request.getServerName().replace("ats", "eis") %>/displayXUI.jsp?mipid=cm.bcm.cfm.rt::bcm_cfmrt00_m01.xfdl&reportID=<%=reportID%>&USER_ID=<%=usID%>&DEPT_CODE=<%=dtID%>&doctName=<%=doctName%>&apType=I","NEIS_POPUP","width=835px, height=555px, top=0px, left=0px, toolbar=no, scrollbars=no, resizable=no, status=no, location=no, menubar=no, fullscreen=no");
			}
		</script>
</head>

<body style='' bgcolor="#FFFFFF" leftmargin="0" topmargin="0"
	marginwidth="0" marginheight="0"
	onload="scrollObjectContent('formDiv');">
<span id="SetWin"
	style="position: absolute; z-index: 10; Visibility: hidden; height: 65px; width: 210px; background: silver; border: 1px #333333 solid; line-height: 1.4em; padding: 3px 3px"></span>

<form name="dform"
	action="/servlet/kr.co.kihyun.beans.totsys.repoadm.HttpRecogSet"
	method="post"><input type="hidden" name="deptIDs"> <input
	type="hidden" name="deptNames"> <input type="hidden"
	name="deptTypes"> <input type="hidden" name="deptCountText">
<input type="hidden" name="deptChange"> <input type="hidden"
	name="contents"> <input type="hidden" name="reportID"
	value="<%=reportID %>"> <input type="hidden" name="repoadminID"
	value="<%=repoadminID %>"> <input type="hidden"
	name="repoadmType"> <input type="hidden" name="reportType"
	value="<%=reportType %>"></form>
<!--연계등록 초기화를 위한 폼-->
<form name="acptdocform"
	action="/servlet/kr.co.kihyun.beans.totsys.repoper.HttpAcptDocUpdate"
	method="post" ><input type="hidden" name="reportID" value="<%=reportID%>"></form>

<form name="compForm"
	action="/servlet/kr.co.kihyun.beans.totsys.repoper.HttpPrssUpdate"
	method="post"><input type="hidden" name="reportID"
	value="<%=reportID%>"> <input type="hidden" name="prss"
	value="<%=MReport.COMP%>"> <input type="hidden" name="repDocID"
	value=""><input type="hidden" name="accDocCd"
	value="<%=accDocCd%>"></form>

<form name="NotDoc" method="post"
	action="/servlet/kr.co.kihyun.beans.totsys.repoper.HttpNotUpdate">
<input type="hidden" name="reportID" value="<%=reportID%>"></form>

<form name="prssChange" method="post"
	action="/servlet/kr.co.kihyun.beans.totsys.repoper.HttpPrssUpdate">
<input type="hidden" name="reportID" value="<%=reportID%>"> <input
	type="hidden" name="prss" value="<%=MReport.ACCEPT_LIST%>"> <input
	type="hidden" name="totRange" value="<%=totRange%>"> <input
	type="hidden" name="repDocID" value=""></form>

<form name="payForm" method="post">
  <input type="hidden" name="reportID" value="<%=reportID%>"> 
</form>

<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<jsp:include page="/totsys/common/inc/totper/top/top.jsp" flush="true" />
        <%--
	<%if("TEMP".equals(reportType)){%>
	<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
	<%}else if("RECOG".equals(reportType)){%>
	<jsp:include page="/totsys/common/inc/title/title.jsp" flush="true">
		<jsp:param value="<%= titleName %>" name="title" />
	</jsp:include>
	<%}%>
        --%>

        <jsp:include page="/totsys/common/inc/title/title.jsp" flush="true">
            <jsp:param value="<%= URLEncoder.encode(doctName2,"UTF-8") %>" name="desc" />
	</jsp:include>


</table>
</div>

<div id="header">
<ul id="primary">
	<li><span class="kecttep_menu_focous"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") %><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit")%></span></li>
	<%if(totReport.getProcess() == TotReportProcess.TEMP && totReport.getSlaveTotDoc() == null){%>
	<li><a
		href="./temp_report_modify.jsp?doctName=<%=URLEncoder.encode(doctName2,"UTF-8") %>&reportID=<%=totReport.getId()%>&totperInfo=<%=totperInfo%>&reportType=<%=reportType %>"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") %><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.modify")%></a></li>
	<%}%>
</ul>
</div>
<div id="main">
<div id="contents">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr class="toolbar">
		<td align="left">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td align="left" colspan="4">
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<%if(totReport.getTotDoc().getProcess(pm) != TotDocProcess.END) {%>
							<%if(totReport.getProcess() != TotReportProcess.APPROVE){%>
								<%if(MoumiConfig.getUseRecog()){//승인선 지정%>
								<td><a class="simplebutton" href="#" onclick="deptRegist();"><span
									class="check"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.recog")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.lineSelect")%></span></a>
								</td>
<!--								<td class="kecttep_button_td"><a class="simplebutton"
									href="#" onclick="recogSet();"><span class="check"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.recog")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.up")%></span></a>
								</td>-->
                                                                <%}%>
                                                                <%if (totReport.getProcess() == TotReportProcess.TEMP) {%>
<%--
                                                                <%
                                                                    if(!((grade == 1 && foundation == 3)||daegu.equals("D1")||dtID.equals("A000003493")||dtID.equals("A000003506")||dtID.equals("A000003490")||dtID.equals("A000003491"))){
                                                                %>
--%>
                                                                        <%
                                                                            if (!(grade == 1 && foundation == 3)) {
                                                                        %>
								<td class="kecttep_button_td">
                                    <a class="simplebutton"	href="#" onclick="sendNeisRecog();">
                                        <span class="check">
                                            <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.recog") %><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.up")%>
                                        </span>
                                    </a>
                                </td>
                                <%}%>




                                                                

								<td class="kecttep_button_td">
                                                                    <a class="simplebutton" href="#" onclick="sendDraft();">
                                                                        <span class="check">
                                                                            <%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.sendDraft") %>
                                                                        </span>
                                                                    </a>
                                                                </td>

                                                    		<%//if (totRange == 1) {%>
<!--									<td class="kecttep_button_td"><a class="simplebutton"
										href="#" onclick="reportComp();"><span class="ok"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.comp") %></span></a>
									</td>-->
									<%//} else if (dtID.equals(totReport.getDept(pm).getId())) {%>
<!--									<td class="kecttep_button_td"><a class="simplebutton"
										href="#" onclick="reportComp();"><span class="ok"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.comp") %></span></a>
									</td>-->
									<%//}%>
                                                                        <!-- 제출완료 버튼 -->
                                                                        <%--
                                                                        <%if ((grade == 1 && foundation == 3)||daegu.equals("D1")||dtID.equals("A000003493")||dtID.equals("A000003506")||dtID.equals("A000003490")||dtID.equals("A000003491")) {//사립유치원 또는 대구시 교육청%>
                                                                        --%>
                                                                        <%//if (grade == 1 && foundation == 3) {//사립유치원 또는 대구시 교육청%>
									<td class="kecttep_button_td"><a class="simplebutton"
										href="#" onclick="reportComp();"><span class="ok"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.comp") %></span></a>
									</td>
                                                                        <%//}%>
								<%}%>
							<%}%>
						<%} else {%>
							<td class="kecttep_button_td">
								<span><%= MoumiConfig.getMessageBundle().getString("moumi.message.doc.EndedDocDesc") %></span>
							</td>
							<td class="kecttep_button_td">
								<a class="simplebutton" style="width: 7em;"
								href="#" onclick="reportDel();"><span class="check"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.docDel") %></span></a>
							</td>
						<%}%>
						<%if("RECOG".equals(reportType)){%>
						<%if(repoadm.getRecogNum()+1 < totReport.getRepoadms().size()){%>
						<td class="kecttep_button_td"><a class="simplebutton"
							href="#"
							onclick="recogProccessChagne('<%=Recog.NOT_RECOG.ordinal() %>');"><span
							class="info"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.recog")%></span></a>
						</td>
						<td class="kecttep_button_td"><a class="simplebutton"
							href="#"
							onclick="recogProccessChagne('<%=Recog.ARBITRARY.ordinal() %>');"><span
							class="info"><%= Recog.ARBITRARY %></span></a></td>
						<%}%>
						<%if(repoadm.getRecogNum()+1 == totReport.getRepoadms().size()){%>
						<td class="kecttep_button_td"><a class="simplebutton"
							href="#"
							onclick="recogProccessChagne('<%=Recog.FINAL_RECOG.ordinal() %>');"><span
							class="info"><%= Recog.FINAL_RECOG%></span></a></td>
						<%}%>
						<td class="kecttep_button_td"><a class="simplebutton"
							href="#"
							onclick="recogProccessChagne('<%=Recog.RETURN_RECOG.ordinal() %>');"><span
							class="info"><%= Recog.RETURN_RECOG %></span></a></td>
						<%}%>
						<%if(!MString.isNull(boardContents) || !MString.isNull(svrFilenames)){%>
						<td class="kecttep_button_td"><a class="simplebutton"
							href="#"
							onclick="totperInfo('<%= totReport.getTotDoc().getId() %>','<%= boardGroupID%>');"><span
							class="info"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.totperInfo") %></span></a>
						</td>
						<%}%>


<%--
						<td class="kecttep_button_td"><a class="simplebutton"
							href="/totsys/common/inc/documents/report/report_view_excel1.jsp?reportID=<%=reportID%>"
							target="_parent"><span class="excel"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.excel") %></span></a>
						</td>
--%>
<td>&nbsp;</td>
<td>
<% if(downDocId==null || downDocId==0L) { %>
  <a class="simplebutton" href="/totsys/common/inc/documents/report/report_view_excel1.jsp?reportID=<%=reportID%>" target="_parent">
    <span class="excel"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.excel") %></span>
  </a>
  <% } else {%>

  <a class="simplebutton" href="/totsys/common/inc/documents/tot_reports/total_reports_excel.jsp?reportID=<%=reportID%>&gradeCode=-1&searchType=-1&displaySummary=false&docID=<%=downDocId%>&tableNum=&docName=<%=URLEncoder.encode(docName, "UTF-8")%>" target="_parent">
    <span class="excel"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.excel") %></span>
  </a>
						   <% } %>
</td>



                           


						<td class="kecttep_button_td"><a class="simplebutton"
							href="#" onclick="printReport();"><span class="print"><%= MoumiConfig.getMessageBundle().getString("moumi.message.button_small.print") %></span></a>
						</td>
                                                <%if(!slav.equals("[]")){%>
                                                <td class="kecttep_button_td"><a class="simplebutton" href="#" onclick="acptdoc();"><span
                                                     class="check"><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.subDocRegist")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.button_small.initialization")%></span></a>
                                                </td>
                                                <%}%>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>

	<!---- 내용---->
	<tr>
		<td height="31" valign="top">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr height="10">
				<td height="10"></td>
				<td height="10"></td>
				<td height="10"></td>
				<td height="10"></td>
			</tr>
			<!------------------------------- 집계자 정보 시작 ------------------------------->
			<jsp:include page="/totsys/common/inc/totper/totper.jsp" flush="true">
				<jsp:param name="docID"
					value='<%= totReport.getTotDoc().getId() %>' />
			</jsp:include>
			<!------------------------------- 집계자 정보 끝 --------------------------------->
			<tr nowrap height="10">
				<td nowrap width="149" height="10"></td>
				<td height="10"></td>
				<td nowrap width="149" height="10"></td>
				<td height="10"></td>
			</tr>

			<!---- 승인상태---->
			<%//if(totReport.getRecog() != Recog.NOT_RECOG){%>
			<%if(false){%>
			<tr>
				<td colspan="4" valign="top"><jsp:include
					page="/totsys/common/inc/repoadm/repoadm_info.jsp" flush="true">
					<jsp:param name="reportID" value="<%= reportID %>" />
				</jsp:include></td>
			</tr>
			<%}%>
			<!---- 승인상태 끝---->

			<!---- 반려 사유---->
			<%//if(totReport.getRecog() == Recog.RETURN_RECOG){%>
			<%if(false){%>
			<tr style="padding-top: 10px">
				<td colspan="4" valign="top"><jsp:include
					page="/totsys/common/inc/memo/recog_return_message.jsp"
					flush="true">
					<jsp:param name="repoadminID" value="<%= repoadminID %>" />
				</jsp:include></td>
			</tr>
			<%}%>
			<!------ 반려사유 끝 ----->
			<tr>
				<td>
					<table>
						<tr>
							<td class="kecttep_list_tdmenu" width="143" nowrap><img
								src="/totsys/common/images/reg_icon.gif" align="middle"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%></td>
							<td class="kecttep_top2_graytd" style="padding-left: 15;">
								<%= totReport.getTotDoc().getExecutionCode() %>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table>
						<tr>
							<td class="kecttep_list_tdmenu" width="143" nowrap><img
								src="/totsys/common/images/reg_icon.gif" align="middle"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.acceptanceCode")%></td>
							<td class="kecttep_top2_graytd" style="padding-left: 15;">
								<%= totReport.getAcceptanceCode() %>
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr>
				<td colspan="4" valign="top"><!------------------------------- 보고 내용 시작 ------------------------------->
				<jsp:include
					page="/totsys/common/inc/documents/report/report_view.jsp"
					flush="true">
					<jsp:param name="reportID" value="<%= totReport.getId() %>" />
				</jsp:include> <!------------------------------- 보고 내용 시작 ------------------------------->
				</td>
			</tr>

			<tr>
				<td>
				</td>
			</tr>

		</table>
		</td>
	</tr>
	<!------------------------------- top menu start ------------------------------->
	<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>
	<!------------------------------- top menu end ------------------------------->
</table>
</div>
</div>
    <form name="reuseForm" method="post">
        <input type="hidden" name="reportID">
        <input type="hidden" name="USER_ID">
        <input type="hidden" name="DEPT_CODE">
        <input type="hidden" name="doctName">
    </form>
</body>
</html>
<%
		tx.rollback();
	}catch (Exception ex){
		ex.printStackTrace();
		out.println(kr.co.kihyun.text.html.ServletUtil.getJavaScript("location='/servlet/kr.co.kihyun.beans.user.HttpSSOLogin?mode=logout';"));
	}finally{
		if(tx.isActive())
			tx.rollback();
		pm.close();
	}
%>
