protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_databasedellog"); if (ManageHelper.PageAct() != "del") { return; } ManageHelper.CheckAdminPower("system_databasedellog"); var db = new Sys.BLL.Common(); try { db.DatabaseLogDel(); Response.Write("yes"); ManageHelper.AddLog("system_databasedellog", "清除数据库日志成功"); } catch (Exception ex) { Response.Write(ex.Message); ManageHelper.AddLog("system_databasedellog", "清除数据库日志失败"); Response.End(); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_databasebackup"); if (ManageHelper.PageAct() != "bak") { return; } WebConfig.SetString("DatabaseBackupPath", DatabaseBackupPath); var db = new Sys.BLL.Common(); try { var bakfile = db.DatabaseBackup(DatabaseBackupPath); Response.Write("yes"); ManageHelper.AddLog("system_databasebackup", "数据库备份成功,路径:" + bakfile); } catch (Exception ex) { Response.Write(ex.Message); ManageHelper.AddLog("system_databasebackup", "数据库备份失败,路径:" + DatabaseBackupPath); Response.End(); } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_configsystem"); if (ManageHelper.PageAct() == "save") { ConfigSave(); } }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_toolcache"); if (ManageHelper.PageAct() == "clear") { foreach (var entry in base.Cache.Cast <DictionaryEntry>()) { DataCache.RemoveCache(entry.Key.ToString()); } Response.Write("yes"); Response.End(); } }
public string CurPageFlag = "system_adminipblockconfig"; //当前模块权限 protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower(CurPageFlag); var bll = new Sys.BLL.SysConfig(); if (ManageHelper.PageAct() == "save") { ManageHelper.CheckAdminPower("system_memberipblockconfigupdate");//修改权限 var model = bll.GetModel("WebConfig", "AdminIpBlockType"); model.Value = PageRequest.GetString("IpBlockType"); bll.Update(model); //添加日志 ManageHelper.AddLog(CurPageFlag, (BlockModule == 0 ? "后台" : "用户") + "访问限制选项修改为:“" + Sys.BLL.SysConfig.GetNameByCache("IpBlockType", PageRequest.GetString("IpBlockType")) + "”"); Response.Write("yes"); Response.End(); } }