/// <summary> /// 删除模板 /// </summary> public void Theme_Del() { if (!EX_Admin.Power("theme_del", "删除模板")) { EX_Admin.NoPower(); return; } int id = RequestTool.RequestInt("id", 0); Lebi_Theme model = B_Lebi_Theme.GetModel(id); if (model == null) { Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}"); return; } int count = B_Lebi_Language.Counts("Theme_id=" + model.id + ""); if (count > 0) { Response.Write("{\"msg\":\"" + Tag("模板正在使用中,不能删除") + "\"}"); return; } Log.Add("删除模板", "Theme", id.ToString(), CurrentAdmin, model.Name); B_Lebi_Theme.Delete(id); B_Lebi_Theme_Advert.Delete("Theme_id=" + id + ""); B_Lebi_Theme_Skin.Delete("Theme_id=" + id + ""); B_Lebi_Advert.Delete("Theme_id=" + id + ""); Response.Write("{\"msg\":\"OK\"}"); }