Пример #1
0
 // 更新总参与人数
 private void Upaddnums(M_Pub mpub)
 {
     mpub.PubAddnum = mpub.PubAddnum + 1;
     pubBll.GetUpdate(mpub);
     buser.ChangeVirtualMoney(buser.GetLogin().UserID, new M_UserExpHis()
     {
         score     = SiteConfig.UserConfig.CommentRule,
         detail    = "",
         ScoreType = (int)M_UserExpHis.SType.Point
     });
     if (string.IsNullOrEmpty(mpub.PubGourl))
     {
         if (mpub.PubGourl == "")
         {
             function.Script(this, "ActionSec(1,'" + Server.HtmlEncode(Request.UrlReferrer.ToString()) + "')");
         }
         else
         {
             B_CreateShopHtml bll = new B_CreateShopHtml();
             bll.CreateShopHtml(mpub.PubGourl);
             function.Script(this, "ActionSec(1,'" + bll.CreateShopHtml(mpub.PubGourl) + "')");
         }
     }
     else
     {
         B_CreateShopHtml bll = new B_CreateShopHtml();
         bll.CreateShopHtml(mpub.PubGourl);
         function.Script(this, "ActionSec(1,'" + mpub.PubGourl + "')");
     }
 }
        // 转换标签
        public string GetContent(string Result)
        {
            string mat  = "";
            bool   flag = false;

            #region 替换系统标签
            string pattern = @"{\$([\s\S])*?\/}";
            string tit     = this.Subject_T.Text;
            do
            {
                flag = false;
                MatchCollection matchs = Regex.Matches(Result, pattern, RegexOptions.IgnoreCase);
                if (matchs.Count > 0)
                {
                    foreach (Match match in matchs)
                    {
                        Result = bc.CreateShopHtml(Result);
                        mat    = match.Value;
                        Result = Result.Replace(mat, bm.SysLabelProc(mat, tit));
                        flag   = true;
                    }
                }
            }while (flag);
            #endregion
            Result = bc.CreateShopHtml(Result);
            return(Result);
        }