<%@page import="kr.co.kihyun.beans.tosys.etc1.TotsysEtc"%>
<%@page import="javax.jdo.Transaction"%>
<%@page import="javax.jdo.Query"%>
<%
/************************************************************@@
  * Program Name	: left.jsp
  * Description		: 핸디소프트 연동용 totper_left Menu
  * Author		    : 기현테크
  * Create Date		: 2010.11.18
  * History		    :
  *
  * Modify Date         : 2014.08.18 (조영준 - 소스정리 및 디자인 수정)
@@************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8"
        import="java.net.URLDecoder"
        import="java.net.URLEncoder"
        import="java.util.Iterator"
        import="java.util.List"
        import="java.util.Map"
        import="java.util.HashMap"
        import="javax.jdo.PersistenceManager"
        import="kr.co.kihyun.beans.entity.*"
        import="kr.co.kihyun.beans.entity.util.*"
        import="kr.co.kihyun.beans.user.HttpSSOLogin"
        import="kr.co.kihyun.text.html.ServletUtil"
        import="kr.co.kihyun.moumi.MoumiConfig"
        import="kr.co.kihyun.lang.MString"
        import="kr.co.kihyun.lang.MLong"
        import="kr.co.kihyun.beans.totsys.menu.MenuBean"
        import="kr.co.kihyun.moumi.doc.MDoc"
        import="kr.co.kihyun.moumi.report.MReport"
        import="kr.co.kihyun.lang.MInteger"
        import="kr.co.kihyun.beans.entity.TotDoc"
        import="kr.co.kihyun.beans.user.MultiCheck"
        import="kr.co.kihyun.service.vo.TotDocReportVO"
        import="kr.co.kihyun.service.TotDocReportService"
        import="kr.co.kihyun.beans.entity.MUser" %>
<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>
<%
//left.jsp 에서 PersistenceManager 의 Transaction 을 사용할 필요가 없지 않나?(조영준 2014.08.18)
//2014.09.22 Update by KWON,HAN : 필요에 의해서 다시 사용함.
PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
Transaction tx = pm.currentTransaction();
try{
	/*********** User HttpSSOLogin check ***********/
	String connURL="location='/totsys/login/login.jsp';";
	if(!HttpSSOLogin.isLogin(request)){
		out.println(ServletUtil.alert(MoumiConfig.getMessageBundle().getString("moumi.message.popup.left_jsp_WorkTimeOut")));
		out.println(ServletUtil.getJavaScript(connURL));
		return;
	}
	/********** session내의 userId **********/
	String dtName = HttpSSOLogin.getDeptName(request);
	String usID = HttpSSOLogin.getLoginID(request);
	String dpID = HttpSSOLogin.getDeptID(request);
	String usName = HttpSSOLogin.getUserName(request);
	int sysAuth = HttpSSOLogin.getSysAuth(request);
        //MUser mUser = pm.getObjectById(MUser.class, usID);
	/****** Parameter ******/
	int menuType = MInteger.parseInt(request.getParameter("menuType"), -1);
	String param = MString.checkNull(request.getParameter("On"));
	String locationType = MString.checkNull(request.getParameter("locationType"));
	Long docID = MLong.parseLong(request.getParameter("docID"), null);
	String deptID = request.getParameter("deptID");
	String repUserID = MString.checkNull(request.getParameter("repUserID"));
	String recog = MString.checkNull(request.getParameter("recog"));
	String recogNum = MString.checkNull(request.getParameter("recogNum"));
	String prss = MString.checkNull(request.getParameter("prss"));


        tx.begin();

        MUser mUser = pm.getObjectById(MUser.class, usID);
        String sModYn = mUser.getModYn();               //2014.08.19 Add by KWON,HAN

        TotsysEtc te=new TotsysEtc();
        te.getPopupNotice();
        int count = te.getCount();
        String[] idList = te.popupId;

        tx.rollback();

        int countModYn = 0;
        int tmpCount = 1;
        String docType = "ALL";
        String exeType = "A";
        String procMode = null;

        //인사이동이 있는 경우에만
        /*
        if("Y".equals(sModYn)) {
            tx.begin();

            //검색조건파라미터 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
            Map params = new HashMap();
            params.put("userId",        usID);
            params.put("deptId",        dpID);
            params.put("findOption",    "");
            params.put("filterValue",   "");

            TotDocReportService docReport = new TotDocReportService(pm);

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

            List<TotDocReportVO> list = null;

            //만족하는 레코드가 존재하면 조회
            list = docReport.executeQuery(TotDocReportVO.class);

            countModYn = list.size();

            tx.rollback();

            //처음으로 이 화면이 호출된 경우이고 검색된 데이터가 없다면 인사이동 후 이관여부를 'N'으로 변경한다.
            if (MString.isNull(procMode)) {
                if(countModYn <= 0) {
                    tx.begin();

                    MultiCheck mc = new MultiCheck();

                    tmpCount = mc.updateModYnOfMuser(usID, "N");
                    if(tmpCount != 1) {
                        tx.rollback();
                    } else {
                        tx.commit();
                    }
                }
            }
        }
        */
	/************* home taget url *****************/
	//session.setAttribute("homeTagetURL", "/totsys/totper/main.jsp");


        MenuBean[][] totperMenuss = null;
        /*SysAuth == 2 */
        if(MoumiConfig.TOTPER == sysAuth ){

            MenuBean[][] totperMenus = {
                {
                    //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")),
                    new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS", TotDocType.TOT_DOC+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")),
                    new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"),

                    new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"),
                    new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"),
                    new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"),
                                      new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp") // 사용자그룹설정 추가
                },
                {
                    new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""),
                    new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"),
                    new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"),
                    new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")),
                    new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END", MoumiConfig.getMessageBundle().getString("moumi.message.menu.allSubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc"))
                },
                {
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ"),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS")
                }
                   //boardMenus
            };
            totperMenuss = totperMenus;
         }else if(MoumiConfig.REPOPER == sysAuth){
            MenuBean[][] re_TotperMenus = {
                {
                    //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""),
                    new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.menu.submit")+MoumiConfig.getMessageBundle().getString("moumi.message.menu.do")+""),
                    new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"),
                    new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"),
                    new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")),
                    new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END", MoumiConfig.getMessageBundle().getString("moumi.message.menu.allSubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc"))
                },
                {
                    //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ"),
                    new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS")
                }
                //boardMenus
            };
            totperMenuss = re_TotperMenus;
        }

        //SysAuth == 9
	MenuBean[][] sysadmMenus = {
            {   //집계하기
                //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")),
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")), // 집계진행자료
                new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"),  // 문서생성
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"), // 집계진행자료
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"),  // 미진행자료
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), //MoumiConfig.getMessageBundle().getString("moumi.message.menu.end") + MoumiConfig.getMessageBundle().getString("moumi.message.menu.box")),   // 종료함->종료자료
                //new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp"),
                new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"),    // 사용자그룹설정
                new MenuBean(request, "/totsys/sysadm/org/org_view.jsp")   // 조직도
//                 new MenuBean(request, "/totsys/common/inc/statistics/statistics.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.menu.statistics")+"(집계.제출)") // 통계
            },
            {   //제출하기
                //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")),
                new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")),
                new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"),    // 접수자료
                new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"),  // 제출진행자료
                new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")), // 내제출자료
                new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END", MoumiConfig.getMessageBundle().getString("moumi.message.menu.allSubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc"))   // 전체제출자료
            },
            {   //게시판
                //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"), // 공지사항
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ"),           // 자주묻는질문
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS")            // 자료실
            }
        //boardMenus
        };

        //SysAuth == 7인 부분 추가 함
        MenuBean[][] sub_sysMenus = {
            {
                //new MenuBean(request, "/totsys/sysadm/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")),
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS", MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc")),
                new MenuBean(request, "/totsys/totper/mydocbox/regbox/doc_regist.jsp?step=1"),
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=PRSS"),// MoumiConfig.getMessageBundle().getString("moumi.message.menu.prss") + MoumiConfig.getMessageBundle().getString("moumi.message.menu.box")),
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=REG"),
                new MenuBean(request, "/totsys/totper/mydocbox/prssbox/doc_list.jsp?docType=END"), //MoumiConfig.getMessageBundle().getString("moumi.message.menu.end") + MoumiConfig.getMessageBundle().getString("moumi.message.menu.box")),
                // new MenuBean(request, "/totsys/totper/mydocbox/formbox/doc_list.jsp"),
                new MenuBean(request, "/totsys/login/envsetting/group/group_setup.jsp"),
                new MenuBean(request, "/totsys/sysadm/org/org_view.jsp?rootID="+dpID)
//                  new MenuBean(request, "/totsys/common/inc/statistics/statistics.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.menu.statistics")+"(집계.제출)") // 통계
            },
            {
                //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")),
                new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp", MoumiConfig.getMessageBundle().getString("moumi.message.tot_report.submitted")),
                new MenuBean(request, "/totsys/repoper/mydocbox/returnbox/report_list.jsp"),
                new MenuBean(request, "/totsys/repoper/mydocbox/tempbox/report_list.jsp?reportType=TEMP"),
                new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=COMP", MoumiConfig.getMessageBundle().getString("moumi.message.menu.mySubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc")),
                new MenuBean(request, "/totsys/repoper/mydocbox/endbox/report_list.jsp?reportType=END", MoumiConfig.getMessageBundle().getString("moumi.message.menu.allSubmit") +MoumiConfig.getMessageBundle().getString("moumi.message.menu.doc"))
            },
            {
                //new MenuBean(request, "/totsys/totper/main.jsp?mata=1", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE", MoumiConfig.getMessageBundle().getString("moumi.message.board")),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_SYSTEM_NOTICE"),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_FAQ"),
                new MenuBean(request, "/totsys/sysadm/board/board_list.jsp?boardGroupID=ID_PDS")
            }
            //boardMenus
        };


%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>중메뉴</title>
<link rel="stylesheet" type="text/css" href="/totsys/common/css/kecttep.css">
<link rel="stylesheet" type="text/css" href="/totsys/common/css/SquareButtons.css">
<link rel="stylesheet" type="text/css" href="/totsys/common/css/style.css">
<script src="/totsys/common/js/popup.js"></script>
<script>
function getCookie( name ) {
    var nameOfCookie = name + "=";
    var x = 0;

    while ( x <= document.cookie.length ) {
        var y = (x+nameOfCookie.length);

        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) {
                endOfCookie = document.cookie.length;
            }
            return unescape( document.cookie.substring( y, endOfCookie ) );
        }

        x = document.cookie.indexOf( " ", x ) + 1;

        if ( x == 0 ) {
            break;
        }
    }
    return "";
}

function pupupIndex() {  //로그인시 팝업

<% for(int ii=0;ii<count;ii++) { %>
    gName="BOARD"+<%=idList[ii]%>;
    if(getCookie(gName)!="no") {
        var urlname2 = "/totsys/common/inc/totper/left/main_popup3.jsp?gName="+gName;
        //   var urlname2 = "newjsp.jsp?id="+gName;
        var height = screen.height;
        var width = screen.width;
        var leftpos = width / 2 - 350+100+((<%=ii%>+1)*50);
        var toppos = height / 2 - 350 +((<%=ii%>+1)*50);
        window.open(urlname2, gName,"width=550, height=380, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=" + leftpos + ",top=" + toppos);
    }
<% } %>
}
    //2014.09.22 Add by KWON,HAN : 인사이동 후 담당자 일괄변경
function transDept(){
    var sModYn = "<%=sModYn%>";
    var iCountModYn = <%=countModYn%>;
    var iTmpCount = <%=tmpCount%>;
    var confirmYn = "N";

    if(iTmpCount != 1) {
        //인사이동 후 이관여부를 변경하는 도중에 오류가 발생하였습니다.\\n\\n 관리자에게 문의 하십시오.
        alert("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.errorModYnAdmin")%>");
        return false;
    }
    if(sModYn != "Y") {
        return false;
    }

    if(iCountModYn <= 0) {
        alert("인사이동이 발생하였습니다.\n\n담당자를 변경할 집계(제출)자료가 존재하지 않습니다.");
        //if(confirm("인사이동이 발생하였습니다.\n\n담당자를 변경할 집계(제출)자료가 존재하지 않습니다.\n\n확인을 하시겠습니까?")) {
        //    confirmYn = "Y";
        //}
    } else {
        //인사이동이 발생하였습니다.\\n\\n집계(제출)자료의 담당자를 일괄적으로 변경하시겠습니까?
        if(confirm("<%= MoumiConfig.getMessageBundle().getString("moumi.message.popup.modYnTransfer")%>")) {
            confirmYn = "Y";
        }
    }

    if(confirmYn == "Y") {
        var urlname = "/totsys/common/web/documents/tot_doc/popup_doc_report_transfer.jsp?docType=ALL&exeType=A";
        var width = screen.width;
        var height = screen.height;
        var leftpos = width / 2 - 350;
        var toppos = height / 2 - 350;
        post = window.open(urlname, "post", "width=1024, height=600, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
        //모달 팝업창
        //post = window.showModalDialog(urlname, "post", "dialogWidth:1310px; dialogHeight:610px; toolbar:no;location:no;directories:no;status:no;menubar:no;scrollbars:no;resizable:no;dialogLeft:" + leftpos + ";dialogTop:" + toppos);
        post.focus();
    }
    //+++++++++++++++++++++++++++++++

    return;
}

function up(){
    window.open("/indexSSOupdate.jsp?id=<%=usID%>","");
    if (/MSIE/.test(navigator.userAgent)) {
        if(navigator.appVersion.indexOf("MSIE 7.0")>=0 || navigator.appVersion.indexOf("MSIE 8.0")>=0 || navigator.appVersion.indexOf("MSIE 9.0")>=0) {
            parent.window.open('about:blank','_self').close();
        } else {
            parent.window.close();
        }
    }
}
//-->
</script>
</head>
<body class="left_body" onload="parent.contentGenerator.location.href='/totsys/login/top.jsp';pupupIndex();"><!--팝업 띄우고 싶으면 pupupIndex(); 를 onload에 추가시킴 -->
<!-- top메뉴 내용은 left.jsp내용을 기반으로 하기 때문에 left.jsp가 로딩 된 후에 다시 로드 되어야 한다. -->
<script src="/totsys/common/js/wz_tooltip/wz_tooltip.js"></script>
<%
    MenuBean[][] menus = null;

    if(sysAuth == MoumiConfig.TOTPER || sysAuth == MoumiConfig.REPOPER)
        menus = totperMenuss;
    else if(sysAuth == MoumiConfig.SYSADM)
        menus = sysadmMenus;
    else if(sysAuth == MoumiConfig.SUB_SYSADM || sysAuth == MoumiConfig.REPOADM || sysAuth == MoumiConfig.SUB_TOTADM)
        menus = sub_sysMenus;
    else{
        menus = totperMenuss;
    }

    if(MoumiConfig.isOnLeftMenu()){
        for(int i = 0; i < menus.length; i++) {
%>
    <div id="menu<%= i+1 %>" style="display:'<%= i == 0 ? "inline" : "none" %>';">
        <table width="130" border="0" cellspacing="0" cellpadding="0" align="center">

            <!-- Begin : left 메뉴 상단 background -->
            <tr>
                <td>
                    <img alt="메뉴테두리" src="/totsys/common/images/left/left_t.gif" width="130" height="8" style="vertical-align: bottom" />
                </td>
            </tr><!-- End : left 메뉴 상단 background -->

            <tr>
                <td background="/totsys/common/images/left/left_bg.gif">
                    <table width="120" border="0" cellpadding="0" cellspacing="0" align="center">
                        <!-- Begin : left 메뉴 타이틀 -->
                        <tr>
                            <td height="30" align="center" class="largeButton2" style="margin:0 0 10px 10px;">
                                <!--<a class="largeButton2" href="/totsys/totper/main.jsp" target="main" style="margin:0 0 10px 0;">-->
                                <!--<a class="largeButton2" href="<%--= menus[i][0].getUrl() --%>" target="main" style="margin:0 0 10px 0;">-->
                                    <strong>
                                        <font color="#FFFFFF" size="2.5">
                                        <!--<span id="mainmenu<%= i+1 %>" class="buttonWrapper">-->
                                            <%= menus[i][0] %>
                                        <!--</span>-->
                                        </font>
                                    </strong>
                                <!--</a>-->
                            </td>
                        </tr><!--// End : left 메뉴 타이틀 -->

                        <!-- Begin : left 메뉴 loop -->
<%
            for(int j = 1; j < menus[i].length; j++) {
%>
                        <tr>
                            <td height="30" style="padding-left:10px" align="left">
                                <img alt="글머리" src="/totsys/common/images/folder.gif" id="img<%= i + 1%>" />
                                <span>
                                    <a class="f_12_p_Black_L" id="linkd<%= i + 1%><%= j%>" href="<%= menus[i][j].getUrl()%>" target="main" title="<%= menus[i][j]%>">
                                        <%= menus[i][j]%>
                                    </a>
                                </span>
                            </td>
                        </tr>
<%
            }   // end for
%>
                        <!--// End : left 메뉴 loop -->
                    </table>
                </td>
            </tr>

            <!-- Begin : left 메뉴 하단 Background -->
            <tr>
                <td>
                    <img alt="글머리" src="/totsys/common/images/left/left_b.gif" width="130" height="20" />
                </td>
            </tr><!--// End : left 메뉴 하단 Background -->
        </table>
    </div>
<%
        }   // end for
    } else {
%>
    <!-- TODO: implement -->
<%
}
%>
</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();
}
%>
