Beispiel #1
0
    void MyBind()
    {
        barMod = barBll.SelReturnModel(Pid);
        if (barMod == null)
        {
            function.WriteErrMsg("该贴子不存在!");
        }
        PostID = barMod.Pid == 0 ? Pid : barMod.Pid;
        M_UserInfo mu = tpuserBll.GetLogin();// buser.GetLogin();

        cateMod         = guestBll.GetCate(barMod.CateID);
        PostName_L.Text = barMod.Title;
        if ((cateMod.IsBarOwner(mu.UserID) || barMod.CUser == mu.UserID) && barMod.ReplyID == 0)
        {
            if (barMod.Pid == 0)
            {
                MsgTitle_T.Visible = true;
                MsgTitle_T.Text    = barMod.Title;
            }
            MsgContent_T.Text = StrHelper.DecompressString(barMod.MsgContent);
        }
        else
        {
            function.WriteErrMsg("您没有权限修改此贴!");
        }
    }
Beispiel #2
0
        public MvcHtmlString GetMsg(DataRow dr)
        {
            string result = "";

            //if (HidePost)
            //{
            //    result = HideTlp;
            //}
            if (DataConvert.CLng(dr["Status"]) == (int)ZLEnum.ConStatus.Recycle)
            {
                if (auth_barowner)
                {
                    result = AlertTlp + StrHelper.DecompressString(dr["MsgContent"].ToString());
                }
                else
                {
                    result = UserAlertTlp;
                }
            }
            else
            {
                result = StrHelper.DecompressString(dr["MsgContent"].ToString());
            }
            return(MvcHtmlString.Create(result));
        }
        public DataTable GetDTFromBar()
        {
            barMod = barBll.SelReturnModel(Sid);
            if (barMod == null)
            {
                return(null);
            }
            RegexHelper regHelper = new RegexHelper();
            string      msg       = StrHelper.DecompressString(barMod.MsgContent);

            barMod.MsgContent = msg.Replace("</img", " </img");
            MatchCollection matches = regHelper.GetValuesBySE(barMod.MsgContent, "<img", "/>");
            DataTable       dt      = DTFormat();

            for (int i = 0; i < matches.Count; i++)
            {
                Match m = matches[i];
                if (m.Value.Contains("/Ueditor"))
                {
                    continue;
                }
                DataRow dr = dt.NewRow();
                dr["Index"] = i;
                dr["Src"]   = regHelper.GetHtmlAttr(m.Value, "src");
                dt.Rows.Add(dr);
            }
            return(dt);
        }
Beispiel #4
0
    public string GetMsg()
    {
        string result = "";

        if (HidePost)
        {
            result = HideTlp;
        }
        else if (DataConvert.CLng(Eval("Status")) == -2)
        {
            if (IsBarOwner)
            {
                result = AlertTlp + StrHelper.DecompressString(Eval("MsgContent").ToString());
            }
            else
            {
                result = UserAlertTlp;
            }
        }
        else
        {
            result = StrHelper.DecompressString(Eval("MsgContent").ToString());
        }
        return(result);
    }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = DBCenter.SelTop(1, "ID", "*", "ZL_Logo_Design", "Zstatus IN(0) AND ZType=1", "");
         if (dt.Rows.Count < 1)
         {
             function.WriteErrMsg("取到的值为空");
         }
         int    id      = DataConvert.CLng(dt.Rows[0]["ID"]);
         string content = DataConvert.CStr(dt.Rows[0]["LogoContent"]);
         Mid_Hid.Value = dt.Rows[0]["ID"].ToString();
         if (string.IsNullOrEmpty(content))
         {
             Ignore_Btn_Click(null, null);
         }
         Content_Hid.Value = content;
         Content_Hid.Value = StrHelper.DecompressString(Content_Hid.Value);
         string[] domainArr = new string[] {
             "https://www.raysandsigns.com/",
             "http://www.raysandsigns.com/",
             "https://raysandsigns.com/",
             "http://raysandsigns.com/",
             "http://win10:164/"
         };
         foreach (string domain in domainArr)
         {
             Content_Hid.Value = Content_Hid.Value.Replace(domain, "/");
         }
     }
 }
Beispiel #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     B_User.CheckIsLogged(Request.RawUrl);
     mu = buser.GetLogin();
     if (!IsPostBack)
     {
         if (TlpID > 0)
         {
             desMod = desBll.SelReturnModel(TlpID);
             if (desMod == null || desMod.ZType != 1)
             {
                 function.WriteErrMsg("模板不存在");
             }
         }
         if (Mid > 0)
         {
             desMod = desBll.SelReturnModel(Mid);
             if (desMod == null)
             {
                 function.WriteErrMsg("目标不存在");
             }
             if (desMod.UserID != mu.UserID)
             {
                 function.WriteErrMsg("你无权修改");
             }
         }
         if (desMod == null)
         {
             function.WriteErrMsg("未指定信息");
         }
         function.Script(this, "fabHelper.init(" + StrHelper.DecompressString(desMod.LogoContent) + ");");
     }
 }
Beispiel #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         PageSetting setting = SelPage(CPage, PSize, new F_Logo_Design()
         {
         });
         DataTable dt = setting.dt;
         foreach (DataRow dr in dt.Rows)
         {
             dr["LogoContent"] = StrHelper.DecompressString(DataConvert.CStr(dr["LogoContent"]));
         }
         List_Hid.Value = JsonConvert.SerializeObject(dt);
         Page_Lit.Text  = PageCommon.CreatePageHtml(setting.pageCount, CPage);
     }
 }
Beispiel #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Mid > 0)
         {
             desMod         = desBll.SelReturnModel(Mid);
             Alias_T.Text   = desMod.Alias;
             BKUrl_T.Text   = GetBk(desMod.ID);
             Save_Hid.Value = StrHelper.DecompressString(desMod.LogoContent);
             //对其中的URL做处理
             string[] urlArr = new string[] { "http://win10:164", "http://www.raysandsigns.com",
                                              "http://raysandsigns.com", "https://www.raysandsigns.com", "https://raysandsigns.com" };
             foreach (string url in urlArr)
             {
                 Save_Hid.Value = Save_Hid.Value.Replace(url, "");
             }
             //function.Script(this,"fabHelper.init("+StrHelper.DecompressString(desMod.LogoContent)+");");
         }
     }
 }
Beispiel #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         desMod         = desBll.SelReturnModel(Mid);
         Save_Hid.Value = StrHelper.DecompressString(desMod.LogoContent);
         if (Mode == "admin")
         {
             B_Admin.CheckIsLogged(Request.RawUrl);
         }
         else
         {
             B_User.CheckIsLogged(Request.RawUrl);
             M_UserInfo mu = buser.GetLogin();
             if (desMod.UserID != mu.UserID)
             {
                 function.WriteErrMsg("你无权修改记录");
             }
         }
     }
 }
Beispiel #10
0
        //贴子编辑|新建
        public IActionResult EditContent()
        {
            M_UserInfo      mu      = tuBll.GetLogin();// buser.GetLogin();
            M_Guest_Bar     barMod  = new M_Guest_Bar();
            M_GuestBookCate cateMod = null;

            if (Mid >= 0)
            {
                barMod = barBll.SelReturnModel(Mid);
                if (barMod == null)
                {
                    return(WriteErr("该贴子不存在!"));
                }
                cateMod = cateBll.SelReturnModel(barMod.CateID);
                if ((cateMod.IsBarOwner(mu.UserID) || barMod.CUser == mu.UserID) && barMod.ReplyID == 0)
                {
                    barMod.MsgContent = StrHelper.DecompressString(barMod.MsgContent);
                }
                else
                {
                    return(WriteErr("您没有权限修改此贴!"));
                }
            }
            else
            {
                cateMod = cateBll.SelReturnModel(CateID);
                string errtitle = "<h3 class='panel-title'><span class='fa fa-exclamation-circle'></span> 系统提示</h3>";
                if (!authBll.AuthCheck(cateMod, mu, "send"))//验证发贴权限
                {
                    string url = "/User/Login?ReturnUrl=" + HttpUtility.UrlEncode(Request.RawUrl());
                    return(WriteErr(errtitle, "你没有登录,请[<a href='" + url + "'>登录</a>]后再发贴!", url));
                }
                else if (!authBll.AuthCheck(cateMod, mu, "send"))
                {
                    return(WriteErr(errtitle, "您没有权限在此发帖,请[<a href='/Bar/Index'>返回</a>]论坛主页!", "/Index"));
                }
            }
            ViewBag.cateMod = cateMod;
            return(View(barMod));
        }
        public string GetReplyStr(object rid)
        {
            string msg = Eval("MsgContent").ToString();

            switch (Eval("Source").ToString())
            {
            case "bar":
                msg = StrHelper.DecompressString(msg);
                break;
            }
            string result = "<a href='/Plat/Blog/?Uids=" + Eval("CUser") + "' title='查看他的工作流'>" + GetUName() + "</a>";

            if (Convert.ToInt32(rid) != 0)
            {
                result += "回复" + Eval("ReplyUName") + "<span class='fa fa-comment'></span>:" + msg;
            }
            else
            {
                result += "<span class='fa fa-comment'></span>:" + msg;
            }
            return(result);
        }
Beispiel #12
0
        public void DataBind(string key = "")
        {
            DataTable dt = barBll.SelByPid(1, int.MaxValue, ID).dt;

            barMod        = barBll.SelReturnModel(ID);
            ID_L.Text     = barMod.ID.ToString();
            IP_L.Text     = barMod.IP == "" ? "无IP地址" : barMod.IP;
            CDate_L.Text  = barMod.CDate.ToString();
            CDate_T.Text  = barMod.CDate.ToString();
            CUser_LB.Text = barMod.CUName == "" ? "[匿名]" : "<a href=\"javascript:;\" onclick=\"ShowUserInfo(" + barMod.CUser + ")\">" + barMod.CUName + "</a>";//
            Title_L.Text  = barMod.Title;
            Title_L.Attributes["style"] += barMod.Style;
            txtTitle.Text = barMod.Title;
            txtTitle.Attributes["style"] += barMod.Style;
            MedalBind();
            string content = StrHelper.DecompressString(barMod.MsgContent);

            MsgContent_L.Text = content;
            MsgContent_T.Text = content;
            Egv1.DataSource   = dt;
            Egv1.DataBind();
        }
Beispiel #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            B_Admin.CheckIsLogged(Request.RawUrl);
            M_CartPro     cpMod  = cpBll.SelReturnModel(CartID);
            M_Product     proMod = proBll.GetproductByid(cpMod.ProID);
            M_Logo_Design desMod = desBll.SelReturnModel(Convert.ToInt32(cpMod.Attribute));
            if (string.IsNullOrEmpty(desMod.LogoContent))
            {
                imgUrl            = function.GetImgUrl(proMod.Thumbnails);
                img_panel.Visible = true;
            }
            else
            {
                Save_Hid.Value       = StrHelper.DecompressString(desMod.LogoContent);
                design_panel.Visible = true;
            }
            //proMod = proBll.GetproductByid(cpMod.ProID);

            DataTable cpDT = SnsHelper.SelCart(cpMod.Orderlistid, cpMod.ID);
            Design_HTML.Text = PageHelper.Aspx_GetHtml("/cart/comp/cart_logo.aspx", cpDT.DefaultView[0]);
        }
    }
Beispiel #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (ProID < 1)
         {
             function.WriteErrMsg("Unspecified commodity ID");
         }
         int tlp = GetTlpIDByProID(ProID);
         desMod = desBll.SelReturnModel(tlp);
         proMod = proBll.GetproductByid(ProID);
         if (desMod == null || desMod.ZType != 1)
         {
             //function.WriteErrMsg("Templates do not exist");
             Response.Redirect("/Plugins/third/logo/list.aspx?page=1");
         }
         //--------------------------------------------
         if (desMod == null)
         {
             function.WriteErrMsg("Unspecified information");
         }
         desDR = DBCenter.Sel(desMod.TbName, "ID=" + desMod.ID).Rows[0];
         if (string.IsNullOrEmpty(DataConvert.CStr(desDR["BackGround"])))
         {
             desDR["BackGround"] = "black";
         }
         //NEON SIGNS
         if (proMod.Nodeid == 7 || proMod.Nodeid == 104)
         {
             Size_L.Text          = "3";
             font_div.Visible     = true;
             color_12_div.Visible = true;
         }
         //LED Signs商品
         if (proMod.Nodeid == 8 || proMod.Nodeid == 105)
         {
             Size_L.Text          = "1";
             Backing_TR.Visible   = false;
             Outdoor_TR.Visible   = false;
             font_led_div.Visible = true;
             color_7_div.Visible  = true;
         }
         //LED STRIP SIGNS
         if (proMod.Nodeid == 106)
         {
             Size_L.Text         = "1";
             Backing_TR.Visible  = false;
             Outdoor_TR.Visible  = false;
             font_div.Visible    = true;
             color_7_div.Visible = true;
         }
         //有些商品未设置好,做兼容处理
         if (font_div.Visible == false && font_led_div.Visible == false)
         {
             font_div.Visible = true;
         }
         if (color_7_div.Visible == false && color_12_div.Visible == false)
         {
             color_12_div.Visible = true;
         }
         DataTable proInfo = DBCenter.Sel(proMod.TableName, "ID=" + proMod.ItemID);
         Size_L.Text    = proInfo.Rows[0]["Size"].ToString();
         SKU_L.Text     = proInfo.Rows[0]["SKU"].ToString();
         Save_Hid.Value = StrHelper.DecompressString(desMod.LogoContent);
         string[] urlArr = new string[] { "http://win10:164", "http://www.raysandsigns.com",
                                          "http://raysandsigns.com", "https://www.raysandsigns.com", "https://raysandsigns.com" };
         foreach (string url in urlArr)
         {
             Save_Hid.Value = Save_Hid.Value.Replace(url, "");
         }
         //function.Script(this, "fabHelper.init(" + StrHelper.DecompressString(desMod.LogoContent) + ");");
     }
 }
Beispiel #15
0
 public string GetMsgContent()
 {
     return(StrHelper.DecompressString(Eval("MsgContent").ToString()));
 }