Exemplo n.º 1
0
 protected override void ShowPage()
 {
     this.pagetitle = "短消息发件箱";
     if (!base.IsLogin())
     {
         return;
     }
     if (DNTRequest.IsPost())
     {
         if (ForumUtils.IsCrossSitePost())
         {
             base.AddErrLine("您的请求来路不正确,无法提交。如果您安装了某种默认屏蔽来路信息的个人防火墙软件(如 Norton Internet Security),请设置其不要禁止来路信息后再试。");
             return;
         }
         if (ShortMessage.DeletePrivateMessage(this.userid, DNTRequest.GetFormString("pmitemid")) <= 0)
         {
             base.AddErrLine("参数无效<br />");
             return;
         }
         base.SetShowBackLink(false);
         base.AddMsgLine("删除完毕");
     }
     else
     {
         base.BindPrivateMessage(1);
     }
     this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
 }
Exemplo n.º 2
0
 protected override void ShowPage()
 {
     this.pagetitle = "黑名单";
     if (!base.IsLogin())
     {
         return;
     }
     if (DNTRequest.IsPost())
     {
         if (ForumUtils.IsCrossSitePost())
         {
             base.AddErrLine("您的请求来路不正确,无法提交。如果您安装了某种默认屏蔽来路信息的个人防火墙软件(如 Norton Internet Security),请设置其不要禁止来路信息后再试。");
             return;
         }
         if (DNTRequest.GetFormString("Ignorepm") != this.user.Ignorepm)
         {
             this.user.Ignorepm = Utils.CutString(DNTRequest.GetFormString("Ignorepm"), 0, 999);
             //Users.UpdateUserPMSetting(this.user);
             (user as IEntity).Save();
         }
         base.SetUrl("usercpignorelist.aspx");
         base.SetMetaRefresh();
         base.SetShowBackLink(true);
         base.AddMsgLine("操作完毕");
     }
     this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
 }
Exemplo n.º 3
0
 protected override void ShowPage()
 {
     this.pagetitle = "用户控制面板";
     if (!base.IsLogin())
     {
         return;
     }
     this.score1 = ((decimal)this.user.ExtCredits1).ToString();
     this.score2 = ((decimal)this.user.ExtCredits2).ToString();
     this.score3 = ((decimal)this.user.ExtCredits3).ToString();
     this.score4 = ((decimal)this.user.ExtCredits4).ToString();
     this.score5 = ((decimal)this.user.ExtCredits5).ToString();
     this.score6 = ((decimal)this.user.ExtCredits6).ToString();
     this.score7 = ((decimal)this.user.ExtCredits7).ToString();
     this.score8 = ((decimal)this.user.ExtCredits8).ToString();
     if (!base.IsErr() && this.useradminid > 0)
     {
         this.admingroupinfo = AdminGroup.FindByID(this.usergroupid);
     }
     //var stringBuilder = new StringBuilder();
     //if (!this.usergroupinfo.AttachExtensions.IsNullOrEmpty())
     //{
     //	stringBuilder.AppendFormat("[id] in ({0})", this.usergroupinfo.AttachExtensions);
     //}
     //this.usergroupattachtype = Attachments.GetAttachmentTypeString(stringBuilder.ToString());
     this.usergroupattachtype = AttachType.GetAttachmentTypeString(usergroupinfo, null);
     this.newnoticecount      = Notice.GetNewNoticeCountByUid(this.userid);
 }
Exemplo n.º 4
0
        protected override void ShowPage()
        {
            pagetitle = "公共消息";
            if (!base.IsLogin())
            {
                return;
            }

            base.BindItems(announcepmcount);
            announcepmlist = ShortMessage.GetAnnouncePrivateMessageList(16, pageid);
            newnoticecount = Notice.GetNewNoticeCountByUid(userid);
        }
Exemplo n.º 5
0
        protected override void ShowPage()
        {
            this.pagetitle = "撰写短消息";
            if (!base.IsLogin())
            {
                return;
            }
            if (!this.CheckPermission())
            {
                return;
            }
            if (DNTRequest.IsPost() && !ForumUtils.IsCrossSitePost())
            {
                if (!this.CheckPermissionAfterPost())
                {
                    return;
                }
                this.SendPM();
                if (base.IsErr())
                {
                    return;
                }
            }
            var    shortUserInfo = BBX.Entity.User.FindByID(this.msgtoid);
            string text          = (shortUserInfo != null) ? shortUserInfo.Name : "";

            this.msgto = ((this.msgtoid > 0) ? text : this.msgto);
            string text2 = DNTRequest.GetQueryString("action").ToLower();

            if ((text2.CompareTo("re") == 0 || text2.CompareTo("fw") == 0) && DNTRequest.GetQueryInt("pmid", -1) != -1)
            {
                var msg = ShortMessage.FindByID(DNTRequest.GetQueryInt("pmid", -1));
                if (msg != null && (msg.MsgtoID == userid || msg.MsgfromID == userid))
                {
                    this.msgto   = ((text2.CompareTo("re") == 0) ? Utils.HtmlEncode(msg.Msgfrom) : "");
                    this.subject = Utils.HtmlEncode(text2) + ":" + msg.Subject;
                    this.message = Utils.HtmlEncode("> ") + msg.Message.Replace("\n", "\n> ") + "\r\n\r\n";
                }
            }
            if (DNTRequest.GetString("operation") == "pmfriend")
            {
                this.CreatePmFriendMessage();
            }
            this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
        }
Exemplo n.º 6
0
 protected override void ShowPage()
 {
     this.pagetitle = "短消息收件箱";
     if (!base.IsLogin())
     {
         return;
     }
     if (DNTRequest.IsPost())
     {
         if (ForumUtils.IsCrossSitePost())
         {
             base.AddErrLine("您的请求来路不正确,无法提交。如果您安装了某种默认屏蔽来路信息的个人防火墙软件(如 Norton Internet Security),请设置其不要禁止来路信息后再试。");
             return;
         }
         if (Utils.StrIsNullOrEmpty(DNTRequest.GetFormString("pmitemid")))
         {
             base.AddErrLine("您未选中任何短消息,当前操作失败!");
             return;
         }
         if (!Utils.IsNumericList(DNTRequest.GetFormString("pmitemid")))
         {
             base.AddErrLine("参数信息错误!");
             return;
         }
         var ids = DNTRequest.GetFormString("pmitemid");
         if (!String.IsNullOrEmpty(ids) || ShortMessage.DeletePrivateMessage(this.userid, ids) <= 0)
         {
             base.AddErrLine("参数无效");
             return;
         }
         Users.UpdateUserNewPMCount(this.userid, this.olid);
         base.SetUrl("usercpinbox.aspx");
         base.SetMetaRefresh();
         base.SetShowBackLink(true);
         base.AddMsgLine("删除完毕");
     }
     else
     {
         base.BindPrivateMessage(0);
     }
     this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
 }
Exemplo n.º 7
0
 protected override void ShowPage()
 {
     this.pagetitle = "短消息草稿箱";
     if (!base.IsLogin())
     {
         return;
     }
     if (DNTRequest.IsPost())
     {
         if (ShortMessage.DeletePrivateMessage(this.userid, DNTRequest.GetFormString("pmitemid")) <= 0)
         {
             base.AddErrLine("参数无效<br />");
             return;
         }
         base.SetMetaRefresh();
         base.SetShowBackLink(true);
         base.AddMsgLine("删除完毕");
     }
     else
     {
         base.BindPrivateMessage(2);
     }
     this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
 }
Exemplo n.º 8
0
        protected override void ShowPage()
        {
            pagetitle = "用户控制面板";
            if (!base.IsLogin())
            {
                return;
            }

            NoticeType noticetype = Notice.GetNoticetype(filter);

            reccount = Notice.GetNoticeCountByUid(userid, noticetype);
            base.BindItems(reccount, "usercpnotice.aspx?filter=" + filter);
            //noticeinfolist = Notices.GetNoticeinfoCollectionByUid(userid, noticetype, pageid, 16);
            noticeinfolist = Notice.FindAllByUidAndType(userid, noticetype, (pageid - 1) * 16, 16);
            newnoticecount = Notice.GetNewNoticeCountByUid(userid);
            Notice.UpdateNoticeNewByUid(userid, 0);
            //OnlineUsers.UpdateNewNotices(olid);
            var online = Online.FindByID(olid);

            if (online != null)
            {
                online.UpdateNewNotices(0);
            }
        }
Exemplo n.º 9
0
        protected override void ShowPage()
        {
            if (!base.IsLogin())
            {
                return;
            }
            this.pagetitle = "查看短消息";
            if (this.pmid <= 0)
            {
                base.AddErrLine("参数无效");
                return;
            }
            if (!CreditsFacade.IsEnoughCreditsPM(this.userid))
            {
                this.canreplypm = false;
            }
            var msg = ShortMessage.FindByID(this.pmid);

            if (msg == null)
            {
                base.AddErrLine("无效的短消息ID");
                return;
            }
            if (msg.Msgfrom == "系统" && msg.MsgfromID == 0)
            {
                msg.Message = Utils.HtmlDecode(msg.Message);
            }
            if (msg == null || (msg.MsgtoID != this.userid && msg.MsgfromID != this.userid))
            {
                base.AddErrLine("对不起, 短消息不存在或已被删除.");
                this.newnoticecount = Notice.GetNewNoticeCountByUid(this.userid);
                return;
            }
            if (DNTRequest.GetQueryString("action").CompareTo("delete") != 0)
            {
                if (DNTRequest.GetQueryString("action").CompareTo("noread") == 0)
                {
                    //PrivateMessages.SetPrivateMessageState(this.pmid, 1);
                    msg.New = true;
                    msg.Update();
                    this.ispost = true;
                    if (!msg.New && msg.Folder == 0)
                    {
                        Users.UpdateUserNewPMCount(this.userid, this.olid);
                        base.AddMsgLine("指定消息已被置成未读状态,现在将转入消息列表");
                        base.SetUrl("usercpinbox.aspx");
                        base.SetMetaRefresh();
                    }
                }
                else
                {
                    //PrivateMessages.SetPrivateMessageState(this.pmid, 0);
                    msg.New = false;
                    msg.Update();

                    if (msg.New && msg.Folder == 0)
                    {
                        Users.UpdateUserNewPMCount(this.userid, this.olid);
                    }
                }
                this.msgto        = ((msg.Folder == 0) ? msg.Msgfrom : msg.Msgto);
                this.msgfrom      = msg.Msgfrom;
                this.subject      = msg.Subject;
                this.message      = UBB.ParseUrl(Utils.StrFormat(msg.Message));
                this.postdatetime = msg.PostDateTime.ToFullString();
                this.resubject    = "re:" + msg.Subject;
                this.remessage    = Utils.HtmlEncode("> ") + msg.Message.Replace("\n", "\n> ") + "\r\n\r\n";
                return;
            }
            this.ispost = true;
            msg.Delete();
            //if (ShortMessage.DeletePrivateMessage(this.userid, pmid + "") < 1)
            //{
            //    base.AddErrLine("消息未找到,可能已被删除");
            //    return;
            //}
            base.AddMsgLine("指定消息成功删除,现在将转入消息列表");
            base.SetUrl("usercpinbox.aspx");
            base.SetMetaRefresh();
        }