<%    /**
     * *********************************************************** @@
     * Program Name     * : report_list.jsp
     * Description	: /제출자/전체제출완료함/제출자료 목록
     * Author	: 기현테크 Create
     * Date	: 2010.11.27 History	:
     * @@***********************************************************
     */
%>
<%@ page contentType="text/html; charset=UTF-8"
         import="java.net.URLEncoder"
         import="java.util.Date"
         import="java.util.Calendar"
         import="java.util.List"
         import="java.text.SimpleDateFormat"
         import="javax.jdo.PersistenceManager"
         import="javax.jdo.Transaction"
         import="kr.co.kihyun.beans.entity.*"
         import="kr.co.kihyun.beans.entity.util.*"
         import="kr.co.kihyun.beans.user.HttpSSOLogin"
         import="kr.co.kihyun.lang.Encoder"
         import="kr.co.kihyun.util.MDate"
         import="kr.co.kihyun.lang.MInteger"
         import="kr.co.kihyun.lang.MString"
         import="kr.co.kihyun.moumi.Moumi"
         import="kr.co.kihyun.moumi.report.MReport"
         import="kr.co.kihyun.moumi.doc.MDoc"
         import="kr.co.kihyun.beans.totsys.doc.Doc"
         import="kr.co.kihyun.beans.user.UserView"
         import="kr.co.kihyun.beans.user.DeptView"
         import="kr.co.kihyun.beans.user.DeptAdd"
         import="kr.co.kihyun.lang.MLong"
         import="kr.co.kihyun.moumi.MoumiConfig"
         import="kr.co.kihyun.db.DBUtil"
         import="java.util.Map" import="kr.co.kihyun.service.*" import="kr.co.kihyun.service.vo.*"
         import="java.util.HashMap" import="java.util.StringTokenizer"
         %>
<%@page import="java.util.ArrayList"%>
<%@page import="java.net.URLDecoder"%>
<%@page import="kr.co.kihyun.beans.user.DeptView"%>
<%@ 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);

        String modeMessage = "";        //자바스크립트 alert창에 업무처리결과를 보여줄 메세지를 저장

        String reportType = clearXSS(Encoder.toJava(request.getParameter("reportType")), null);
        int strPage = MInteger.parseInt(request.getParameter("strPage"), 1);
        String findOption = clearXSS(request.getParameter("findOption"), null);
        String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), null);
        String procMode = request.getParameter("proc_mode");
        String stDate = clearXSS(request.getParameter("stDate"), "");
        String edDate = clearXSS(request.getParameter("edDate"), "");

        SimpleDateFormat dForomat = new SimpleDateFormat("yyyy-MM-dd");
        Calendar date = Calendar.getInstance();
        date.add(Calendar.MONTH, -12);
        Long prev_date = date.getTimeInMillis();
        Long now_today = new Date().getTime();
        if ("".equals(stDate)) {
            stDate = dForomat.format(prev_date);
        }
        if ("".equals(edDate)) {
            edDate = dForomat.format(now_today);
        }
        if(findWord != null){
        String[] filter_word= {"--", "\\(", "\\)", "\\'", "\\\""};
            for(int ii=0; ii< filter_word.length;ii++){
                findWord = findWord.replaceAll(filter_word[ii], "");
            }
        }

        TotReportService reportService = new TotReportService(pm);

        if (!MString.isNull(procMode)) {
            //보안지정/해제, 부서공유/취소 처리 부분
            String reportIDList = request.getParameter("reportID");
            String strGubun = request.getParameter("strGubun");

            if (strGubun.equals("Y")) {
                //보안지정
                modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes") + MoumiConfig.getMessageBundle().getString("moumi.message.set");
            } else if (strGubun.equals("N")) {
                //보안해제
                modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes") + MoumiConfig.getMessageBundle().getString("moumi.message.unset");
            } else if (strGubun.equals("1")) {
                //부서공유
                modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approSet");
            } else if (strGubun.equals("0")) {
                //부서공유취소
                modeMessage = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approCancel");
            }

            StringTokenizer st = new StringTokenizer(reportIDList, ",");

            tx.begin();
            while (st.hasMoreTokens()) {
                String reportId = (String) st.nextElement();

                if (procMode.equals("share")) {
                    //부서공유/취소 처리
                    int intGubun = Integer.parseInt(strGubun);
                    reportService.updateApproForReport(new Long(reportId), intGubun);
                } else if (procMode.equals("security")) {
                    //보안지정/해제 처리
                    reportService.updateSecuYnForReport(new Long(reportId), strGubun);
                }
            }
            tx.commit();
        }
    //******************************************************************************************************************

        int wordLengthLimit = 50;

        tx.begin();

        List<TotReport> reports = null;
        MUser mUser = pm.getObjectById(MUser.class, usID);
        String dtId = mUser.getUpperDept(pm).getId();
        MDept mDept = pm.getObjectById(MDept.class, dtID);
        String upperId = mDept.getUpper() == null ? "" : mDept.getUpper();
        SysAuth sysAuth = mUser.getSysAuth();

        //organId와 dtID를 비교해서 다르면 상위부서의 전체제출서류를 가져오게 수정함. by wonseok Lee 20171010
        String organId = mDept.getOrgan();

        String uri = URLEncoder.encode("report_list.jsp?reportType=" + MString.checkNull(reportType) + "&findOption=" + MString.checkNull(findOption), "UTF-8") + "&method=GET";

        /**
         * ********** 리스트 페이지 구성 ***********
         */
        int endPage = 0;
        int pageSize = 0;
        int currentPage = 0;
        int currentPageSetUp = 0;
        int recordSize = 15;

        currentPage = strPage;

        String reportName = "";
        if ("COMP".equals(reportType)) {
            reportName = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.mySubmit") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.box");
        } else if ("END".equals(reportType)) {
            reportName = MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.end") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc") + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.box");
        }

        Date nowDate = new Date();
    //======================================================================
        //검색조건파라미터
        Map params = new HashMap();
        params.put("findOption", findOption);
        params.put("filterValue", findWord);
        params.put("userId", usID);
        params.put("deptId", dtId);
        params.put("upperId", upperId);
        params.put("sysAuth", sysAuth);

        //organId와 dtID를 비교해서 다르면 상위부서의 전체제출서류를 가져오게 수정함. by wonseok Lee 20171010
        params.put("organId", organId);


            params.put("stDate", stDate);
            params.put("edDate", edDate);

        //검색메인쿼리와 레코드갯수조회쿼리를 생성 후 멤버변수로 저장
        reportService.createReportListSearchQuery(params, reportType);

        //레코드갯수조회쿼리를 실행하여 레코드갯수를 구함
        int count = reportService.getCountFromMainQuery();

        if ((count % recordSize) == 0) {
            pageSize = (int) (count / recordSize);
        } else {
            pageSize = (int) (count / recordSize) + 1;
        }

        if (currentPage > pageSize) {
            currentPage = pageSize;
        }
        currentPageSetUp = (int) (currentPage / 10) * 10;
        if (currentPage % 10 == 0) {
            currentPageSetUp -= 10;
        }

        int startNo = (currentPage - 1) * recordSize + 1;
        int endNo = currentPage * recordSize;

        List<TotReportVO> list = null;

        //검색목록조회쿼리 실행
        if (count > 0) {
            //페이징처리를 위한 추가파라미터 설정
            reportService.getParams().put("startNo", startNo);
            reportService.getParams().put("endNo", endNo);

            //검색메인쿼리를 페이징처리를 위한 쿼리로 변환
            reportService.convertToPagenatingQuery();

            //만족하는 레코드가 존재하면 조회
            list = reportService.executeQuery(TotReportVO.class);
        }
        //======================================================================
        tx.commit();

        SimpleDateFormat ymdFormat = new SimpleDateFormat("yyyy-MM-dd");
%>
<!DOCTYPE html>
<html lang="ko">
	<head>
		<meta charset="UTF-8">
		<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" />
     	<link rel="stylesheet" href="/totsys/common/css/contentStyle.css" type="text/css">
		<link rel="stylesheet" href="/totsys/common/css/basic.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/find.js"></script>
        <script src="/totsys/common/js/util.js"></script>
        <script src="/totsys/common/js/calendar.js"></script>
        <script src="/totsys/common/js/mouse.js"></script>
        <script src="/totsys/common/js/popup.js"></script>
        <script src="/totsys/common/js/jquery-1.12.4.min.js"></script>
        <script>
            <%if (!MString.isNull(procMode)) {%>
            alert("<%= modeMessage%> <%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.process.complete")%>");
            <%}%>
                function leftAnc() {

                    for (var i = 1; i <= 4; i++) {
                        top.frames['left'].document.all["link" + i].style.fontWeight = "";
                    }
                    top.frames['left'].link4.style.fontWeight = "bold";
                }

                function leftIncReload() {
                    top.left.incFrame.location.reload();
                }

                function viewNote(docID, userID, deptID) {
                    var width = 600;
                    var height = 350;
                    var leftpos = (screen.width - width) / 2;
                    var toppos = (screen.height - height) / 2;
                    window.open("/totsys/common/web/note/popup_doc_history.jsp?docID=" + docID + "&deptID=" + deptID + "&userID=" + userID, "", "width=" + width + ", height=" + height + ", toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left= " + leftpos + " ,top= " + toppos);
                }

                function selectAll() {
                    frm = document.approOpen;
                    var obj = document.getElementsByName("check");
                    if (obj.length > 0) {
                        for (var i = 0; i < obj.length; i++) {
                            if (obj[i].disabled == false) {
                                obj[i].checked = true;
                            }
                        }
                    }
                }

                function cancelAll() {
                    var obj = document.getElementsByName("check");
                    for (var i = 0; i < obj.length; i++) {
                        obj[i].checked = false;
                    }
                }

                /**
                 *체크박스 전체선택 해제 스크립트 추가
                 **/
                function checkALL(checkYn) {
                    frm = document.approOpen;
                    var checklist = document.getElementsByName("check");
                    if (checklist.length > 0) {
                        for (var i = 0; i < checklist.length; i++) {
                            if (checklist[i].disabled == false)
                                checklist[i].checked = checkYn;
                        }
                    }
                }

                /**
                 * 시작일과 종료일의 정합성 체크 함수
                 * @param {type} stDate
                 * @param {type} edDate
                 * @returns {Boolean}
                 */
                function isDateTrue(stDate, edDate) {
                    if (stDate <= edDate) {
                        return true;
                    }
                    return false;
                }

                /*
                 * 검색조건폼에 대한 submit처리함수
                 * @param {type} p_findForm
                 * @returns {Boolean}
                 */
                function fn_onFindSubmit(p_findForm) {
                    if (!isDateTrue(document.findForm.stDate.value, document.findForm.edDate.value)) {
                        alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.startEndDateCheck")%>");
                        document.findForm.edDate.focus();
                        document.findForm.edDate.select();
                        return false;
                    }
                    p_findForm.strPage.value = 1;
                    return true;
                }

                /**
                 * 페이지이동처리함수
                 * @param {type} p_secu_yn
                 * @returns {undefined}
                 */
                function fn_goToPage(p_page) {
                    document.findForm.strPage.value = p_page;
                    document.findForm.submit();
                }

                /*
                 * 현재페이지의 검색조건을 갖고 Relead하는 함수
                 */
                function fn_reload() {
                    document.findForm.submit();
                }

                /*
                 * 상세보기페이지로 이동처리하는 함수
                 * @param {type} p_reportId
                 * @param {type} p_endDate
                 * @param {type} p_submitDate
                 * @returns {undefined}
                 */
                function fn_goToView(p_reportId, p_endDate, p_submitDate) {
                    document.viewForm.reportID.value = p_reportId;
                    document.viewForm.endDate.value = p_endDate;
                    document.viewForm.tmpSubStrEndDate.value = p_submitDate;
                    document.viewForm.submit();
                }

                /*
                 * 부서공유/부서공유취소처리하는 함수
                 * @param p_gubun - 1.부서공유, 0.부서공유취소
                 */
                function fn_openDocument(p_gubun) {
                    var $checked = $("input:checkbox[name=check]:checked");
                    var v_checkedCount = $checked.length;
                    var v_message = "";
                    if (p_gubun == 1) {
                        v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approSet")%>";
                    } else {
                        v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approCancel")%>";
                    }

                    if (v_checkedCount == 0) {
                        alert(v_message + "<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect")%>")
                        return;
                    }

                    for (var i = 0; i < v_checkedCount; i++) {
                        var val = $checked[i].value;
                        var v_appro = document.getElementById("sh" + val).value;
                        if (v_appro == p_gubun) {

                            if (p_gubun == 1) {
                                alert("이미 " + v_message + "된 자료입니다.\n\n선택하신 자료를 확인하여 주십시오.");
                            } else {
                                alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approSet")%>" + "된 자료가 없습니다.\n\n선택하신 자료를 확인하여 주십시오.");
                            }
                            // alert("이미 " + v_message + "된 자료가 존재합니다.");
                            return;
                        }
                    }

                    var res = new Array();
                    $checked.each(function() {
                        res.push($(this).val());
                    });

                    if (confirm(v_checkedCount + " <%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docCounter")%>\n\n" + v_message + "를 실행 하시겠습니까?")) {
                        document.approOpen.reportID.value = res;
                        document.approOpen.strGubun.value = p_gubun;
                        document.approOpen.submit();
                    }
                }

                /*
                 * 2014.08.28 Add by KWON,HAN : 사용자공유
                 */
                function userShareSelect(sGubun, sReportID) {
                    var $checked;
                    var v_checkedCount;
                    var reportID = new Array();

                    if (sGubun === "check") {
                        $checked = $("input:checkbox[name=check]:checked");
                        v_checkedCount = $checked.length;

                        if (v_checkedCount === 0) {
                            alert('<%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>' + ' ' + '<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect")%>');
                            return false;
                        }

                        var val = '';
                        var secuYn = 'N';
                        var usersharecount = 0;

                        for (var i = 0; i < v_checkedCount; i++) {
                            val = $checked[i].value;
                            secuYn = document.getElementById("se" + val).value;
                            usersharecount = document.getElementById("su" + val).value;

                            if (secuYn == 'Y') {
                                alert("이미 보안이 지정된 자료입니다.\n\n선택하신 자료를 확인하여 주십시오.");
                                return false;
                            }
                            if (usersharecount > 0) {
                                //명의 사용자에게 공유되어 있습니다.
                                alert("이미 " + usersharecount + '<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.userShareCounter")%>' + "\n\n사용자 공유란의 공유된 사용자수를 클릭하여 수정하십시오. ");
                                return false;
                            }
                        }

                        $checked.each(function() {
                            reportID.push($(this).val());
                        });
                    } else if (sGubun === "select") {
                        reportID = sReportID;
                    } else {
                        //[정상적인 접근방법으로 처리해주십시요]!
                        alert('<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.normalHandle")%>');
                        return false;
                    }

                    var urlname = "";
                    var height = screen.height;
                    var width = screen.width;
                    var leftpos = width / 2 - 350;
                    var toppos = height / 2 - 350;

                    //docReportType:문서 구분(D:집계문서, R:제출문서)
                    urlname = "/totsys/common/web/report_dept/popup_user_share_select.jsp?docID=" + reportID + "&docReportType=R&userYN=Y&selfDeptYn=Y&exeFlag=list";
                    post = window.open(urlname, "post", "width=900, height=600, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
                    post.focus();
                }

                /*
                 * 담당변경을 처리하는 함수
                 */
                function fn_changeDamDang() {
                    var $checked = $("input:checkbox[name=check]:checked");
                    var v_checkedCount = $checked.length;

                    if (v_checkedCount == 0) {
                        alert("<%=MoumiConfig.getMessageBundle().getString("moumi.message.button.trans")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect")%>");
                        return;
                    }

                    var nowDate = "<%=nowDate.getTime()%>";
                    for (var i = 0; i < v_checkedCount; i++) {
                        var val = $checked[i].value;
                        var doc_complete = document.getElementById("cm" + val).value;
                        if (doc_complete == "N") {
                            alert("집계진행중인 자료는 담당변경을 할 수 없습니다.");
                            return;
                        }
                    }

                    var res = new Array();
                    $checked.each(function() {
                        res.push($(this).val());
                    });

                    var height = screen.height;
                    var width = screen.width;
                    var leftpos = width / 2 - 350;
                    var toppos = height / 2 - 350;
                    frm = document.damdangForm;
                    frm.docID.value = "";
                    frm.rptDocID.value = "";
                    frm.reportID.value = res;
                    frm.rptReportID.value = res;
                    //frm.action="/totsys/repoper/mydocbox/returnbox/popup_rep_transfer9.jsp?rptReportID="+rptReportID;
                    frm.action = "/totsys/repoper/mydocbox/returnbox/popup_rep_transfer9.jsp";
                    frm.target = 'damdangForm';
                    frm.method = 'post';
                    win = window.open('', "damdangForm", "width=620, height=680, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
                    win.focus();
                    frm.submit();
                }

            <%
                if (reportType.equals("COMP")) {%>
                /*
                 * 보안지정/해제를 처리하는 함수
                 */
                function fn_setSecuYn(p_secu_yn) {
                    var $checked = $("input:checkbox[name=check]:checked");
                    var v_checkedCount = $checked.length;
                    var v_message = "";
                    if (p_secu_yn == 'Y') {
                        v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.set")%>";
                    } else {
                        v_message = "<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.unset")%>";
                    }

                    if (v_checkedCount == 0) {
                        alert(v_message + "<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docSelect")%>")
                        return;
                    }

                    for (var i = 0; i < v_checkedCount; i++) {
                        var val = $checked[i].value;
                        var v_secu_yn = document.getElementById("se" + val).value;
                        if (v_secu_yn == p_secu_yn) {
                            if (p_secu_yn == 'Y') {
                                alert("이미 " + v_message + "된 자료가 존재합니다. \n\n선택하신 자료를 확인하여 주십시오.");
                            } else {
                                alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%>" + "지정 된 자료가 없습니다.\n\n선택하신 자료를 확인하여 주십시오.");
                            }
                            return;
                        }
                    }

                    var res = new Array();
                    $checked.each(function() {
                        res.push($(this).val());
                    });

                    if (confirm(v_checkedCount + " <%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.docCounter")%>\n\n" + v_message + "를 실행 하시겠습니까?")) {
                        document.approOpen.proc_mode.value = 'security';
                        document.approOpen.reportID.value = res;
                        document.approOpen.strGubun.value = p_secu_yn;
                        document.approOpen.submit();
                    }
                }
            <%}%>

                //calendar.js 에서 날짜를 선택하면 실행되는 콜백함수
                function fn_CalSetValue(obj, value) {
                    if (!isDateTrue(document.findForm.stDate.value, document.findForm.edDate.value)) {
                        alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.startEndDateCheck")%>");
                        document.findForm.edDate.focus();
                        document.findForm.edDate.select();
                        return false;
                    }

                    fn_onFindSubmit(document.findForm);
                    document.findForm.submit();
                }

        </script>
    </head>
    <body>
        <form name="damdangForm" method="post" >
            <input type="hidden" name="docReportType" value="R">
            <input type="hidden" name="exeFlag"       value="list">
            <input type="hidden" name="docID"         value="">
            <input type="hidden" name="rptDocID"      value="">
            <input type="hidden" name="reportID"      value="">
            <input type="hidden" name="rptReportID"   value="">
            <input type="hidden" name="reportType" value="<%=reportType%>">
            <input type="hidden" name="boxName" value="returnbox">
            <input type="hidden" name="hideUser" value="false">
            <input type="hidden" name="callbackFunc" value="fn_reload()">
        </form>
        <form name="approOpen" method="post">
            <input type="hidden" name="proc_mode" value="share">
            <input type="hidden" name="reportID" value="">
            <input type="hidden" name="strGubun">
            <input type="hidden" name="reportType" value="<%=reportType%>">
            <input type="hidden" name="strPage" value="<%= currentPage%>">
            <input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
            <input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
        </form>
        <form name="viewForm" method="post" action="./report_view.jsp">
            <input type="hidden" name="reportID" value="">
            <input type="hidden" name="endDate" value="">
            <input type="hidden" name="tmpSubStrEndDate" value="">
            <input type="hidden" name="reportType" value="<%=reportType%>">
            <input type="hidden" name="strPage" value="<%= currentPage%>">
            <input type="hidden" name="findOption" value="<%=MString.checkNull(findOption)%>">
            <input type="hidden" name="findWord" value="<%=MString.checkNull(findWord)%>">
            <input type="hidden" name="stDate" value="<%=stDate%>">
            <input type="hidden" name="edDate" value="<%=edDate%>">
        </form>
        <table>
            <%--<jsp:include page="/totsys/common/inc/repoper/top/top.jsp" flush="true" />--%>
            <tr>
                <td></td>
                <td>
                    <table>
                        <jsp:include page="/totsys/common/inc/title/title.jsp" flush="true" />
                        <tr>
                            <td class="vTop">
                                <table>
                                    <tr class="toolbar">
                                        <td>
                                            <table>
                                                <tr>

                                                    <td width="650">

                                                        <form name="findForm" method="post" action="./report_list.jsp" onsubmit="return fn_onFindSubmit(this);" style="margin: 0px">
                                                            <input type="hidden" name="strPage" value="<%= currentPage%>">
                                                            <select name="findOption" class="inputtxt" onchange="showMSG(this.options[this.selectedIndex].value, msg)">
                                                                <option value="totDoc.name"<%= "totDoc.name".equals(findOption) ? " selected" : ""%>>
                                                                    <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name")%>
                                                                </option>
                                                                <option value="totDoc.executionCode"<%= "totDoc.executionCode".equals(findOption) ? " selected" : ""%>>
                                                                    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%>
                                                                </option>
                                                                <option value="totDoc.mUser.name"<%= "totDoc.mUser.name".equals(findOption) ? " selected" : ""%>>
                                                                    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.personInCharge")%> <!--//담당자//-->
                                                                </option>
                                                                <option value="totDoc.mUser.name2"<%= "totDoc.mUser.name2".equals(findOption) ? " selected" : ""%>>
                                                                    <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.sender")%><!--//제출자//-->
                                                                </option>
                                                            </select>
                                                            <input name="findWord" value="<%=MString.checkNull(findWord)%>" type="text" class="inputtxt" size="30" maxlength="30" style="ime-mode: active;" />
                                                            <input name="reportType" value="<%=MString.checkNull(reportType)%>" type="hidden">
                                                            <input type="image" src="/totsys/common/images/bt_search_inquiry2.gif" border="0" align="middle" />


                                                            &nbsp;&nbsp;
                                                            <label style="vertical-align: middle;">
                                                                <strong>제출일</strong>
                                                            </label>
                                                            &nbsp;
                                                            <!--// 검색 시작일 -->
                                                            <input name="stDate" type="text" size="10" value="<%=stDate%>" onclick="showSetWin('findForm.stDate');" style="cursor: pointer;  vertical-align: middle;" class="inputtxt">
                                                            <a href="#" onclick="showSetWin('findForm.stDate');">
                                                                <img src="/totsys/common/images/date.gif" align="middle">
                                                            </a><!-- 검색 시작일 //-->
                                                            ~
                                                            <!--// 검색 종료일 -->
                                                            <input name="edDate" type="text" size="10" value="<%=edDate%>" readonly onclick="showSetWin('findForm.edDate');" style="cursor: pointer;  vertical-align: middle;" class="inputtxt">
                                                            <a href="#" onclick="showSetWin('findForm.edDate');">
                                                                <img src="/totsys/common/images/date.gif" align="middle">
                                                            </a><!-- 검색 종료일 //-->

                                                        </form>
                                                    </td>
                                                    <td>
                                                        <span id="msg" class="kecttep_date_search" style='display: none; padding-top: 5px;'>
                                                            &nbsp;&nbsp;<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.daySearchForm")%>
                                                        </span>
                                                    </td>
                                                    <td>
                                                        <span id="msg" class="kecttep_date_search" style='display: none; padding-top: 5'>
                                                            &nbsp;&nbsp;<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.daySearchForm")%>
                                                        </span>
                                                    </td>
                                                    <td class="kecttep_button_td vTop tar">
                                                        <%
                                                            if (reportType.equals("COMP")) {
                                                        %>
                                                        <!--//보안지정//-->
                                                        <a href="javascript:void(0);" onclick="fn_setSecuYn('Y');">
                                                            <img src="/totsys/common/images/bt_secure_on.jpg" alt="<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.set")%>" />
                                                        </a>

                                                        <!--//보안해제//-->
                                                        <a href="javascript:void(0);" onclick="fn_setSecuYn('N');">
                                                            <img src="/totsys/common/images/bt_secure_off.jpg" alt="<%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%><%= MoumiConfig.getMessageBundle().getString("moumi.message.unset")%>" />
                                                        </a>
                                                        <%
                                                            }
                                                        %>
                                                        <!--//부서공유//-->
                                                        <a href="javascript:void(0);" onclick="fn_openDocument(1)">
                                                            <img src="/totsys/common/images/bt_deptselect.jpg" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approSet")%>" />
                                                        </a>

                                                        <!--//부서공유취소//-->
                                                        <a href="javascript:void(0);" onclick="fn_openDocument(0)">
                                                            <img src="/totsys/common/images/bt_deptcancel.jpg" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.approCancel")%>" />
                                                        </a>

                                                        <!-- 2014.08.28 Add by KWON,HAN : 사용자공유 -->
                                                        <a href="javascript:void(0);" onclick="javascript:userShareSelect('check', '');">
                                                            <img src="/totsys/common/images/bt_user_share.jpg" alt="<%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%= Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>" />
                                                        </a>
                                                        <%
                                                            if (reportType.equals("COMP")) {
                                                        %>
                                                        <!--//담당변경//-->
                                                        <a href="javascript:void(0);" onclick="fn_changeDamDang()">
                                                            <img src="/totsys/common/images/bt_damdang.gif" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.button.trans")%>" />
                                                        </a>

                                                        <%
                                                        } else if (reportType.equals("END")) {
                                                        %>
                                                        <a href="javascript:void(0);" onclick="fn_changeDamDang()">
                                                            <img src="/totsys/common/images/bt_damdang.gif" alt="<%=MoumiConfig.getMessageBundle().getString("moumi.message.button.trans")%>" />
                                                        </a>
                                                        <%
                                                            }
                                                        %>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height: 31px; vertical-align: top;">
                                            <table class="kecttep_list_table">
                                                <tr class="vMiddle">
                                                    <% if (reportType.equals("COMP")) { %>
                                                    <td style="width: 30px;" class="kecttep_tdmenu tac">
                                                        <input type="checkbox" name="check0" onclick="javascript:checkALL(this.checked)"/>
                                                    </td>
                                                    <% } else if (reportType.equals("END")) { %>
                                                    <td style="width: 30px;" class="kecttep_tdmenu tac">
                                                        <input type="checkbox" name="check0" onclick="javascript:checkALL(this.checked)"/>
                                                    </td>
                                                    <% }%>
                                                    <td style="width: 60px;" class="kecttep_tdmenu tac">
                                                        <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.section")%>
                                                    </td>
                                                    <td style="width: 130px;" width="130" align="center" class="kecttep_tdmenu" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.executionCode")%></td>
                                                    <td align="center" class="kecttep_tdmenu" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.name")%></td>
                                                    <td style="width: 130px;" class="kecttep_tdmenu tac"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.coporation")%></td>
                                                    <td style="width: 85px;" class="kecttep_tdmenu tac"><%=TotDocType.TOT_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.request")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.person")%></td>
                                                    <td style="width: 97px;" class="kecttep_tdmenu tac" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.person")%></td>
                                                    <td style="width: 75px;" class="kecttep_tdmenu tac" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.startDate")%></td>
                                                    <td style="width: 105px;" class="kecttep_tdmenu tac" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endDate")%></td>
                                                    <% if (reportType.equals("COMP") || reportType.equals("END")) {%>
                                                    <td style="width: 75px;" class="kecttep_tdmenu tac" rowspan="1"><%=MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.doc.Day")%></td>
                                                    <% } %>

                                                    <% if (reportType.equals("COMP") || (reportType.equals("END") && (sysAuth.equals(SysAuth.SUB_SYSADM) || sysAuth.equals(SysAuth.SYSADM)))) {%>
                                                    <td style="width: 50px;" class="kecttep_tdmenu tac" rowspan="1">
                                                        <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%>
                                                    </td>
                                                    <% }%>
                                                    <td style="width: 60px;" class="kecttep_last_tdmenu tac" rowspan="1">
                                                        <%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.remark")%>
                                                    </td>
                                                    <!-- 2014.08.29 Add by KWON,HAN -->
                                                    <td style="width: 70px;" class="kecttep_last_tdmenu tac" rowspan="1">
                                                        <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.share")%>
                                                    </td>
                                                    <!-- -------------------------- -->
                                                </tr>
                                                <%
                                                    if (count > 0) {
                                                        int listCount = list.size();
                                                        int index = 0;
                                                        for (int i = 0; i < listCount; i++) {
                                                            index = i + 1;
                                                            TotReportVO reportVO = (TotReportVO) list.get(i);
                                                            String docName = reportVO.getDocName();
                                                            String userId = MString.checkNull(reportVO.getUserId());
                                                            String shareUserId = MString.checkNull(reportVO.getShareUserId());  //2014.09.02 Add by KWON,HAN

                                                            String tmpMoumiAcptLimitStrategy = Long.toString(reportVO.getSubmitLimitCnt());
                                                            String tmp2 = null;
                                                            String tstr = "시";
                                                            String tcnt;
                                                            //선착순 집계의 현재 제출수, 총집계수를 출력하도록 수정. 2014.11.26 by YOUNGJUN,CHO
                                                            //tcnt = "("+Integer.toString(reportVO.getSubmitLimitCnt())+"개 기관)";
                                                            tcnt = "<br /><span title='총 " + Integer.toString(reportVO.getSubmitLimitCnt()) + " 개 기관 중 " + Integer.toString(reportVO.getCompleteReportCount()) + " 개 기관에서 제출하였습니다.'>제출기관  (" + Integer.toString(reportVO.getCompleteReportCount()) + " / " + Integer.toString(reportVO.getSubmitLimitCnt()) + ")" + "</span>";
                                                            if (tmpMoumiAcptLimitStrategy.equals("0")) {
                                                                tmp2 = new SimpleDateFormat("yyyy-MM-dd HH").format(reportVO.getEndDate());
                                                                tcnt = "";
                                                            } else {
                                                                tmp2 = MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.endBySubmitTotal");                          //선착순집계
                                                                tstr = "";
                                                            }
                                                            if (tmp2.contains("9999-12-30")) {
                                                                tmp2 = MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.docGethering");   //집계진행중
                                                            }
                                                            if (tmp2.equals(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.docGethering"))) {
                                                                tstr = "";             //집계진행중
                                                            }
                                                            Long tempYymmddhh = reportVO.getEndDate().getTime();
                                                %>
                                                <tr style="padding-top: 3px; vertical-align: middle; background-color: #ffffff;"
                                                    onmouseover="this.style.backgroundColor = 'F9F9F9'"
                                                    onmouseout="this.style.backgroundColor = 'white'">
                                                    <% if (reportType.equals("COMP")) {%>
                                                    <td style="width: 30px; height: 25px;" class="kecttep_graytd tac">
                                                        <input type="checkbox" name="check"  value="<%= reportVO.getId()%>">
                                                        <input type="hidden" name="checkDocID<%=index%>" value="<%=reportVO.getId()%>">
                                                        <input type="hidden" name="userID<%=index%>" value="<%=reportVO.getUserId()%>">
                                                        <input type="hidden" name="docOwnerId<%=index%>" value="<%=reportVO.getDocOwnerName()%>">
                                                        <input type="hidden" name="rptOwnerId<%=index%>" value="<%=reportVO.getOwnerName()%>">
                                                        <input type="hidden" name="reportID<%=index%>" value="<%=reportVO.getId()%>">
                                                        <input type="hidden" id="ed<%= reportVO.getId()%>" name="endDate<%=index%>" value="<%=tempYymmddhh%>">
                                                        <input type="hidden" id="sh<%= reportVO.getId()%>" name="appro<%=index%>" value="<%=reportVO.getAppro()%>">
                                                        <input type="hidden" id="se<%= reportVO.getId()%>" name="secuYn<%=index%>" value="<%=reportVO.getSecuYn()%>">
                                                        <input type="hidden" id="cm<%= reportVO.getId()%>" name="docCompleteYn<%=index%>" value="<%=reportVO.isDocComplete() ? "Y" : "N"%>">
                                                        <input type="hidden" id="su<%= reportVO.getId()%>" name="shareUserCount<%=index%>" value="<%=reportVO.getShareUserCount()%>">
                                                    </td>
                                                    <% } else if (reportType.equals("END")) {
                                                        String disabled = "disabled";
                                                        if (usID.equals(userId)
                                                                || ((sysAuth.equals(SysAuth.SUB_SYSADM) || sysAuth.equals(SysAuth.SUB_TOTADM) || sysAuth.equals(SysAuth.SYSADM) || sysAuth.equals(SysAuth.REPOADM))
                                                                && !reportVO.isSecure())) {
                                                            disabled = "";
                                                        }
                                                    %>
                                                    <td style="width: 30px; height: 25px;" class="kecttep_graytd tac">
                                                        <input type="checkbox" name="check"  value="<%= reportVO.getId()%>" <%= disabled%>>
                                                        <input type="hidden" name="checkDocID<%=index%>" value="<%=reportVO.getId()%>">
                                                        <input type="hidden" name="userID<%=index%>" value="<%=reportVO.getUserId()%>">
                                                        <input type="hidden" name="docOwnerId<%=index%>" value="<%=reportVO.getDocOwnerName()%>">
                                                        <input type="hidden" name="rptOwnerId<%=index%>" value="<%=reportVO.getOwnerName()%>">
                                                        <input type="hidden" name="reportID<%=index%>" value="<%=reportVO.getId()%>">
                                                        <input type="hidden" id="ed<%= reportVO.getId()%>" name="endDate<%=index%>" value="<%=tempYymmddhh%>">
                                                        <input type="hidden" id="sh<%= reportVO.getId()%>" name="appro<%=index%>" value="<%=reportVO.getAppro()%>">
                                                        <input type="hidden" id="se<%= reportVO.getId()%>" name="secuYn<%=index%>" value="<%=reportVO.getSecuYn()%>">
                                                        <input type="hidden" id="cm<%= reportVO.getId()%>" name="docCompleteYn<%=index%>" value="<%=reportVO.isDocComplete() ? "Y" : "N"%>">
                                                        <input type="hidden" id="su<%= reportVO.getId()%>" name="shareUserCount<%=index%>" value="<%=reportVO.getShareUserCount()%>">
                                                    </td>
                                                    <% } %>
                                                    <td style="width: 60px; height: 25px;" class="kecttep_graytd tac">
                                                        <%
                                                // 2014.09.23 by youngjun cho (문서 구분방식에 따라 색상차별화 추가)
                                                if (reportVO.isPeriodicalDoc() && reportVO.isDocCollection()) {%>
                                                        <span class="kecttep_doc_append_type kecttep_doc_append_type_periodical_collection"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.periodical") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.collection")%></span>
                                                        <%} else if (reportVO.isPeriodicalDoc() && !reportVO.isDocCollection()) {%>
                                                        <span class="kecttep_doc_append_type kecttep_doc_append_type_periodical_file"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.periodical") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%></span>
                                                        <%} else if (!reportVO.isPeriodicalDoc() && reportVO.isDocCollection()) {%>
                                                        <span class="kecttep_doc_append_type kecttep_doc_append_type_random_collection"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.random") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.collection")%></span>
                                                        <%} else if (!reportVO.isPeriodicalDoc() && !reportVO.isDocCollection()) {%>
                                                        <span class="kecttep_doc_append_type kecttep_doc_append_type_random_file"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.create.random") + "/" + Moumi.getMessageBundle().getString("moumi.message.tot_doc.file")%></span>
                                                        <%}%>
                                                        <%--<%= reportVO.isPeriodicalDoc() ? MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.create.periodical") : MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.create.random") %>/<%= reportVO.isDocCollection() ? MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.collection") : MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.file")%>--%>
                                                    </td>
                                                    <td style="width: 130px; height: 25px;" class="kecttep_graytd tac"><%=MString.checkNull(reportVO.getExecCode(), "&nbsp;")%></td>
                                                    <!--//시작//-->
                                                    <td class="kecttep_graytd">&nbsp;&nbsp;
                                                        <%
                                                            boolean bLinkOk = usID.equals(userId)
                                                                    || ((sysAuth.equals(SysAuth.SUB_SYSADM) || sysAuth.equals(SysAuth.SUB_TOTADM) || sysAuth.equals(SysAuth.SYSADM) || sysAuth.equals(SysAuth.REPOADM) || reportVO.getAppro() == 1) && !reportVO.isSecure());

                                                            bLinkOk = bLinkOk || usID.equals(shareUserId);   //2014.09.02 Add by KWON,HAN

                                                            if (bLinkOk) {
                                                        %>
                                                        <a href="javascript:fn_goToView('<%= reportVO.getId()%>', '<%=tmp2%>', '<%=tempYymmddhh%>');" onmouseover="balloon_on('<%= MString.getEllipsis(reportVO.getDocName(), wordLengthLimit)%>', this, 10, 4)"  onmouseout="balloon_off()">
                                                            <%}%>
                                                            <span <%if (!usID.equals(userId) && reportVO.getAppro() != 1 && (!usID.equals(shareUserId)) && sysAuth.equals(SysAuth.TOTPER)) {%>style="color: red;"<%}%>><%= MString.getEllipsis(reportVO.getDocName(), wordLengthLimit)%></span>
                                                        </a>

                                                    </td>
                                                    <!--//끝//-->
                                                    <td style="width: 130px;" class="kecttep_graytd tac"><%=reportVO.getDeptName()%></td>
                                                    <td style="width: 85px;" class="kecttep_graytd tac"><%=reportVO.getDocOwnerName()%></td>
                                                    <td style="width: 105px;" class="kecttep_graytd tac">
                                                        <% if (reportType.equals("COMP")) {%>
                                                        <%= MString.checkNull(reportVO.getRtDeptName())%><br><%= MString.checkNull(reportVO.getOwnerName())%>
                                                        <%} else {%>
                                                        <%= MString.checkNull(reportVO.getOwnerName())%><br>
                                                        <%
                                                            if (reportVO.getUserId() == null) {
                                                                out.print("&nbsp");
                                                            } else {
                                                                out.print("(" + reportVO.getUserId() + ")");
                                                            }
                                                        %>
                                                        <%}%>
                                                    </td>
                                                    <td style="width: 75px;" class="kecttep_graytd tac"><%= reportVO.getStartDate() == null ? "&nbsp;" : ymdFormat.format(reportVO.getStartDate())%></td>
                                                    <td style="width: 105px;" class="kecttep_graytd tac">
                                                        <%
                                                            out.write(tmp2 + tstr + tcnt);
                                                        %>
                                                    </td>

                                                    <% if (reportType.equals("COMP") || reportType.equals("END")) {%>
                                                    <td style="width: 75px;" class="kecttep_graytd tac"><%= reportVO.getSubmitDate() == null ? "&nbsp;" : ymdFormat.format(reportVO.getSubmitDate())%></td>
                                                    <% } %>

                                                    <% if (reportType.equals("COMP") || (reportType.equals("END") && (sysAuth.equals(SysAuth.SUB_SYSADM) || sysAuth.equals(SysAuth.SYSADM)))) { %>
                                                    <td style="width: 50px;" class="kecttep_graytd tac vMiddle">
                                                        &nbsp;
                                                        <% if (reportVO.isSecure()) {%>
                                                        <%= MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.secu.yes")%>
                                                        <% } %>
                                                    </td>
                                                    <% } %>
                                                    <td style="width: 60px;" class="kecttep_graytd tac vMiddle">
                                                        <%if (reportVO.getAppro() == 1) {
                                                                out.println(MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.approOpenData"));
                                                            } else if (reportVO.getPrss() == 12) {
                                                                out.println(MoumiConfig.getMessageBundle().getString("moumi.message.button.not"));
                                        } else {%>
                                                        &nbsp;
                                                        <%}%>
                                                    </td>
                                                    <!-- 2014.08.29 Add by KWON,HAN -->
                                                    <td style="width: 60px;" class="kecttep_last_graytd tac vMiddle">
                                                        <%if (reportVO.getShareUserCount() > 0) {
                                                        %>
                                                        <%if (usID.equals(reportVO.getShareDocRegId()) || sysAuth.equals(SysAuth.SYSADM) || sysAuth.equals(SysAuth.SUB_SYSADM)) {%>
                                                        <a href="javascript:userShareSelect('select','<%= reportVO.getId()%>');">
                                                            <%}%>
                                                            <%=reportVO.getShareUserCount()%><%=Moumi.getMessageBundle().getString("moumi.message.doc.Name")%>
                                                        <%if (usID.equals(reportVO.getShareDocRegId()) || sysAuth.equals(SysAuth.SYSADM) || sysAuth.equals(SysAuth.SUB_SYSADM)) {%>
                                                        </a>
                                                        <%}%>
                                                        <%
                                        } else {%>
                                                        &nbsp;
                                                        <%}%>
                                                    </td>
                                                    <!-- ---------------------------- -->
                                                </tr>
                                                <%
                                                        }           //end of for list
                                                    }           //end of if(count > 0)
                                                %>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 15px;"></td>
                                    </tr>
                                    <%if (count > 0) {%>
                                    <tr style="padding-top: 3px; vertical-align: middle;">
                                        <td class="kecttep_board tac" colspan="10"><!------------------------------- 페이지수 나오는 부분 시작 ------------------------------->
                                            <jsp:include page="/totsys/common/inc/board/page_module.jsp" flush="true">
                                                <jsp:param name="pageFunction" value="fn_goToPage" />
                                                <jsp:param name="pageSize" value="<%= pageSize%>" />
                                                <jsp:param name="currentPage" value="<%= currentPage%>" />
                                                <jsp:param name="currentPageSetUp" value="<%= currentPageSetUp%>" />
                                            </jsp:include> <!------------------------------- 페이지수 나오는 부분 끝 ------------------------------->
                                        </td>
                                    </tr>
                                    <%} else {%>
                                    <tr>
                                        <td class="kecttep_none_tdmenu tac" colspan="10" style="height: 25px;">
                                        	<%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submit")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.doc")%><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.noOne")%>
                                        </td>
                                    </tr>
                                    <%}%>

                                    <tr>
                                        <td height="2"></td>
                                    </tr>

                                    <!--검색후 검색조건 선택하기위한 스크립트(히든값포함)-->
                                    <input type="hidden" id="tmpFind" name="tmpFind" value="<%=findOption%>">
                                    <script>
                                        if (tmpFind.value == "totDoc.docName") {
                                            findForm.findOption.selectedIndex = 0;
                                        } else if (tmpFind.value == "totDoc.mDept.name") {
                                            findForm.findOption.selectedIndex = 1;
                                        } else if (tmpFind.value == "totDoc.mUser.name") {
                                            findForm.findOption.selectedIndex = 2;
                                        } else if (tmpFind.value == "mUser.name") {
                                            findForm.findOption.selectedIndex = 3;
                                        } else if (tmpFind.value == "totDoc.startDate") {
                                            findForm.findOption.selectedIndex = 4;
                                        } else if (tmpFind.value == "totDoc.repoEndDate") {
                                            findForm.findOption.selectedIndex = 5;
                                        } else if (tmpFind.value == "totDoc.mUser.name2") {
                                            findForm.findOption.selectedIndex = 3;
                                        }
                                    </script>
                                </table>
                            </td>
                            <td style="width: 10px;"></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <!------------------------------- top menu start ------------------------------->
            <%--<%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>--%>
            <!------------------------------- top menu end ------------------------------->
        </table>
        <div id="SetWin" style="position: absolute; z-index: 10; visibility: hidden; width: 100px; background: silver; border: 1px #333333 solid; line-height: 1.4em; padding: 3px 3px; v"></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 {
        if (tx.isActive()) {
            tx.rollback();
        }
        pm.close();
    }
%>
