<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page import="kr.co.kihyun.lang.MString"%>
<%@ page import="kr.co.kihyun.lang.Encoder"%>
<%@ page import="kr.co.kihyun.moumi.MoumiConfig"%>
<%@ page import="kr.co.kihyun.text.html.ServletUtil"%>
<%@ page import="kr.co.kihyun.beans.user.HttpSSOLogin"%>
<%@ page import="java.net.URLEncoder"
		import="java.net.URLDecoder"
         import="java.util.Date"
         import="java.text.SimpleDateFormat" import="kr.co.kihyun.util.MDate"
         import="kr.co.kihyun.lang.MLong" import="kr.co.kihyun.lang.MString"
         import="kr.co.kihyun.moumi.Moumi" import="kr.co.kihyun.moumi.MoumiUtil"
         import="kr.co.kihyun.beans.user.HttpSSOLogin"
         import="kr.co.kihyun.beans.user.UserGroup"
         import="kr.co.kihyun.beans.user.User"
         import="kr.co.kihyun.beans.user.UserGroupList"
         import="kr.co.kihyun.beans.user.Dept"
         import="kr.co.kihyun.lang.Encoder"
         import="kr.co.kihyun.beans.entity.MUser"
         import="java.util.List"
         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.entity.UserPart"
         import="java.util.HashMap"
         import="java.util.Map"
         import="kr.co.kihyun.moumi.Moumi"
         import="kr.co.kihyun.beans.user.MultiCheck"
         import="kr.co.kihyun.beans.user.DeptAdd"
 %>


<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
    PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
    Transaction tx = pm.currentTransaction();
    try {
        /**
         * ********** Parameter ***********
         */
        String strPage = clearXSS(request.getParameter("strPage"), "");
        String findOption = clearXSS(MString.checkNull(request.getParameter("findOption")), "");
        String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")), "");
        String userID = clearXSS(Encoder.toJava(request.getParameter("userID")), "");
        String returnSysAuth = clearXSS(Encoder.toJava(request.getParameter("sysAuth")), "");
        /**
         * *** user Login check ****************
         */
        if (!HttpSSOLogin.isLogin(request)) {
            String connURL = "parent.location='/totsys/login/login.jsp';";
            out.println(ServletUtil.getJavaScript(connURL));
            return;
        }

        /**
         * ******** session내의 userId *********
         */
        String usID = HttpSSOLogin.getLoginID(request);
        int systemAuth = HttpSSOLogin.getSysAuth(request);

        tx.begin();

        /**
         * ********** User values ***********
         */
        MUser mUser = pm.getObjectById(MUser.class, userID);
        String passwd = mUser.getPassword();
        String userName = mUser.getName(pm);
        String email = mUser.getEmail();
        String phone = mUser.getPhone();
        SysAuth sysAuth = mUser.getSysAuth();
        String deptID = mUser.getUpperDept(pm).getId();
        String deptName = mUser.getUpperDept(pm).getName();
        String dutyName = mUser.getDutyName();
        Long priority = mUser.getPriority();
        String sDualPostYn = mUser.getDualPostYn();     //2014.08.19 Add by KWON,HAN
        String sModYn = mUser.getModYn();               //2014.08.19 Add by KWON,HAN
        String sOrignDept = mUser.getOrignDeptId();
        String tmpAuth = sysAuth.toString();
        tmpAuth = tmpAuth.replace(" ", "");

        String[] sDeptID;
        String[] sDeptName;
        String sDualPostDeptName = "";
        String[] sOriginDeptFlag;
        Integer count = 0;

        DeptAdd dept = new DeptAdd();
        int grade = dept.getGrade(userID, deptID);               //2:초등학교
        int foundation = dept.getFoundation(userID, deptID);     //2:공립

		MultiCheck mc = new MultiCheck();
        mc.IdCheck(userID);
        count = mc.getCount();
        sDeptName = mc.getDeptName();
        sDeptID = mc.getDeptID();
        sOriginDeptFlag = mc.getOrignDeptFlag();

        tx.rollback();
%>
<!DOCTYPE html>
<html lang="ko">
	<head>
		<meta charset="UTF-8">
		<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/SquareButtons.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">
        <script src="/totsys/common/js/rollover.js"></script>
        <script src="/totsys/common/js/popup.js"></script>
        <script src="/totsys/common/js/find.js"></script>
        <script src="/totsys/common/js/mouse.js"></script>
        <script type="text/javascript" src="/totsys/common/js/jquery-1.12.4.min.js"></script>
        <SCRIPT>
         function userModify() {
                if (confirm("정보를 변경하시겠습니까?"))
                {
                    dform.submit();
                }
            }
        </SCRIPT>
        <style>
            td {
                padding: 1 2 1 2;
            }

        </style>
    </HEAD>
    <body class="over_hidden">
        <table style="height: 70px; width: 520px;">
            <jsp:include page="/totsys/common/inc/sysadm/top/top.jsp" flush="true" />
            <tr>
                <td style="width: 0"></td>
                <td style="vertical-align: top;">
                    <table>
                        <tr class="toolbar">
                            <td style="text-align: right;">
                                <table>
                                    <tr>
                                        <td><!-- 사용자변경 조건에   6 SUB_TOTADM("부서관리자"), 5 REPOADM("학교관리자")를 추가 by wonseok Lee 20171010-->
                                            <a href="#" onclick="<% if (!MString.isNull(userID) && SysAuth.TOTPER == sysAuth || SysAuth.REPOADM == sysAuth || SysAuth.SUB_TOTADM == sysAuth || SysAuth.SUB_SYSADM == sysAuth || SysAuth.SYSADM == sysAuth) {%>userModify();<%}%>">
                                                <img src="/totsys/common/images/bt_usermodi.gif" alt="사용자변경" />
                                            </a>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <form name="dform" action="/servlet/kr.co.kihyun.beans.user.HttpUserModify" method="post">
                            <input type="hidden" name="clearModYn" value="N">
                            <input type="hidden" name="userID" value="<%=URLEncoder.encode(userID, "UTF-8")%>">
                            <tr>
                                <td style="height: 31px; vertical-align: top;">
                                    <table class="kecttep_list_table">
                                        <!-- 아이디 -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="width: 100px; height: 31px; padding-left: 10px;">
                                                <img alt="말머리" src="/totsys/common/images/icon.gif" align="middle">&nbsp;&nbsp;<b>ID</b>
                                            </td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">&nbsp;<%= MString.checkNull(userID)%></td>
                                        </tr>
                                        <!-- 이름 -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;"><img alt="글머리" src="/totsys/common/images/icon.gif" align="middle">&nbsp;&nbsp;<b><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.userName")%></b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10;">&nbsp;<%= MString.checkNull(userName)%>&nbsp;(<%=tmpAuth%>)</td>
                                        </tr>
                                        <!-- 겸임부서 -->

                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;">
                                                <img alt="글머리" src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b><%=Moumi.getMessageBundle().getString("moumi.message.totsys.login.user.popup_dept_jsp.dual_post")%><%=Moumi.getMessageBundle().getString("moumi.message.doc.Devision")%></b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">
                                                <%--  <input type='radio'  name='deptID' value = '<%=deptID%>' checked > <%=deptName%> (현소속)--%>
                                        <%
                                        	String orignDept = "";
                                            for(int i=0; i<count; i++){
                                            if ("Y".equals(sOriginDeptFlag[i])){
                                              orignDept = "(현소속)";
                                            }else{
                                              orignDept = " ";
                                            }
                                            if(sDeptID[i].equals(deptID)){
                                        %>
                                            	<input type='radio'  name='deptID' value = '<%=sDeptID[i]%>' checked > <%=MString.checkNull(sDeptName[i])%><%=orignDept%>
                                        <%}else{%>
                                            	<input type='radio'  name='deptID' value = '<%=sDeptID[i]%>' > <%=MString.checkNull(sDeptName[i])%><%=orignDept%>
                                        <%}%>
                                        <%}%>
                                            </td>
                                        </tr>

                                        <!-- 소속기관/부서 -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;">
                                            	<img alt="글머리" src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.devision")%>(<%=MoumiConfig.getMessageBundle().getString("moumi.message.statistics.school")%>)</b>
                                           	</td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">
                                                <input type="hidden" name="deptID" value="<%=deptID%>">&nbsp;<%= MString.checkNull(deptName)%></td>
                                        </tr>

                                        <!-- 전화번호-->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px; height: 31px;">
                                            	<img alt="글머리" src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b><%=MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.telNumber")%></b>
                                           	</td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">&nbsp;<input type="text"  name="phone" class=inputtxt value="<%=MString.checkNull(phone)%>" align="center"></td>
                                        </tr>
                                        <!-- E-MAIL -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;"><img
                                                    src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b>E-MAIL</b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">&nbsp;<input type="text"  name="email" class=inputtxt value="<%= MString.checkNull(email)%>" align="center"></td>
                                        </tr>
                                        <!-- 현재권한 -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;"><img
                                                    src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b>현재권한</b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">
                                                &nbsp;<%= sysAuth.toString()%>
                                            </td>
                                        </tr>
                                        <!-- 권한수정  -->
                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;"><img
                                                    src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b>권한수정</b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;padding-top: 7px;">

                                                <%
												// 6 SUB_TOTADM("부서관리자"), 5 REPOADM("학교관리자")를 추가하였고 조건절 수정함  by wonseok Lee 20171010


												if (tmpAuth.equals(sysAuth.TOTPER.toString())) {
                                                  	returnSysAuth = "2";
                                                }
                                                else if (tmpAuth.equals(sysAuth.REPOADM.toString())) {
                                                  	returnSysAuth = "5";
                                                }
                                                else if (tmpAuth.equals(sysAuth.SUB_TOTADM.toString())) {
                                                  	returnSysAuth = "6";
                                                }
                                                else if (tmpAuth.equals(sysAuth.SUB_SYSADM.toString())) {
                                                  	returnSysAuth = "7";
                                                }
                                                else if (tmpAuth.equals(sysAuth.SYSADM.toString())) {
                                                  	returnSysAuth = "9";
                                                }

                                                //9 SYSADM("시스템관리자")
                                                //7 SUB_SYSADM("기관시스템관리자")
                                                //6 SUB_TOTADM("부서관리자")
                                                //5 REPOADM("학교관리자")
                                                //2 TOTPER("일반사용자")

                                                //9 SYSADM("시스템관리자") 이면 모든 등급을 다 보여주며 모든 등급으로의 권한수정이 가능하다.
                                                if (HttpSSOLogin.getSysAuth(request) == Moumi.SYSADM) {
                                                    if (returnSysAuth.equals("9")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>                                                		
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("7")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("6")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("5")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                       			<%
                                                	}
                                                	else {
                                                %>
                                                    	<input type=radio name=findOption value=9 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                }

                                                //7 SUB_SYSADM("기관시스템관리자") 이면 9 SYSADM("시스템관리자")외에는 다 수정가능하다.
                                                else if (HttpSSOLogin.getSysAuth(request) == Moumi.SUB_SYSADM) {

                                                    if (returnSysAuth.equals("9")) {
                                                %>
                                                        <input type=radio name=findOption value=9 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
      											<%
                                                	}
                                                	else if (returnSysAuth.equals("7")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("6")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%

                                                	}
                                                	else if (returnSysAuth.equals("5")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                       			<%
                                                	}
                                                	else {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                }

                                                //6  SUB_TOTADM("부서관리자") 이면 9 SYSADM("시스템관리자"), 7 SUB_SYSADM("기관시스템관리자"), 5 REPOADM("기관시스템관리자") 외에는 다 수정가능하다.
                                                else if (HttpSSOLogin.getSysAuth(request) == Moumi.SUB_TOTADM) {

                                                    if (returnSysAuth.equals("9")) {
                                                %>
                                                        <input type=radio name=findOption value=9 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
      											<%
                                                	}
                                                	else if (returnSysAuth.equals("7")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("6")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%

                                                	}
                                                	else if (returnSysAuth.equals("5")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                       			<%
                                                	}
                                                	else {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 ><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                }

                                                //5 REPOADM("학교관리자") 이면 9 SYSADM("시스템관리자"), 7 SUB_SYSADM("기관시스템관리자"),6 SUB_TOTADM("부서관리자") 외에는 다 수정가능하다.
                                                else if (HttpSSOLogin.getSysAuth(request) == Moumi.REPOADM) {

                                                    if (returnSysAuth.equals("9")) {
                                                %>
                                                        <input type=radio name=findOption value=9 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>                                                		
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
      											<%
                                                	}
                                                	else if (returnSysAuth.equals("7")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                	else if (returnSysAuth.equals("6")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%

                                                	}
                                                	else if (returnSysAuth.equals("5")) {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                       			<%
                                                	}
                                                	else {
                                                %>
                                                    	<input type=radio name=findOption value=9 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.sysadm")%>
                                                		<input type=radio name=findOption value=7 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_system_adm")%>
                                                		<input type=radio name=findOption value=6 disabled><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.coporation_totDoc_adm")%>
                                                		<br>
                                                		<input type=radio name=findOption value=2 checked><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.upper_totper")%>
                                                <%
                                                	}
                                                }
                                                %>

                                            </td>
                                        </tr>
                                        <!-- 병설유치원 겸임 : 2014.08.19 Add By KWON,HAN -->
                                        <%
                                            if ((grade == 2 || grade == 1) && foundation == 2) {  //2:초등학교 AND 2:공립
                                        %>

                                        <tr>
                                            <td class="kecttep_tdmenu_middle" style="padding-left: 10px; height: 31px;">
                                                <img src="/totsys/common/images/icon.gif">&nbsp;&nbsp;
                                                <b><%=Moumi.getMessageBundle().getString("moumi.message.totsys.sysadm.user.user_view_jsp.establish")%>
                                                    <%=Moumi.getMessageBundle().getString("moumi.message.grade.pre")%>&nbsp;
                                                    <%=Moumi.getMessageBundle().getString("moumi.message.totsys.login.user.popup_dept_jsp.dual_post")%>
                                                </b></td>
                                            <td class="kecttep_last_graytd" style="padding-left: 10px;">
                                                <%
                                                    if (sDualPostYn.equals("Y")) {
                                                %>
                                                <input type=radio name=rdDualPostYn value='Y' checked >가능
                                                <input type=radio name=rdDualPostYn value='N' >불가능
                                                <%
                                                } else {
                                                %>
                                                <input type=radio name=rdDualPostYn value='Y' >가능
                                                <input type=radio name=rdDualPostYn value='N' checked >불가능
                                                <%}%>
                                            </td>
                                        </tr>
                                        <%}%>

                                        <!-- 인사이동 자료이관 : 2014.08.19 Add By KWON,HAN -->
                                        <tr>
                                            <td class="kecttep_tdmenu" style="padding-left: 10px; height: 31px;">
                                                <img src="/totsys/common/images/icon.gif">&nbsp;&nbsp;<b>자료이관</b></td>
                                            <td class="kecttep_last_graytd_bottom" style="padding-left: 10px;">
                                                <%
                                                if (systemAuth == SysAuth.SYSADM.ordinal() || systemAuth == SysAuth.SUB_SYSADM.ordinal()) {
                                                    if (sModYn.equals("Y")) {
                                                %>
                                                <input type=radio name=rdModYn value='Y' checked >대상자
                                                <input type=radio name=rdModYn value='N' >대상자아님
                                                <%
                                                } else {
                                                %>
                                                <input type=radio name=rdModYn value='Y' >대상자
                                                <input type=radio name=rdModYn value='N' checked >대상자아님
                                                <%}
                                                } else {
                                                if (sModYn.equals("Y")) {
                                                %>
                                                &nbsp;<font color="#FF0000"><b>대상자입니다</b></font>
                                                <%
                                                } else {
                                                %>
                                                &nbsp;대상자가 아닙니다.
                                                <%
                                                    }
                                                }
                                                %>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </form>
                    </table>
                </td>
                <td style="width: 10px;"></td>
            </tr>
            <!-- top menu start -->
            <%@ include file="/totsys/common/inc/buttom/buttom.jsp"%>
            <!-- top menu end -->
        </table>
    </body>
</html>
<%
    } catch (Exception ex) {
        //38.오류메세지를 통한 정보 노출(getMessage)_CWE-209 : Update by YOUNGJUN,CHO
        ex.printStackTrace();
        //out.println(ex);
        //out.println("<html><body style='overflow=auto' bgcolor='white'><h1>Can't contact servlet runner</h1><br><br>Message : " + ex.getMessage() + "</body></html>");
        //out.println("<META HTTP-EQUIV='refresh' CONTENT='0.1; URL=/error/exception.jsp'>");
        //================================================
    } finally {
        if (tx.isActive()) {
            tx.rollback();
        }
        pm.close();
    }
%>
