/// <summary> /// 编辑权限-删除过滤页面 /// </summary> public void Admin_url_Del() { if (!EX_Admin.Power("admin_url_edit", "编辑过滤页面")) { AjaxNoPower(); return; } string id = RequestTool.RequestString("uid"); if (id == "") { Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}"); return; } B_Lebi_Admin_Power.Delete("id in (lbsql{" + id + "})"); string action = Tag("删除过滤页面"); string description = id; Log.Add(action, "Admin_Power", id, CurrentAdmin, description); Response.Write("{\"msg\":\"OK\"}"); }
/// <summary> /// 保存权限 /// </summary> public void SavePower() { if (!EX_Admin.Power("admin_limit_edit", "编辑权限")) { EX_Admin.NoPower(); return; } string ids = RequestTool.RequestString("id"); int gid = RequestTool.RequestInt("gid", 0); Lebi_Admin_Group group = B_Lebi_Admin_Group.GetModel(gid); if (group == null) { Response.Write("{\"msg" + Tag("参数错误") + "\"}"); return; } B_Lebi_Admin_Power.Delete("Admin_Group_id=" + group.id + ""); List <Lebi_Admin_Limit> models = B_Lebi_Admin_Limit.GetList("id in (lbsql{" + ids + "})", ""); if (models != null) { Lebi_Admin_Power p = new Lebi_Admin_Power(); foreach (Lebi_Admin_Limit model in models) { p.Admin_Group_id = group.id; p.Admin_Limit_Code = model.Code; p.Admin_Limit_id = model.id; B_Lebi_Admin_Power.Add(p); } } string action = Tag("编辑权限"); string description = Shop.Bussiness.Language.Content(group.Name, "CN"); Log.Add(action, "Admin_Power", gid.ToString(), CurrentAdmin, description); Response.Write("{\"msg\":\"OK\"}"); }