
<%    /**
     * **********************************************************@@ Program Name
     * : tot_reports_print.jsp Description	: /집계자/내문서함/등록함/문서 등록 Author	: 기현테크
     * Create Date	: 2010.11.25 History	:
     * @@***********************************************************
     */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"
         import="java.net.URLEncoder" import="java.net.URLDecoder"
         import="kr.co.kihyun.beans.user.HttpSSOLogin" import="java.util.*"
         import="java.io.StringReader"
         import="javax.swing.text.html.parser.ParserDelegator"
         import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.util.Stopwatch"
         import="kr.co.kihyun.text.html.TagFilter"
         import="kr.co.kihyun.text.html.ServletUtil"
         import="kr.co.kihyun.text.html.CallbackHandler"
         import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.doc.MDoc"
         import="kr.co.kihyun.moumi.doc.table.MTable"
         import="kr.co.kihyun.moumi.doc.table.TableDefine"
         import="kr.co.kihyun.moumi.doc.table.TableCreation"
         import="kr.co.kihyun.moumi.doc.table.item.MItem"
         import="kr.co.kihyun.lang.MInteger" import="kr.co.kihyun.lang.MString"
         import="kr.co.kihyun.lang.MLong"
         import="kr.co.kihyun.beans.totsys.doc.Doc"%>

<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>

<%    try {
        /**
         * ******** session내의 userId *********
         */
        String usID = HttpSSOLogin.getLoginID(request);
        String dpID = HttpSSOLogin.getDeptID(request);
        /**
         * ******** parameter *********
         */
        Long docID = MLong.parseLong(MString.checkNull(request.getParameter("docID")), null);
        String partID = request.getParameter("partID");
        int gradeCode = MInteger.parseInt(request.getParameter("gradeCode"), -1);
        int tableNum = MInteger.parseInt(request.getParameter("tableNum"), 0);
        int searchType = MInteger.parseInt(request.getParameter("searchType"), -1);
        String displaySummary = MString.checkNull(request.getParameter("displaySummary"));
        String innerFindOption = clearXSS(request.getParameter("innerFindOption"), "");
        String innerFindWord = clearXSS(request.getParameter("innerFindWord"), "");
                String mngcode = clearXSS(request.getParameter("mngcode"), "");//20160509 추가
        if( dpID.contains("A00") && docID > 1700000000){
        mngcode = "".equals(mngcode) ? "b10": mngcode ;//20160509 추가
        }

        String deptID = null;
        String userID = "";

        Doc doc = new Doc();

        deptID = doc.getRegisterDept(docID);
        userID = doc.getRegisterID(docID);
        String docName = URLDecoder.decode(MString.checkNull(request.getParameter("docName")), "UTF-8");
%>
<!DOCTYPE html>
<html lang="ko">
	<head>
		<title>인쇄</title>
		<meta charset="UTF-8">
        <script src="/totsys/common/inc/documents/report/images/rollover.js"></script>
        <link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css">
        <link rel="stylesheet" href="/totsys/common/css/popup.css" type="text/css">
		<link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css">
        <script>
            function printGO() {
                document.getElementById("footer").style.display = "none";
                window.print();
                document.getElementById("footer").style.display = "block";
            }
        </script>
    </head>

    <body class="margin_0" onLoad="MM_preloadImages('/totsys/common/inc/documents/report/images/bt_print_preview-over.gif', '/totsys/common/inc/documents/report/images/bt_page_setup-over.gif');">

		<div><%=docName%></div>
		<div>
	           <!-- 집계자 정보 시작-->
	           <jsp:include page="/totsys/common/inc/totper/totper_print.jsp"	flush="true">
	               <jsp:param name="docID" value="<%= docID%>" />
	               <jsp:param name="deptID" value="<%= deptID%>" />
	               <jsp:param name="userID" value="<%= userID%>" />
	           </jsp:include>
	           <!-- 집계자 정보 끝 -->
		</div>
        <div class="mt_10">
             <!-- form config start -->
             <jsp:include page="./total_reports_save.jsp" flush="true">
                 <jsp:param name="docID" value="<%= docID%>" />
                 <jsp:param name="partID" value="<%= partID%>" />
                 <jsp:param name="gradeCode" value="<%= gradeCode%>" />
                 <jsp:param name="tableNum" value="<%= tableNum%>" />
                 <jsp:param name="innerFindOption" value="<%= innerFindOption%>" />
                 <jsp:param name="innerFindWord" value="<%= URLEncoder.encode(MString.checkNull(innerFindWord), "UTF-8")%>" />   
                 <jsp:param name="mngcode" value="<%= mngcode %>" /> 
             </jsp:include>
        </div>
        <div id="footer" style=" text-align: center; ">
            <hr/>
            <a href="#" onclick="printGO();">
                <img src="/totsys/common/images/bt_print2.gif" border="0" alt="<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.print")%>" />
            </a>
            <a href="#" onclick="window.close();">
                <img src="/totsys/common/images/bt_cancle.gif" border="0" alt="<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.cancel")%>" />
            </a>
        </div>
    </body>
</html>
<%
    } 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 {
    }
%>
