コード例 #1
0
ファイル: ManagePage.cs プロジェクト: refinedKing/Hoto-cms
 /// <summary>
 /// 检查管理员权限
 /// </summary>
 /// <param name="channel_name">栏目名称</param>
 /// <param name="action_type">操作类型</param>
 public void ChkAdminLevel(string channel_name, string action_type)
 {
     Hoto.Model.manager model = GetAdminInfo();
     Hoto.BLL.manager_role bll = new Hoto.BLL.manager_role();
     bool result = bll.Exists(model.role_id, channel_name, action_type);
     if (!result)
     {
         string msbox = "parent.f_errorTab(\"错误提示\", \"您没有管理该页面的权限,请勿尝试非法进入!\")";
         //ClientScript.RegisterClientScriptBlock(Page.GetType(), "JsPrint", msbox.ToString(), true);  //修正BUG
         Response.Write("<script type=\"text/javascript\">" + msbox + "</script>");
         Response.End();
     }
 }
コード例 #2
0
        /// <summary>
        /// 检查管理员权限
        /// </summary>
        /// <param name="channel_id">频道ID</param>
        /// <param name="action_type">操作类型</param>
        public void ChkAdminLevel(int channel_id, string action_type)
        {
            Hoto.Model.manager    model = GetAdminInfo();
            Hoto.BLL.manager_role bll   = new Hoto.BLL.manager_role();
            bool result = bll.Exists(model.role_id, channel_id, action_type);

            if (!result)
            {
                string msbox = "parent.f_errorTab(\"错误提示\", \"您没有管理该页面的权限,请勿尝试非法进入!\")";
                //ClientScript.RegisterClientScriptBlock(Page.GetType(), "JsPrint", msbox.ToString(), true);  //修正BUG
                Response.Write("<script type=\"text/javascript\">" + msbox + "</script>");
                Response.End();
            }
        }
コード例 #3
0
 /// <summary>
 /// 检查管理员权限
 /// </summary>
 /// <param name="channel_name">栏目名称</param>
 /// <param name="action_type">操作类型</param>
 /// <returns>bool</returns>
 public bool IsAdminLevel(string channel_name, string action_type)
 {
     Hoto.Model.manager    model = GetAdminInfo();
     Hoto.BLL.manager_role bll   = new Hoto.BLL.manager_role();
     return(bll.Exists(model.role_id, channel_name, action_type));
 }
コード例 #4
0
ファイル: ManagePage.cs プロジェクト: refinedKing/Hoto-cms
 /// <summary>
 /// 检查管理员权限
 /// </summary>
 /// <param name="channel_name">栏目名称</param>
 /// <param name="action_type">操作类型</param>
 /// <returns>bool</returns>
 public bool IsAdminLevel(string channel_name, string action_type)
 {
     Hoto.Model.manager model = GetAdminInfo();
     Hoto.BLL.manager_role bll = new Hoto.BLL.manager_role();
     return bll.Exists(model.role_id, channel_name, action_type);
 }