protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); int v = int.Parse(Utils.GetRequest("v", "get", 1, @"^[0-9]\d*$", "0")); if (!new BCW.BLL.Detail().Exists(id)) { Utils.Error("不存在的记录", ""); } int pageIndex; int recordCount; int pageSize = Utils.ParseInt(ub.GetSub("FtTextDetailNum", xmlPath)); int pover = int.Parse(Utils.GetRequest("pover", "get", 1, @"^[0-9]\d*$", "0")); string[] pageValUrl = { "id", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["vp"]); if (pageIndex == 0) { pageIndex = 1; } int pn = Utils.ParseInt(Request.QueryString["pn"]); if (pn == 0) { pn = 1; } int meid = 0; string act = Utils.GetRequest("act", "get", 1, "", ""); BCW.Model.Detail model = new BCW.BLL.Detail().GetDetail(id); Master.Title = model.Title; string NodeTitle = new BCW.BLL.Topics().GetTitle(model.NodeId); //收费 if (model.Types != 13) { if (model.Cent > 0) { if (meid == 0) { meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login();//显示登录 } } string BT = string.Empty; string Bz = string.Empty; long megold = 0; if (model.Types == 11) { BT = "文章"; } else { BT = "图片"; } if (model.BzType == 0) { megold = new BCW.BLL.User().GetGold(meid); Bz = ub.Get("SiteBz"); } else { megold = new BCW.BLL.User().GetMoney(meid); Bz = ub.Get("SiteBz2"); } string payIDs = "|" + model.PayId + "|"; if (act != "ok" && payIDs.IndexOf("|" + meid + "|") == -1) { new Out().head(Utils.ForWordType("温馨提示")); Response.Write(Out.Tab("<div class=\"text\">", "")); Response.Write("" + BT + "收费" + model.Cent + "" + Bz + ",确定要浏览吗?扣费一次,永久浏览"); Response.Write(Out.Tab("</div>", "<br />")); Response.Write(Out.Tab("<div>", "")); Response.Write("您自带" + megold + "" + Bz + "<a href=\"" + Utils.getUrl("/bbs/finance.aspx?act=vippay") + "\">[充值]</a><br />"); Response.Write("<a href=\"" + Utils.getUrl("detail.aspx?act=ok&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">马上进入浏览</a><br />"); Response.Write("<a href=\"" + Utils.getPage("list.aspx?id=" + model.NodeId + "") + "\">返回上级</a>"); Response.Write(Out.Tab("</div>", "")); Response.Write(new Out().foot()); Response.End(); } if (payIDs.IndexOf("|" + meid + "|") == -1) { if (megold < model.Cent) { Utils.Error("您的" + Bz + "不足", ""); } //扣币 if (model.BzType == 0) { new BCW.BLL.User().UpdateiGold(meid, -Convert.ToInt64(model.Cent), "浏览收费" + BT + ""); } else { new BCW.BLL.User().UpdateiMoney(meid, -Convert.ToInt64(model.Cent), "浏览收费" + BT + ""); } //更新 payIDs = model.PayId + "|" + meid; new BCW.BLL.Detail().UpdatePayId(id, payIDs); } } } if (model.Types == 11) { if (act.Contains("down")) { if (meid == 0) { meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login();//显示登录 } } //下载文章 BCW.User.Down.DownText(act, model); } //拾物随机 builder.Append(BCW.User.Game.GiftFlows.ShowGiftFlows(12)); } //顶部调用 string TopUbb = string.Empty; if (model.Types == 11) { TopUbb = ub.GetSub("FtTextDetailTop", xmlPath); } else if (model.Types == 12) { TopUbb = ub.GetSub("FtPicDetailTop", xmlPath); } else if (model.Types == 13) { TopUbb = ub.GetSub("FtFileDetailTop", xmlPath); } if (TopUbb != "") { TopUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(TopUbb)); if (TopUbb.IndexOf("</div>") == -1) { builder.Append(Out.Tab("<div>", "")); builder.Append(TopUbb); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(TopUbb); } } if (model.Types == 11) { builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>>"); if (!Utils.GetDomain().Contains("boyi929")) { builder.Append("<a href=\"" + Utils.getUrl("default.aspx?id=298") + "\">新闻</a>>"); } builder.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</a>>正文"); builder.Append(Out.Tab("</div>", "<br />")); } builder.Append(Out.Tab("<div class=\"title\">" + model.Title + "</div>", "" + model.Title + "")); if (model.Types == 11) { builder.Append(Out.Tab("<div>", "<br />")); builder.Append("" + DT.FormatDate(model.AddTime, 1) + ""); builder.Append(Out.Tab("</div>", "")); } builder.Append(Out.Tab("", Out.LHr())); if (pageIndex == 1) { string Pics = string.Empty; Pics = model.Pics.Trim(); if (!string.IsNullOrEmpty(Pics)) { string[] txtPic = Pics.Split("#".ToCharArray()); if (model.Types != 12) { builder.Append(Out.Tab("<div>", "<br />")); if (pn > txtPic.Length) { pn = txtPic.Length; } builder.Append("<img src=\"" + Out.SysUBB(txtPic[pn - 1]) + "\" alt=\"load\"/>"); if (pn < txtPic.Length) { builder.Append("<br /><a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "&pn=" + (pn + 1) + "") + "\">下张</a> "); } if (pn > 1) { if (pn >= txtPic.Length) { builder.Append("<br />"); } builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "&pn=" + (pn - 1) + "") + "\">上张</a>"); } if (txtPic.Length > 1) { builder.Append("(" + pn + "/" + txtPic.Length + ")"); } builder.Append(Out.Tab("</div>", "")); } } if (model.Types == 13) { builder.Append(Out.Tab("<div>", "<br />")); if (!string.IsNullOrEmpty(model.TarText)) { builder.Append("[资费]:" + model.TarText + "<br />"); } builder.Append("[分类]:<a href=\"" + Utils.getUrl("list.aspx?id=" + model.NodeId + "") + "\">" + NodeTitle + "</a><br />"); builder.Append("[更新]:" + DT.FormatDate(model.AddTime, 11) + "<br />"); if (!string.IsNullOrEmpty(model.LanText)) { builder.Append("[语言]:" + model.LanText + "<br />"); } if (!string.IsNullOrEmpty(model.SafeText)) { builder.Append("[检查]:" + model.SafeText + "<br />"); } if (model.IsVisa > 0) { string IsVisa = string.Empty; if (model.IsVisa == 1) { IsVisa = "未知"; } else if (model.IsVisa == 1) { IsVisa = "需要"; } else { IsVisa = "不需要"; } builder.Append("[签证]:" + IsVisa + "<br />"); } if (!string.IsNullOrEmpty(model.LyText)) { builder.Append("[来源]:" + model.LyText + "<br />"); } string Content = string.Empty; if (pover == 0) { if (model.Content.Length > 200) { Content = "" + Out.SysUBB(Utils.Left(model.Content, 200)) + "<a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "&pover=1&&backurl=" + Utils.PostPage(1) + "") + "\">详细>></a>"; } else { Content = Out.SysUBB(model.Content); } } else { Content = Out.SysUBB(model.Content); } builder.Append("[简介]:" + Content + "<br />"); if (!string.IsNullOrEmpty(model.UpText)) { builder.Append("[更新]:" + model.UpText + "<br />"); } if (!string.IsNullOrEmpty(model.Model)) { //机型适配 string PhoneBrand = ""; string PhoneModel = ""; string PhoneSystem = ""; if (Request.Cookies["BrandComment"] != null) { PhoneBrand = HttpUtility.UrlDecode(Request.Cookies["BrandComment"]["PhoneBrand"]); PhoneModel = HttpUtility.UrlDecode(Request.Cookies["BrandComment"]["PhoneModel"]); PhoneSystem = HttpUtility.UrlDecode(Request.Cookies["BrandComment"]["PhoneSystem"]); } builder.Append("<a href=\"" + Utils.getUrl("demore.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">适用机型</a>:"); if (PhoneModel != "" && model.Model.Contains(PhoneBrand)) { string Model = "," + model.Model + ","; if (Model.IndexOf("," + PhoneModel + ",") != -1) { builder.Append("" + (PhoneBrand + PhoneModel) + ""); } else if (Model.IndexOf("," + PhoneSystem + ",") != -1) { builder.Append("" + PhoneSystem + ""); } } else { builder.Append("<a href=\"" + Utils.getUrl("model.aspx?backurl=" + Utils.PostPage(1) + "") + "\">未设置</a>"); } } builder.Append(Out.Tab("</div>", "")); } if (model.Types == 12 || model.Types == 13) { pageSize = Utils.ParseInt(ub.GetSub("FtPicListNum", xmlPath)); if (model.Types == 13) { pageSize = 20; } pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 string strWhere = "NodeId=" + id + ""; // 开始读取列表 IList <BCW.Model.File> listFile = new BCW.BLL.File().GetFiles(pageIndex, pageSize, strWhere, out recordCount); if (listFile.Count > 0) { int k = 1; foreach (BCW.Model.File n in listFile) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { builder.Append(Out.Tab("<div>", "<br />")); } if (model.Types == 12) { builder.Append("<img src=\"" + ((n.PrevFiles == "") ? n.Files : n.PrevFiles.ToString()) + "\" alt=\"load\"/><br /><a href=\"" + Utils.getUrl("" + n.Files + "") + "\">>原图下载</a>.<a href=\"" + Utils.getUrl("/showpic.aspx?pic=" + n.PrevFiles + "&backurl=" + Utils.PostPage(1) + "") + "\">编辑</a>"); } else { builder.Append("[格式:" + n.FileExt.Replace(".", "") + "/大小:" + BCW.Files.FileTool.GetContentLength(n.FileSize) + " " + n.Content + "]<br />"); builder.Append("<a href=\"" + Utils.getUrl("demore.aspx?act=down&id=" + n.ID + "&backurl=" + Utils.PostPage(1) + "") + "\">>>免费下载到手机</a>"); } k++; builder.Append(Out.Tab("</div>", "")); } //分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); builder.Append(Out.Tab("", "<br />")); } } } if (model.Types == 11) { //手工分页设置 if (model.Content.IndexOf("##") != -1) { pageSize = 0; } string content = BasePage.MultiContent(model.Content, pageIndex, pageSize, pover, out recordCount); builder.Append(Out.Tab("<div>", "<br />")); builder.Append(Out.SysUBB(content.Replace("查看大图更多热图", "~摘自新华网~")).Replace("<br/> <br/>", "<br />")); builder.Append(Out.Tab("</div>", "")); builder.Append(BasePage.MultiContentPage(model.Content, pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "vp", pover)); builder.Append(Out.Tab("", "<br />")); } if (ub.GetSub("FtGNset", xmlPath) == "0") { builder.Append(Out.Tab("<div>", "")); if (model.Types == 11) { builder.Append("<a href=\"" + Utils.getUrl("demore.aspx?act=downtext&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">功能箱</a>."); } builder.Append("<a href=\"" + Utils.getUrl("/bbs/favorites.aspx?act=addin&backurl=" + Utils.PostPage(1) + "") + "\">收藏</a>."); builder.Append("<a href=\"" + Utils.getUrl("/inter.aspx?act=recom&backurl=" + Utils.PostPage(1) + "") + "\">分享.举报</a>"); builder.Append(Out.Tab("</div>", "<br />")); } if (ub.GetSub("FtCKset", xmlPath) == "0") { builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("=评论回复="); builder.Append(Out.Tab("</div>", "<br />")); } //快速评论 string ReText = ub.GetSub("FtKCset", xmlPath); if (ReText != "") { builder.Append(Out.Tab("<div>", "")); ReText = ReText.Replace("#", "|"); string ReStats = model.ReStats; if (string.IsNullOrEmpty(ReStats)) { ReStats = ReText; } string sStats = string.Empty; //修改用户点击 /* * 3*/ if (v != 0)//点击支持反对路过选项进入 { int myid = new BCW.User.Users().GetUsId(); if (myid == 0) { Utils.Login(); //需要登录 } // builder.Append("clickid:" + model.ClickID + "<br/>"); if (!("#" + model.ClickID + "#").Contains("#" + myid + "#"))//用户未点击过 { string[] arrReStats = ReStats.Split("|".ToCharArray()); for (int i = 0; i < arrReStats.Length; i++) { if ((v - 1) == i) { sStats += "|" + Convert.ToInt32(Utils.ParseInt(arrReStats[i]) + 1); } else { sStats += "|" + Utils.ParseInt(arrReStats[i]); } } sStats = Utils.Mid(sStats, 1, sStats.Length); new BCW.BLL.Detail().UpdateReStats(id, sStats, Utils.GetUsIP()); string click = model.ClickID; string saveid = string.Empty; if (string.IsNullOrEmpty(click)) { saveid = saveid + myid; } else { saveid = myid + "#" + click; } // builder.Append(saveid+"<br/>"); new BCW.BLL.Detail().UpdateClickID(id, saveid); } else { string[] arrReStats = ReStats.Split("|".ToCharArray()); for (int i = 0; i < arrReStats.Length; i++) { if (string.IsNullOrEmpty(sStats)) { sStats += arrReStats[i]; } else { sStats += "|" + Utils.ParseInt(arrReStats[i]); } } } } else { sStats = ReStats; } string[] arrText = ReText.Split("|".ToCharArray()); string[] arrsStats = sStats.Split("|".ToCharArray()); for (int i = 0; i < arrText.Length; i++) { string aStats = string.Empty; if (arrsStats.Length <= i) { aStats = "0"; } else { aStats = Utils.ParseInt(arrsStats[i].ToString()).ToString(); } builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "&v=" + (i + 1) + "&backurl=" + Utils.getPage(0) + "") + "\">" + Out.BasUBB(arrText[i].ToString()) + "(" + aStats + ")</a> "); } builder.Append(Out.Tab("</div>", "<br />")); } //更新人气点击 new BCW.BLL.Detail().UpdateReadcount(id, 1); if (ub.GetSub("FtCKset", xmlPath) == "0") { string strText = ",,,"; string strName = "Content,id,act,backurl"; string strType = "text,hidden,hidden,hidden"; string strValu = "'" + id + "'ok'" + Utils.getPage(0) + ""; string strEmpt = "true,,,"; string strIdea = "/"; string strOthe = "发表评论,comment.aspx,post,3,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); DataSet ds = new BCW.BLL.Comment().GetList(id, 3, 0); builder.Append(Out.Tab("<div>", "<br />")); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.AppendFormat("{0}.{1}:{2}({3})", (i + 1), ds.Tables[0].Rows[i]["UserName"].ToString(), ds.Tables[0].Rows[i]["Content"].ToString(), DT.FormatDate(Convert.ToDateTime(ds.Tables[0].Rows[i]["AddTime"]), 1)); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["ReText"].ToString())) { builder.Append(Out.Tab("<font color=\"red\">", "")); builder.Append("<br />★管理员回复:" + ds.Tables[0].Rows[i]["ReText"].ToString() + ""); builder.Append(Out.Tab("</font>", "")); } builder.Append("<br />"); } } builder.Append("<a href=\"" + Utils.getUrl("comment.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">查看更多评论(" + model.Recount + "条)</a>"); builder.Append(Out.Tab("</div>", "<br />")); } // 下条 builder.Append(Out.Tab("<div>", "")); BCW.Model.Detail x = new BCW.BLL.Detail().GetPreviousNextDetail(id, model.NodeId, true); if (!string.IsNullOrEmpty(x.Title)) { builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + x.ID + "&backurl=" + Utils.getPage(0) + "") + "\">下一条:" + x.Title + "</a><br />"); } // 上条 BCW.Model.Detail s = new BCW.BLL.Detail().GetPreviousNextDetail(id, model.NodeId, false); if (!string.IsNullOrEmpty(s.Title)) { builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + s.ID + "&backurl=" + Utils.getPage(0) + "") + "\">上一条:" + s.Title + "</a><br />"); } builder.Append(Out.Tab("</div>", "")); ////根据关键字取相关记录 //if (model.Types == 11) //{ // string wheTabs = string.Empty; // if (!string.IsNullOrEmpty(model.KeyWord)) // { // string[] wheTab; // wheTab = model.KeyWord.Split("#".ToCharArray()); // for (int i = 0; i < wheTab.Length; i++) // { // if (i > 0) // { // wheTabs = wheTabs + " OR "; // } // wheTabs = wheTabs + "'#'+KeyWord+'#' like '%#" + wheTab[i] + "#%'"; // } // } // ds = new BCW.BLL.Detail().GetList("ID,Title", "NodeId=" + model.NodeId + " AND Types=" + model.Types + " AND ID<>" + id + " AND (" + wheTabs + ") ORDER BY ID DESC"); // if (ds != null && ds.Tables[0].Rows.Count > 0) // { // builder.Append(Out.Tab("<div>", "")); // builder.Append("=相关文章="); // builder.Append(Out.Tab("</div>", "")); // for (int i = 0; i < ds.Tables[0].Rows.Count; i++) // { // builder.Append(Out.Tab("<div>", "<br />")); // builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + ds.Tables[0].Rows[i]["ID"].ToString() + "") + "\">" + ds.Tables[0].Rows[i]["Title"].ToString() + "</a>"); // builder.Append(Out.Tab("</div>", "")); // } // if (ds.Tables[0].Rows.Count > 3) // { // builder.Append(Out.Tab("<div>", "<br />")); // builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "") + "\">..更多相关(" + ds.Tables[0].Rows.Count + ")</a>"); // builder.Append(Out.Tab("</div>", "")); // } // } //} //底部调用 string FootUbb = string.Empty; if (model.Types == 11) { FootUbb = ub.GetSub("FtTextDetailFoot", xmlPath); } else if (model.Types == 12) { FootUbb = ub.GetSub("FtPicDetailFoot", xmlPath); } else if (model.Types == 13) { FootUbb = ub.GetSub("FtFileDetailFoot", xmlPath); } if (FootUbb != "") { FootUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(FootUbb)); if (FootUbb.IndexOf("</div>") == -1) { builder.Append(Out.Tab("<div>", "")); builder.Append(FootUbb); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(TopUbb); } } builder.Append(Out.Tab("<div class=\"title\">", Out.RHr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("list.aspx?id=" + model.NodeId + "") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</a>"); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage() { int rd = int.Parse(Utils.GetRequest("rd", "get", 1, @"^[1-9]\d*$", "0")); string mobile = Utils.GetRequest("mobile", "get", 1, @"^(?:13|14|15|18)\d{9}$", ""); // builder.Append(ub.GetSub("SiteName", "/Controls/wap.xml") ); //if (Utils.GetTopDomain().Contains("kb288.net")) //{ // Master.Title = "注册会员账号"; // builder.Append(Out.Tab("<div>", "")); // builder.Append("手机号(找回密码用):"); // builder.Append(Out.Tab("</div>", "")); // string strText = ",设置登陆密码:/,确认登陆密码:/,,,"; // string strName = "mobile,Pwd,Pwdr,rd,act,backurl"; // string strType = "text,password,password,hidden,hidden,hidden"; // string strValu = "'''" + rd + "'ok'" + Utils.getPage(0) + ""; // string strEmpt = "false,false,false,false,false,false"; // string strIdea = "/"; // string strOthe = "确认注册,reg.aspx,post,0,red"; // builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); // builder.Append(Out.Tab("<div>", "<br />")); // builder.Append("(确认注册后即代表你已同意本站的一切条款和规定)<br />"); // builder.Append("注册成功后,请编写短信888到15992310086即可成为验证会员<br />"); // builder.Append("注册成功达7天后还未进行验证的ID,系统将进行回收处理<br />"); // builder.Append("注册后请在个人空间设置银行资料"); // builder.Append(Out.Tab("</div>", "<br />")); //} //else { builder.Append(Out.Tab("<div>", "")); // builder.Append("<a href=\"" + Utils.getUrl("RegPage.aspx") + "\">手工免费注册</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">免费注册会员</div>", "")); if (ub.GetSub("RegLeibie", xmlPath2) == "1" || ub.GetSub("RegLeibie", xmlPath2) == "2") { if (ub.GetSub("RegEmailPost", xmlPath2) == "1") { Master.Title = "免费注册-邮箱验证"; builder.Append(Out.Tab("<div>", "")); builder.Append("*手机号(身份认证重要信息):"); builder.Append(Out.Tab("</div>", "")); string strText = ",*设定密码(6-20字符):/,*确认密码:/,*邮箱地址:/,,,"; string strName = "mobile,Pwd,Pwdr,Email,rd,act,backurl"; string strType = "text,password,password,text,hidden,hidden,hidden"; string strValu = "''''" + rd + "'ok'" + Utils.getPage(0) + ""; string strEmpt = "false,false,false,false,false,false,false"; string strIdea = "/"; string strOthe = "提交注册,reg.aspx,post,0,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("", "<br />")); } else { builder.Append(Out.Tab("<div>", "")); builder.Append("*手机号(找回密码用):"); builder.Append(Out.Tab("</div>", "")); string strText = ",*设定密码(6-20字符):/,*确认密码:/,*请输入验证码:/,,,"; string strName = "mobile,Pwd,Pwdr,code,rd,act,backurl"; string strType = "text,password,password,text,hidden,hidden,hidden"; string strValu = "''''" + rd + "'ok'" + Utils.getPage(0) + ""; string strEmpt = "false,false,false,false,false,false,false"; string strIdea = "'''<img src=\"bbs/pwd/Code.aspx\"/>'''|/"; string strOthe = "注册(并自动登陆),reg.aspx,post,0,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("", "<br />")); } } if (ub.GetSub("RegLeibie", xmlPath2) == "0" || ub.GetSub("RegLeibie", xmlPath2) == "2") { builder.Append(Out.Tab("<div>", "")); builder.Append(Out.BasUBB(ub.GetSub("RegSmsContent", xmlPath2))); builder.Append(Out.Tab("</div>", "<br />")); } DataSet ds = new BCW.BLL.User().GetList("TOP 5 Mobile", "Isverify>=0 ORDER BY RegTime DESC"); if (ds != null && ds.Tables[0].Rows.Count > 0) { builder.Append(Out.Tab("<div>", "")); builder.Append("=最新注册前五位=<a href=\"" + Utils.getUrl("reg.aspx") + "\">刷新</a>"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("<br />" + Utils.Left(ds.Tables[0].Rows[i]["Mobile"].ToString(), 5) + "******"); } builder.Append(Out.Tab("</div>", "<br />")); } } builder.Append(Out.Tab("<div class=\"title\">", Out.RHr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>-"); builder.Append("<a href=\"" + Utils.getUrl("reg.aspx") + "\">站内协议</a>"); builder.Append(Out.Tab("</div>", "")); }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); int v = int.Parse(Utils.GetRequest("v", "get", 1, @"^[0-9]\d*$", "0")); int pover = int.Parse(Utils.GetRequest("pover", "get", 1, @"^[0-1]$", "0")); if (!new BCW.BLL.Goods().Exists(id)) { Utils.Error("不存在的记录", ""); } int pageIndex; int recordCount; int pageSize = 300; string[] pageValUrl = { "id", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["vp"]); if (pageIndex == 0) { pageIndex = 1; } int pn = Utils.ParseInt(Request.QueryString["pn"]); if (pn == 0) { pn = 1; } BCW.Model.Goods model = new BCW.BLL.Goods().GetGoods(id); Master.Title = model.Title; //顶部调用 string TopUbb = TopUbb = ub.GetSub("FtShopDetailTop", xmlPath); if (TopUbb != "") { TopUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(TopUbb)); if (TopUbb.IndexOf("</div>") == -1) { builder.Append(Out.Tab("<div>", "")); builder.Append(TopUbb); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(TopUbb); } } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append(model.Title); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); if (pageIndex == 1 && pover == 0) { string sFile = model.Files.Trim(); if (!string.IsNullOrEmpty(sFile)) { string[] txtPic = sFile.Split("#".ToCharArray()); if (pn > txtPic.Length) { pn = txtPic.Length; } builder.Append("<img src=\"" + Out.SysUBB(txtPic[pn - 1]) + "\" alt=\"load\"/><br />"); if (pn < txtPic.Length) { builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "&pn=" + (pn + 1) + "") + "\">下张</a> "); } if (pn > 1) { builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "&pn=" + (pn - 1) + "") + "\">上张</a>"); } if (txtPic.Length > 1) { builder.Append("(" + pn + "/" + txtPic.Length + ")<br />"); } } } builder.Append(Out.Tab("</div>", "")); if (pover == 1) { string content = BasePage.MultiContent(model.Content, pageIndex, pageSize, pover, out recordCount); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.SysUBB(content)); builder.Append(Out.Tab("</div>", "")); builder.Append(BasePage.MultiContentPage(model.Content, pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "vp", pover)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">>>返回查看商品</a>"); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(Out.Tab("<div>", Out.RHr())); builder.Append("市场价:¥" + Convert.ToDouble(model.CityMoney) + "元"); builder.Append("<br />会员价:"); if (model.PostType == 0) { builder.Append("¥" + Convert.ToDouble(model.VipMoney) + "元"); } else if (model.PostType == 1) { builder.Append(Convert.ToDouble(model.VipMoney) + "" + ub.Get("SiteBz")); } else { builder.Append(Convert.ToDouble(model.VipMoney) + "" + ub.Get("SiteBz2")); } builder.Append("<br />库存:" + (model.StockCount - model.SellCount) + "/已售" + model.SellCount + "件"); if (model.PayType == 0 || model.PayType == 2) { if (model.PayType == 0) { builder.Append("<br />送货:货到付款"); } else { builder.Append("<br />送货:先付款后发货"); } if (!string.IsNullOrEmpty(model.PostMoney) && model.PostMoney.Contains("|")) { string[] sTemp = model.PostMoney.Split("|".ToCharArray()); string postMoney = string.Empty; for (int j = 0; j < sTemp.Length; j++) { if (j % 2 == 0) { postMoney += "/" + sTemp[j + 1].ToString() + ":" + sTemp[j] + "元"; } } builder.Append("<br />邮费:" + Utils.Mid(postMoney, 1, postMoney.Length) + ""); } else { builder.Append("<br />邮费:卖家包邮"); } } else { builder.Append("<br />送货:当面交易"); } builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); if (!string.IsNullOrEmpty(model.Config)) { builder.Append("【产品属性】<br />"); builder.Append(Out.SysUBB(model.Config)); } builder.Append("联系方式:" + BCW.User.AdminCall.AdminUBB(Out.BasUBB(model.Mobile)) + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">[立即订购]</a>"); builder.Append("<a href=\"" + Utils.getUrl("/bbs/favorites.aspx?act=addin&backurl=" + Utils.PostPage(1) + "") + "\">[加入收藏]</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&pover=1&backurl=" + Utils.getPage(0) + "") + "\">[商品详情]</a>"); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=payment&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">[付款方式]</a>"); builder.Append("<br /><a href=\"" + Utils.getUrl("shopbuy.aspx?act=recom&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">推荐本商品有奖>></a>"); builder.Append(Out.Tab("</div>", "<br />")); //互动块记录 builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=info&id=" + id + "&ptype=1&backurl=" + Utils.getPage(0) + "") + "\">>查看评价</a>.<a href=\"" + Utils.getUrl("shopbuy.aspx?act=info&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">成交(" + model.Paycount + ")</a>"); builder.Append(Out.Tab("</div>", "")); string strText = ",,,,"; string strName = "Content,id,ptype,act,backurl"; string strType = "text,hidden,hidden,hidden,hidden"; string strValu = "'" + id + "'14'ok'" + Utils.getPage(0) + ""; string strEmpt = "true,,,,"; string strIdea = "/"; string strOthe = "评论咨询,comment.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); int meid = new BCW.User.Users().GetUsId(); DataSet ds = new BCW.BLL.Comment().GetList(id, 3, 14); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.AppendFormat("{0}.{1}:{2}({3})", (i + 1), ds.Tables[0].Rows[i]["UserName"].ToString(), ds.Tables[0].Rows[i]["Content"].ToString(), DT.FormatDate(Convert.ToDateTime(ds.Tables[0].Rows[i]["AddTime"]), 1)); if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["ReText"].ToString())) { builder.Append(Out.Tab("<font color=\"red\">", "")); builder.Append("<br />★管理员回复:" + ds.Tables[0].Rows[i]["ReText"].ToString() + ""); builder.Append(Out.Tab("</font>", "")); } builder.Append("<br />"); } } builder.Append("<a href=\"" + Utils.getUrl("comment.aspx?ptype=14&id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">查看更多评论(" + model.Recount + "条)</a>"); builder.Append(Out.Tab("</div>", "<br />")); //底部调用 string FootUbb = FootUbb = ub.GetSub("FtShopDetailFoot", xmlPath); if (FootUbb != "") { FootUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(FootUbb)); if (FootUbb.IndexOf("</div>") == -1) { builder.Append(Out.Tab("<div>", "")); builder.Append(FootUbb); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(TopUbb); } } builder.Append(Out.Tab("<div>", Out.RHr())); builder.Append("<a href=\"" + Utils.getUrl("myshop.aspx?backurl=" + Utils.PostPage(1) + "") + "\">我的订单记录</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>"); if (model.NodeId != 0) { string nodeTitle = new BCW.BLL.Topics().GetTitle(model.NodeId); if (nodeTitle != "") { builder.Append("-<a href=\"" + Utils.getUrl("shop.aspx?id=" + model.NodeId + "") + "\">" + nodeTitle + "</a>"); } } builder.Append(Out.Tab("</div>", "")); } //更新人气点击 new BCW.BLL.Goods().UpdateReadcount(id, 1); }