예제 #1
0
 protected void BindPrivateMessage(int folder)
 {
     this.pmcount      = ShortMessage.GetPrivateMessageCount(this.userid, folder);
     this.usedmsgcount = ShortMessage.GetPrivateMessageCount(this.userid, folder);
     this.maxmsg       = this.usergroupinfo.MaxPmNum;
     if (this.maxmsg > 0)
     {
         this.usedmsgbarwidth   = this.usedmsgcount * 100 / this.maxmsg;
         this.unusedmsgbarwidth = 100 - this.usedmsgbarwidth;
     }
     this.BindItems(this.pmcount);
 }
예제 #2
0
 private void CreatePM(int folder, int saveToSendBox, string url, string msg)
 {
     if (folder != 2)
     {
         User userInfo = Users.GetUserInfo(this.msgtoid);
         var  ug       = UserGroup.FindByID(this.usergroupid);
         if (!ug.Is管理团队 && ShortMessage.GetPrivateMessageCount(this.msgtoid, -1) >= UserGroup.FindByID(userInfo.GroupID).MaxPmNum)
         {
             base.AddErrLine("抱歉,接收人的短消息已达到上限,无法接收");
             return;
         }
         if (!Utils.InArray(userInfo.NewsLetter.ToInt().ToString(), "2,3,6,7"))
         {
             base.AddErrLine("抱歉,接收人拒绝接收短消息");
             return;
         }
     }
     if (url != "usercpinbox.aspx" && ShortMessage.GetPrivateMessageCount(this.userid, -1) >= this.usergroupinfo.MaxPmNum)
     {
         base.AddErrLine("抱歉,您的短消息已达到上限,无法保存到发件箱");
         return;
     }
     this.pm.Folder = (Int16)folder;
     if (CreditsFacade.SendPM(this.userid) == -1)
     {
         base.AddErrLine("您的积分不足, 不能发送短消息");
         return;
     }
     //this.pm.Pmid = PrivateMessages.CreatePrivateMessage(this.pm, saveToSendBox);
     pm.Create(saveToSendBox != 0);
     if (DNTRequest.GetString("emailnotify") == "on")
     {
         this.SendNotifyEmail(Users.GetUserInfo(this.msgtoid).Email.Trim(), this.pm);
     }
     base.SetUrl(url);
     base.SetMetaRefresh();
     base.SetShowBackLink(true);
     base.MsgForward("usercppostpm_succeed");
     base.AddMsgLine(msg);
 }