protected void Page_Load(object sender, EventArgs e) { //检查登录 ManageHelper.CheckAdminLogin(); //权限 ManageHelper.CheckAdminPower("system_adminipblockblacklist"); //这是业务层 switch (act) { case "searchData": searchData(); break; } var result = new Hashtable(); result["data"] = listIp; var total = new Common().GetCount("AdminRole", strWhere); result["total"] = total; // Response.Write(json); var json = PluSoft.Utils.JSON.Encode(listIp); }
protected void Page_Load(object sender, EventArgs e) { //获取BlockModule和BlockType的中文名 if (BlockModule == 0) { BlockModuleName = "系统"; } else if (BlockModule == 1) { BlockModuleName = "用户"; } if (BlockType == 0) { BlockModuleName = "白名单"; } else if (BlockType == 1) { BlockModuleName = "黑名单"; } //检查登录 ManageHelper.CheckAdminLogin(); //管理权限 // ManageHelper.CheckAdminPower("system_adminipblockmanage"); if (PageRequest.GetString("act") == "SaveData") { Save(); } }
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(); } }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_databaseview"); //if (act == "db") //{ // var db = new Sys.DAL.Common(); // ds = db.GetSelect(tbl, "", "", "top 200 *"); // return; //} //var bll = new Sys.BLL.Common(); //ds = bll.DatabaseTable(); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_toolserver"); CmsInfo += trShow("系统版本号:", Sys.Kernel.Software.Version); CmsInfo += trShow("系统数据库:", Sys.Kernel.Software.Database); //ManagementObjectSearcher searcher14 = new ManagementObjectSearcher("SELECT * FROM Win32_Processor"); //foreach (ManagementObject share in searcher14.Get()) //{ // //HardwareInfo += trShow("CPU * " + searcher14.Get().Count + ":", share["Name"].ToString() + " (二级缓存:" + share["L2CacheSize"].ToString() + "KB)"); // SoftwareInfo += trShow("服务器CPU * " + searcher14.Get().Count + ":", share["Name"].ToString() + " (二级缓存:" + share["L2CacheSize"].ToString() + "KB)"); // break; //} //ManagementObjectSearcher searcher12 = new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem"); //foreach (ManagementObject share in searcher12.Get()) //{ // //HardwareInfo += trShow("操作系统:", share["Caption"].ToString()+ " (版本号:" + share["Version"].ToString()+")"); // //HardwareInfo += trShow("制造商:", share["Manufacturer"].ToString()); // //HardwareInfo += trShow("计算机名:", share["csname"].ToString()); // //HardwareInfo += trShow("Windows目录:", share["WindowsDirectory"].ToString()); // SoftwareInfo += trShow("Windows目录:", share["WindowsDirectory"].ToString()); //} SoftwareInfo += trShow("服务器名称:", Server.MachineName.ToString()); SoftwareInfo += trShow("操作系统:", Environment.OSVersion.ToString()); SoftwareInfo += trShow("服务器IP:", Request.ServerVariables["LOCAL_ADDR"]); SoftwareInfo += trShow("服务器域名:", Request.ServerVariables["SERVER_NAME"]); SoftwareInfo += trShow("服务端脚本执行超时:", Server.ScriptTimeout.ToString()); SoftwareInfo += trShow("服务器现在时间:", DateTime.Now.ToString()); SoftwareInfo += trShow("Session总数:", Session.Contents.Count.ToString()); SoftwareInfo += trShow("Application总数:", Application.Contents.Count.ToString()); SoftwareInfo += trShow(".NET Framework 版本:", Environment.Version.ToString()); SoftwareInfo += trShow("IIS版本:", Request.ServerVariables["SERVER_SOFTWARE"]); SoftwareInfo += trShow("相对路径:", Request.ServerVariables["PATH_INFO"]); SoftwareInfo += trShow("物理路径:", Request.ServerVariables["APPL_PHYSICAL_PATH"]); SoftwareInfo += trShow("运行时间:", (Math.Round(double.Parse((Environment.TickCount / 600 / 60).ToString())) / 100).ToString() + "小时"); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); switch (act) { case "editsave": Save(); break; default: break; } Loginadmin = BllAdmin.GetModel(Account.GetLoginUserID()); Modeladmin = BllAdmin.GetModel(UserId); Html = GetRoleFlagList(Modeladmin.RoleFlags, Modeladmin.PlusFlag); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); switch (act) { case "edit": Edit(); break; case "addsave": Add(); break; case "editsave": EditSave(); break; } }
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(); } }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminPower("system_adminview"); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminHavePower("system_eqpmodel_list"); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); ManageHelper.CheckAdminHavePower("system_member_azg"); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); }
protected void Page_Load(object sender, EventArgs e) { ManageHelper.CheckAdminLogin(); model = new Admin().GetModel(Account.GetLoginUserID()) ?? new Sys.Model.Admin(); Flag = model.UserFlag.IndexOf("system_allot_role") != -1; }