private void HonorNoPage(int uid) { string info = Utils.GetRequest("info", "all", 1, "", ""); int hid = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[1-9]\d*$", "会员ID错误")); if (info != "ok") { Master.Title = "撤销荣誉版主"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定撤销" + new BCW.BLL.User().GetUsName(hid) + "(" + hid + ")的荣誉版主吗"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?info=ok&act=honorno&hid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">确定撤销</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=position&hid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">先留着吧..</a>"); builder.Append(Out.Tab("</div>", "<br />")); } else { if (!new BCW.BLL.User().Exists(hid)) { Utils.Error("不存在的会员ID", ""); } string Limit = new BCW.BLL.User().GetLimit(hid); if (!Limit.Contains("honor")) { Utils.Error("该会员不是荣誉版主", ""); } Limit = Limit.Replace("honor", ""); new BCW.BLL.User().UpdateLimit(hid, Limit); //记录日志 string UsName = new BCW.BLL.User().GetUsName(hid); string strLog = string.Empty; strLog = "系统管理员将[url=/bbs/uinfo.aspx?uid=" + hid + "]" + UsName + "[/url]撤销荣誉版主身份"; new BCW.BLL.Forumlog().Add(0, 0, strLog); //发送内线给新版主 new BCW.BLL.Guest().Add(hid, UsName, strLog.Replace("[url=/bbs/uinfo.aspx?uid=" + hid + "]" + UsName + "[/url]", "您")); Utils.Success("撤销荣誉版主", "撤销荣誉版主成功..", Utils.getUrl("usermanage.aspx?act=position&hid=" + hid + "&backurl=" + Utils.getPage(0) + ""), "1"); } }
private void PhUploadPage() { int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } BCW.User.Users.ShowVerifyRole("f", meid); //非验证会员提示 new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Upfile, meid); //会员上传权限 //遍历File表单元素 System.Web.HttpFileCollection files = System.Web.HttpContext.Current.Request.Files; for (int iFile = 0; iFile < files.Count; iFile++) { //检查文件扩展名字 System.Web.HttpPostedFile postedFile = files[iFile]; string fileName, fileExtension; fileName = System.IO.Path.GetFileName(postedFile.FileName); string UpExt = ".gif,.jpg,.jpeg"; int UpLength = Convert.ToInt32(ub.GetSub("UpaPhFileSize", xmlPath)); if (fileName != "") { fileExtension = System.IO.Path.GetExtension(fileName).ToLower(); //检查是否允许上传格式 if (UpExt.IndexOf(fileExtension) == -1) { Utils.Error("头像图片格式只允许" + UpExt + "..", ""); } if (postedFile.ContentLength > Convert.ToInt32(UpLength * 1024)) { Utils.Error("头像大小限" + UpLength + "K内", ""); } string DirPath = string.Empty; string prevDirPath = string.Empty; string Path = "/Files/bbs/" + meid + "/tx/"; string prevPath = Path; if (FileTool.CreateDirectory(Path, out DirPath)) { //生成随机文件名 fileName = DT.getDateTimeNum() + iFile + fileExtension; string SavePath = System.Web.HttpContext.Current.Request.MapPath(DirPath) + fileName; postedFile.SaveAs(SavePath); //=============================图片木马检测,包括TXT=========================== string vSavePath = SavePath; bool IsPass = true; System.IO.StreamReader sr = new System.IO.StreamReader(vSavePath, System.Text.Encoding.Default); string strContent = sr.ReadToEnd().ToLower(); sr.Close(); string str = "system.|request|javascript|script |script>|.getfolder|.createfolder|.deletefolder|.createdirectory|.deletedirectory|.saveas|wscript.shell|script.encode|server.|.createobject|execute|activexobject|language="; foreach (string s in str.Split('|')) { if (strContent.IndexOf(s) != -1) { System.IO.File.Delete(vSavePath); IsPass = false; break; } } if (IsPass == false) { Utils.Error("非法图片..", ""); } //=============================图片木马检测,包括TXT=========================== string wh = new BCW.Graph.ImageHelper().GetPicxywh(SavePath, 0); wh = wh.Replace("像素", ""); string[] whTemp = wh.Split('*'); int w = Utils.ParseInt(whTemp[0]); int h = Utils.ParseInt(whTemp[1]); if (w < 15 || h < 15) { System.IO.File.Delete(SavePath); Utils.Error("头像宽高尺寸都不能小于15像素", ""); } if (w > 240 || h > 320) { //System.IO.File.Delete(SavePath); //Utils.Error("头像尺寸限240*320像素内", ""); //------缩放图片(比例缩放)----- int width = 240; int height = 320; try { bool pbool = true; if (FileTool.CreateDirectory(prevPath, out prevDirPath)) { string prevSavePath = System.Web.HttpContext.Current.Request.MapPath(prevDirPath) + fileName; if (fileExtension == ".gif") { new BCW.Graph.GifHelper().GetThumbnail(SavePath, prevSavePath, width, height, pbool); } else { if (fileExtension == ".png" || fileExtension == ".jpg" || fileExtension == ".jpeg") { new BCW.Graph.ImageHelper().ResizeImage(SavePath, prevSavePath, width, height, pbool); } } } DirPath = prevDirPath; } catch { //删除原图 BCW.Files.FileTool.DeleteFile(DirPath + fileName); Utils.Error("头像上传失败,头像图片格式也许已损坏,可以重试一下", ""); } } //删除之前的自定义头像文件 string PhotoFile = new BCW.BLL.User().GetPhoto(meid); if (PhotoFile != "" && PhotoFile.Contains("/tx/")) { BCW.Files.FileTool.DeleteFile(PhotoFile); } new BCW.BLL.User().UpdatePhoto(meid, DirPath + fileName); } else { Utils.Error("上传出现错误..", ""); } } } //动态记录 new BCW.BLL.Action().Add(meid, "在空间设置了[URL=/bbs/uinfo.aspx?uid=" + meid + "]新的头像[/URL]"); Utils.Success("设置头像", "设置头像成功!<br /><a href=\"" + ReplaceWap(Utils.getUrl("uinfo.aspx")) + "\">>查看效果</a>", ReplaceWap(Utils.getPage("uinfo.aspx")), "2"); }
private void PositionPage(string act) { Master.Title = "查看权限"; int hid = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[0-9]\d*$", "会员ID错误")); if (!new BCW.BLL.User().Exists(hid)) { Utils.Error("不存在的会员ID", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("管理会员:<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + new BCW.BLL.User().GetUsName(hid) + "(" + hid + ")</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("=当前权限=<br />"); int GroupId = new BCW.BLL.Group().GetID(hid); DataSet ds = new BCW.BLL.Role().GetList("ID,UsName,RoleName,ForumID,ForumName,Include", "UsID=" + hid + " and (OverTime>='" + DateTime.Now + "' OR OverTime='1990-1-1 00:00:00') and Status=0 ORDER BY FORUMID ASC"); if (ds != null && ds.Tables[0].Rows.Count > 0 || GroupId > 0) { if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { int id = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString()); int Include = int.Parse(ds.Tables[0].Rows[i]["Include"].ToString()); int forumid = int.Parse(ds.Tables[0].Rows[i]["ForumID"].ToString()); string ForumName = ds.Tables[0].Rows[i]["ForumName"].ToString(); string UsName = ds.Tables[0].Rows[i]["UsName"].ToString(); string RoleName = ds.Tables[0].Rows[i]["RoleName"].ToString(); builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=edit&id=" + id + "&hid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">[管理]</a>"); if (forumid == -1) { builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&id=" + id + "&hid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖全站<br />"); } else if (forumid == 0) { builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&id=" + id + "&hid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖全区版块<br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=rolece&id=" + id + "&hid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + RoleName + "</a> 管辖<a href=\"" + Utils.getPage("forum.aspx?id=" + forumid + "") + "\">" + ForumName + "</a><br />"); } } string Limit = new BCW.BLL.User().GetLimit(hid); if (!Limit.Contains("honor")) { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=honor&hid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">[设为荣誉版主]</a>"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=honorno&hid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">[撤销荣誉版主]</a>"); } } if (GroupId > 0) { builder.Append("<a href=\"" + Utils.getUrl("group.aspx?act=edit&id=" + GroupId + "") + "\">" + new BCW.BLL.Group().GetTitle(GroupId) + "</a> " + ub.GetSub("GroupzName", "/Controls/group.xml") + ""); } } else { builder.Append("普通会员"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=add&uid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">设为版主</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("moderator.aspx?act=add2&uid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">设为管理员</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?act=view&uid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">返回上一级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void ReloadPage() { int hid = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[0-9]\d*$", "会员ID错误")); if (!new BCW.BLL.User().Exists(hid)) { Utils.Error("不存在的会员ID", ""); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("管理会员:<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + new BCW.BLL.User().GetUsName(hid) + "</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); string Limit = new BCW.BLL.User().GetLimit(hid); if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Lock, hid) || Limit.Contains("lock")) { builder.Append("已锁定<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=1&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=1&backurl=" + Utils.getPage(0) + "") + "\">锁定</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Text, hid)) { builder.Append("已禁发贴<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=2&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=2&backurl=" + Utils.getPage(0) + "") + "\">禁发贴</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Reply, hid)) { builder.Append("已禁回贴<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=3&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=3&backurl=" + Utils.getPage(0) + "") + "\">禁回贴</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Guest, hid)) { builder.Append("已禁短消息<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=4&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=4&backurl=" + Utils.getPage(0) + "") + "\">禁短消息</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Chat, hid)) { builder.Append("已禁聊天室<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=5&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=5&backurl=" + Utils.getPage(0) + "") + "\">禁聊天室</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_NetWork, hid)) { builder.Append("已禁发广播<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=7&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=7&backurl=" + Utils.getPage(0) + "") + "\">禁发广播</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Comment, hid)) { builder.Append("已禁全站评论<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=8&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=8&backurl=" + Utils.getPage(0) + "") + "\">禁全站评论</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Upfile, hid)) { builder.Append("已禁上传文件<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=9&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=9&backurl=" + Utils.getPage(0) + "") + "\">禁上传文件</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Finance, hid)) { builder.Append("已禁金融系统<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=10&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=10&backurl=" + Utils.getPage(0) + "") + "\">禁金融系统</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Game, hid)) { builder.Append("已禁社区游戏<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=11&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=11&backurl=" + Utils.getPage(0) + "") + "\">禁社区游戏</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Speak, hid)) { builder.Append("已禁游戏闲聊<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=14&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=14&backurl=" + Utils.getPage(0) + "") + "\">禁游戏闲聊</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_UsBook, hid)) { builder.Append("已禁使用留言本<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=6&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=6&backurl=" + Utils.getPage(0) + "") + "\">禁使用留言本</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Diary, hid)) { builder.Append("已禁使用日记<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=12&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=12&backurl=" + Utils.getPage(0) + "") + "\">禁使用日记</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Albums, hid)) { builder.Append("已禁使用相册<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=13&backurl=" + Utils.getPage(0) + "") + "\">[解]</a><br />"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=13&backurl=" + Utils.getPage(0) + "") + "\">禁使用相册</a><br />"); } if (new BCW.User.Limits().IsUserLimit(BCW.User.Limits.enumRole.Role_Spaceapp, hid)) { builder.Append("已禁社区应用<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin2&hid=" + hid + "&ptype=15&backurl=" + Utils.getPage(0) + "") + "\">[解]</a>"); } else { builder.Append("<a href=\"" + Utils.getUrl("usermanage.aspx?act=admin&hid=" + hid + "&ptype=15&backurl=" + Utils.getPage(0) + "") + "\">禁社区应用</a>"); } if (Utils.GetDomain().Contains("qyh.cc")) { builder.Append("<br /><a href=\"" + Utils.getUrl("usermanage.aspx?act=payset&uid=" + hid + "") + "\">游戏押注控制</a>"); } builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.RHr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?act=view&uid=" + hid + "") + "\">返回上一级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void AdminPage(string act, int meid) { int hid = int.Parse(Utils.GetRequest("hid", "all", 2, @"^[0-9]\d*$", "会员ID错误")); int ptype = int.Parse(Utils.GetRequest("ptype", "all", 2, @"^[0-9]\d*$", "选择权限错误")); string info = Utils.GetRequest("info", "post", 1, "", ""); string sName = string.Empty; string Role = string.Empty; if (!new BCW.BLL.User().Exists(hid)) { Utils.Error("不存在的会员ID", ""); } string UsName = new BCW.BLL.User().GetUsName(hid); if (ptype == 1) { sName = "锁定"; Role = "A"; } else if (ptype == 2) { sName = "发帖"; Role = "B"; } else if (ptype == 3) { sName = "回贴"; Role = "C"; } else if (ptype == 4) { sName = "短消息"; Role = "D"; } else if (ptype == 5) { sName = "聊天室"; Role = "E"; } else if (ptype == 6) { sName = "留言本"; Role = "F"; } else if (ptype == 7) { sName = "发广播"; Role = "G"; } else if (ptype == 8) { sName = "全站评论"; Role = "H"; } else if (ptype == 9) { sName = "上传文件"; Role = "I"; } else if (ptype == 10) { sName = "金融系统"; Role = "J"; } else if (ptype == 11) { sName = "社区游戏"; Role = "K"; } else if (ptype == 12) { sName = "使用日记"; Role = "L"; } else if (ptype == 13) { sName = "使用相册"; Role = "M"; } else if (ptype == 14) { sName = "使用闲聊"; Role = "N"; } else if (ptype == 15) { sName = "社区应用"; Role = "O"; } if (act == "admin") { if (ptype == 1) { sName = "锁定"; } else { sName = "禁止" + sName + ""; } } else { if (ptype == 1) { sName = "解锁"; } else { sName = "解禁" + sName + ""; } } if (info == "ok") { string Why = Utils.GetRequest("Why", "post", 3, @"^[^\^]{1,50}$", "理由限50字内,可留空"); int rDay = 0; if (act == "admin") { rDay = int.Parse(Utils.GetRequest("rDay", "post", 2, @"^0|1|2|3|5|10|15|30|90$", "期限选择错误")); if (ptype != 1) { if (rDay == 0) { Utils.Error("只有锁定类型才可以选择永久期限", ""); } } //如果已存在过期加黑记录则先删除 new BCW.BLL.Blacklist().DeleteRole(hid, Role); if (new BCW.BLL.Blacklist().ExistsRole(hid, Role)) { Utils.Error("此ID已被" + sName + "", ""); } BCW.Model.Blacklist model = new BCW.Model.Blacklist(); model.UsID = hid; model.UsName = UsName; model.ForumID = 0; model.ForumName = ""; model.BlackRole = Role; model.BlackWhy = Why; model.BlackDay = rDay; model.Include = 0; model.AdminUsID = meid; model.ExitTime = DateTime.Now.AddDays(rDay); model.AddTime = DateTime.Now; new BCW.BLL.Blacklist().Add(model); //永久锁定 if (ptype == 1 && rDay == 0) { string Limit = new BCW.BLL.User().GetLimit(hid); Limit = Limit + "|lock"; new BCW.BLL.User().UpdateLimit(hid, Limit); } } else { if (ptype > 1) { if (new BCW.BLL.Blacklist().ExistsRole(hid, "A")) { Utils.Error("你必须解除锁定才能进行此操作", ""); } } string Limit = new BCW.BLL.User().GetLimit(hid); if (!new BCW.BLL.Blacklist().ExistsRole(hid, Role) && !Limit.Contains("lock")) { Utils.Error("不存在的加黑记录", ""); } new BCW.BLL.Blacklist().DeleteRole(hid, Role); //解除永久锁定 if (ptype == 1) { Limit = Limit.Replace("lock", ""); new BCW.BLL.User().UpdateLimit(hid, Limit); } } //记录日志 string strLog = "系统管理员对[url=/bbs/uinfo.aspx?uid=" + hid + "]" + UsName + "[/url]" + sName + ""; string strLog2 = "系统管理员将你" + sName + ""; if (act == "admin") { if (rDay == 0) { strLog += "(永久)"; strLog2 += "(永久)"; } else { strLog += "" + rDay + "天"; strLog2 += "" + rDay + "天"; } } if (!string.IsNullOrEmpty(Why)) { strLog += ",理由:" + Why + ""; strLog2 += ",理由:" + Why + ""; } new BCW.BLL.Forumlog().Add(0, 0, strLog); new BCW.BLL.Guest().Add(0, hid, UsName, strLog2); Utils.Success("管理会员", "执行管理成功,正在返回..", Utils.getUrl("usermanage.aspx?hid=" + hid + "&backurl=" + Utils.getPage(0) + ""), "1"); } else { builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("对<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + hid + "&backurl=" + Utils.PostPage(1) + "") + "\">" + UsName + "(" + hid + ")</a>执行《" + sName + "》"); builder.Append(Out.Tab("</div>", "")); if (act == "admin") { strText = ",,理由(50字内):/,期限:,,,,"; strName = "hid,ptype,Why,rDay,act,info,backurl"; strType = "hidden,hidden,textarea,select,hidden,hidden,hidden"; strValu = "" + hid + "'" + ptype + "''10'admin'ok'" + Utils.getPage(0) + ""; if (ptype == 1) { strEmpt = "false,false,false,0|永久|1|1天|2|2天|3|3天|5|5天|10|10天|15|15天|30|30天|90|90天,false,false,false"; } else { strEmpt = "false,false,false,1|1天|2|2天|3|3天|5|5天|10|10天|15|15天|30|30天|90|90天,false,false,false"; } } else { strText = ",,理由(50字内):/,,,,"; strName = "hid,ptype,Why,act,info,backurl"; strType = "hidden,hidden,textarea,hidden,hidden,hidden"; strValu = "" + hid + "'" + ptype + "''admin2'ok'" + Utils.getPage(0) + ""; strEmpt = "false,false,false,false,false,false"; } strIdea = "/"; strOthe = "确定执行,usermanage.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "")); builder.Append(" <a href=\"" + Utils.getUrl("usermanage.aspx?hid=" + hid + "&backurl=" + Utils.getPage(0) + "") + "\">重选</a><br />"); builder.Append("<a href=\"" + Utils.getPage("usermanage.aspx?hid=" + hid + "") + "\">>返回上一级</a>"); if (ptype == 1) { builder.Append("<br />温馨提示:<br />1.锁定会员后,该会员将不能正常使用所有功能."); } builder.Append(Out.Tab("</div>", "<br />")); } }