Beispiel #1
0
    private void SetAllTimeTop()
    {
        int    iTmp = 0;
        string sUrl = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        if (
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1002.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1003.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1005.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR3001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR_DEPT_ORG.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR_DEPT_ORG_EMBED.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1009.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1014.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR10001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST1100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST3600.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "APP2000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0406S1.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0304S2.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0403S4.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "BSC0404S1.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110104_01.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110204.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST110204_01.ASPX"
            )
        {
            sUrl = HttpContext.Current.Request.Url.PathAndQuery;
        }

        Biz_lib_MenuControl biz        = new Biz_lib_MenuControl();
        DataSet             dsAuthTop  = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthSub  = biz.GetAuthSubMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthMenu = biz.GetAuthMenu(gUserInfo.Emp_Ref_ID.ToString());

        bool bAuthPage   = biz.IsAuthPage(gUserInfo.Emp_Ref_ID.ToString(), sUrl);
        bool bNotUseMenu = biz.IsNotUseMenu(gUserInfo.Emp_Ref_ID.ToString(), sUrl);

        //// 권한이 없을때 처리...
        if (!bAuthPage && err != "err")
        {
            //Server.Transfer("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            HttpContext.Current.Response.Redirect("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            return;
        }

        // 메뉴구성페이지가 아닐때 처리...
        //if (bNotUseMenu)
        //{
        //    return;
        //}

        int iTopMenuID = GetTopMenuRefID(sUrl);

/*
 *      DataTable dtSubMenu = GetSubMenu(iTopMenuID.ToString());
 */
        #region TopMenu 설정
        string sTopLiteral = "";
        iTmp = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            //sTopLiteral += "<td {5}><img src=\"../images/blank.gif\" width=\"1\"><table                         ";
            //sTopLiteral += "     cellpadding=0 cellspacing=0>                                                   ";
            //sTopLiteral += "        <tr>                                                                        ";
            //sTopLiteral += "            <td style=\"cursor:hand\" onclick=\"location.href='{0}';mfLeftTopTitle('{6}')\"               ";
            //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            //sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";
            //sTopLiteral += "        </tr>                                                                       ";
            //sTopLiteral += "    </table>                                                                        ";
            //sTopLiteral += "</td>                                                                               ";

            //sTopLiteral = string.Format(
            //                            sTopLiteral
            //                           , GetValue(drRow["MENU_FULL_PATH"])
            //                           , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
            //                           , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
            //                           , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
            //                           , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
            //                           , (iTmp == 0 ? "align=\"left\"" : "width=130")
            //                           , GetValue(drRow["MENU_PREV_ICON_PATH"])
            //                           );


            sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"3\"></td>          ";
            sTopLiteral += "<td";
            //sTopLiteral += "<td style=\"cursor:hand\"               ";
            //sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            //sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";//;mfLeftTopTitle('{5}')
            sTopLiteral += "            ><a href='#null' onfocus='this.blur();' onclick=\"location.replace('{0}')\"><img src=\"{3}\" name=\"img{4}\" border='0'></a></td> ";



            //sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"6\"></td>          ";
            //sTopLiteral += "<td style=\"cursor:hand\" onclick=\"location.href='{0}';mfLeftTopTitle('{5}')\"               ";
            ////sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            ////sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            //sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";
            sTopLiteral = string.Format(
                sTopLiteral
                , GetValue(drRow["MENU_FULL_PATH"])
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , GetValue(drRow["MENU_PREV_ICON_PATH"])
                );

            if (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]))
            {
                leftTopTitle.ImageUrl = GetValue(drRow["MENU_PREV_ICON_PATH"]);
            }

            iTmp++;
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        litTopMenu.Text = sTopLiteral;
        #endregion

        #region SubMenuStyle 설정 - 08.03.20 류승태 -- 주석처리 메뉴추가관련

/*
 *      string sSubLiteral = "";
 *      int iPrevLevel = 1; // 이전레벨
 *      int iTmpLevel = 0;
 *
 *      string sMenuID = "";    // 토글메뉴시 사용
 *
 *      foreach (DataRow drRow in dtSubMenu.Rows)
 *      {
 *          iTmpLevel = Convert.ToInt32(drRow["LEVEL"]);
 *
 *          if (iPrevLevel != iTmpLevel)
 *          {
 *              if (iPrevLevel < iTmpLevel)
 *              {
 *                  // 세부항목 여는 행위
 *                  if (iTmpLevel >= 3)
 *                      //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      sSubLiteral += "<span id=\"" + sMenuID + "\">                                                               \n";
 *                      sSubLiteral += "    <table width=\"137\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">      \n";
 *                      sSubLiteral += "        <tr><td width=\"128\" height=3></td></tr>                               \n";
 *
 *                      //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  }
 *                  else
 *                  {
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                          //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                          sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                          sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                      }
 *
 *                      sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                      sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                      sSubLiteral += "    <tr>                                                                                                \n";
 *                      sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                      sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                      sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                      sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토클함수를 콜한다.
 *                          sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                      }
 *
 *                      sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *                      sSubLiteral += "        </td>                                                                                           \n";
 *                      sSubLiteral += "    </tr>                                                                                               \n";
 *                      sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                      sSubLiteral += "</table>                                                                                                \n";
 *                  }
 *              }
 *              else
 *              {
 *                  // 레벨이 달라지는 경우이므로 레벨이 2인경우는 닫고 다시연다.
 *                  if (iTmpLevel >= 3)
 *                      ;
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *                      sSubLiteral += "    </table>                                                                    \n";
 *                      sSubLiteral += "</span>                                                                         \n";
 *
 *                      //////sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                      sSubLiteral += "<span id=\"" + sMenuID + "\">                                                               \n";
 *                      sSubLiteral += "    <table width=\"137\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">      \n";
 *                      sSubLiteral += "        <tr><td width=\"128\" height=3></td></tr>                               \n";
 *
 *                  }
 *
 *                  // 세부항목 닫는 행위
 *                  if (iTmpLevel >= 3)
 *                      //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  else if (iTmpLevel >= 2)
 *                  {
 *                      //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                      sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  }
 *                  else
 *                  {
 *                      sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *                      sSubLiteral += "    </table>                                                                    \n";
 *                      sSubLiteral += "</span>                                                                         \n";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                          //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                          sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                          sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                      }
 *
 *                      sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                      sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                      sSubLiteral += "    <tr>                                                                                                \n";
 *                      sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                      sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                      sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                      sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                      if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                      {
 *                          // 메뉴그룹이라면 토클함수를 콜한다.
 *                          sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                      }
 *
 *                      sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *
 *                      sSubLiteral += "        </td>                                                                                           \n";
 *                      sSubLiteral += "    </tr>                                                                                               \n";
 *                      sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                      sSubLiteral += "</table>                                                                                                \n";
 *                  }
 *              }
 *
 *              iPrevLevel = iTmpLevel;
 *          }
 *          else
 *          {
 *              if (iTmpLevel >= 3)
 *                  //sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  sSubLiteral += "        <tr><td height=\"19\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">▶ " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *              else if (iTmpLevel >= 2)
 *                  //sSubLiteral += "        <tr><td height=\"19\"><a href=\"javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *                  sSubLiteral += "        <tr><td height=\"19\"><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" class=\"stext\">>> " + GetValue(drRow["MENU_NAME"]) + "</a></td></tr>    \n";
 *              else
 *              {
 *                  if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                  {
 *                      // 메뉴그룹이라면 토글시 사용할 ID를 정한다.
 *                      //sMenuID = "spn" + GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."));
 *                      sMenuID = "spn" + GetValue(drRow["MENU_REF_ID"]);
 *
 *                      sSubLiteral += "<script type=\"text/javascript\">saMenu[saMenu.length] = '" + sMenuID + "';</script>";
 *                  }
 *
 *                  sSubLiteral += "<table width=\"169\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" runat=\"server\">   \n";
 *                  sSubLiteral += "    <tr><td height=\"1\" bgcolor=\"#FFFFFF\"></td></tr>                                                 \n";
 *                  sSubLiteral += "    <tr>                                                                                                \n";
 *                  sSubLiteral += "        <td height=\"21\" bgcolor=\"EEEEEE\" class=\"left_menu3\"><img                                  \n";
 *                  sSubLiteral += "            src=\"../images/icon/left_icon01.gif\" height=\"10\" align=\"absmiddle\"                    \n";
 *                  sSubLiteral += "            style=\"cursor:hand\"                                                                       \n";
 *                  sSubLiteral += "            ><a href=\"" + (GetValue(drRow["MENU_FULL_PATH"]) == "" ? "#" : "javascript:location.href='" + GetValue(drRow["MENU_FULL_PATH"]) + "'") + "\" ";
 *
 *                  if (GetValue(drRow["MENU_TYPE"]) == "M")
 *                  {
 *                      // 메뉴그룹이라면 토클함수를 콜한다.
 *                      sSubLiteral += "onclick=\"return mfToggleMenu('" + sMenuID + "')\" ";
 *                  }
 *
 *                  sSubLiteral += "> " + GetValue(drRow["MENU_NAME"]) + "</a> \n";
 *
 *                  sSubLiteral += "        </td>                                                                                           \n";
 *                  sSubLiteral += "    </tr>                                                                                               \n";
 *                  sSubLiteral += "    <tr bgcolor=\"F0F0F0\"><td height=\"1\" bgcolor=\"D6D6D6\"></td></tr>                               \n";
 *                  sSubLiteral += "</table>                                                                                                \n";
 *
 *              }
 *          }
 *
 *          //if (GetValue(drRow["MENU_DIR"]) + GetValue(drRow["MENU_PAGE_NAME"]) == sUrl.ToUpper())
 *          if (GetValue(drRow["MENU_FULL_PATH"]) == sUrl.ToUpper())
 *          {
 *              // 현재페이지가 속해있는 메뉴그룹 셋팅 (계속 펼쳐져 있도록 한다.)
 *              sSubLiteral += "<script type=\"text/javascript\">sMenu = '" + sMenuID + "';</script>";
 *          }
 *      }
 *
 *      // iPrevLevel이 2보다 크거나 같으면 닫아준다.
 *      if (iPrevLevel >= 2)
 *      {
 *          sSubLiteral += "        <tr><td height=5></td></tr>                                             \n";
 *          sSubLiteral += "    </table>                                                                    \n";
 *          sSubLiteral += "</span>                                                                         \n";
 *      }
 *
 *      // 최초 시작시 메뉴를 전부 닫고 현재페이지가 속한 메뉴만 오픈한다.
 *      sSubLiteral += "<script type=\"text/javascript\">mfStartMenu();</script>";
 *
 *      litSubMenu.Text = sSubLiteral;
 */
        #endregion
    }
    private void SetAllTimeTop()
    {
        int    iTmp = 0;
        string sUrl = HttpContext.Current.Request.Url.AbsolutePath;

        // ERRORINFO.ASPX는 쿼리스트링이 고정되지 않은 페이지 이므로 예외처리한다. (해당페이지 권한시 FULL_PATH로 처리되므로 무한루프일수 있다.)
        if (
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "ERRORINFO.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1002.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1003.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR2001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1009.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR1001_1014.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST1100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST3600.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "EST4100.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "APP2000.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR10001.ASPX" &&
            sUrl.Substring(sUrl.LastIndexOf("/") + 1).ToUpper() != "USR3001.ASPX"
            )
        {
            sUrl = HttpContext.Current.Request.Url.PathAndQuery;
        }

        Biz_lib_MenuControl biz        = new Biz_lib_MenuControl();
        DataSet             dsAuthTop  = biz.GetAuthTopMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthSub  = biz.GetAuthSubMenu(gUserInfo.Emp_Ref_ID.ToString());
        DataSet             dsAuthMenu = biz.GetAuthMenu(gUserInfo.Emp_Ref_ID.ToString());

        bool bAuthPage   = biz.IsAuthPage(gUserInfo.Emp_Ref_ID.ToString(), sUrl);
        bool bNotUseMenu = biz.IsNotUseMenu(gUserInfo.Emp_Ref_ID.ToString(), sUrl);

        //// 권한이 없을때 처리...
        if (!bAuthPage && err != "err")
        {
            //Server.Transfer("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            HttpContext.Current.Response.Redirect("/_common/ErrorPages/ErrorInfo.aspx?ERRMSG=권한이 없습니다!");
            return;
        }

        // 메뉴구성페이지가 아닐때 처리...
        if (bNotUseMenu)
        {
            return;
        }

        int       iTopMenuID = GetTopMenuRefID(sUrl);
        DataTable dtSubMenu  = GetSubMenu(iTopMenuID.ToString());

        #region TopMenu 설정
        string sTopLiteral = "";
        iTmp = 0;

        sTopLiteral += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">    \n";
        sTopLiteral += "    <tr>    \n";

        foreach (DataRow drRow in dsAuthTop.Tables[0].Rows)
        {
            sTopLiteral += "<td><img src=\"../images/blank.gif\" width=\"6\"></td>          ";
            sTopLiteral += "<td style=\"cursor:hand\" onclick=\"location.href='{0}';mfLeftTopTitle('{5}')\"               ";
            sTopLiteral += "                                    onmouseout=\"MM_swapImgRestore()\"              ";
            sTopLiteral += "                                    onmouseover=\"MM_swapImage('img{1}', '', '{2}')\"   ";
            sTopLiteral += "            ><img src=\"{3}\" name=\"img{4}\" border=0></td>                        ";

            sTopLiteral = string.Format(
                sTopLiteral
                , GetValue(drRow["MENU_FULL_PATH"])
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]))
                , (iTopMenuID == Convert.ToInt32(drRow["MENU_REF_ID"]) ? GetValue(drRow["MENU_NAME_IMAGE_PATH_U"]) : GetValue(drRow["MENU_NAME_IMAGE_PATH"]))
                , GetValue(drRow["MENU_PAGE_NAME"]).Substring(0, GetValue(drRow["MENU_PAGE_NAME"]).LastIndexOf("."))
                , GetValue(drRow["MENU_PREV_ICON_PATH"])
                );

            iTmp++;
        }

        sTopLiteral += "    </tr>   \n";
        sTopLiteral += "</table>    \n";

        litTopMenu.Text = sTopLiteral;
        #endregion


        #region 부서점수트리 설정
        //TreeNode trnTop = new TreeNode("Top", "TOP");
        //trvDeptScore.Nodes.Add(trnTop);
        //trnTop.ChildNodes.Add(new TreeNode("Child", "CHILD"));


        #endregion
    }