/// <summary> /// 添加/编辑菜单 /// </summary> private void Insert2(int leibie, int ptype, int nid, int id, string pName) { if (id != 0) { Master.Title = "编辑" + pName + ""; builder.Append(Out.Div("title", "编辑" + pName + "")); } else { Master.Title = "添加" + pName + ""; builder.Append(Out.Div("title", "添加" + pName + "")); } string strText = "" + pName + "名称:/," + pName + "内容:/,栏目后面:/,VIP等级可见:/,显示状态:/,显示顺序:/,,,,"; string strName = "Title,Content,IsBr,VipLeven,Hidden,Paixu,leibie,ptype,nid,id"; string strType = "text,big,select,select,select,snum,hidden,hidden,hidden,hidden"; string strValu = ""; if (id != 0) { //读取菜单 BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); strValu = "" + model.Title + "'" + model.Content + "'" + model.IsBr + "'" + model.VipLeven + "'" + model.Hidden + "'" + model.Paixu + "'" + model.Leibie + "'" + model.Types + "'" + model.NodeId + "'" + id + ""; } else { if (ptype == 2) { string content = Utils.GetRequest("content", "all", 1, "", ""); try { if (content.Contains("call")) { content = "" + BCW.User.AdminCall.CallValue[int.Parse(content.Replace("call", ""))] + ""; } } catch { } strValu = "'" + content + "''0'0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } else { strValu = "'''0'0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } } string strEmpt = "false,false,0|换行|1|不换行,0|不限|1|一级|2|二级|3|三级|4|四级|5|五级|6|六级|7|七级|8|八级,0|正常显示|1|登录可见|2|隐藏显示,false,,,,"; string strIdea = "/"; string strOthe = ""; if (id != 0) { strOthe = "确定编辑|reset,classok.aspx,post,1,red|blue"; } else { strOthe = "确定添加|reset,classok.aspx,post,1,red|blue"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); }
/// <summary> /// 添加/编辑菜单 /// </summary> private void Insert4(int leibie, int ptype, int nid, int id, string pName) { if (id != 0) { Master.Title = "编辑" + pName + ""; builder.Append(Out.Div("title", "编辑" + pName + "")); } else { Master.Title = "添加" + pName + ""; builder.Append(Out.Div("title", "添加" + pName + "")); } string strText = "" + pName + "显示名称:/,选择论坛:/,栏目后面:/,显示状态:/,显示顺序:/,,,,"; string strName = "Title,Content,IsBr,Hidden,Paixu,leibie,ptype,nid,id"; string strType = "text,select,select,select,snum,hidden,hidden,hidden,hidden"; string strForum = string.Empty; DataSet ds = new BCW.BLL.Forum().GetList("ID,Title", ""); if (ds == null || ds.Tables[0].Rows.Count == 0) { Utils.Error("你还没有任何版块..<br /><a href=\"" + Utils.getUrl("forum.aspx") + "\">马上添加</a>", ""); } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strForum += "|" + ds.Tables[0].Rows[i]["ID"] + "|" + ds.Tables[0].Rows[i]["Title"] + "(" + ds.Tables[0].Rows[i]["ID"] + ")"; } strForum = "0|选择版块" + strForum; string strValu = ""; if (id != 0) { //读取菜单 BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); strValu = "" + model.Title + "'" + model.Content + "'" + model.IsBr + "'" + model.Hidden + "'" + model.Paixu + "'" + model.Leibie + "'" + model.Types + "'" + model.NodeId + "'" + id + ""; } else { strValu = "'''0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } string strEmpt = "false," + strForum + ",0|换行|1|不换行,0|正常显示|1|登录可见|2|隐藏显示,false,,,,"; string strIdea = "/"; string strOthe = ""; if (id != 0) { strOthe = "确定编辑|reset,classok.aspx,post,1,red|blue"; } else { strOthe = "确定添加|reset,classok.aspx,post,1,red|blue"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); }
/// <summary> /// 添加/编辑子菜单 /// </summary> private void Insert3(int leibie, int ptype, int nid, int id, string pName) { if (id != 0) { Master.Title = "编辑" + pName + ""; builder.Append(Out.Div("title", "编辑" + pName + "")); } else { Master.Title = "添加" + pName + ""; builder.Append(Out.Div("title", "添加" + pName + "")); } string strText = "" + pName + "名称:/,栏目后面:/,显示状态:/,显示顺序:/,,,,"; string strName = "Title,IsBr,Hidden,Paixu,leibie,ptype,nid,id"; string strType = "text,select,select,snum,hidden,hidden,hidden,hidden"; string strValu = ""; if (id != 0) { //读取菜单 BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); strValu = "" + model.Title + "'" + model.IsBr + "'" + model.Hidden + "'" + model.Paixu + "'" + model.Leibie + "'" + model.Types + "'" + model.NodeId + "'" + id + ""; } else { strValu = "''0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } string strEmpt = "false,0|换行|1|不换行,0|正常显示|1|登录可见|2|隐藏显示,false,,,,"; string strIdea = "/"; string strOthe = ""; if (id != 0) { strOthe = "确定编辑|reset,classok.aspx,post,1,red|blue"; } else { strOthe = "确定添加|reset,classok.aspx,post,1,red|blue"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); }
/// <summary> /// 添加/编辑页面菜单 /// </summary> private void Insert1(int leibie, int ptype, int nid, int id) { if (id != 0) { Master.Title = "编辑菜单"; builder.Append(Out.Div("title", "编辑菜单")); } else { Master.Title = "添加菜单"; builder.Append(Out.Div("title", "添加新菜单")); } string strText = "页面菜单名称:/,栏目后面:/,浏览器限制:/,VIP等级限制:/,页面收费:/,收费币种:/,消费方式:(收费非0时有效)/,访问密码:(留空不加密)/,显示状态:/,显示顺序:/,,,,"; string strName = "Title,IsBr,IsPc,VipLeven,Cent,BzType,SellTypes,InPwd,Hidden,Paixu,leibie,ptype,nid,id"; string strType = "text,select,select,select,num,select,select,text,select,snum,hidden,hidden,hidden,hidden"; string strValu = ""; if (id != 0) { //读取菜单 BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); strValu = "" + model.Title + "'" + model.IsBr + "'" + model.IsPc + "'" + model.VipLeven + "'" + model.Cent + "'" + model.BzType + "'" + model.SellTypes + "'" + model.InPwd + "'" + model.Hidden + "'" + model.Paixu + "'" + model.Leibie + "'" + model.Types + "'" + model.NodeId + "'" + id + ""; } else { strValu = "'1'0'0'0'0'0''0'0'" + leibie + "'" + ptype + "'" + nid + "'" + id + ""; } string strEmpt = "false,0|换行|1|不换行,0|不限制|1|仅限手机,0|不限|1|一级|2|二级|3|三级|4|四级|5|五级|6|六级|7|七级|8|八级,true,0|" + ub.Get("SiteBz") + "|1|" + ub.Get("SiteBz2") + ",0|按次计费|1|包周计费|2|包月计费,true,0|正常显示|1|登录可见|2|隐藏显示,false,,,,"; string strIdea = "/"; string strOthe = ""; if (id != 0) { strOthe = "确定编辑|reset,classok.aspx,post,1,red|blue"; } else { strOthe = "确定添加|reset,classok.aspx,post,1,red|blue"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); }
private void Add2Page() { string RadioType = "multiple"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 2, @"^[1-9]\d*$", "类型选择错误")); int leibie = int.Parse(Utils.GetRequest("leibie", "all", 1, @"^[0-9]\d*$", "0")); int nid = int.Parse(Utils.GetRequest("nid", "all", 1, @"^[0-9]\d*$", "0")); int p = int.Parse(Utils.GetRequest("p", "get", 2, @"^[0-9]\d*$", "类型选择错误")); string strEmptyValue = string.Empty; DataSet ds = null; if (ptype <= 4) { //查询条件 string strWhere = string.Empty; if (ptype == 1) { strWhere = "Types=11"; } else if (ptype == 2) { strWhere = "Types=12"; } else if (ptype == 3) { strWhere = "Types=13"; } else if (ptype == 4) { strWhere = "Types=14"; } ds = new BCW.BLL.Topics().GetList("ID,Title", strWhere); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString() + ""; } strEmptyValue = "0|全部栏目" + strEmptyValue; } else { strEmptyValue = "0|全部栏目"; } } else if (ptype == 5) { strEmptyValue = "0|全部栏目"; } else if (ptype == 6) { strEmptyValue = "0|全部分类|" + ub.GetSub("LinkLeibie", "/Controls/link.xml") + ""; } else if (ptype == 7 || ptype == 15)//论坛 { if (ptype == 7) { ds = new BCW.BLL.Forum().GetList("ID,Title", "IsActive=0"); } else { ds = new BCW.BLL.Forum().GetList("ID,Title", "IsActive=0 and GroupId>0"); } if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString() + ""; } strEmptyValue = "0|全部论坛" + strEmptyValue; } else { strEmptyValue = "0|全部论坛"; } } else if (ptype == 8 || ptype == 9) { strEmptyValue = "0|全部分类"; } else if (ptype == 10) { if (p != 2) { strEmptyValue = "0|全部记录"; } else { RadioType = "select"; strEmptyValue = "0|全部游戏|1|剪刀石头|2|ktv789|3|猜猜乐|4|竞拍|6|幸运二八|8|疯狂彩球|9|挖宝竞猜|10|跑马游戏|11|上证竞猜|12|社区商城"; if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288")) { strEmptyValue += "|13|大小庄"; strEmptyValue += "|14|疯狂吹牛"; } strEmptyValue += "|15|结婚系统"; if (Utils.GetDomain().Contains("168yy") || Utils.GetDomain().Contains("tl88")) { strEmptyValue += "|16|猜拳游戏"; } } } else if (ptype == 11) { strEmptyValue = "0|全部记录"; } else if (ptype == 12) { ds = new BCW.BLL.Chat().GetList("ID,ChatName", "Types=0"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["ChatName"].ToString() + ""; } strEmptyValue = "0|全部聊室" + strEmptyValue; } else { strEmptyValue = "0|全部聊室"; } } else if (ptype == 13) { if (p < 4) { //查询条件 string strWhere = string.Empty; if (p == 0) { strWhere = "Types=11"; } else if (p == 1) { strWhere = "Types=13"; } else if (p == 2) { strWhere = "Types=12"; } else if (p == 3) { strWhere = "Types=14"; } ds = new BCW.BLL.Topics().GetList("ID,Title", strWhere); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strEmptyValue += "|" + ds.Tables[0].Rows[i]["ID"].ToString() + "|" + ds.Tables[0].Rows[i]["Title"].ToString().Replace("|", "") + ""; } strEmptyValue = "0|全部栏目" + strEmptyValue; } else { strEmptyValue = "0|全部栏目"; } } else { strEmptyValue = "0|全部记录"; } } else if (ptype == 14) { strEmptyValue = "0|全部记录"; } builder.Append(Out.Tab("<div class=\"title\">选择调用栏目</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append("选择调用栏目:"); builder.Append(Out.Tab("</div>", "")); string strText = ",,,,,,,"; string strName = "NodeId,ptype,p,leibie,nid,act,backurl"; string strType = "" + RadioType + ",hidden,hidden,hidden,hidden,hidden,hidden"; string strValu = ""; if (ptype != 13) { strValu = "0'" + ptype + "'" + p + "'" + leibie + "'" + nid + "'add3'" + Utils.getPage(0) + ""; } else { strValu = "0'" + ptype + "'" + p + "'" + leibie + "'" + nid + "'add6'" + Utils.getPage(0) + ""; } string strEmpt = "" + strEmptyValue + ",false,false,false,false,false,false"; string strIdea = "/"; string strOthe = "下一步,smart.aspx,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("smart.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回上一级</a><br />"); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
private void ReloadPage() { Master.Title = "快速添加"; int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-9]\d*$", "1")); int leibie = int.Parse(Utils.GetRequest("leibie", "get", 1, @"^[0-2]$", "0")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("请选择菜单类型"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("类型:"); if (leibie == 0) { builder.Append("首页|"); } else { builder.Append("<a href=\"" + Utils.getUrl("channel.aspx?leibie=0&ptype=" + ptype + "") + "\">首页</a>|"); } if (leibie == 1) { builder.Append("社区|"); } else { builder.Append("<a href=\"" + Utils.getUrl("channel.aspx?leibie=1&ptype=" + ptype + "") + "\">社区</a>|"); } if (leibie == 2) { builder.Append("论坛"); } else { builder.Append("<a href=\"" + Utils.getUrl("channel.aspx?leibie=2&ptype=" + ptype + "") + "\">论坛</a>"); } builder.Append(Out.Tab("</div>", "<br />~~~~~~")); int pageIndex; int recordCount; //int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); int pageSize = 20; string strWhere = ""; string[] pageValUrl = { "leibie", "ptype" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "Types=" + ptype + " and Leibie=" + leibie + ""; // 开始读取专题 IList <BCW.Model.Topics> listTopics = new BCW.BLL.Topics().GetTopicss(pageIndex, pageSize, strWhere, out recordCount); if (listTopics.Count > 0) { int k = 1; foreach (BCW.Model.Topics n in listTopics) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { builder.Append(Out.Tab("<div>", "<br />")); } string IsHidden = string.Empty; if (n.Hidden == 1) { IsHidden = "^"; } builder.AppendFormat("<a href=\"" + Utils.getUrl("class.aspx?act=view&id={0}") + "\">[" + BCW.User.AppCase.CaseTopics(n.Types) + "]>" + IsHidden + "</a>{1}.{2}", n.ID, n.Paixu, n.Title); k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Tab("", "<br />")); builder.Append(Out.Div("text", "没有菜单记录")); } builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>")); builder.Append(Out.Tab("</div>", "<br />")); }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0")); int kid = int.Parse(Utils.GetRequest("kid", "get", 1, @"^[0-9]\d*$", "0")); string strWhere = string.Empty; int meid = new BCW.User.Users().GetUsId(); BCW.Model.Topics model = null; if (id != 0) { if (!new BCW.BLL.Topics().ExistsIdLeibie(id, 0)) { Utils.Error("不存在的记录", ""); } if (meid == 0) { strWhere = "NodeId=" + id + " AND Hidden=0 ORDER BY Paixu ASC"; } else { strWhere = "NodeId=" + id + " AND Hidden<=1 ORDER BY Paixu ASC"; } model = new BCW.BLL.Topics().GetTopics(id); Master.Title = model.Title; //----------------业务处理开始 bool IsTs = false; if (model.Cent != 0) { if (model.SellTypes == 0)//按次收费 { string payIDs = "|" + model.PayId + "|"; if (payIDs.IndexOf("|" + meid + "|") == -1) { IsTs = true; } } else if (model.SellTypes == 1 || model.SellTypes == 2)//包周包月 { if (!new BCW.BLL.Order().Exists(id, meid, DateTime.Now)) { IsTs = true; } } } if (model.VipLeven != 0) { if (meid == 0) { Utils.Login();//显示登录 } int VipLeven = BCW.User.Users.VipLeven(meid); if (VipLeven < model.VipLeven) { Utils.Error("本页面限VIP等级" + model.VipLeven + "级进入<br />您的VIP等级为<a href=\"" + Utils.getUrl("/bbs/finance.aspx?act=addvip") + "\">" + VipLeven + "级</a>", ""); } } if (IsTs == true) { if (meid == 0) { Utils.Login();//显示登录 } long Cent = Convert.ToInt64(model.Cent); //取用户信息 string Bz = string.Empty; long megold = 0; 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 act = Utils.GetRequest("act", "get", 1, "", ""); if (act != "ok") { new Out().head(Utils.ForWordType("温馨提示")); Response.Write(Out.Tab("<div class=\"text\">", "")); if (model.SellTypes == 0) { Response.Write("本页内容收费" + Cent + "" + Bz + ",扣费一次,永久浏览"); } else if (model.SellTypes == 1) { Response.Write("本页内容为包周业务,,如果您是此内容的包周会员,可以免费进入,否则将扣除您的" + Cent + "" + Bz + ",您将免费浏览本页面为一周时间"); } else if (model.SellTypes == 2) { Response.Write("本页内容为包月业务,,如果您是此内容的包月会员,可以免费进入,否则将扣除您的" + 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("default.aspx?act=ok&id=" + id + "") + "\">马上进入浏览</a><br />"); Response.Write("<a href=\"" + Utils.getUrl("default.aspx") + "\">返回上级</a>"); Response.Write(Out.Tab("</div>", "")); Response.Write(new Out().foot()); Response.End(); } //支付安全提示 string[] p_pageArr = { "act", "id" }; BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr, "get"); if (model.SellTypes == 0)//按次收费 { string payIDs = "|" + model.PayId + "|"; if (payIDs.IndexOf("|" + meid + "|") == -1) { if (megold < Cent) { Utils.Error("您的" + Bz + "不足", Utils.getUrl("default.aspx?id=" + id + "")); } //扣币 if (model.BzType == 0) { new BCW.BLL.User().UpdateiGold(meid, -Cent, "浏览收费页面"); } else { new BCW.BLL.User().UpdateiMoney(meid, -Cent, "浏览收费页面"); } //更新 payIDs = model.PayId + "|" + meid; new BCW.BLL.Topics().UpdatePayId(id, payIDs); } } else if (model.SellTypes == 1 || model.SellTypes == 2)//包周包月 { int iDays = 0; if (model.SellTypes == 1) { iDays = 7; } else { iDays = 30; } if (!new BCW.BLL.Order().Exists(id, meid, DateTime.Now)) { if (megold < Cent) { Utils.Error("您的" + Bz + "不足", ""); } //扣币 if (model.BzType == 0) { new BCW.BLL.User().UpdateiGold(meid, -Cent, "浏览收费页面"); } else { new BCW.BLL.User().UpdateiMoney(meid, -Cent, "浏览收费页面"); } //增加/更新 BCW.Model.Order modelorder = new BCW.Model.Order(); modelorder.UsId = meid; modelorder.UsName = new BCW.BLL.User().GetUsName(meid); modelorder.TopicId = id; modelorder.SellTypes = model.SellTypes; modelorder.Title = model.Title; modelorder.AddTime = DateTime.Now; modelorder.ExTime = DateTime.Now.AddDays(iDays); if (!new BCW.BLL.Order().Exists(id, meid)) { new BCW.BLL.Order().Add(modelorder); } else { new BCW.BLL.Order().Update(modelorder); } } } } //----------------业务处理结束 //----------------密码访问开始 string pwd = Utils.GetRequest("pwd", "post", 1, "", ""); if (!string.IsNullOrEmpty(model.InPwd) && pwd != model.InPwd) { new Out().head(Utils.ForWordType("温馨提示")); Response.Write(Out.Tab("<div class=\"title\">", "")); Response.Write("本页面内容已加密"); Response.Write(Out.Tab("</div>", "")); string strText = "输入密码:/,,"; string strName = "pwd,id,backurl"; string strType = "password,hidden,hidden,hidden"; string strValu = "'" + id + "'" + Utils.getPage(0) + ""; string strEmpt = "false,false,false"; string strIdea = "/"; string strOthe = "确认访问,default.aspx,post,1,red"; Response.Write(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); Response.Write(Out.Tab("<div>", "")); Response.Write(" <a href=\"" + Utils.getUrl("default.aspx") + "\">取消</a>"); Response.Write(Out.Tab("</div>", "")); Response.Write(new Out().foot()); Response.End(); } //----------------密码访问结束 //----------------限制手机访问开始 if (model.IsPc == 1) { if (!Utils.IsMobileUa()) { Utils.Error("请使用手机访问本页", ""); } } //----------------限制手机访问结束 //拾物随机 builder.Append(BCW.User.Game.GiftFlows.ShowGiftFlows(15)); //builder.Append(Out.Tab("<div class=\"title\">" + model.Title + "</div>", "")); } else { if (meid == 0) { strWhere = "NodeId=0 AND Leibie=0 AND Hidden=0 ORDER BY Paixu ASC"; } else { strWhere = "NodeId=0 AND Leibie=0 AND Hidden<=1 ORDER BY Paixu ASC"; } Master.Title = ub.Get("SiteName"); string Logo = ub.Get("SiteLogo"); if (!string.IsNullOrEmpty(Logo)) { builder.Append(Out.Tab("<div>", "")); builder.Append("<img src=\"" + Logo + "\" alt=\"load\"/>"); builder.Append(Out.Tab("</div>", "<br />")); } //顶部滚动 builder.Append(BCW.User.Master.OutTopRand(1)); } //20151222 黄国军查阅 //读取排序 DataSet ds = new BCW.BLL.Topics().GetList(strWhere); if (ds == null || ds.Tables[0].Rows.Count == 0) { if (id != 0) { builder.Append(Out.Div("div", "没有相关记录..")); } else { builder.Append(Out.Div("div", "网站正在建设中..")); } } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string ID = ds.Tables[0].Rows[i]["ID"].ToString(); string Types = ds.Tables[0].Rows[i]["Types"].ToString(); string Title = ds.Tables[0].Rows[i]["Title"].ToString(); string Content = ds.Tables[0].Rows[i]["Content"].ToString(); string IsBr = ds.Tables[0].Rows[i]["IsBr"].ToString(); int VipLeven = Utils.ParseInt(ds.Tables[0].Rows[i]["VipLeven"].ToString()); string Br = string.Empty; if (IsBr == "0" && IsVipSeen(meid, VipLeven) == true) { Br = Convert.ToChar(10).ToString(); } switch (Types) { case "1": builderIndex.Append("<a href=\"" + Utils.getUrl("default.aspx?id=" + ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; case "2": if (IsVipSeen(meid, VipLeven)) { builderIndex.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(Content))); } break; case "3": if (IsVipSeen(meid, VipLeven)) { builderIndex.Append("<img src=\"" + Content + "\" alt=\"load\"/>"); } break; case "4": if (IsVipSeen(meid, VipLeven)) { builderIndex.Append("<a href=\"" + BCW.User.AdminCall.AdminUBB(Utils.SetUrl(Content)) + "\">" + Title + "</a>"); } break; case "5": if (IsVipSeen(meid, VipLeven)) { builderIndex.Append(Out.WmlDecode(Content)); } break; case "6": builderIndex.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + Content + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; case "10": builderIndex.Append(BCW.User.AdminCall.ShowAdvert()); break; case "11": builderIndex.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; case "12": builderIndex.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; case "13": builderIndex.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; case "14": builderIndex.Append("<a href=\"" + Utils.getUrl("shop.aspx?id=" + ID + "&backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>"); break; default: builderIndex.Append(""); break; } builderIndex.Append(Br); } if (!Utils.Isie()) { builder.Append(builderIndex.ToString().Replace((Convert.ToChar(10).ToString()), "<br />")); } else { //20151222 黄国军 注释 //首页游戏列表输出 string[] txtIndex = builderIndex.ToString().Split((Convert.ToChar(10).ToString()).ToCharArray()); for (int i = 0; i < txtIndex.Length; i++) { // 输出列表的格式 if (txtIndex[i].IndexOf("</div>") == -1) { if ((i + 1) % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "")); } else { builder.Append(Out.Tab("<div>", "")); } } builder.Append(txtIndex[i].ToString()); if (txtIndex[i].IndexOf("</div>") == -1) { builder.Append(Out.Tab("</div>", "")); } } } if (id != 0) { builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>"); if (model.NodeId != 0) { builder.Append("-<a href=\"" + Utils.getUrl("default.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</a>"); } builder.Append(Out.Tab("</div>", "")); } //-----------友链链入开始 if (kid != 0) { if (new BCW.BLL.Link().Exists(kid)) { //统计链入 string xmlPath = "/Controls/link.xml"; if (ub.GetSub("LinkIsPc", xmlPath) == "0") { if (Utils.IsMobileUa()) { new BCW.BLL.Link().UpdateLinkIn(kid); if (ub.GetSub("LinkGoUrl", xmlPath) != "") { Response.Redirect(ub.GetSub("LinkGoUrl", xmlPath)); } } } else { new BCW.BLL.Link().UpdateLinkIn(kid); if (ub.GetSub("LinkGoUrl", xmlPath) != "") { Response.Redirect(ub.GetSub("LinkGoUrl", xmlPath)); } } } } //-----------友链链入结束 }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0")); if (!new BCW.BLL.Topics().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); Master.Title = model.Title; //顶部调用 string TopUbb = string.Empty; TopUbb = ub.GetSub("FtShopListTop", 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\">" + model.Title + "</div>", "")); int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "id" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "NodeId=" + id + ""; // 开始读取列表 IList <BCW.Model.Goods> listGoods = new BCW.BLL.Goods().GetGoodss(pageIndex, pageSize, strWhere, out recordCount); if (listGoods.Count > 0) { int k = 1; foreach (BCW.Model.Goods n in listGoods) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("shopdetail.aspx?id={0}&backurl=" + Utils.PostPage(1) + "") + "\">{2}.{3}</a>", n.ID, pageIndex, (pageIndex - 1) * pageSize + k, n.Title); if (!string.IsNullOrEmpty(n.Cover) && IsCover() == true) { builder.Append("<br /><img src=\"" + n.Cover + "\" alt=\"load\"/>"); } k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } //底部调用 string FootUbb = string.Empty; FootUbb = ub.GetSub("FtShopListFoot", 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(FootUbb); } } builder.Append(Out.Tab("<div class=\"title\">", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>"); if (model.NodeId != 0) { builder.Append("-<a href=\"" + Utils.getUrl("default.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</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")); 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>", "")); }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误")); if (!new BCW.BLL.Topics().Exists(id)) { Utils.Error("不存在的记录", ""); } BCW.Model.Topics model = new BCW.BLL.Topics().GetTopics(id); Master.Title = model.Title; //顶部调用 string TopUbb = string.Empty; if (model.Types == 11) { TopUbb = ub.GetSub("FtTextListTop", xmlPath); } else if (model.Types == 12) { TopUbb = ub.GetSub("FtPicListTop", xmlPath); } else if (model.Types == 13) { TopUbb = ub.GetSub("FtFileListTop", 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); } } //机型适配 string PhoneBrand = ""; string PhoneModel = ""; string PhoneSystem = ""; if (model.Types == 13) { 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"]); } if (PhoneBrand != "" && PhoneModel != "") { if (Request["view"] != "all") { Master.Title = PhoneModel + "-" + model.Title; //builder.Append(Out.Tab("<div class=\"title\">" + PhoneModel + "-" + model.Title + "</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + id + "&view=all&backurl=" + Utils.getPage(0) + "") + "\">查看全部</a>>" + PhoneModel + "系列"); } else { //builder.Append(Out.Tab("<div class=\"title\">" + model.Title + "</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append("查看全部><a href=\"" + Utils.getUrl("list.aspx?id=" + id + "&backurl=" + Utils.getPage(0) + "") + "\">" + PhoneModel + "系列</a>"); } builder.Append(Out.Tab("</div>", "<br />")); } } //else //{ // builder.Append(Out.Tab("<div class=\"title\">" + model.Title + "</div>", "")); //} int pageIndex; int recordCount; int pageSize = Convert.ToInt32(ub.Get("SiteListNo")); string strWhere = ""; string[] pageValUrl = { "id", "view", "backurl" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //查询条件 strWhere = "NodeId=" + id + " and Hidden=0"; if (model.Types == 13) { if (!string.IsNullOrEmpty(PhoneModel) && Request["view"] != "all") { strWhere += " AND (Model LIKE '%" + (PhoneModel) + "%' Or Model LIKE '%" + PhoneSystem + "%' OR Model LIKE '%" + (PhoneBrand) + "%')"; } } // 开始读取列表 IList <BCW.Model.Detail> listDetail = new BCW.BLL.Detail().GetDetails(pageIndex, pageSize, strWhere, out recordCount); if (listDetail.Count > 0) { int k = 1; foreach (BCW.Model.Detail n in listDetail) { if (k % 2 == 0) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("detail.aspx?id={0}&backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>", n.ID, (pageIndex - 1) * pageSize + k, n.Title); if (!string.IsNullOrEmpty(n.Cover) && IsCover(n.Types) == true) { builder.Append("<br /><img src=\"" + n.Cover + "\" alt=\"load\"/>"); } k++; builder.Append(Out.Tab("</div>", "")); } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } //上传连接 if (model.Types == 13 && Utils.GetTopDomain().Equals("tl88.cc")) { builder.Append(Out.Tab("<div>", "<br />")); builder.Append("<a href=\"" + Utils.getUrl("addfile.aspx?nid=" + id + "&backurl=" + Utils.PostPage(1) + "") + "\">>我要上传</a>"); builder.Append(Out.Tab("</div>", "")); } //底部调用 string FootUbb = string.Empty; if (model.Types == 11) { FootUbb = ub.GetSub("FtTextListFoot", xmlPath); } else if (model.Types == 12) { FootUbb = ub.GetSub("FtPicListFoot", xmlPath); } else if (model.Types == 13) { FootUbb = ub.GetSub("FtFileListFoot", 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.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">上级</a>"); if (model.NodeId != 0) { builder.Append("-<a href=\"" + Utils.getUrl("default.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</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); }