Beispiel #1
0
    private void UIDListPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        Master.Title = "我的靓号记录";
        builder.Append(Out.Tab("<div class=\"title\">", ""));

        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-3]$", "0"));

        if (ptype == 0)
        {
            builder.Append("全部|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=0") + "\">全部</a>|");
        }

        if (ptype == 1)
        {
            builder.Append("查询中|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=1") + "\">查询中</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("已报价|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=2") + "\">已报价</a>|");
        }

        if (ptype == 3)
        {
            builder.Append("已成交");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=3") + "\">已成交</a>");
        }

        builder.Append(Out.Tab("<div>", "<br />"));

        int    pageIndex;
        int    recordCount;
        string strWhere = string.Empty;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));

        string[] pageValUrl = { "act", "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        strWhere = "Types=0 and UsID=" + meid + " and State<>9";

        if (ptype > 0 && ptype < 3)
        {
            strWhere += " and State=" + ptype + "";
        }
        else if (ptype >= 3)
        {
            strWhere += " and State>=3";
        }


        // 开始读取专题
        IList <BCW.Model.SellNum> listSellNum = new BCW.BLL.SellNum().GetSellNums(pageIndex, pageSize, strWhere, out recordCount);

        if (listSellNum.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.SellNum n in listSellNum)
            {
                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 />"));
                    }
                }
                if (n.State == 1)
                {
                    builder.Append("ID号:" + n.BuyUID + "|提交时间" + DT.FormatDate(n.AddTime, 5) + "[未报价]");
                }
                else if (n.State == 2)
                {
                    builder.Append("ID号:" + n.BuyUID + "|提交时间" + DT.FormatDate(n.AddTime, 5) + "[报价" + n.Price + "" + ub.Get("SiteBz") + "]");
                    builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidok&amp;id=" + n.ID + "&amp;backurl=" + Utils.getPage(0) + "") + "\">兑换</a>");
                }
                else if (n.State == 3)
                {
                    builder.Append("ID号:" + n.BuyUID + "|提交时间" + DT.FormatDate(n.AddTime, 5) + "[报价" + n.Price + "" + ub.Get("SiteBz") + "]");
                    builder.Append("兑换时间" + DT.FormatDate(n.PayTime, 5) + "[等待系统回复]");
                }
                else
                {
                    builder.Append("ID号:" + n.BuyUID + "|提交时间" + DT.FormatDate(n.AddTime, 5) + "[报价" + n.Price + "" + ub.Get("SiteBz") + "]");
                    builder.Append("<br />绑定手机号:" + BCW.User.Users.FormatMobile(n.Mobile) + "");
                    //builder.Append("<br />备注:" + n.Notes + "");
                    builder.Append("<br />成交时间" + DT.FormatDate(n.PayTime, 5) + "");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div>", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidbuy") + "\">查找喜欢的ID&gt;&gt;</a>");
        builder.Append(Out.Tab("</div>", ""));

        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("../uinfo.aspx") + "\">上级</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("../uinfo.aspx") + "\">空间</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #2
0
    private void FriendPage(string act)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int hid = int.Parse(Utils.GetRequest("hid", "get", 2, @"^[1-9]\d*$", "0"));

        if (hid == 0)
        {
            hid = meid;
        }

        string NameType = string.Empty;
        string sTitle   = string.Empty;

        if (hid == meid)
        {
            NameType = "我";
        }
        else
        {
            NameType = "TA";
        }

        if (act == "fans")
        {
            sTitle = "关注的友友";
        }
        else if (act == "friend")
        {
            sTitle = "的好友动态";
        }
        else
        {
            sTitle = "的动态记录";
        }

        Master.Title = "" + NameType + "" + sTitle + "";
        builder.Append(Out.Tab("<div class=\"title\">" + NameType + "" + sTitle + "</div>", ""));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("mebook.aspx?hid=" + hid + "") + "\">留言</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("visit.aspx?act=list&amp;ptype=1&amp;hid=" + hid + "") + "\">拜访</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("visit.aspx?act=list&amp;ptype=2&amp;hid=" + hid + "") + "\">访客</a>|");
        if (act == "friend")
        {
            builder.Append("好友|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("action.aspx?act=friend&amp;hid=" + hid + "") + "\">好友</a>|");
        }

        if (meid == hid)
        {
            if (act == "fans")
            {
                builder.Append("关注");
                builder.Append("<br /><a href=\"" + Utils.getUrl("friend.aspx?act=fans&amp;backurl=" + Utils.PostPage(1) + "") + "\">管理我关注的友友</a>");
            }
            else
            {
                builder.Append("<a href=\"" + Utils.getUrl("action.aspx?act=fans&amp;hid=" + hid + "") + "\">关注</a>");
            }
        }
        else
        {
            if (act == "me")
            {
                builder.Append("动态");
            }
            else
            {
                builder.Append("<a href=\"" + Utils.getUrl("action.aspx?act=me&amp;hid=" + hid + "") + "\">动态</a>");
            }
        }

        builder.Append(Out.Tab("</div>", "<br />"));

        int pageIndex;
        int recordCount;
        int pageSize = Convert.ToInt32(ub.Get("SiteListNo"));

        string[] pageValUrl = { "act", "hid", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        int Types = 0;

        if (act == "fans")
        {
            Types = 2;
        }

        // 开始读取列表
        IList <BCW.Model.Action> listAction = null;

        if (act == "me")
        {
            listAction = new BCW.BLL.Action().GetActions(pageIndex, pageSize, "usid=" + hid + " and notes not like '%guess2%' and notes not like '%bbsshop%' ", out recordCount);
        }
        else
        {
            listAction = new BCW.BLL.Action().GetActionsFriend(Types, hid, pageIndex, pageSize, out recordCount);
        }

        if (listAction.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Action n in listAction)
            {
                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("{0}前<a href=\"" + Utils.getUrl("uinfo.aspx?uid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}</a>{3}", DT.DateDiff2(DateTime.Now, n.AddTime), n.UsId, n.UsName, Out.SysUBB(n.Notes));
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #3
0
    private void RegPwdOkPage()
    {
        Master.Title = "免费注册/重置密码";
        if (Utils.GetTopDomain() == "knnnk.com")
        {
            int meid = new BCW.User.Users().GetUsId();
            if (meid != 1 && meid != 2)
            {
                Utils.Error("权限不足", "");
            }

            string mobile = Utils.GetRequest("mobile", "post", 2, @"^(?:13|14|15|18)\d{9}$", "请正确输入十一位数的手机号码");
            string ac     = Utils.GetRequest("ac", "all", 1, "", "");
            builder.Append(Out.Tab("<div class=\"title\">免费注册/重置密码</div>", ""));

            if (Utils.ToSChinese(ac) == "注册会员")
            {
                if (new BCW.BLL.User().Exists(mobile))
                {
                    Utils.Error("很抱歉,此手机号已经注册", "");
                }
                //取得会员ID
                int maxId = BCW.User.Reg.GetRandId();
                if (maxId == 0)
                {
                    Utils.Error("很抱歉,服务器繁忙,请稍后注册..", "");
                }
                //加密用户密码
                string strPwd = Utils.MD5Str(Utils.Right(mobile, 6));
                //取随机识别串
                string UsKey = new Rand().RandNum(10);

                string newName = ub.GetSub("RegName", "/Controls/reg.xml");
                if (newName == "")
                {
                    newName = "新会员";
                }

                //写入注册表
                BCW.Model.User model = new BCW.Model.User();
                model.ID        = maxId;
                model.Mobile    = mobile;
                model.UsName    = "" + newName + "" + maxId + "";
                model.UsPwd     = strPwd;
                model.UsKey     = UsKey;
                model.Photo     = "/Files/Avatar/image0.gif";
                model.Sex       = 0;
                model.RegTime   = DateTime.Now;
                model.RegIP     = Utils.GetUsIP();
                model.EndTime   = DateTime.Now;
                model.Birth     = DateTime.Parse("1980-1-1");
                model.Sign      = "未设置签名";
                model.InviteNum = 0;
                model.IsVerify  = 0;
                model.Email     = "";
                new BCW.BLL.User().Add(model);
                //发送内线
                new BCW.BLL.Guest().Add(model.ID, model.UsName, ub.GetSub("RegGuest", "/Controls/reg.xml"));
                //积分操作
                new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_RegUser, maxId);

                builder.Append(Out.Tab("<div>", ""));
                builder.Append("注册成功!<br />");
                builder.Append("注册ID:" + maxId + "<br />注册手机号:" + mobile + "<br />登录密码:" + Utils.Right(mobile, 6) + "");
                builder.Append(Out.Tab("</div>", ""));
            }
            else if (Utils.ToSChinese(ac) == "重置密码")
            {
                if (BCW.User.Reg.GetPwdSms(mobile))//找回登录密码
                {
                    builder.Append(Out.Tab("<div>", ""));
                    builder.Append("重置密码成功!<br />");
                    builder.Append("手机号:" + mobile + "<br />登录密码:" + Utils.Right(mobile, 6) + "");
                    builder.Append(Out.Tab("</div>", ""));
                }
            }
            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>");
            builder.Append(Out.Tab("</div>", ""));
        }
    }
Beispiel #4
0
    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&amp;id=" + id + "&amp;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>&gt;");
            if (!Utils.GetDomain().Contains("boyi929"))
            {
                builder.Append("<a href=\"" + Utils.getUrl("default.aspx?id=298") + "\">新闻</a>&gt;");
            }
            builder.Append("<a href=\"" + Utils.getUrl("list.aspx?id=" + model.NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(model.NodeId) + "</a>&gt;正文");
            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 + "&amp;backurl=" + Utils.getPage(0) + "&amp;pn=" + (pn + 1) + "") + "\">下张</a> ");
                    }
                    if (pn > 1)
                    {
                        if (pn >= txtPic.Length)
                        {
                            builder.Append("<br />");
                        }
                        builder.Append("<a href=\"" + Utils.getUrl("detail.aspx?id=" + id + "&amp;backurl=" + Utils.getPage(0) + "&amp;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 + "&amp;pover=1&amp;&amp;backurl=" + Utils.PostPage(1) + "") + "\">详细&gt;&gt;</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 + "&amp;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 + "") + "\">&gt;原图下载</a>.<a href=\"" + Utils.getUrl("/showpic.aspx?pic=" + n.PrevFiles + "&amp;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&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;免费下载到手机</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&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">功能箱</a>.");
            }
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/favorites.aspx?act=addin&amp;backurl=" + Utils.PostPage(1) + "") + "\">收藏</a>.");
            builder.Append("<a href=\"" + Utils.getUrl("/inter.aspx?act=recom&amp;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 + "&amp;v=" + (i + 1) + "&amp;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 + "&amp;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 + "&amp;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 + "&amp;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>", ""));
    }
Beispiel #5
0
    /// <summary>
    /// 上传文件页面
    /// </summary>
    private void UploadPage(int forumid, int bid)
    {
        //string ac = Utils.ToSChinese(Utils.GetRequest("ac", "post", 1, "", ""));
        string ac   = Utils.GetRequest("ac", "get", 1, "", "");
        int    meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        BCW.User.Users.ShowVerifyRole("f", meid);                                         //非验证会员提示
        new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Upfile, meid); //会员上传权限

        //论坛限制性
        BCW.Model.Forum Forummodel = new BCW.BLL.Forum().GetForum(forumid);
        //圈子限制性
        BCW.Model.Group modelgr = null;
        if (Forummodel.GroupId > 0)
        {
            modelgr = new BCW.BLL.Group().GetGroupMe(Forummodel.GroupId);
            if (modelgr == null)
            {
                Utils.Error("不存在的" + ub.GetSub("GroupName", "/Controls/group.xml") + "", "");
            }
            else if (DT.FormatDate(modelgr.ExTime, 0) != "1990-01-01 00:00:00" && modelgr.ExTime < DateTime.Now)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "已过期", "");
            }
            if (modelgr.ForumStatus == 2)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛已关闭", "");
            }
            if (modelgr.ForumStatus == 1)
            {
                if (meid == 0)
                {
                    Utils.Login();
                }

                string GroupId = new BCW.BLL.User().GetGroupId(meid);
                if (GroupId.IndexOf("#" + Forummodel.GroupId + "#") == -1 && IsCTID(meid) == false)
                {
                    Utils.Error("非成员不能访问" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛!<br /><a href=\"" + Utils.getUrl("/bbs/group.aspx?act=addin&amp;id=" + Forummodel.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">加入本" + ub.GetSub("GroupName", "/Controls/group.xml") + "</a>", "");
                }
            }
        }
        BCW.User.Users.ShowForumLimit(meid, Forummodel.Gradelt, Forummodel.Visitlt, Forummodel.VisitId, Forummodel.IsPc);

        if (ac == "fill" || bid == 0)//发帖
        {
            //是否刷屏
            string appName = "LIGHT_THREAD";
            int    Expir   = Convert.ToInt32(ub.GetSub("BbsThreadExpir", xmlPath2));
            BCW.User.Users.IsFresh(appName, Expir);

            BCW.User.Users.ShowVerifyRole("a", meid);                                                   //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Text, meid);             //会员本身权限
            new BCW.User.FLimits().CheckUserFLimit(BCW.User.FLimits.enumRole.Role_Text, meid, forumid); //版块内权限
            BCW.User.Users.ShowAddThread(meid, Forummodel.Postlt);
        }
        else//回帖
        {
            //是否刷屏
            string appName = "LIGHT_REPLY";
            int    Expir   = Convert.ToInt32(ub.GetSub("BbsReplyExpir", xmlPath2));
            BCW.User.Users.IsFresh(appName, Expir);

            BCW.User.Users.ShowVerifyRole("b", meid);                                                    //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Reply, meid);             //会员本身权限
            new BCW.User.FLimits().CheckUserFLimit(BCW.User.FLimits.enumRole.Role_Reply, meid, forumid); //版块内权限
            BCW.User.Users.ShowAddReply(meid, Forummodel.Replylt);
        }
        int kk    = 0;
        int reid  = 0;
        int ptype = 5;//标识为附件帖子

        if (ac == "fill")
        {
            //上传文件
            SaveFiles(meid, forumid, bid, reid, out kk);
            string strOut = string.Empty;
            if (kk < 0)
            {
                if (kk == -999)
                {
                    kk = 0;
                }

                strOut = ",部分文件超出今天上传数量导致上传失败";
                kk     = Math.Abs(kk);
            }
            //更新帖子文件数
            new BCW.BLL.Text().UpdateFileNum(bid, kk);
            new BCW.BLL.Text().UpdateTypes(bid, ptype);
            //记录日志
            string strLog = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + new BCW.BLL.User().GetUsName(meid) + "[/url]对主题[url=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]《" + new BCW.BLL.Text().GetTitle(bid) + "》[/url]追加" + kk + "个文件!";
            new BCW.BLL.Forumlog().Add(7, forumid, bid, strLog);

            Response.Write("追加" + kk + "个文件成功" + strOut + "");
            Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")) + "\">返回之前页面</a>");
            Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("default.aspx")) + "\">返回社区首页</a>");
            Response.Write("</body></html>");
            Response.End();
        }
        else
        {
            string mename  = new BCW.BLL.User().GetUsName(meid);
            string Title   = string.Empty;
            string Content = string.Empty;
            if (bid == 0)
            {
                Title = Utils.GetRequest("Title", "post", 1, "", "");
                if (!Utils.IsRegex(Title, @"^[\s\S]{" + ub.GetSub("BbsThreadMin", xmlPath2) + "," + ub.GetSub("BbsThreadMax", xmlPath2) + "}$"))
                {
                    Response.Write("标题限" + ub.GetSub("BbsThreadMin", xmlPath2) + "-" + ub.GetSub("BbsThreadMax", xmlPath2) + "字<br/>");
                    Response.Write(Out.back("返回上一级"));
                    Response.Write("</body></html>");
                    Response.End();
                }
                Title   = Title.Replace(char.ConvertFromUtf32(10), "").Replace(char.ConvertFromUtf32(13), "");
                Content = Utils.GetRequest("Content", "post", 1, "", "");
                if (!Utils.IsRegex(Content, @"^[\s\S]{" + ub.GetSub("BbsContentMin", xmlPath2) + "," + ub.GetSub("BbsContentMax", xmlPath2) + "}$"))
                {
                    Response.Write("请输入" + ub.GetSub("BbsContentMin", xmlPath2) + "-" + ub.GetSub("BbsContentMax", xmlPath2) + "字的内容<br/>");
                    Response.Write(Out.back("返回上一级"));
                    Response.Write("</body></html>");
                    Response.End();
                }
            }
            else
            {
                Content = Utils.GetRequest("Content", "post", 1, "", "");
                if (!Utils.IsRegex(Content, @"^[\s\S]{1," + ub.GetSub("BbsReplyMax", xmlPath2) + "}$"))
                {
                    Response.Write("请输入不超" + ub.GetSub("BbsReplyMax", xmlPath2) + "字的回帖内容<br/>");
                    Response.Write(Out.back("返回上一级"));
                    Response.Write("</body></html>");
                    Response.End();
                }
            }

            if (bid == 0)
            {
                int ThreadNum = Utils.ParseInt(ub.GetSub("BbsThreadNum", xmlPath));
                if (ThreadNum > 0)
                {
                    int ToDayCount = new BCW.BLL.Forumstat().GetCount(meid, 1);//今天发布帖子数
                    if (ToDayCount >= ThreadNum)
                    {
                        Response.Write("系统限每天每ID限发帖子" + ThreadNum + "帖<br/>");
                        Response.Write(Out.back("返回上一级"));
                        Response.Write("</body></html>");
                        Response.End();
                    }
                }

                int    Price    = 0;
                int    Prices   = 0;
                int    HideType = 0;
                int    IsSeen   = 0;
                string PayCi    = string.Empty;

                BCW.Model.Text addmodel = new BCW.Model.Text();
                addmodel.ForumId     = forumid;
                addmodel.Types       = ptype;
                addmodel.Title       = Title;
                addmodel.Content     = Content;
                addmodel.HideContent = "";
                addmodel.UsID        = meid;
                addmodel.UsName      = mename;
                addmodel.Price       = Price;
                addmodel.Prices      = Prices;
                addmodel.HideType    = HideType;
                addmodel.PayCi       = PayCi;
                addmodel.IsSeen      = IsSeen;
                addmodel.AddTime     = DateTime.Now;
                addmodel.ReTime      = DateTime.Now;
                bid = new BCW.BLL.Text().Add(addmodel);
                //上传文件
                SaveFiles(meid, forumid, bid, reid, out kk);
                string strOut = string.Empty;
                if (kk < 0)
                {
                    if (kk == -999)
                    {
                        kk = 0;
                    }

                    strOut = ",部分文件超出今天上传数量导致上传失败";
                    kk     = Math.Abs(kk);
                }
                //更新帖子文件数
                new BCW.BLL.Text().UpdateFileNum(bid, kk);
                //论坛统计
                BCW.User.Users.UpdateForumStat(1, meid, mename, forumid);
                //动态记录
                new BCW.BLL.Action().Add(meid, mename, "在" + Forummodel.Title + "发表了文件帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]");

                //积分操作/论坛统计/圈子论坛不进行任何奖励
                int GroupId = new BCW.BLL.Forum().GetGroupId(forumid);
                if (GroupId == 0)
                {
                    new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_Text, meid);
                }
                if (kk == 0)
                {
                    new BCW.BLL.Text().UpdateTypes(bid, 0);//去掉附件帖标识
                }
                #region  这里开始修改提醒ID 发内线
                string remind = ub.GetSub("remindid" + forumid, "/Controls/bbs.xml"); //获取XML的值

                if (remind != "")                                                     //如果有提醒ID
                {
                    string[] IDS = remind.Split('#');
                    for (int i = 0; i < IDS.Length; i++)
                    {
                        if (GroupId != 0)
                        {
                            new BCW.BLL.Guest().Add(0, int.Parse(IDS[i]), new BCW.BLL.User().GetUsName(int.Parse(IDS[i])), "请注意!用户[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "(" + meid + ")[/url]在圈坛-" + Forummodel.Title + "发表了[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]的帖子");
                        }
                        else
                        {
                            new BCW.BLL.Guest().Add(0, int.Parse(IDS[i]), new BCW.BLL.User().GetUsName(int.Parse(IDS[i])), "请注意!用户[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "(" + meid + ")[/url]在" + Forummodel.Title + "发表了[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + Title + "[/URL]的帖子");
                        }
                    }
                }
                #endregion
                Response.Write("上传" + kk + "个文件成功" + strOut + "");
                Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("forum.aspx?forumid=" + forumid + "")) + "\">返回之前页面</a>");
                Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("default.aspx")) + "\">返回社区首页</a>");
                Response.Write("</body></html>");
                Response.End();
            }
            else
            {
                int ReplyNum = Utils.ParseInt(ub.GetSub("BbsReplyNum", xmlPath));
                if (ReplyNum > 0)
                {
                    int ToDayCount = new BCW.BLL.Forumstat().GetCount(meid, 2);//今天发布回帖数
                    if (ToDayCount >= ReplyNum)
                    {
                        Response.Write("系统限每天每ID限回帖" + ReplyNum + "次<br/>");
                        Response.Write(Out.back("返回上一级"));
                        Response.Write("</body></html>");
                        Response.End();
                    }
                }

                int Floor = new BCW.BLL.Reply().GetFloor(bid);

                //派币帖
                string CentText = string.Empty;
                string PbCent   = string.Empty;
                int    iTypes   = new BCW.BLL.Text().GetTypes(bid);
                if (iTypes == 3)
                {
                    BCW.Model.Text p = new BCW.BLL.Text().GetPriceModel(bid);
                    if (p.Prices - p.Pricel > 0)
                    {
                        string bzText = string.Empty;
                        if (p.BzType == 0)
                        {
                            bzText = ub.Get("SiteBz");
                        }
                        else
                        {
                            bzText = ub.Get("SiteBz2");
                        }

                        long zPrice = 0;
                        if (p.Price2 > 0)
                        {
                            zPrice = Convert.ToInt64(new Random().Next(p.Price, (p.Price2 + 1)));//随机得到奖币值
                        }
                        else
                        {
                            zPrice = Convert.ToInt64(p.Price);
                        }

                        long GetPrice = 0;
                        if (p.Prices - p.Pricel < zPrice)
                        {
                            GetPrice = p.Prices - p.Pricel;
                        }
                        else
                        {
                            GetPrice = zPrice;
                        }

                        if (p.PayCi == "0")
                        {
                            if (("#" + p.ReplyID + "#").IndexOf("#" + meid + "#") == -1)
                            {
                                if (p.BzType == 0)
                                {
                                    new BCW.BLL.User().UpdateiGold(meid, mename, GetPrice, "派币帖回帖获得");
                                }
                                else
                                {
                                    new BCW.BLL.User().UpdateiMoney(meid, mename, GetPrice, "派币帖回帖获得");
                                }

                                //更新已派
                                new BCW.BLL.Text().UpdatePricel(bid, GetPrice);
                                CentText = "" + GetPrice + "" + bzText + "";
                                PbCent   = "楼主派" + GetPrice + "" + bzText + "";
                            }
                        }
                        else
                        {
                            if (("#" + p.PayCi + "#").IndexOf("#" + Utils.Right(Floor.ToString(), 1) + "#") != -1)
                            {
                                if (p.BzType == 0)
                                {
                                    new BCW.BLL.User().UpdateiGold(meid, mename, GetPrice, "派币帖回帖获得");
                                }
                                else
                                {
                                    new BCW.BLL.User().UpdateiMoney(meid, mename, GetPrice, "派币帖回帖获得");
                                }

                                //更新已派
                                new BCW.BLL.Text().UpdatePricel(bid, GetPrice);
                                CentText = "" + GetPrice + "" + bzText + "";
                                PbCent   = "踩中楼层" + Utils.Right(Floor.ToString(), 1) + "尾,楼主派" + GetPrice + "" + bzText + "";
                            }
                        }
                    }
                }

                BCW.Model.Reply model = new BCW.Model.Reply();
                model.Floor    = Floor;
                model.ForumId  = forumid;
                model.Bid      = bid;
                model.UsID     = meid;
                model.UsName   = mename;
                model.Content  = Content;
                model.FileNum  = 0;
                model.ReplyId  = 0;
                model.AddTime  = DateTime.Now;
                model.CentText = CentText;
                reid           = new BCW.BLL.Reply().Add(model);

                //更新回复ID
                string sPayID = new BCW.BLL.Text().GetReplyID(bid);
                if (("#" + sPayID + "#").IndexOf("#" + meid + "#") == -1)
                {
                    string ReplyID = string.Empty;
                    if (string.IsNullOrEmpty(sPayID))
                    {
                        ReplyID = meid.ToString();
                    }
                    else
                    {
                        ReplyID = sPayID + "#" + meid;
                    }
                    new BCW.BLL.Text().UpdateReplyID(bid, ReplyID);
                }
                //更新回复数
                new BCW.BLL.Text().UpdateReplyNum(bid, 1);
                //上传文件
                SaveFiles(meid, forumid, bid, reid, out kk);
                string strOut = string.Empty;
                if (kk < 0)
                {
                    if (kk == -999)
                    {
                        kk = 0;
                    }

                    strOut = "部分文件超出今天上传数量导致上传失败!";
                    kk     = Math.Abs(kk);
                }
                //更新回复文件数
                new BCW.BLL.Reply().UpdateFileNum(reid, kk);
                //论坛统计
                BCW.User.Users.UpdateForumStat(2, meid, mename, forumid);
                //动态记录
                new BCW.BLL.Action().Add(meid, mename, "在" + Forummodel.Title + "回复帖子[URL=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "]" + new BCW.BLL.Text().GetTitle(bid) + "[/URL]");

                //积分操作/论坛统计/圈子论坛不进行任何奖励
                int GroupId = new BCW.BLL.Forum().GetGroupId(forumid);
                if (GroupId == 0)
                {
                    new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_Reply, meid);
                }
                Response.Write("回复" + kk + "个文件成功!" + strOut + "" + PbCent + "");
                Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")) + "\">返回主题帖子</a>");
                Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("reply.aspx?forumid=" + forumid + "&amp;bid=" + bid + "")) + "\">进入回复列表</a>");
                Response.Write("<br/><a href=\"" + ReplaceWap(Utils.getUrl("default.aspx")) + "\">返回社区首页</a>");
                Response.Write("</body></html>");
                Response.End();
            }
        }
    }
Beispiel #6
0
    private void ViewPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        Master.Title = "查看竞拍";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append(model.title);
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("" + Out.SysUBB(model.content) + "");
        if (meid > 0)
        {
            if (model.paytype == 2 && model.winID == meid)
            {
                builder.Append("<br />=保密内容=<br />" + model.pcontent + "");
            }
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        if (!string.IsNullOrEmpty(model.fileurl))
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<img src=\"" + model.fileurl + "\" alt=\"load\"/>");
            builder.Append("<br /><a href=\"" + Utils.getUrl(model.fileurl) + "\">下载截图</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }

        builder.Append(Out.Tab("<div>", ""));
        builder.Append("发布时间:" + model.writetime + "");
        if (model.totime < DateTime.Now)
        {
            builder.Append("<br />剩余时间:已截止");
        }
        else
        {
            builder.Append("<br />剩余时间:" + DT.DateDiff(DateTime.Now, model.totime) + "");
        }
        builder.Append("<br />截止时间:" + model.totime + "");
        builder.Append("<br />起拍价:" + model.price + "" + bzText + "");
        builder.Append("<br />发布会员:<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.userid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + model.username + "</a>");
        if (meid > 0)
        {
            if (model.payCount == 0 && model.userid == meid)
            {
                builder.Append("<br /><a href=\"" + Utils.getUrl("race.aspx?act=del&amp;id=" + id + "") + "\">删除竞拍</a>");
            }
        }
        if (model.paytype == 2 && model.winID != 0)
        {
            builder.Append("<br /><b>竞拍最后得主:</b><a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.winID + "") + "\">" + model.winName + "</a>");
        }
        else
        {
            if (model.winID > 0)
            {
                builder.Append("<br /><b>当前最高价:</b>" + model.topPrice + "" + bzText + ",<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.winID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + model.winName + "</a>");
            }
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        if (model.paytype > 0)
        {
            if (model.paytype == 1 && model.totime > DateTime.Now)
            {
                //增幅
                long paycents = 0;
                if (model.Types == 0)
                {
                    paycents = model.topPrice + Convert.ToInt64(ub.GetSub("RaceZfPrice", xmlPath));
                }
                else
                {
                    paycents = model.topPrice + Convert.ToInt64(ub.GetSub("RaceZfPrice2", xmlPath));
                }

                builder.Append(Out.Tab("<div>", ""));
                long gold  = new BCW.BLL.User().GetGold(meid);
                long money = new BCW.BLL.User().GetMoney(meid);
                builder.Append("您目前共有" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "/" + Utils.ConvertGold(money) + "" + ub.Get("SiteBz2") + "");
                builder.Append(Out.Tab("</div>", "<br />"));
                strText = "出价(须高于最高价和起拍价):/,,";
                strName = "payCent,id,act";
                strType = "stext,hidden,hidden";
                strValu = "" + paycents + "'" + id + "'pay";
                strEmpt = "false,false,false";
                strIdea = "";
                strOthe = "我拍,race.aspx,post,3,red";
                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("增幅至少" + (paycents - model.topPrice) + "" + bzText + ",即" + paycents + "" + bzText + "");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("=最新出价=");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            IList <BCW.Model.Game.Racelist> listRacelist = new BCW.BLL.Game.Racelist().GetRacelists(5, "raceid=" + id + "");
            if (listRacelist.Count > 0)
            {
                foreach (BCW.Model.Game.Racelist n in listRacelist)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.payname + "出价" + n.payCent + "" + bzText + "</a>" + DT.DateDiff(DateTime.Now, n.paytime) + "前<br />");
                }
                builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=list&amp;id=" + id + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;更多出价记录</a>");
            }
            else
            {
                builder.Append("没有出价记录..");
            }
            builder.Append(Out.Tab("</div>", ""));
            //显示闲聊
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("=最新留言=");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(BCW.User.Users.ShowSpeak(4, "race.aspx", 5, meid, "view", id));
            builder.Append(Out.Tab("", "<br />"));
        }
        builder.Append(Out.Tab("<div>", Out.RHr()));
        builder.Append("<a href=\"" + Utils.getPage("race.aspx?act=my") + "\">返回上一级</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.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #7
0
    private void ListPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.paytype < 1)
        {
            Utils.Error("此竞拍还没有通过审核", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        Master.Title = "查看出价记录";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + id + "") + "\">返回上一级</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = string.Empty;

        strWhere = "raceid=" + id + "";
        string[] pageValUrl = { "act", "id", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        // 开始读取列表
        IList <BCW.Model.Game.Racelist> listRacelist = new BCW.BLL.Game.Racelist().GetRacelists(pageIndex, pageSize, strWhere, out recordCount);

        if (listRacelist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Racelist n in listRacelist)
            {
                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.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[" + DT.FormatDate(n.paytime, 6) + "]" + n.payname + "</a>(出价" + n.payCent + "" + bzText + ")");

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + id + "") + "\">返回查看竞拍</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.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = BCW.User.Users.userId();

        if (meid > 0)
        {
            meid = new BCW.User.Users().GetUsId();
        }
        BCW.User.Master.ShowMaster(meid, _Title);

        //底部
        builder.Append(Out.Tab("<div class=\"ft\">", "<br />"));
        if (Utils.PostPage(0).ToLower() == "/default.aspx")
        {
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteIndexUbb")).Replace("[@功能]", Utils.Function(_IsFoot))));
        }
        else
        {
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteWapUbb")).Replace("[@功能]", Utils.Function(_IsFoot))));
        }
        builder.Append(Out.Tab("</div>", ""));

        //版本
        builder.Append("<!--Powered by kubao.cc " + ub.Get("SiteVersion") + " @author Light-->");

        string strAlign = ub.Get("SiteAlign");

        if (meid > 0)
        {
            //短消息提示
            if (string.IsNullOrEmpty(Request.Form.ToString()))
            {
                int smsCount  = new BCW.BLL.Guest().GetCount(meid);
                int smsXCount = new BCW.BLL.Guest().GetXCount(meid);
                if (smsCount > 0 || smsXCount > 0)
                {
                    string actUrl  = string.Empty;
                    string actUrl2 = string.Empty;
                    if (smsCount > 0)
                    {
                        actUrl = "act=newlist&amp;";
                    }

                    if (smsXCount > 0)
                    {
                        actUrl2 = "act=view&amp;hid=0&amp;";
                    }
                    else
                    {
                        actUrl2 = "ptype=1&amp;";
                    }

                    string GuestText = "<b>新内线<a href=\"" + Utils.getUrl("/bbs/guest.aspx?" + actUrl + "backurl=" + Utils.PostPage(1) + "") + "\">(" + smsCount + ")</a>系统<a href=\"" + Utils.getUrl("/bbs/guest.aspx?" + actUrl2 + "backurl=" + Utils.PostPage(1) + "") + "\">(" + smsXCount + ")</a></b>";

                    builder2.Append(Out.Tab("<div>", ""));
                    builder2.Append(GuestText);
                    builder2.Append(Out.Tab("</div>", "<br />"));
                }
            }
        }
        //头部
        if (_Refresh == 0)
        {
            new Out().head(Utils.ForWordType(_Title), strAlign);
        }
        else
        {
            new Out().head(Utils.ForWordType(_Title), _Gourl, _Refresh.ToString(), strAlign);
        }
        //顶部Ubb
        string SiteTopUbb = string.Empty;

        if (ub.Get("SiteIndexTopUbb") != "")
        {
            SiteTopUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteIndexTopUbb")));
            if (SiteTopUbb.IndexOf("</div>") == -1)
            {
                builder3.Append(Out.Tab("<div>", ""));
                builder3.Append(SiteTopUbb);
                builder3.Append(Out.Tab("</div>", ""));
            }
            else
            {
                builder3.Append(SiteTopUbb);
            }
        }

        //消息提示
        Response.Write(Utils.ForWordType(builder2.ToString()));
        //顶部Ubb
        Response.Write(Utils.ForWordType(builder3.ToString()));
        //尾部
        builder.Append(new Out().foot());
    }
Beispiel #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int uid  = int.Parse(Utils.GetRequest("uid", "all", 1, @"^[0-9]\d*$", "0"));
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        if (uid == 0)
        {
            uid = meid;
        }
        int ptype     = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-3]\d*$", "1"));
        int showtype  = int.Parse(Utils.GetRequest("showtype", "all", 1, @"^[0-9]\d*$", "0"));
        int ordertype = int.Parse(Utils.GetRequest("ordertype", "all", 1, @"^[0-9]\d*$", "1"));

        if (ptype == 1)
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>&gt;帖子");
            builder.Append(Out.Tab("</div>", "<br />"));
            Master.Title = "查看主题帖子";

            //string strText = "排序:,,,,";
            //string strName = "ordertype,ptype,uid,showtype,backurl";
            //string strType = "select,hidden,hidden,hidden,hidden";
            //string strValu = "" + ordertype + "'" + ptype + "'" + uid + "'" + showtype + "'" + Utils.getPage(0) + "";
            //string strEmpt = "1|按发帖时间|2|按最后跟贴|3|按帖子浏览量|4|按帖子跟贴量,,,,";
            //string strIdea = "";
            //string strOthe = "确定,moreThread.aspx,post,3,red";
            //builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

            int      pageIndex;
            int      recordCount;
            int      pageSize   = Convert.ToInt32(ub.Get("SiteListNo"));
            string   strWhere   = string.Empty;
            string   strOrder   = string.Empty;
            string[] pageValUrl = { "uid", "ptype", "showtype", "ordertype", "backurl" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }

            //查询条件
            strWhere = "UsID=" + uid + "";
            if (showtype == 1)
            {
                strWhere += " and IsGood=1";
            }
            else if (showtype == 2)
            {
                strWhere += " and IsRecom=1";
            }

            strWhere += " and IsDel=0";

            //if (ordertype == 1)
            strOrder = "AddTime Desc";
            //else if (ordertype == 2)
            //    strOrder = "ReTime Desc";
            //else if (ordertype == 3)
            //    strOrder = "ReadNum Desc";
            //else if (ordertype == 4)
            //    strOrder = "ReplyNum Desc";

            // 开始读取列表
            IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTextsMe(pageIndex, pageSize, strWhere, strOrder, out recordCount);
            if (listText.Count > 0)
            {
                int k = 1;
                foreach (BCW.Model.Text n in listText)
                {
                    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("topic.aspx?forumid=" + n.ForumId + "&amp;bid={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, n.Title, DT.FormatDate(n.AddTime, 2));

                    k++;
                    builder.Append(Out.Tab("</div>", ""));
                }

                // 分页
                builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
            }
            else
            {
                builder.Append(Out.Div("div", "没有相关记录.."));
            }
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            if (showtype != 0)
            {
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">全部帖</a> ");
            }
            if (showtype != 1)
            {
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;showtype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">精华帖</a> ");
            }
            if (showtype != 2)
            {
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;showtype=2&amp;backurl=" + Utils.getPage(0) + "") + "\">推荐帖</a>");
            }
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-");
            builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">回帖</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else if (ptype == 2)
        {
            Master.Title = "查看回帖";
            int      pageIndex;
            int      recordCount;
            int      pageSize   = Convert.ToInt32(ub.Get("SiteListNo"));
            string   strWhere   = string.Empty;
            string   strOrder   = string.Empty;
            string[] pageValUrl = { "uid", "ptype", "forumid", "backurl" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }

            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>&gt;回帖");
            builder.Append(Out.Tab("</div>", "<br />"));

            //查询条件
            strWhere = "UsID=" + uid + "";
            if (meid != uid)
            {
                strWhere += " and ForumId<>88 and  ForumId<>100 and  ForumId<>14 and  ForumId<>99 and ForumId<>77";
            }


            strWhere += " and IsDel=0";

            strOrder = "ID Desc";

            // 开始读取列表
            IList <BCW.Model.Reply> listReply = new BCW.BLL.Reply().GetReplysMe(pageIndex, pageSize, strWhere, strOrder, out recordCount);
            if (listReply.Count > 0)
            {
                int k = 1;
                foreach (BCW.Model.Reply n in listReply)
                {
                    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("reply.aspx?act=view&amp;forumid=" + n.ForumId + "&amp;bid=" + n.Bid + "&amp;reid=" + n.Floor + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, Out.USB(TrueStrLength.cutTrueLength(n.Content, 20, "…")), DT.FormatDate(n.AddTime, 2));

                    k++;
                    builder.Append(Out.Tab("</div>", ""));
                }

                // 分页
                builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
            }
            else
            {
                builder.Append(Out.Div("div", "没有相关记录.."));
            }
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=3&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">按论坛查看回帖&gt;&gt;</a>");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-");
            builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">回帖</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else if (ptype == 3)
        {
            Master.Title = "查看回帖";
            int      pageIndex;
            int      recordCount;
            int      pageSize   = 4;
            string   strWhere   = "IsActive=0";
            string   strOrder   = string.Empty;
            string[] pageValUrl = { "uid", "ptype", "forumid", "backurl" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }
            int forumid = int.Parse(Utils.GetRequest("forumid", "get", 1, @"^[0-9]\d*$", "0"));
            if (forumid == 0)
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>&gt;回帖");
                builder.Append(Out.Tab("</div>", "<br />"));

                // 开始读取论坛
                IList <BCW.Model.Forum> listForum = new BCW.BLL.Forum().GetForums(pageIndex, pageSize, strWhere, out recordCount);
                if (listForum.Count > 0)
                {
                    int k = 1;
                    foreach (BCW.Model.Forum n in listForum)
                    {
                        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("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;forumid={0}&amp;backurl=" + Utils.getPage(0) + "") + "\">[{1}]</a>", n.ID, n.Title);
                        builder.Append("<br />参与" + new BCW.BLL.Reply().GetCount(uid, n.ID) + "回帖");
                        k++;
                        builder.Append(Out.Tab("</div>", ""));
                    }

                    // 分页
                    builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
                }
                else
                {
                    builder.Append(Out.Div("text", "没有相关记录"));
                }
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
                builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-");
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=1&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">帖子</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
            else
            {
                pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
                string BbsName = new BCW.BLL.Forum().GetTitle(forumid);
                if (BbsName == "")
                {
                    Utils.Error("不存在的论坛", "");
                }
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + uid + "") + "\">Ta的空间</a>&gt;" + BbsName + "回帖");
                builder.Append(Out.Tab("</div>", "<br />"));

                //查询条件
                strWhere = "UsID=" + uid + " and forumid=" + forumid + "";
                if (meid != uid)
                {
                    strWhere += " and ForumId<>88 and  ForumId<>100 and  ForumId<>14 and  ForumId<>99 and ForumId<>77";
                }

                if (showtype == 1)
                {
                    strWhere += " and IsGood=1";
                }

                strWhere += " and IsDel=0";

                strOrder = "ID Desc";

                // 开始读取列表
                IList <BCW.Model.Reply> listReply = new BCW.BLL.Reply().GetReplysMe(pageIndex, pageSize, strWhere, strOrder, out recordCount);
                if (listReply.Count > 0)
                {
                    int k = 1;
                    foreach (BCW.Model.Reply n in listReply)
                    {
                        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("reply.aspx?act=view&amp;forumid=" + forumid + "&amp;bid=" + n.Bid + "&amp;reid=" + n.Floor + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">{1}.{2}</a>{3}", n.ID, (pageIndex - 1) * pageSize + k, n.Content, DT.FormatDate(n.AddTime, 2));

                        k++;
                        builder.Append(Out.Tab("</div>", ""));
                    }

                    // 分页
                    builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
                }
                else
                {
                    builder.Append(Out.Div("div", "没有相关记录.."));
                }
                builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;forumid=" + forumid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">全部回帖</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=" + ptype + "&amp;uid=" + uid + "&amp;forumid=" + forumid + "&amp;showtype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">精华回帖</a> ");
                builder.Append(Out.Tab("</div>", ""));
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
                builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx?uid=" + uid + "") + "\">上级</a>-");
                builder.Append("<a href=\"" + Utils.getUrl("moreThread.aspx?ptype=2&amp;uid=" + uid + "&amp;backurl=" + Utils.getPage(0) + "") + "\">回帖</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
        }
    }
Beispiel #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string act = Utils.GetRequest("act", "all", 1, "", "");

        switch (act)
        {
        case "add":
        case "addin":
            AddPage(act, meid);
            break;

        case "addok":
            AddokPage(meid);
            break;

        case "save":
            SavePage(meid);
            break;

        case "edit":
            EditPage(meid);
            break;

        case "editsave":
            EditSavePage(meid);
            break;

        case "del":
            DelPage(meid);
            break;

        case "group":
            GroupPage(meid);
            break;

        case "addgroup":
            AddGroupPage(meid);
            break;

        case "groupsave":
            GroupSavePage(meid);
            break;

        case "editgroup":
            EditGroupPage(meid);
            break;

        case "editgroupsave":
            EditGroupSavePage(meid);
            break;

        case "delgroup":
            DelGroupPage(meid);
            break;

        case "list":
            ListPage(meid);
            break;

        case "view":
            ViewPage(meid);
            break;

        default:
            ReloadPage(meid);
            break;
        }
    }
Beispiel #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "推荐注册排行榜";
        int meid = new BCW.User.Users().GetUsId();
        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-2]\d*$", "0"));
        int Year = int.Parse(Utils.GetRequest("Year", "get", 1, @"^(?:19[3-9]\d|20[01]\d)$", "0"));
        int Month = int.Parse(Utils.GetRequest("Month", "get", 1, @"^(?:[0]?[1-9]|1[012])$", "0"));
        if (Year < 2010)
            Year = 0;

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        if (Year == 0 || Month == 0)
        {
            if (ptype == 0)
                builder.Append("总榜|");
            else
                builder.Append("<a href=\"" + Utils.getPage("recomuser.aspx?backurl=" + Utils.getPage(0) + "") + "\">总榜</a>|");

            if (ptype == 1)
                builder.Append("本月|");
            else
                builder.Append("<a href=\"" + Utils.getPage("recomuser.aspx?ptype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">本月</a>|");

            if (ptype == 2)
                builder.Append("上月");
            else
                builder.Append("<a href=\"" + Utils.getPage("recomuser.aspx?ptype=2&amp;backurl=" + Utils.getPage(0) + "") + "\">上月</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getPage("recomuser.aspx?backurl=" + Utils.getPage(0) + "") + "\">总榜</a>|" + Year + "年" + Month + "月");
            ptype = 3;
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        int pageIndex;
        int recordCount;
        int pageSize = 20;// Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = "";
        string[] pageValUrl = {"ptype", "Year", "Month", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
            pageIndex = 1;
        //查询条件
        if (ptype == 1)
            strWhere = "Year(RegTime)=" + DateTime.Now.Year + " and Month(RegTime)=" + DateTime.Now.Month + " and ";
        else if (ptype == 2)
        {
            DateTime ForDate = DateTime.Parse(DateTime.Now.AddMonths(-1).ToShortDateString());
            int ForYear = ForDate.Year;
            int ForMonth = ForDate.Month;
            strWhere = "Year(RegTime) = " + (ForYear) + " AND Month(RegTime) = " + (ForMonth) + " and ";
        }
        else if (ptype == 3)
            strWhere = "(Year(RegTime) = " + Year + ") AND (Month(RegTime) = " + Month + ") and ";

        strWhere += "InviteNum>0 and IsVerify=1";

        // 开始读取列表
        IList<BCW.Model.User> listUser = new BCW.BLL.User().GetInvites(pageIndex, pageSize, strWhere, out recordCount);
        if (listUser.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.User n in listUser)
            {
                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.Append("<a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(n.ID) + "(" + n.InviteNum + "人)</a>");

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }
            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 1));

        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        if (pageIndex == 1)
        {
            builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
            builder.Append("按月份查询:");
            builder.Append(Out.Tab("</div>", "<br />"));
            string strText = "年,月:,";
            string strName = "Year,Month,backurl";
            string strType = "snum,snum,hidden";
            string strValu = "" + DateTime.Now.Year + "'" + DateTime.Now.Month + "'" + Utils.getPage(0) + "";
            string strEmpt = "true,true,false";
            string strIdea = "";
            string strOthe = "查询,recomuser.aspx,get,3,red";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            if (meid > 0)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("您的推荐地址:<br /><a href=\"http://" + Utils.GetDomain() + "/reg-" + meid + ".aspx\">http://" + Utils.GetDomain() + "/reg-" + meid + ".aspx</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #12
0
    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 + "&amp;backurl=" + Utils.getPage(0) + "&amp;pn=" + (pn + 1) + "") + "\">下张</a> ");
                }
                if (pn > 1)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&amp;backurl=" + Utils.getPage(0) + "&amp;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 + "&amp;backurl=" + Utils.getPage(0) + "") + "\">&gt;&gt;返回查看商品</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 + "&amp;backurl=" + Utils.getPage(0) + "") + "\">[立即订购]</a>");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/favorites.aspx?act=addin&amp;backurl=" + Utils.PostPage(1) + "") + "\">[加入收藏]</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("shopdetail.aspx?id=" + id + "&amp;pover=1&amp;backurl=" + Utils.getPage(0) + "") + "\">[商品详情]</a>");
            builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=payment&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">[付款方式]</a>");

            builder.Append("<br /><a href=\"" + Utils.getUrl("shopbuy.aspx?act=recom&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">推荐本商品有奖&gt;&gt;</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
            //互动块记录
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("<a href=\"" + Utils.getUrl("shopbuy.aspx?act=info&amp;id=" + id + "&amp;ptype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">&gt;查看评价</a>.<a href=\"" + Utils.getUrl("shopbuy.aspx?act=info&amp;id=" + id + "&amp;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&amp;id=" + id + "&amp;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);
    }
Beispiel #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int VipLeven = BCW.User.Users.VipLeven(meid);

        if (VipLeven == 0)
        {
            Utils.Error("必须要是VIP会员才可以开庄", "");
        }

        int gid   = Utils.ParseInt(Utils.GetRequest("gid", "all", 2, @"^[0-9]*$", "竞猜ID无效"));
        int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "all", 1, @"^[1-2]$", "0"));

        TPR2.Model.guess.BaList model = new TPR2.BLL.guess.BaList().GetModel(gid);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.p_del == 1)
        {
            Utils.Error("不存在的记录", "");
        }
        //if (model.p_TPRtime <= DateTime.Now)
        //{
        //    Utils.Error("开赛时间已到,暂停开庄", "");
        //}

        Master.Title = model.p_one + "VS" + model.p_two;
        string ac = Utils.GetRequest("ac", "all", 1, "", "");

        if (Utils.ToSChinese(ac) == "确定开庄")
        {
            long payCent = Int64.Parse(Utils.GetRequest("payCent", "post", 2, @"^[1-9]\d*$", "接受投注总额填写错误"));

            long gold  = new BCW.BLL.User().GetGold(meid);
            long xCent = Convert.ToInt64(ub.GetSub("SitexCent", xmlPath));
            if (gold < xCent)
            {
                Utils.Error("自带的" + ub.Get("SiteBz") + "必须达到" + xCent + "才可以开庄", "");
            }
            if (gold < payCent)
            {
                Utils.Error("你的" + ub.Get("SiteBz") + "不足", "");
            }

            TPR2.Model.guess.BaListMe m = new TPR2.Model.guess.BaListMe();
            if (ptype == 1)
            {
                DateTime oncetime = DateTime.Now;
                int      p_ison   = Utils.ParseInt(Utils.GetRequest("p_ison", "post", 1, @"^[0-2]$", "0"));
                if (p_ison == 1)
                {
                    oncetime = Utils.ParseTime(Utils.GetRequest("oncetime", "post", 2, DT.RegexTime, "请正确填写封盘时间"));

                    if (Convert.ToDateTime(model.p_TPRtime) > oncetime)
                    {
                        Utils.Error("封盘时间应大于开赛时间", "");
                    }
                }
                else
                {
                    if (model.p_TPRtime <= DateTime.Now)
                    {
                        Utils.Error("开打的比赛必须选择走地模式来开庄", "");
                    }
                }
                //写入数据
                m.p_id       = model.p_id;
                m.p_title    = model.p_title;
                m.p_type     = model.p_type;
                m.p_one      = model.p_one;
                m.p_two      = model.p_two;
                m.p_pk       = model.p_pk;
                m.p_dx_pk    = model.p_dx_pk;
                m.p_pn       = model.p_pn;
                m.p_one_lu   = model.p_one_lu;
                m.p_two_lu   = model.p_two_lu;
                m.p_big_lu   = model.p_big_lu;
                m.p_small_lu = model.p_small_lu;
                m.p_bzs_lu   = model.p_bzs_lu;
                m.p_bzp_lu   = model.p_bzp_lu;
                m.p_bzx_lu   = model.p_bzx_lu;
                m.p_addtime  = DateTime.Now;
                m.p_TPRtime  = model.p_TPRtime;
                m.p_ison     = p_ison;//赔率标识(0自动更新|1走地|2固定赔率)
                m.p_del      = 0;
                m.usid       = meid;
                m.payCent    = payCent;

                int newId = new TPR2.BLL.guess.BaListMe().Add(m);
                if (p_ison == 1)
                {
                    new TPR2.BLL.guess.BaListMe().FootOnceType(newId, oncetime);
                }
                //同步即时比分
                BCW.Data.SqlHelper.ExecuteSql("update tb_BaListMe set p_result_temp1=" + model.p_result_temp1 + ",p_result_temp2=" + model.p_result_temp2 + " where id=" + newId + "");


                Utils.Success("开庄", "开庄成功..<br />" + Out.waplink(Utils.getUrl("kzlist.aspx"), "我的开庄列表") + "", Utils.getUrl("kzlist.aspx"), "1");
            }
            else
            {
                string   p_title   = Out.UBB(Utils.GetRequest("p_title", "post", 2, @"^[\u4e00-\u9fa5A-Za-z0-9_\-\s]+$", "请正确填写联赛名称"));
                DateTime p_TPRtime = Utils.ParseTime(Utils.GetRequest("p_TPRtime", "post", 2, DT.RegexTime, "请正确填写联赛时间"));
                string   p_one     = Out.UBB(Utils.GetRequest("p_one", "post", 2, @"^[\u4e00-\u9fa5A-Za-z0-9_\-\s\(\)]+$", "请正确填写上盘名称"));
                string   p_two     = Out.UBB(Utils.GetRequest("p_two", "post", 2, @"^[\u4e00-\u9fa5A-Za-z0-9_\-\s\(\)]+$", "请正确填写下盘名称"));


                decimal p_one_lu = Convert.ToDecimal(Utils.GetRequest("p_one_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写上盘赔率,小数点后保留1-2位"));
                decimal p_two_lu = Convert.ToDecimal(Utils.GetRequest("p_two_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写下盘赔率,小数点后保留1-2位"));

                decimal p_big_lu   = Convert.ToDecimal(Utils.GetRequest("p_big_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写大盘赔率,小数点后保留1-2位"));
                decimal p_small_lu = Convert.ToDecimal(Utils.GetRequest("p_small_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写小盘赔率,小数点后保留1-2位"));

                int     p_pn     = 0;
                decimal p_pk     = 0;
                decimal p_dx_pk  = 0;
                decimal p_bzs_lu = 0;
                decimal p_bzp_lu = 0;
                decimal p_bzx_lu = 0;

                if (model.p_type == 1)
                {//足球特征
                    p_pn    = Utils.ParseInt(Utils.GetRequest("p_pn", "post", 2, @"^[1-2]$", "请正确选择让球类型"));
                    p_pk    = Convert.ToDecimal(Utils.GetRequest("p_pk", "post", 2, @"^[0-9]{1,21}$", "请正确选择上下盘口"));
                    p_dx_pk = Convert.ToDecimal(Utils.GetRequest("p_dx_pk", "post", 2, @"^[0-9]{1,19}$", "请正确选择大小盘口"));
                    if (Request["p_bzs_lu"] != "")
                    {
                        p_bzs_lu = Convert.ToDecimal(Utils.GetRequest("p_bzs_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写主胜赔率,小数点后保留1-2位"));
                        p_bzp_lu = Convert.ToDecimal(Utils.GetRequest("p_bzp_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写平手赔率,小数点后保留1-2位"));
                        p_bzx_lu = Convert.ToDecimal(Utils.GetRequest("p_bzx_lu", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写客胜赔率,小数点后保留1-2位"));
                    }
                    else
                    {
                        p_bzs_lu = 0;
                        p_bzp_lu = 0;
                        p_bzx_lu = 0;
                    }
                }
                else
                {//篮球特征
                    p_pk    = Convert.ToDecimal(Utils.GetRequest("p_pk", "post", 2, @"^(-)?(\d)*(\.(\d){1})?$", "请正确填写上下盘口"));
                    p_dx_pk = Convert.ToDecimal(Utils.GetRequest("p_dx_pk", "post", 2, @"^(-)?(\d)*(\.(\d){1})?$", "请正确填写大小盘口"));
                }
                //写入数据
                m.p_id       = model.p_id;
                m.p_title    = p_title;
                m.p_type     = model.p_type;
                m.p_one      = p_one;
                m.p_two      = p_two;
                m.p_pk       = p_pk;
                m.p_dx_pk    = p_dx_pk;
                m.p_pn       = p_pn;
                m.p_one_lu   = p_one_lu;
                m.p_two_lu   = p_two_lu;
                m.p_big_lu   = p_big_lu;
                m.p_small_lu = p_small_lu;
                m.p_bzs_lu   = p_bzs_lu;
                m.p_bzp_lu   = p_bzp_lu;
                m.p_bzx_lu   = p_bzx_lu;
                m.p_addtime  = DateTime.Now;
                m.p_TPRtime  = p_TPRtime;
                m.p_ison     = 2;//赔率标识(0自动更新|1走地|2固定赔率)
                m.p_del      = 0;
                m.usid       = meid;
                m.payCent    = payCent;

                int newId = new TPR2.BLL.guess.BaListMe().Add(m);
                //同步即时比分
                BCW.Data.SqlHelper.ExecuteSql("update tb_BaListMe set p_result_temp1=" + model.p_result_temp1 + ",p_result_temp2=" + model.p_result_temp2 + " where id=" + newId + "");


                Utils.Success("开庄", "开庄成功..<br />" + Out.waplink(Utils.getUrl("kzlist.aspx"), "我的开庄列表") + "", Utils.getUrl("kzlist.aspx"), "1");
            }
        }
        else
        {
            if (ptype == 0)
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("我来坐庄:" + model.p_one + "VS" + model.p_two + "");
                builder.Append(Out.Tab("</div>", "<br />"));
                builder.Append(Out.Tab("<div class=\"text\">", ""));
                builder.Append(Out.waplink(Utils.getUrl("kzguess.aspx?gid=" + gid + "&amp;ptype=1"), "自动同步水位") + "<br />赔率与系统水位实时同步,节省您的时间<br />");
                builder.Append(Out.waplink(Utils.getUrl("kzguess.aspx?gid=" + gid + "&amp;ptype=2"), "固定水位开庄") + "<br />完全按照您设置的赔率开庄,当然您可以随时更新赔率<br />");
                builder.Append(Out.waplink(Utils.getPage("default.aspx"), "取消开庄") + "");
                builder.Append(Out.Tab("</div>", ""));
            }
            else if (ptype == 1)
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("我来坐庄:" + model.p_one + "VS" + model.p_two + "");
                builder.Append(Out.Tab("</div>", ""));

                string strText = "接受投注总额:/,,";
                string strName = "payCent,gid,ptype";
                string strType = "num,hidden,hidden";
                string strValu = "'" + gid + "'" + ptype + "";
                string strEmpt = "true,true,true";
                if (model.p_type == 1)
                {
                    strText += ",走地模式:,走地封盘时间:";
                    strName += ",p_ison,oncetime";
                    strType += ",select,date";
                    strValu += "'0'" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime).AddMinutes(100), 0) + "";
                    strEmpt += ",0|否|1|是,true";
                }

                string strIdea = "/系统不会扣除你的接受投注总额,买家下注时则通过计算赔付进行扣除相应的押金/";
                if (model.p_type == 1)
                {
                    strIdea += "当您选择走地模式时,必须填写走地封盘时间/";
                }
                string strOthe = string.Empty;
                //if (Utils.GetDomain().Contains("168yy.cc") || Utils.GetDomain().Contains("tl88.cc"))
                //    strOthe = "" + ub.Get("SiteBz") + "开庄|" + ub.Get("SiteBz2") + "开庄,kzguess.aspx,post,0,red|blue";
                //else
                strOthe = "确定开庄,kzguess.aspx,post,1,red";

                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            }
            else if (ptype == 2)
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("我来坐庄:" + model.p_one + "VS" + model.p_two + "");
                builder.Append(Out.Tab("</div>", ""));
                if (model.p_type == 1)
                {
                    string strText = "联赛名称,联赛时间,上盘名称,上盘赔率,下盘名称,下盘赔率,让球类型,上下盘口,大盘赔率,小盘赔率,大小盘口,标准主胜,标准平手,标准客胜,接受投注总额:/,,,";
                    string strName = "p_title,p_TPRtime,p_one,p_one_lu,p_two,p_two_lu,p_pn,p_pk,p_big_lu,p_small_lu,p_dx_pk,p_bzs_lu,p_bzp_lu,p_bzx_lu,payCent,ptype,gid,backurl";
                    string strType = "text,text,text,text,text,text,select,select,text,text,select,text,text,text,num,hidden,hidden,hidden";
                    string strValu = "" + model.p_title + "'" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime), 0) + "'" + model.p_one + "'" + Convert.ToDouble(model.p_one_lu) + "'" + model.p_two + "'" + Convert.ToDouble(model.p_two_lu) + "'" + model.p_pn + "'" + Convert.ToDouble(model.p_pk) + "'" + Convert.ToDouble(model.p_big_lu) + "'" + Convert.ToDouble(model.p_small_lu) + "'" + Convert.ToDouble(model.p_dx_pk) + "'" + Convert.ToDouble(model.p_bzs_lu) + "'" + Convert.ToDouble(model.p_bzp_lu) + "'" + Convert.ToDouble(model.p_bzx_lu) + "'0'" + ptype + "'" + gid + "'" + Utils.getPage(0) + "";
                    string strEmpt = "flase,false,false,false,false,false,1|让球|2|受让,1|平手|2|平手/半球|3|半球|4|半球/一球|5|一球|6|一球/球半|7|球半|8|球半/二球|9|二球|10|二球/二球半|11|二球半|12|二球半/三球|13|三球|14|三球/三球半|15|三球半|16|三球半/四球|17|四球|18|四球/四球半|19|四球半|20|四球半/五球|21|五球,true,true,20|0.5|21|0.5/1.0|22|1.0|23|1.0/1.5|1|1.5|2|1.5/2.0|3|2.0|4|2/2.5|5|2.5|6|2.5/3.0|7|3.0|8|3/3.5|9|3.5|10|3.5/4.0|11|4.0|12|4/4.5|13|4.5|14|4.5/5.0|15|5.0|16|5/5.5|17|5.5|18|5.5/6.0|19|6.0|24|6.0/6.5|25|6.5|26|6.5/7.0|27|7.0|28|7.0/7.5|29|7.5|30|7.5/8.0|31|8.0|32|8.0/8.5|33|8.5|34|8.5/9.0|35|9.0|36|9.0/9.5|37|9.5|38|9.5/10.0|39|10.0,true,true,true,false,true,true,false";
                    string strIdea = "/";
                    string strOthe = "";
                    //if (Utils.GetDomain().Contains("168yy.cc") || Utils.GetDomain().Contains("tl88.cc"))
                    //    strOthe = "" + ub.Get("SiteBz") + "开庄|" + ub.Get("SiteBz2") + "开庄,kzguess.aspx,post,0,red|blue";
                    //else
                    strOthe = "确定开庄,kzguess.aspx,post,1,red";

                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("系统不会扣除你的接受投注总额,买家下注时则通过计算赔付进行扣除相应的押金<br />赔率填写-1可隐藏某选项下注,即不可下注该选项!");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else
                {
                    string strText = "联赛名称,联赛时间,上盘名称,上盘赔率,下盘名称,下盘赔率,上下盘口,大盘赔率,小盘赔率,大小盘口,接受投注总额:/,,,";
                    string strName = "p_title,p_TPRtime,p_one,p_one_lu,p_two,p_two_lu,p_pk,p_big_lu,p_small_lu,p_dx_pk,payCent,ptype,gid,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,num,hidden,hidden,hidden";
                    string strValu = "" + model.p_title + "'" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime), 0) + "'" + model.p_one + "'" + Convert.ToDouble(model.p_one_lu) + "'" + model.p_two + "'" + Convert.ToDouble(model.p_two_lu) + "'" + Convert.ToDouble(model.p_pk) + "'" + Convert.ToDouble(model.p_big_lu) + "'" + Convert.ToDouble(model.p_small_lu) + "'" + Convert.ToDouble(model.p_dx_pk) + "'0'" + ptype + "'" + gid + "'" + Utils.getPage(0) + "";
                    string strEmpt = "flase,false,false,false,false,false,false,true,true,true,false,true,false,false";
                    string strIdea = "/";
                    string strOthe = string.Empty;
                    //if (Utils.GetDomain().Contains("168yy.cc") || Utils.GetDomain().Contains("tl88.cc"))
                    //    strOthe = "" + ub.Get("SiteBz") + "开庄|" + ub.Get("SiteBz2") + "开庄,kzguess.aspx,post,0,red|blue";
                    //else
                    strOthe = "确定开庄,kzguess.aspx,post,1,red";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("系统不会扣除你的接受投注总额,买家下注时则通过计算赔付进行扣除相应的押金<br />赔率填写-1可隐藏某选项下注,即不可下注该选项!");
                    builder.Append(Out.Tab("</div>", ""));
                }
            }
            if (ptype > 0)
            {
                builder.Append(Out.Tab("</div>", "<br />"));
                builder.Append(Out.waplink(Utils.getUrl("kzguess.aspx?gid=" + gid + "&amp;backurl=" + Utils.getPage(0) + ""), "&lt;&lt;切换开庄方式") + " ");
                builder.Append(Out.Tab("</div>", ""));
            }
            builder.Append(Out.Tab("<div>", Out.Hr()));
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=1"), "未开投注") + " ");
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=2"), "历史投注") + "<br />");
            builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + "");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-");
            builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-");
            builder.Append(Out.waplink(Utils.getUrl("/bbs/game/default.aspx"), "游戏") + "");
            builder.Append(Out.Tab("</div>", ""));
        }
    }
Beispiel #14
0
    private void UIDBuyPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        Master.Title = "兑换靓号";
        builder.Append(Out.Tab("<div class=\"title\">兑换靓号</div>", ""));
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info == "ok" || info == "ok2")
        {
            int uid = int.Parse(Utils.GetRequest("uid", "post", 2, @"^[1-9]\d*$", "请输入4-8位的ID进行查找"));

            if (uid < 1000 || uid > 99999999)
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("输入4-8位的ID进行查找!<br /><a href=\"" + Utils.getUrl("sellnum.aspx?act=uidbuy&amp;backurl=" + Utils.getPage(0) + "") + "\">&lt;&lt;重新查找</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
            else
            {
                if (new BCW.BLL.SellNum().Exists(0, uid, 3))
                {
                    Utils.Error("此靓号已被别人抢先兑换了", "");
                }
                else if (new BCW.BLL.User().Exists(uid))
                {
                    builder.Append(Out.Tab("<div>", ""));
                    builder.Append("很遗憾!您输入的ID" + uid + "已被他人使用!<br /><a href=\"" + Utils.getUrl("sellnum.aspx?act=uidbuy&amp;backurl=" + Utils.getPage(0) + "") + "\">&lt;&lt;重新查找</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else
                {
                    if (info == "ok")
                    {
                        builder.Append(Out.Tab("<div>", ""));
                        builder.Append("恭喜!你查找的ID:" + uid + "未被使用<br />喜欢这个靓号吗?点击下一步查询所需花费的" + ub.Get("SiteBz") + "");
                        builder.Append(Out.Tab("</div>", "<br />"));
                        string strName = "uid,act,info,backurl";
                        string strValu = "" + uid + "'uidbuy'ok2'" + Utils.getPage(0) + "";
                        string strOthe = "下一步,sellnum.aspx,post,0,red";

                        builder.Append(Out.wapform(strName, strValu, strOthe));
                        builder.Append(Out.Tab("<div>", "<br />"));
                        builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidbuy&amp;backurl=" + Utils.getPage(0) + "") + "\">&lt;&lt;换个更靓的</a>");
                        builder.Append(Out.Tab("</div>", ""));
                    }
                    else if (info == "ok2")
                    {
                        //int myVipLeven = BCW.User.Users.VipLeven(meid);
                        //if (myVipLeven == 0)
                        //{
                        //    Utils.Error("必须是VIP会员才能继续...<br /><a href=\"" + Utils.getUrl("/bbs/finance.aspx?act=addvip&amp;backurl=" + Utils.PostPage(1) + "") + "\">马上开通VIP会员&gt;&gt;</a>", "");
                        //}

                        if (new BCW.BLL.SellNum().GetCount(0, meid) >= 5)
                        {
                            Utils.Error("每ID每天只能查询5次报价...", "");
                        }
                        //if (new BCW.BLL.SellNum().Exists(0, uid, 1))
                        //{
                        //    Utils.Error("ID:" + uid + "已被提交给系统...", "");
                        //}

                        long    Price = 0;
                        int     State = 1;
                        DataSet ds    = new BCW.BLL.SellNum().GetList("Price", "BuyUID=" + uid + " and State=2");
                        if (ds != null && ds.Tables[0].Rows.Count > 0)
                        {
                            Price = Int64.Parse(ds.Tables[0].Rows[0]["Price"].ToString());
                            State = 2;
                        }

                        string            mename = new BCW.BLL.User().GetUsName(meid);
                        BCW.Model.SellNum model  = new BCW.Model.SellNum();
                        model.Types   = 0;
                        model.UsID    = meid;
                        model.UsName  = mename;
                        model.BuyUID  = uid;
                        model.Price   = Price;
                        model.State   = State;
                        model.AddTime = DateTime.Now;
                        new BCW.BLL.SellNum().Add(model);

                        //动态记录
                        new BCW.BLL.Action().Add(meid, mename, "在[URL=/bbs/spaceapp/sellnum.aspx?act=uidbuy]兑换靓号处[/URL]查询靓号ID" + uid + "的价格");

                        //发信息通知管理员
                        if (State == 1)
                        {
                            new BCW.BLL.Guest().Add(10086, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]查询ID" + uid + "的价格,请进入后台处理");
                            new BCW.BLL.Guest().Add(19611, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]查询ID" + uid + "的价格,请进入后台处理");
                            //if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th"))
                            //{
                            //    new BCW.BLL.Guest().Add(1010, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]查询ID" + uid + "的价格,请进入后台处理");
                            //}
                            Utils.Success("靓号", "靓号提交成功,系统正在计算所需花费的的" + ub.Get("SiteBz") + ",请等待系统回复...", Utils.getUrl("sellnum.aspx?act=uidlist"), "2");
                        }
                        else
                        {
                            Utils.Success("靓号", "靓号提交成功,系统报价" + Price + "" + ub.Get("SiteBz") + ",正在进入靓号记录...", Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=2"), "2");
                        }
                    }
                }
            }
        }
        else
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("人靠衣装马靠鞍,ID号也一样哦~");
            builder.Append(Out.Tab("</div>", "<br />"));
            string strText = "输入你喜欢的ID(4-8位):/,,,,";
            string strName = "uid,act,info,backurl";
            string strType = "num,hidden,hidden,hidden";
            string strValu = "'uidbuy'ok'" + Utils.PostPage(1) + "";
            string strEmpt = "true,false,false,false";
            string strIdea = "";
            string strOthe = "查找,sellnum.aspx,post,3,red";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist") + "\">我的靓号记录</a><br />");
            builder.Append("温馨提示:<br />在兑换成功7天内可以用支出" + ub.Get("SiteBz") + "的ID内线<a href=\"" + Utils.getUrl("/bbs/guest.aspx?act=add&amp;hid=10086") + "\">客服(10086)</a>把现用的ID资料(包括发帖、回帖、" + ub.Get("SiteBz") + "等)全部转移到兑换的新ID中,超过7天不再受理.");
            builder.Append(Out.Tab("</div>", ""));
        }

        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("../uinfo.aspx") + "\">上级</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("../uinfo.aspx") + "\">空间</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #15
0
    /// <summary>
    /// 开奖填写页
    /// </summary>
    /// <param name="forumid"></param>
    private void OpenPage(int forumid)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string GsAdminID = ub.GetSub("BbsGsAdminID", xmlPath);

        if (!("#" + GsAdminID + "#").Contains("#" + meid + "#"))
        {
            Utils.Error("权限不足", "");
        }
        DateTime GsStopTime = Utils.ParseTime(ub.GetSub("BbsGsStopTime", xmlPath));
        int      GsqiNum    = Utils.ParseInt(ub.GetSub("BbsGsqiNum", xmlPath));

        if (GsqiNum == 0)
        {
            Utils.Error("本期尚未设置", "");
        }
        if (GsStopTime > DateTime.Now)
        {
            //Utils.Error("本期第" + GsqiNum + "期截止时间" + GsStopTime + ",截止时间未到不能开奖", "");
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">" + new BCW.BLL.Forum().GetTitle(forumid) + "</a>");
        builder.Append("&gt;&gt;开奖");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("<b>第" + ub.GetSub("BbsGsqiNum", xmlPath) + "期开奖</b>");
        builder.Append(Out.Tab("</div>", ""));

        string qiNum = Utils.GetRequest("qiNum", "all", 2, @"^[0-9]\d*$", "期数错误");
        string info  = Utils.GetRequest("info", "all", 1, "", "");

        if (info != "ok")
        {
            string strText = "平.码1:,平.码2:,平.码3:,平.码4:,平.码5:,平.码6:,特别号码:,,,,";
            string strName = "pNum1,pNum2,pNum3,pNum4,pNum5,pNum6,sNum,forumid,qiNum,act,info";
            string strType = "num,num,num,num,num,num,num,hidden,hidden,hidden,hidden";
            string strValu = "'''''''" + forumid + "'" + qiNum + "'open'ok";
            string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false";
            string strIdea = "/";
            string strOthe = "确定开奖|reset,Gsopen.aspx,post,1,red|blue";

            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("Gsopen.aspx?forumid=" + forumid + "") + "\">返回上级</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("manwork.aspx?forumid=" + forumid + "") + "\">&lt;&lt;返回版务</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            string sNum  = Utils.GetRequest("sNum", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "特别号码填写错误");
            string pNum1 = Utils.GetRequest("pNum1", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码1填写错误");
            string pNum2 = Utils.GetRequest("pNum2", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码2填写错误");
            string pNum3 = Utils.GetRequest("pNum3", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码3填写错误");
            string pNum4 = Utils.GetRequest("pNum4", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码4填写错误");
            string pNum5 = Utils.GetRequest("pNum5", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码5填写错误");
            string pNum6 = Utils.GetRequest("pNum6", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码6填写错误");
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("请确定第" + qiNum + "期开奖结果:<br />" + pNum1 + "-" + pNum2 + "-" + pNum3 + "-" + pNum4 + "-" + pNum5 + "-" + pNum6 + "特" + sNum + "");
            builder.Append(Out.Tab("</div>", "<br />"));
            string strName = "sNum,pNum1,pNum2,pNum3,pNum4,pNum5,pNum6,forumid,act,qiNum,backurl";
            string strValu = "" + sNum + "'" + pNum1 + "'" + pNum2 + "'" + pNum3 + "'" + pNum4 + "'" + pNum5 + "'" + pNum6 + "'" + forumid + "'opensave'" + qiNum + "'" + Utils.getPage(0) + "";
            string strOthe = "确认开奖,Gsopen.aspx,post,0,red";
            builder.Append(Out.wapform(strName, strValu, strOthe));

            builder.Append(Out.Tab("<div>", " "));
            builder.Append(" <a href=\"" + Utils.getUrl("Gsopen.aspx?act=open&amp;forumid=" + forumid + "&amp;qiNum=" + qiNum + "") + "\">取消</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
    }
Beispiel #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }


        if (meid != 10086 && meid != 19611 && meid != 112233)
        {
            Utils.Error("不存在的页面", "");
        }

        Master.Title = "虚拟49选1设置";
        builder.Append(Out.Tab("", ""));
        int    ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[0-9]\d*$", "0"));
        string ac    = Utils.GetRequest("ac", "all", 1, "", "");
        string act   = Utils.GetRequest("act", "all", 1, "", "");

        if (act == "list")
        {
            ListPage();
        }
        else if (act == "view")
        {
            ViewPage();
        }
        else if (act == "stat")
        {
            StatPage();
        }
        else
        {
            ub     xml     = new ub();
            string xmlPath = "/Controls/six.xml";
            Application.Remove(xmlPath); //清缓存
            xml.ReloadSub(xmlPath);      //加载配置
            if (Utils.ToSChinese(ac) == "确定修改")
            {
                if (ptype == 1)
                {
                    Utils.Error("不存在的记录", "");

                    string Name      = Utils.GetRequest("Name", "post", 2, @"^[^\^]{1,20}$", "系统名称限1-20字内");
                    string Logo      = Utils.GetRequest("Logo", "post", 3, @"^[^\^]{1,200}$", "Logo地址限200字内");
                    string Status    = Utils.GetRequest("Status", "post", 2, @"^[0-1]$", "系统状态选择错误");
                    string BeforeMin = Utils.GetRequest("BeforeMin", "post", 2, @"^[0-9]\d*$", "开奖前N分钟截止下注填写错误");
                    string Expir     = Utils.GetRequest("Expir", "post", 2, @"^[0-9]\d*$", "下注防刷时间填写错误");
                    string SystemUbb = Utils.GetRequest("SystemUbb", "post", 3, @"^[\s\S]{1,10000}$", "界面Ubb限10000字内");

                    xml.dss["SixName"]      = Name;
                    xml.dss["SixLogo"]      = Logo;
                    xml.dss["SixStatus"]    = Status;
                    xml.dss["SixBeforeMin"] = BeforeMin;
                    xml.dss["SixExpir"]     = Expir;
                    xml.dss["SixSystemUbb"] = SystemUbb;
                }
                else if (ptype == 2)
                {
                    string TM   = Utils.GetRequest("TM", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "特.码赔率填写错误");
                    string DS   = Utils.GetRequest("DS", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "单赔率填写错误");
                    string DX   = Utils.GetRequest("DX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "大赔率填写错误");
                    string DS2  = Utils.GetRequest("DS2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "双赔率填写错误");
                    string DX2  = Utils.GetRequest("DX2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "小赔率填写错误");
                    string BS   = Utils.GetRequest("BS", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "波色赔率填写错误");
                    string SX   = Utils.GetRequest("SX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "生肖赔率填写错误");
                    string QS   = Utils.GetRequest("QS", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "家禽生肖赔率填写错误");
                    string QS2  = Utils.GetRequest("QS2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "野兽生肖赔率填写错误");
                    string HDS  = Utils.GetRequest("HDS", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "合数合单赔率填写错误");
                    string HDS2 = Utils.GetRequest("HDS2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "合数合双赔率填写错误");
                    string HDX  = Utils.GetRequest("HDX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "合数合大赔率填写错误");
                    string HDX2 = Utils.GetRequest("HDX2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "合数合小赔率填写错误");
                    string SIX  = Utils.GetRequest("SIX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "六肖赔率填写错误");
                    string WX   = Utils.GetRequest("WX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "五行赔率填写错误");
                    string TL   = Utils.GetRequest("TL", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "特连赔率填写错误");
                    string SZS  = Utils.GetRequest("SZS", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "三中三赔率填写错误");
                    string SZE  = Utils.GetRequest("SZE", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "三中二赔率填写错误");
                    string SZE2 = Utils.GetRequest("SZE2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "三中二2赔率填写错误");
                    string EZE  = Utils.GetRequest("EZE", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "二中二赔率填写错误");
                    string YX   = Utils.GetRequest("YX", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "平肖赔率填写错误");
                    string DP   = Utils.GetRequest("DP", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "独平赔率填写错误");
                    string DW   = Utils.GetRequest("DW", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "独尾赔率填写错误");
                    string PTLX = Utils.GetRequest("PTLX", "post", 3, @"^(\d)*(\.(\d){0,2})?$", "平特两肖赔率填写错误");
                    string WBZ  = Utils.GetRequest("WBZ", "post", 3, @"^(\d)*(\.(\d){0,2})?$", "五不中赔率填写错误");
                    xml.dss["SixTM"]   = TM;
                    xml.dss["SixDS"]   = DS;
                    xml.dss["SixDX"]   = DX;
                    xml.dss["SixDS2"]  = DS2;
                    xml.dss["SixDX2"]  = DX2;
                    xml.dss["SixBS"]   = BS;
                    xml.dss["SixSX"]   = SX;
                    xml.dss["SixQS"]   = QS;
                    xml.dss["SixQS2"]  = QS2;
                    xml.dss["SixHDS"]  = HDS;
                    xml.dss["SixHDS2"] = HDS2;
                    xml.dss["SixHDX"]  = HDX;
                    xml.dss["SixHDX2"] = HDX2;
                    xml.dss["SixSIX"]  = SIX;
                    xml.dss["SixWX"]   = WX;
                    xml.dss["SixTL"]   = TL;
                    xml.dss["SixSZS"]  = SZS;
                    xml.dss["SixSZE"]  = SZE;
                    xml.dss["SixSZE2"] = SZE2;
                    xml.dss["SixEZE"]  = EZE;
                    xml.dss["SixYX"]   = YX;
                    xml.dss["SixDP"]   = DP;
                    xml.dss["SixDW"]   = DW;
                    xml.dss["SixPTLX"] = PTLX;
                    xml.dss["SixWBZ"]  = WBZ;
                }
                else if (ptype == 3)
                {
                    string T0 = Utils.GetRequest("T0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "0头赔率填写错误");
                    string T1 = Utils.GetRequest("T1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "1头赔率填写错误");
                    string T2 = Utils.GetRequest("T2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "2头赔率填写错误");
                    string T3 = Utils.GetRequest("T3", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "3头赔率填写错误");
                    string T4 = Utils.GetRequest("T4", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "4头赔率填写错误");
                    xml.dss["SixT0"] = T0;
                    xml.dss["SixT1"] = T1;
                    xml.dss["SixT2"] = T2;
                    xml.dss["SixT3"] = T3;
                    xml.dss["SixT4"] = T4;
                }
                else if (ptype == 4)
                {
                    string W0 = Utils.GetRequest("W0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "0尾赔率填写错误");
                    string W1 = Utils.GetRequest("W1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "1尾赔率填写错误");
                    string W2 = Utils.GetRequest("W2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "2尾赔率填写错误");
                    string W3 = Utils.GetRequest("W3", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "3尾赔率填写错误");
                    string W4 = Utils.GetRequest("W4", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "4尾赔率填写错误");
                    string W5 = Utils.GetRequest("W5", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "5尾赔率填写错误");
                    string W6 = Utils.GetRequest("W6", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "6尾赔率填写错误");
                    string W7 = Utils.GetRequest("W7", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "7尾赔率填写错误");
                    string W8 = Utils.GetRequest("W8", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "8尾赔率填写错误");
                    string W9 = Utils.GetRequest("W9", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "9尾赔率填写错误");
                    xml.dss["SixW0"] = W0;
                    xml.dss["SixW1"] = W1;
                    xml.dss["SixW2"] = W2;
                    xml.dss["SixW3"] = W3;
                    xml.dss["SixW4"] = W4;
                    xml.dss["SixW5"] = W5;
                    xml.dss["SixW6"] = W6;
                    xml.dss["SixW7"] = W7;
                    xml.dss["SixW8"] = W8;
                    xml.dss["SixW9"] = W9;
                }
                else if (ptype == 8)
                {
                    string PW0 = Utils.GetRequest("PW0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "0尾赔率填写错误");
                    string PW1 = Utils.GetRequest("PW1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "1尾赔率填写错误");
                    string PW2 = Utils.GetRequest("PW2", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "2尾赔率填写错误");
                    string PW3 = Utils.GetRequest("PW3", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "3尾赔率填写错误");
                    string PW4 = Utils.GetRequest("PW4", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "4尾赔率填写错误");
                    string PW5 = Utils.GetRequest("PW5", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "5尾赔率填写错误");
                    string PW6 = Utils.GetRequest("PW6", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "6尾赔率填写错误");
                    string PW7 = Utils.GetRequest("PW7", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "7尾赔率填写错误");
                    string PW8 = Utils.GetRequest("PW8", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "8尾赔率填写错误");
                    string PW9 = Utils.GetRequest("PW9", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "9尾赔率填写错误");
                    xml.dss["SixPW0"] = PW0;
                    xml.dss["SixPW1"] = PW1;
                    xml.dss["SixPW2"] = PW2;
                    xml.dss["SixPW3"] = PW3;
                    xml.dss["SixPW4"] = PW4;
                    xml.dss["SixPW5"] = PW5;
                    xml.dss["SixPW6"] = PW6;
                    xml.dss["SixPW7"] = PW7;
                    xml.dss["SixPW8"] = PW8;
                    xml.dss["SixPW9"] = PW9;
                }
                else if (ptype == 5)
                {
                    string Red0   = Utils.GetRequest("Red0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "红单赔率填写错误");
                    string Red1   = Utils.GetRequest("Red1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "红双赔率填写错误");
                    string Blue0  = Utils.GetRequest("Blue0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "蓝单赔率填写错误");
                    string Blue1  = Utils.GetRequest("Blue1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "蓝双赔率填写错误");
                    string Green0 = Utils.GetRequest("Green0", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "绿单赔率填写错误");
                    string Green1 = Utils.GetRequest("Green1", "post", 2, @"^(\d)*(\.(\d){0,2})?$", "绿双赔率填写错误");
                    xml.dss["SixRed0"]   = Red0;
                    xml.dss["SixRed1"]   = Red1;
                    xml.dss["SixBlue0"]  = Blue0;
                    xml.dss["SixBlue1"]  = Blue1;
                    xml.dss["SixGreen0"] = Green0;
                    xml.dss["SixGreen1"] = Green1;
                }
                else if (ptype == 6)
                {
                    string red   = Utils.GetRequest("red", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string blue  = Utils.GetRequest("blue", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string green = Utils.GetRequest("green", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string gold  = Utils.GetRequest("gold", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string wood  = Utils.GetRequest("wood", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string water = Utils.GetRequest("water", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string fire  = Utils.GetRequest("fire", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    string soil  = Utils.GetRequest("soil", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    for (int i = 1; i <= 12; i++)
                    {
                        xml.dss["Sixsx" + i + ""] = Utils.GetRequest("sx" + i + "", "post", 2, @"^[^\#]{1,2}(?:\#[^\#]{1,2}){0,100}$", "号码请用#分开");
                    }
                    xml.dss["Sixred"]   = red;
                    xml.dss["Sixblue"]  = blue;
                    xml.dss["Sixgreen"] = green;
                    xml.dss["Sixgold"]  = gold;
                    xml.dss["Sixwood"]  = wood;
                    xml.dss["Sixwater"] = water;
                    xml.dss["Sixfire"]  = fire;
                    xml.dss["Sixsoil"]  = soil;
                }
                else if (ptype == 7)
                {
                    string SmallPay   = Utils.GetRequest("SmallPay", "post", 2, @"^[0-9]\d*$", "最小" + ub.Get("SiteBz") + "下注额填写错误");
                    string BigPay     = Utils.GetRequest("BigPay", "post", 2, @"^[0-9]\d*$", "最大" + ub.Get("SiteBz") + "下注额填写错误");
                    string SmallPay2  = Utils.GetRequest("SmallPay2", "post", 2, @"^[0-9]\d*$", "最小" + ub.Get("SiteBz2") + "下注额填写错误");
                    string BigPay2    = Utils.GetRequest("BigPay2", "post", 2, @"^[0-9]\d*$", "最大" + ub.Get("SiteBz2") + "下注额填写错误");
                    string IDPayCents = Utils.GetRequest("IDPayCents", "post", 2, @"^[0-9]\d*$", "每ID每期下注" + ub.Get("SiteBz") + "上限填写错误");
                    string PayCents   = Utils.GetRequest("PayCents", "post", 2, @"^[0-9]\d*$", "每期下注" + ub.Get("SiteBz") + "上限填写错误");
                    xml.dss["SixSmallPay"]   = SmallPay;
                    xml.dss["SixBigPay"]     = BigPay;
                    xml.dss["SixSmallPay2"]  = SmallPay2;
                    xml.dss["SixBigPay2"]    = BigPay2;
                    xml.dss["SixIDPayCents"] = IDPayCents;
                    xml.dss["SixPayCents"]   = PayCents;
                }
                else if (ptype == 9)
                {
                    for (int i = 1; i <= 49; i++)
                    {
                        string TM = Utils.GetRequest("TM" + i + "", "post", 3, @"^(\d)*(\.(\d){0,2})?$", "特.码赔率" + i + "填写错误");
                        xml.dss["SixTM" + i + ""] = Request["TM" + i + ""];
                    }
                }
                else if (ptype == 10)
                {
                    for (int i = 1; i <= 12; i++)
                    {
                        string XX = Utils.GetRequest("XX" + i + "", "post", 3, @"^(\d)*(\.(\d){0,2})?$", "生肖赔率" + i + "填写错误");
                        xml.dss["SixXX" + i + ""] = Request["XX" + i + ""];
                    }
                }
                else if (ptype == 11)
                {
                    for (int i = 1; i <= 49; i++)
                    {
                        string TMSX = Utils.GetRequest("TMSX" + i + "", "post", 3, @"^(\d)*(\.(\d){0,2})?$", "特.码上限" + i + "填写错误");
                        xml.dss["SixTMSX" + i + ""] = Request["TMSX" + i + ""];
                    }
                }
                System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
                Utils.Success("虚拟投注设置", "设置成功,正在返回..", Utils.getUrl("sixset.aspx?ptype=" + ptype + "&amp;backurl=" + Utils.getPage(0) + ""), "1");
            }
            else
            {
                builder.Append(Out.Div("title", "投注系统设置"));

                if (ptype == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                    builder.Append("帐户实时" + ub.Get("SiteBz") + "" + new BCW.BLL.User().GetGold(6655) + "<br />");

                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=list&amp;backurl=" + Utils.getPage(0) + "") + "\">每期记录</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?act=stat&amp;backurl=" + Utils.getPage(0) + "") + "\">每月赢利</a><br />");
                    //builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">投注配置</a>");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=2&amp;backurl=" + Utils.getPage(0) + "") + "\">基本赔率</a><br />");

                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=9&amp;backurl=" + Utils.getPage(0) + "") + "\">特.码赔率</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=10&amp;backurl=" + Utils.getPage(0) + "") + "\">生肖赔率</a><br />");

                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=3&amp;backurl=" + Utils.getPage(0) + "") + "\">特头赔率</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=4&amp;backurl=" + Utils.getPage(0) + "") + "\">特尾赔率</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=8&amp;backurl=" + Utils.getPage(0) + "") + "\">平特尾赔率</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=5&amp;backurl=" + Utils.getPage(0) + "") + "\">半波赔率</a><br />");
                    //builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=6&amp;backurl=" + Utils.getPage(0) + "") + "\">属性配置</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=7&amp;backurl=" + Utils.getPage(0) + "") + "\">上限配置</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?ptype=11&amp;backurl=" + Utils.getPage(0) + "") + "\">特.码上限</a>");
                    //builder.Append("<a href=\"" + Utils.getUrl("spkadminset.aspx?ptype=7&amp;backurl=" + Utils.PostPage(true) + "") + "\">闲聊管理员</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }

                else if (ptype == 1)
                {
                    string strText = "系统名称:/,系统Logo(可留空):/,系统状态:/,开奖前N分钟截止下注(分钟):/,下注仿刷(秒):/,界面Ubb:/,,";
                    string strName = "Name,Logo,Status,BeforeMin,Expir,SystemUbb,ptype,backurl";
                    string strType = "text,text,select,num,num,big,hidden,hidden";
                    string strValu = "" + xml.dss["SixName"] + "'" + xml.dss["SixLogo"] + "'" + xml.dss["SixStatus"] + "'" + xml.dss["SixBeforeMin"] + "'" + xml.dss["SixExpir"] + "'" + xml.dss["SixSystemUbb"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,true,0|正常|1|维护,false,false,true,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 2)
                {
                    string strText = "特.码赔率:/,特.码单:/,特.码双:/,特.码大:/,特.码小:/,特.码波色:/,特.码生肖:/,家禽生肖:/,野兽生肖:/,合数合单:/,合数合双:/,合数合大:/,合数合小:/,六肖:/,五行:/,特连:/,平.码三中三:/,平.码三中二(中二):/,平.码三中二(中三):/,平.码二中二:/,平特一肖:/,独平:/,平特尾:/,平特两肖:/,五号码不中:/,,";
                    string strName = "TM,DS,DS2,DX,DX2,BS,SX,QS,QS2,HDS,HDS2,HDX,HDX2,SIX,WX,TL,SZS,SZE,SZE2,EZE,YX,DP,DW,PTLX,WBZ,ptype,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixTM"] + "'" + xml.dss["SixDS"] + "'" + xml.dss["SixDS2"] + "'" + xml.dss["SixDX"] + "'" + xml.dss["SixDX2"] + "'" + xml.dss["SixBS"] + "'" + xml.dss["SixSX"] + "'" + xml.dss["SixQS"] + "'" + xml.dss["SixQS2"] + "'" + xml.dss["SixHDS"] + "'" + xml.dss["SixHDS2"] + "'" + xml.dss["SixHDX"] + "'" + xml.dss["SixHDX2"] + "'" + xml.dss["SixSIX"] + "'" + xml.dss["SixWX"] + "'" + xml.dss["SixTL"] + "'" + xml.dss["SixSZS"] + "'" + xml.dss["SixSZE"] + "'" + xml.dss["SixSZE2"] + "'" + xml.dss["SixEZE"] + "'" + xml.dss["SixYX"] + "'" + xml.dss["SixDP"] + "'" + xml.dss["SixDW"] + "'" + xml.dss["SixPTLX"] + "'" + xml.dss["SixWBZ"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("温馨提示:赔率支持使用小数,如1.82");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 3)
                {
                    string strText = "=特头赔率配置=/0头:,1头:,2头:,3头:,4头:,,";
                    string strName = "T0,T1,T2,T3,T4,ptype,backurl";
                    string strType = "text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixT0"] + "'" + xml.dss["SixT1"] + "'" + xml.dss["SixT2"] + "'" + xml.dss["SixT3"] + "'" + xml.dss["SixT4"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 4)
                {
                    string strText = "=特尾赔率配置=/0尾:,1尾:,2尾:,3尾:,4尾:,5尾:,6尾:,7尾:,8尾:,9尾:,,";
                    string strName = "W0,W1,W2,W3,W4,W5,W6,W7,W8,W9,ptype,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixW0"] + "'" + xml.dss["SixW1"] + "'" + xml.dss["SixW2"] + "'" + xml.dss["SixW3"] + "'" + xml.dss["SixW4"] + "'" + xml.dss["SixW5"] + "'" + xml.dss["SixW6"] + "'" + xml.dss["SixW7"] + "'" + xml.dss["SixW8"] + "'" + xml.dss["SixW9"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 8)
                {
                    string strText = "=平特尾赔率配置=/0尾:,1尾:,2尾:,3尾:,4尾:,5尾:,6尾:,7尾:,8尾:,9尾:,,";
                    string strName = "PW0,PW1,PW2,PW3,PW4,PW5,PW6,PW7,PW8,PW9,ptype,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixPW0"] + "'" + xml.dss["SixPW1"] + "'" + xml.dss["SixPW2"] + "'" + xml.dss["SixPW3"] + "'" + xml.dss["SixPW4"] + "'" + xml.dss["SixPW5"] + "'" + xml.dss["SixPW6"] + "'" + xml.dss["SixPW7"] + "'" + xml.dss["SixPW8"] + "'" + xml.dss["SixPW9"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 5)
                {
                    string strText = "=半波赔率配置=/红单:,红双:,蓝单:,蓝双:,绿单:,绿双:,,";
                    string strName = "Red0,Red1,Blue0,Blue1,Green0,Green1,ptype,backurl";
                    string strType = "text,text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixRed0"] + "'" + xml.dss["SixRed1"] + "'" + xml.dss["SixBlue0"] + "'" + xml.dss["SixBlue1"] + "'" + xml.dss["SixGreen0"] + "'" + xml.dss["SixGreen1"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 6)
                {
                    string strText = "=生肖对照表=/鼠:,牛:,虎:,兔:,龙:,蛇:,马:,羊:,猴:,鸡:,狗:,猪:,=波色对照=/红波:/,蓝波:/,绿波:/,=五行对照=/金数:/,木数:/,水数:/,火数:/,土数:/,,";
                    string strName = "sx1,sx2,sx3,sx4,sx5,sx6,sx7,sx8,sx9,sx10,sx11,sx12,red,blue,green,gold,wood,water,fire,soil,ptype,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,text,text,textarea,textarea,textarea,textarea,textarea,textarea,textarea,textarea,hidden,hidden";
                    string strValu = "" + xml.dss["Sixsx1"] + "'" + xml.dss["Sixsx2"] + "'" + xml.dss["Sixsx3"] + "'" + xml.dss["Sixsx4"] + "'" + xml.dss["Sixsx5"] + "'" + xml.dss["Sixsx6"] + "'" + xml.dss["Sixsx7"] + "'" + xml.dss["Sixsx8"] + "'" + xml.dss["Sixsx9"] + "'" + xml.dss["Sixsx10"] + "'" + xml.dss["Sixsx11"] + "'" + xml.dss["Sixsx12"] + "'" + xml.dss["Sixred"] + "'" + xml.dss["Sixblue"] + "'" + xml.dss["Sixgreen"] + "'" + xml.dss["Sixgold"] + "'" + xml.dss["Sixwood"] + "'" + xml.dss["Sixwater"] + "'" + xml.dss["Sixfire"] + "'" + xml.dss["Sixsoil"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("温馨提示:号码之间必须使用#分开");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 7)
                {
                    string strText = "=下注限制配置=/下注最小" + ub.Get("SiteBz") + ":/,下注最大" + ub.Get("SiteBz") + ":/,下注最小" + ub.Get("SiteBz2") + ":/,下注最大" + ub.Get("SiteBz2") + ":/,每ID每期下注" + ub.Get("SiteBz") + "上限:/,每期下注" + ub.Get("SiteBz") + "上限:/,,";
                    string strName = "SmallPay,BigPay,SmallPay2,BigPay2,IDPayCents,PayCents,ptype,backurl";
                    string strType = "num,num,num,num,num,num,hidden,hidden";
                    string strValu = "" + xml.dss["SixSmallPay"] + "'" + xml.dss["SixBigPay"] + "'" + xml.dss["SixSmallPay2"] + "'" + xml.dss["SixBigPay2"] + "'" + xml.dss["SixIDPayCents"] + "'" + xml.dss["SixPayCents"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "false,false,false,false,false,false,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 9)
                {
                    Master.Title = "特.码赔率配置";
                    string strText = "";
                    string strName = "";
                    string strType = "";
                    string strValu = "";
                    string strEmpt = "";
                    for (int i = 1; i <= 49; i++)
                    {
                        strText += ",特.码" + i + ":";
                        strName += ",TM" + i + "";
                        strType += ",text";
                        strValu += "'" + xml.dss["SixTM" + i + ""] + "";
                        strEmpt += ",true";
                    }
                    strText += ",,";
                    strName += ",ptype,backurl";
                    strType += ",hidden,hidden";
                    strValu += "'" + ptype + "'" + Utils.getPage(0) + "";
                    strEmpt += ",false,false";
                    strText  = Utils.Mid(strText, 1, strText.Length);
                    strName  = Utils.Mid(strName, 1, strName.Length);
                    strType  = Utils.Mid(strType, 1, strType.Length);
                    strValu  = Utils.Mid(strValu, 1, strValu.Length);
                    strEmpt  = Utils.Mid(strEmpt, 1, strEmpt.Length);

                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("温馨提示:如某项留空则调用全局特.码赔率进行计算.");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 10)
                {
                    string strText = "鼠:,牛:,虎:,兔:,龙:,蛇:,马:,羊:,猴:,鸡:,狗:,猪:,,";
                    string strName = "XX1,XX2,XX3,XX4,XX5,XX6,XX7,XX8,XX9,XX10,XX11,XX12,ptype,backurl";
                    string strType = "text,text,text,text,text,text,text,text,text,text,text,text,hidden,hidden";
                    string strValu = "" + xml.dss["SixXX1"] + "'" + xml.dss["SixXX2"] + "'" + xml.dss["SixXX3"] + "'" + xml.dss["SixXX4"] + "'" + xml.dss["SixXX5"] + "'" + xml.dss["SixXX6"] + "'" + xml.dss["SixXX7"] + "'" + xml.dss["SixXX8"] + "'" + xml.dss["SixXX9"] + "'" + xml.dss["SixXX10"] + "'" + xml.dss["SixXX11"] + "'" + xml.dss["SixXX12"] + "'" + ptype + "'" + Utils.getPage(0) + "";
                    string strEmpt = "true,true,true,true,true,true,true,true,true,true,true,true,false,false";
                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("温馨提示:如某项留空则调用全局生肖赔率进行计算.");
                    builder.Append(Out.Tab("</div>", ""));
                }
                else if (ptype == 11)
                {
                    Master.Title = "特.码下注上限配置";
                    string strText = "";
                    string strName = "";
                    string strType = "";
                    string strValu = "";
                    string strEmpt = "";
                    for (int i = 1; i <= 49; i++)
                    {
                        strText += ",特.码" + i + ":";
                        strName += ",TMSX" + i + "";
                        strType += ",text";
                        strValu += "'" + xml.dss["SixTMSX" + i + ""] + "";
                        strEmpt += ",true";
                    }
                    strText += ",,";
                    strName += ",ptype,backurl";
                    strType += ",hidden,hidden";
                    strValu += "'" + ptype + "'" + Utils.getPage(0) + "";
                    strEmpt += ",false,false";
                    strText  = Utils.Mid(strText, 1, strText.Length);
                    strName  = Utils.Mid(strName, 1, strName.Length);
                    strType  = Utils.Mid(strType, 1, strType.Length);
                    strValu  = Utils.Mid(strValu, 1, strValu.Length);
                    strEmpt  = Utils.Mid(strEmpt, 1, strEmpt.Length);

                    string strIdea = "/";
                    string strOthe = "确定修改|reset,sixset.aspx,post,1,red|blue";
                    builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                    builder.Append(Out.Tab("<div>", " "));
                    builder.Append("<a href=\"" + Utils.getUrl("sixset.aspx?backurl=" + Utils.getPage(0) + "") + "\">返回</a>");
                    builder.Append(Out.Tab("</div>", ""));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append("温馨提示:如某项留空则不限制该特.码下注上限.");
                    builder.Append(Out.Tab("</div>", ""));
                }
                builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("<a href=\"" + Utils.getPage("six.aspx") + "\">返回上级</a><br />");
                builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>", "<a href=\"" + Utils.getUrl("six.aspx") + "\">返回虚拟49选1</a>"));
                builder.Append(Out.Tab("</div>", ""));
            }
        }
    }
Beispiel #17
0
    private void SavePage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string   Title    = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{1,20}$", "标题限1-20字");
        string   Content  = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{1,1000}$", "物品描述限1-1000字");
        string   FileUrl  = Utils.GetRequest("FileUrl", "post", 3, @"^[\s\S]{1,100}$", "截图地址长度限100字符,可留空");
        string   PContent = Utils.GetRequest("PContent", "post", 2, @"^[\s\S]{1,300}$", "保密内容限1-300字");
        int      Types    = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[0-1]$", "币种类型错误"));
        int      Price    = int.Parse(Utils.GetRequest("Price", "post", 2, @"^[0-9]\d*$", "起拍价填写错误"));
        DateTime Totime   = Utils.ParseTime(Utils.GetRequest("Totime", "post", 2, DT.RegexTime, "截止时间格式填写出错,正确格式如" + DT.FormatDate(DateTime.Now, 0) + ""));

        if (Types == 0)
        {
            int Startlow  = Utils.ParseInt(ub.GetSub("RaceStartlow", xmlPath));
            int Starthigh = Utils.ParseInt(ub.GetSub("RaceStarthigh", xmlPath));
            if (Price < Startlow || Price > Starthigh)
            {
                Utils.Error("起拍价限" + Startlow + "-" + Starthigh + "" + ub.Get("SiteBz") + "", "");
            }
        }
        else
        {
            int Startlow  = Utils.ParseInt(ub.GetSub("RaceStartlow2", xmlPath));
            int Starthigh = Utils.ParseInt(ub.GetSub("RaceStarthigh2", xmlPath));
            if (Price < Startlow || Price > Starthigh)
            {
                Utils.Error("起拍价限" + Startlow + "-" + Starthigh + "" + ub.Get("SiteBz2") + "", "");
            }
        }
        if (Totime < DateTime.Now)
        {
            Utils.Error("截止时间必须大于当时时间", "");
        }
        int DayNum   = Utils.ParseInt(ub.GetSub("RaceDayNum", xmlPath));
        int MyDayNum = new BCW.BLL.Game.Race().GetTodayCount(meid);

        if (MyDayNum >= DayNum)
        {
            Utils.Error("每天每ID只可以发布" + DayNum + "个竞拍", "");
        }
        BCW.Model.Game.Race model = new BCW.Model.Game.Race();
        string mename             = new BCW.BLL.User().GetUsName(meid);

        model.title     = Title;
        model.content   = Content;
        model.fileurl   = FileUrl;
        model.pcontent  = PContent;
        model.price     = Price;
        model.topPrice  = Price;
        model.totime    = Totime;
        model.userid    = meid;
        model.username  = mename;
        model.writetime = DateTime.Now;
        model.writedate = DateTime.Parse(DateTime.Now.ToLongDateString());
        model.Types     = Types;
        model.paytype   = 0;
        int id = new BCW.BLL.Game.Race().Add(model);

        string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]发布竞拍[url=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + Title + "[/url]";

        new BCW.BLL.Action().Add(4, id, 0, "", wText);
        Utils.Success("发布竞拍", "发布成功,请等待管理员审核才会显示出来..", Utils.getUrl("race.aspx"), "1");
    }
Beispiel #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1"));

        int p_type = Utils.ParseInt(Utils.GetRequest("p_type", "get", 1, @"^[0-2]$", "0"));

        int paytype = Utils.ParseInt(Utils.GetRequest("paytype", "get", 1, @"^[0-4]$", "0"));

        string strTitle = "";

        if (ptype == 1)
        {
            strTitle = "未开投注";
        }
        else
        {
            strTitle = "历史投注";
        }

        Master.Title = strTitle;

        //会员身份页面取会员实体
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));

        builder.Append("球:");
        if (p_type == 0)
        {
            builder.Append("全部 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=0&amp;paytype=" + paytype + ""), "全部") + " ");
        }

        if (p_type == 1)
        {
            builder.Append("足球 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=1&amp;paytype=" + paytype + ""), "足球") + " ");
        }

        if (p_type == 2)
        {
            builder.Append("篮球 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=2&amp;paytype=" + paytype + ""), "篮球") + " ");
        }

        builder.Append("<br />盘:");

        if (paytype == 0)
        {
            builder.Append("全部 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=" + p_type + "&amp;paytype=0"), "全部") + " ");
        }

        if (paytype == 1)
        {
            builder.Append("让球 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=" + p_type + "&amp;paytype=1"), "让球") + " ");
        }

        if (paytype == 2)
        {
            builder.Append("大小 ");
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=" + p_type + "&amp;paytype=2"), "大小") + " ");
        }

        if (p_type != 2)
        {
            if (paytype == 3)
            {
                builder.Append("标准 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=" + p_type + "&amp;paytype=3"), "标准") + " ");
            }

            if (paytype == 4)
            {
                builder.Append("波胆 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&amp;p_type=" + p_type + "&amp;paytype=4"), "波胆") + " ");
            }
        }
        builder.Append(Out.Tab("</div >", "<br />"));

        int pageSize = 10;
        int pageIndex;
        int recordCount;

        string[] pageValUrl = { "ptype", "p_type", "paytype" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        //组合条件
        string strWhere = "";

        if (ptype == 1)
        {
            strWhere += "p_active=0 and payusid=" + meid + " and itypes=0 ";
        }
        else
        {
            strWhere += "p_active>0 and payusid=" + meid + " and itypes=0 ";
        }

        if (p_type != 0)
        {
            strWhere += "and ptype=" + p_type + "";
        }

        if (paytype != 0)
        {
            if (paytype == 1)
            {
                strWhere += "and (paytype=1 or paytype=2)";
            }
            if (paytype == 2)
            {
                strWhere += "and (paytype=3 or paytype=4)";
            }
            if (paytype == 3)
            {
                strWhere += "and (paytype=5 or paytype=6 or paytype=7)";
            }
            if (paytype == 4)
            {
                strWhere += "and (paytype>100)";
            }
        }
        // 开始读取竞猜
        IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount);

        if (listBaPay.Count > 0)
        {
            int k = 1;
            foreach (TPR2.Model.guess.BaPay n in listBaPay)
            {
                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 />"));
                    }
                }

                if (n.p_active == 0)
                {
                    builder.AppendFormat("ID:" + n.ID + ".{0}<br />时间:{1}", Out.SysUBB(n.payview), DT.FormatDate(Convert.ToDateTime(n.paytimes), 0));
                    if (n.state >= 1)
                    {
                        builder.Append("*待确认");
                    }
                }
                else if (n.p_active == 2)
                {
                    builder.AppendFormat("ID:" + n.ID + ".{0},平盘<br />时间:{1}", Out.SysUBB(n.payview), DT.FormatDate(Convert.ToDateTime(n.paytimes), 0));
                    builder.AppendFormat(" 返{0}币", Convert.ToDouble(n.p_getMoney));
                }
                else
                {
                    builder.AppendFormat("ID:" + n.ID + ".{0},结果{1}:{2}<br />时间:{3}", Out.SysUBB(n.payview), n.p_result_one, n.p_result_two, DT.FormatDate(Convert.ToDateTime(n.paytimes), 0));

                    if (Convert.ToInt32(n.p_getMoney) > 0)
                    {
                        builder.AppendFormat(" 返{0}币", Convert.ToDouble(n.p_getMoney));
                    }
                    else
                    {
                        builder.AppendFormat(" 输{0}币", Convert.ToDouble(n.payCent));
                    }
                }

                builder.Append(Out.Tab("</div>", ""));

                k++;
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=1"), "未开投注") + " ");
        builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=2"), "历史投注") + "<br />");
        builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + "");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-");
        builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-");
        builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "球彩") + "");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #19
0
    private void PayPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int  id      = int.Parse(Utils.GetRequest("id", "post", 2, @"^[1-9]\d*$", "ID错误"));
        long payCent = Int64.Parse(Utils.GetRequest("payCent", "post", 4, @"^[1-9]\d*$", "出价错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model.userid == meid)
        {
            Utils.Error("不能竞拍自己的物品", "");
        }
        if (model.paytype != 1)
        {
            Utils.Error("此竞拍未通过审核或已结束", "");
        }
        if (model.totime < DateTime.Now)
        {
            Utils.Error("竞拍已经结束", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        long payCents = 0;

        if (model.Types == 0)
        {
            payCents = model.topPrice + Utils.ParseInt64(ub.GetSub("RaceZfPrice", xmlPath));
        }
        else
        {
            payCents = model.topPrice + Utils.ParseInt64(ub.GetSub("RaceZfPrice2", xmlPath));
        }

        if (payCent < payCents)
        {
            Utils.Error("出价至少" + payCents + "" + bzText + "", "");
        }
        long gold = 0;

        if (model.Types == 0)
        {
            gold = new BCW.BLL.User().GetGold(meid);
        }
        else
        {
            gold = new BCW.BLL.User().GetMoney(meid);
        }

        if (gold < Convert.ToInt64(payCent))
        {
            Utils.Error("你的" + bzText + "不足", "");
        }
        if (model.winID == meid)
        {
            Utils.Error("你已成功出价", "");
        }
        string mename = new BCW.BLL.User().GetUsName(meid);

        if (model.Types == 0)
        {
            //支付安全提示
            string[] p_pageArr = { "act", "id", "payCent" };
            BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr);
            //扣币
            new BCW.BLL.User().UpdateiGold(meid, mename, -payCent, "竞拍物品");

            //退回上个会员ID的币
            if (model.winID > 0 && model.topPrice > 0)
            {
                new BCW.BLL.User().UpdateiGold(model.winID, model.winName, model.topPrice, "竞拍退回");
                //发内线提示上一个会员ID
                new BCW.BLL.Guest().Add(1, model.winID, model.winName, "[URL=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/URL]以" + payCent + "" + bzText + "竞拍[URL=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/URL],系统将您之前竞拍的" + model.topPrice + "" + bzText + "退回到您的帐上");
            }
        }
        else
        {
            //扣币
            new BCW.BLL.User().UpdateiMoney(meid, mename, -payCent, "竞拍物品");

            //退回上个会员ID的币
            if (model.winID > 0 && model.topPrice > 0)
            {
                new BCW.BLL.User().UpdateiMoney(model.winID, model.winName, model.topPrice, "竞拍退回");
                //发内线提示上一个会员ID
                new BCW.BLL.Guest().Add(1, model.winID, model.winName, "[URL=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/URL]以" + payCent + "" + bzText + "竞拍[URL=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/URL],系统将您之前竞拍的" + model.topPrice + "" + bzText + "退回到您的帐上");
            }
        }
        //写入购买记录
        BCW.Model.Game.Racelist paymodel = new BCW.Model.Game.Racelist();
        paymodel.payname = mename;
        paymodel.payusid = meid;
        paymodel.payCent = payCent;
        paymodel.paytime = DateTime.Now;
        paymodel.raceid  = id;
        paymodel.paytype = 0;
        new BCW.BLL.Game.Racelist().Add(paymodel);
        //更新最新报价和会员ID
        new BCW.BLL.Game.Race().UpdatetopPrice(id, payCent, meid, mename, 1);

        //检查结束时间是否少于5分钟
        string   sText = string.Empty;
        DateTime stime = model.totime.AddMinutes(5);//加5分钟

        if (DateTime.Now > model.totime.AddMinutes(-5))
        {
            new BCW.BLL.Game.Race().Updatetotime(id, stime);
            sText = "为公平起见,竞拍结束时间延长5分钟";
        }
        string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]以" + payCent + "" + bzText + "竞拍[url=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/url]";

        new BCW.BLL.Action().Add(4, id, 0, "", wText);
        //活跃抽奖入口_20160621姚志光
        try
        {
            //表中存在记录
            if (new BCW.BLL.tb_WinnersGame().ExistsGameName("欢乐竞拍"))
            {
                //投注是否大于设定的限额,是则有抽奖机会
                if (payCent > new BCW.BLL.tb_WinnersGame().GetPrice("欢乐竞拍"))
                {
                    string TextForUbb       = (ub.GetSub("TextForUbb", "/Controls/winners.xml"));       //设置内线提示的文字
                    string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", "/Controls/winners.xml")); //1发内线2不发内线
                    int    hit = new BCW.winners.winners().CheckActionForAll(1, 1, meid, mename, "竞拍", 3);
                    if (hit == 1)
                    {
                        //内线开关 1开
                        if (WinnersGuessOpen == "1")
                        {
                            //发内线到该ID
                            new BCW.BLL.Guest().Add(0, meid, mename, TextForUbb);
                        }
                    }
                }
            }
        }
        catch { }
        Utils.Success("出价竞拍", "出价成功!" + sText + "", Utils.getUrl("race.aspx?act=view&amp;id=" + id + ""), "1");
    }
Beispiel #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();
        int id   = int.Parse(Utils.GetRequest("id", "get", 1, @"^[1-9]\d*$", "0"));

        if (id > 0)
        {
            if (!new BCW.BLL.Advert().Exists2(id))
            {
                Utils.Error("不存在的记录", "");
            }
            BCW.Model.Advert model = new BCW.BLL.Advert().GetAdvert(id);
            //按天/按周计算
            if (meid > 0)
            {
                if (model.iGold > 0)
                {
                    if (model.adType <= 1)
                    {
                        int Day = 1;
                        if (model.adType == 1)
                        {
                            Day = 7;
                        }

                        //根据时限清空点击ID
                        string ClickID = model.ClickID;
                        if (string.IsNullOrEmpty(model.ClickTime.ToString()) || DT.TwoDateDiff(DateTime.Now, model.ClickTime) >= Day)
                        {
                            new BCW.BLL.Advert().UpdateClickID(id);
                            ClickID = string.Empty;
                        }

                        if (string.IsNullOrEmpty(ClickID) || ClickID.IndexOf("#" + meid + "#") == -1)
                        {
                            new BCW.BLL.Advert().UpdateClickID(id, ClickID + "#" + meid + "#");
                            //得币
                            new BCW.BLL.User().UpdateiGold(meid, Convert.ToInt64(model.iGold), "点广告得币");
                            //内线
                            if (ub.GetSub("BbsIsAdMsg", xmlPath) == "1")
                            {
                                new BCW.BLL.Guest().Add(meid, new BCW.BLL.User().GetUsName(meid), "支持站长,点击广告!恭喜您获得" + model.iGold + "" + ub.Get("SiteBz") + ",天天点击天天有惊喜~");
                            }
                        }
                    }
                    else//按次计算
                    {
                        new BCW.BLL.Advert().UpdateClickID(id, "");
                        //得币
                        new BCW.BLL.User().UpdateiGold(meid, Convert.ToInt64(model.iGold), "点广告得币");
                        //内线
                        if (ub.GetSub("BbsIsAdMsg", xmlPath) == "1")
                        {
                            new BCW.BLL.Guest().Add(meid, new BCW.BLL.User().GetUsName(meid), "支持站长,点击广告!恭喜您获得" + model.iGold + "" + ub.Get("SiteBz") + ",天天点击天天有惊喜~");
                        }
                    }
                }
            }
            //跳转广告
            new BCW.BLL.Advert().UpdateClick(id);
            Response.Redirect(model.AdUrl.Replace("&amp;", "&"));
        }
        else
        {
            Master.Title = "打工送币";
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("=打工送币=");
            builder.Append(Out.Tab("</div>", "<br />"));
            int      pageIndex;
            int      recordCount;
            int      pageSize   = Convert.ToInt32(ub.Get("SiteListNo"));
            string   strWhere   = "";
            string[] pageValUrl = { "ptype", "backurl" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }
            //查询条件
            strWhere = "Status=0 and UrlType=0 and StartTime<='" + DateTime.Now + "' and OverTime>='" + DateTime.Now + "'";

            // 开始读取列表
            IList <BCW.Model.Advert> listAdvert = new BCW.BLL.Advert().GetAdverts(pageIndex, pageSize, strWhere, out recordCount);
            if (listAdvert.Count > 0)
            {
                int k = 1;
                foreach (BCW.Model.Advert n in listAdvert)
                {
                    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 />"));
                        }
                    }
                    string adType = string.Empty;
                    if (n.adType == 0)
                    {
                        adType = "/天";
                    }
                    else if (n.adType == 1)
                    {
                        adType = "/周";
                    }
                    else
                    {
                        adType = "";
                    }

                    builder.AppendFormat("{0}.<a href=\"" + Utils.getUrl("adview.aspx?id={1}") + "\">{2}</a>(" + n.iGold + "" + ub.Get("SiteBz") + "" + adType + "/次)", (pageIndex - 1) * pageSize + k, n.ID, n.Title);
                    k++;
                    builder.Append(Out.Tab("</div>", ""));
                }

                // 分页
                builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 1));
            }
            else
            {
                builder.Append(Out.Div("div", "没有相关记录.."));
            }
            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("支持站长,请点击广告,天天送你币!");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">返回上级</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
    }
Beispiel #21
0
    private void MorePage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1"));

        Master.Title = "查看竞拍";
        builder.Append(Out.Tab("<div class=\"title\">查看竞拍</div>", ""));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (ptype == 1)
        {
            builder.Append("正在竞拍|<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;ptype=2") + "\">历史竞拍</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;ptype=1") + "\">正在竞拍</a>|历史竞拍");
        }

        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = string.Empty;

        strWhere = "paytype=" + ptype + "";
        string[] pageValUrl = { "act", "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        // 开始读取列表
        IList <BCW.Model.Game.Race> listRace = new BCW.BLL.Game.Race().GetRaces(pageIndex, pageSize, strWhere, out recordCount);

        if (listRace.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Race n in listRace)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", Out.Hr()));
                    }
                }
                string bzText = string.Empty;
                if (n.Types == 0)
                {
                    bzText = ub.Get("SiteBz");
                }
                else
                {
                    bzText = ub.Get("SiteBz2");
                }

                builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.title + "(起拍价" + n.price + "" + bzText + ")</a>");
                if (ptype == 0)
                {
                    builder.Append("未审核");
                }
                else if (ptype == 1)
                {
                    if (n.totime < DateTime.Now)
                    {
                        builder.Append("<br />剩余时间:竞拍已截止");
                    }
                    else
                    {
                        builder.Append("<br />剩余时间:" + DT.DateDiff(DateTime.Now, n.totime) + "");
                    }
                }
                else
                {
                    builder.Append("<br />竞拍得主:<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.winID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.winName + "</a>");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #22
0
    /// <summary>
    /// 论坛版面
    /// </summary>
    private void ListPage(int forumid)
    {
        if (!new BCW.BLL.Forum().Exists2(forumid))
        {
            Utils.Success("访问论坛", "该论坛不存在或已暂停使用", Utils.getUrl("forum.aspx"), "1");
        }
        int meid = new BCW.User.Users().GetUsId();

        BCW.Model.Forum model   = new BCW.BLL.Forum().GetForum(forumid);
        BCW.Model.Group modelgr = null;
        if (model.GroupId > 0)
        {
            if (meid == 0)
            {
                Utils.Login();
            }

            modelgr = new BCW.BLL.Group().GetGroupMe(model.GroupId);
            if (modelgr == null)
            {
                Utils.Error("不存在的" + ub.GetSub("GroupName", "/Controls/group.xml") + "", "");
            }
            else if (DT.FormatDate(modelgr.ExTime, 0) != "1990-01-01 00:00:00" && modelgr.ExTime < DateTime.Now)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "已过期", "");
            }
            if (modelgr.ForumStatus == 2)
            {
                Utils.Error("" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛已关闭", "");
            }
            string GroupId = new BCW.BLL.User().GetGroupId(meid);
            if (modelgr.ForumStatus == 1)
            {
                bool Isvi = false;
                //能够穿透的ID
                string CTID = "#" + ub.GetSub("GroupCTID", "/Controls/group.xml") + "#";
                if (CTID.IndexOf("#" + meid + "#") != -1)
                {
                    Isvi = true;
                }
                if (GroupId.IndexOf("#" + model.GroupId + "#") == -1 && Isvi == false)
                {
                    Utils.Error("非成员不能访问" + ub.GetSub("GroupName", "/Controls/group.xml") + "论坛!<br /><a href=\"" + Utils.getUrl("/bbs/group.aspx?act=addin&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">加入本" + ub.GetSub("GroupName", "/Controls/group.xml") + "</a>", "");
                }
            }
            int VipLeven = BCW.User.Users.VipLeven(meid);
            if (VipLeven == 0)
            {
                int DqNum = (Utils.GetStringNum(GroupId.Replace("##", "#"), "#") - 1);
                if (DqNum > 5)
                {
                    Utils.Error("您的VIP会员已过期,请进行续费才能同时加入5个以上的" + ub.GetSub("GroupName", "/Controls/group.xml") + ",否则只能同时加入5个才可以使用" + ub.GetSub("GroupName", "/Controls/group.xml") + "<br /><a href=\"" + Utils.getUrl("finance.aspx?act=addvip&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;我现在要续费VIP</a><br /><a href=\"" + Utils.getUrl("group.aspx?act=me&amp;backurl=" + Utils.PostPage(1) + "") + "\">&lt;&lt;我要退出一些圈子</a>", "");
                }
            }
        }
        BCW.User.Users.ShowForumLimit(meid, model.Gradelt, model.Visitlt, model.VisitId, model.IsPc);
        Master.Title = model.Title;
        //个性设置
        int FsPageSize = 10;

        if (meid > 0)
        {
            string ForumSet = new BCW.BLL.User().GetForumSet(meid);
            FsPageSize = BCW.User.Users.GetForumSet(ForumSet, 0);
        }
        int    pageIndex;
        int    recordCount;
        int    pageSize = FsPageSize;
        string strWhere = string.Empty;
        string strOrder = string.Empty;

        string[] pageValUrl = { "forumid", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        if (pageIndex == 1)
        {
            if (!string.IsNullOrEmpty(model.Logo) && Utils.IsMobileUa() == true)
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("<img src=\"" + model.Logo + "\" alt=\"load\"/>");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            //拾物随机
            builder.Append(BCW.User.Game.GiftFlows.ShowGiftFlows(1));
            //顶部滚动
            builder.Append(BCW.User.Master.OutTopRand(3));

            if (!string.IsNullOrEmpty(model.TopUbb))
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(model.TopUbb)));
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            //全区滚动
            BCW.Model.Text flow = new BCW.BLL.Text().GetTextFlow();
            if (flow != null)
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("<a href=\"" + Utils.getUrl("manager.aspx?act=flow&amp;forumid=" + flow.ForumId + "&amp;bid=" + flow.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Out.USB(TrueStrLength.cutTrueLength(flow.Title, 20, "…")) + "</a> ");
                builder.Append(Out.Tab("</div>", "<br />"));
            }

            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/addThread.aspx?forumid=" + forumid + "") + "\">发帖</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/manwork.aspx?forumid=" + forumid + "") + "\">版务</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?forumid=" + forumid + "") + "\">精华</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/forumts.aspx?forumid=" + forumid + "") + "\">专题</a> ");
            builder.Append("<a href=\"" + Utils.getUrl("/search.aspx?act=forum&amp;forumid=" + forumid + "") + "\">搜索</a> ");
            if (new BCW.User.ForumInc().IsForumGSIDS(forumid) == true)
            {
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/Gstoplist.aspx?forumid=" + forumid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">高手</a>");
            }
            builder.Append(Out.Tab("</div>", ""));
            if (model.GroupId > 0)
            {
                builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">主页</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=fund&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">基金</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=view&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">资料</a> ");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=groupid&amp;id=" + model.GroupId + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">成员列表</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
            //本版滚动
            flow = new BCW.BLL.Text().GetTextFlow(forumid);
            if (flow != null)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("manwork.aspx?act=flow&amp;forumid=" + forumid + "&amp;bid=" + flow.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Out.USB(TrueStrLength.cutTrueLength(flow.Title, 20, "…")) + "</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
        }

        //查询条件
        //string strWhe = "=" + forumid + "";
        //是否显示下级版块帖子
        //if (model.ShowType == 1)
        //{
        //    if (!string.IsNullOrEmpty(model.DoNode))
        //    {
        //        strWhe = "in (" + forumid + "," + model.DoNode + ")";
        //    }
        //}
        //strWhere = "IsDel=0 and (ForumId " + strWhe + " OR IsTop=2)";

        //查询条件
        strWhere = "ForumId =" + forumid + " and IsDel=0 and IsTop=0";
        //排序条件
        strOrder = "ReTime Desc";//Istop Desc,
        // 开始读取列表
        IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTexts(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listText.Count > 0)
        {
            if (pageIndex != 1)
            {
                //算出总页数
                int pageTotal = BasePage.CalcPageCount(recordCount, pageSize, ref pageIndex);
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                if (pageTotal > pageIndex)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + forumid + "&amp;page=" + (pageIndex + 1) + "&amp;backurl=" + Utils.getPage(0) + "") + "\">下一页</a>|");
                }

                builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + forumid + "&amp;page=1&amp;backurl=" + Utils.getPage(0) + "") + "\">返回首页</a> ");
                builder.Append(Out.Tab("</div>", ""));
            }
            else
            {
                //全区置顶帖子
                int     j     = 1;
                DataSet dsTop = new BCW.BLL.Text().GetList("Top 3 ID,ForumId,Title,UsID,UsName,ReplyNum,ReadNum", "IsTop=2 and IsDel=0 ORDER BY NEWID()");
                if (dsTop != null && dsTop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsTop.Tables[0].Rows.Count; i++)
                    {
                        if (j % 2 == 0)
                        {
                            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                        }
                        else
                        {
                            builder.Append(Out.Tab("<div>", "<br />"));
                        }

                        builder.AppendFormat("<i><b>[顶]</b></i><a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}", dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), Out.TitleUBB(dsTop.Tables[0].Rows[i]["Title"].ToString()));
                        builder.Append("</a><br />" + dsTop.Tables[0].Rows[i]["UsName"].ToString());
                        builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", dsTop.Tables[0].Rows[i]["ReadNum"].ToString(), dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), dsTop.Tables[0].Rows[i]["ReplyNum"].ToString());
                        j++;
                        builder.Append(Out.Tab("</div>", ""));
                    }
                }

                //本坛置顶帖子
                j     = 1;
                dsTop = new BCW.BLL.Text().GetList("Top 5 ID,ForumId,Title,UsID,UsName,ReplyNum,ReadNum", "ForumId=" + forumid + " and IsTop=1 and IsDel=0 ORDER BY ReTime Desc");
                if (dsTop != null && dsTop.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < dsTop.Tables[0].Rows.Count; i++)
                    {
                        if (j % 2 == 0)
                        {
                            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                        }
                        else
                        {
                            builder.Append(Out.Tab("<div>", "<br />"));
                        }

                        builder.AppendFormat("<b>[顶]</b><a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}", dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), Out.TitleUBB(dsTop.Tables[0].Rows[i]["Title"].ToString()));
                        builder.Append("</a><br />" + dsTop.Tables[0].Rows[i]["UsName"].ToString());
                        builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", dsTop.Tables[0].Rows[i]["ReadNum"].ToString(), dsTop.Tables[0].Rows[i]["ForumId"].ToString(), dsTop.Tables[0].Rows[i]["ID"].ToString(), dsTop.Tables[0].Rows[i]["ReplyNum"].ToString());
                        j++;
                        builder.Append(Out.Tab("</div>", ""));
                    }
                }
            }


            int k = 1;
            foreach (BCW.Model.Text n in listText)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    builder.Append(Out.Tab("<div>", "<br />"));
                }

                builder.Append(BCW.User.AppCase.CaseIsTop(n.IsTop));
                builder.Append(BCW.User.AppCase.CaseIsGood(n.IsGood));
                builder.Append(BCW.User.AppCase.CaseIsRecom(n.IsRecom));
                builder.Append(BCW.User.AppCase.CaseIsLock(n.IsLock));
                builder.Append(BCW.User.AppCase.CaseIsOver(n.IsOver));
                // builder.Append(BCW.User.AppCase.CaseText(n.Types)); //派币
                if (n.Types == 3)
                {
                    builder.Append("<img src=\"/files/face/money.gif\" width=\"20\" height=\"25\"  alt=\"load\"/>"); //派币
                }
                else
                {
                    builder.Append(BCW.User.AppCase.CaseText(n.Types)); //派币/附件
                }
                string TextTab = string.Empty;
                if (n.IsTop != 2)
                {
                    TextTab = BCW.User.AppCase.CaseLabel(n.LabelId, model.Label);
                }

                builder.AppendFormat("<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}.{3}{4}", n.ForumId, n.ID, (pageIndex - 1) * pageSize + k, TextTab, n.Title);
                if (n.Types == 8)
                {
                    builder.Append("[" + n.Gaddnum + "中" + n.Gwinnum + "]");
                }
                builder.Append("</a><br />" + n.UsName);
                builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", n.ReadNum, n.ForumId, n.ID, n.ReplyNum);

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Tab("", "<br />"));
            builder.Append(Out.Div("div", "没有相关记录.."));
        }

        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/addThread.aspx?forumid=" + forumid + "") + "\">发帖</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?act=text&amp;forumid=" + forumid + "") + "\">我帖</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/sktype.aspx?forumid=" + forumid + "") + "\">模式</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/forumstat.aspx?act=top&amp;forumid=" + forumid + "") + "\">排行</a>");
        builder.Append(Out.Tab("</div>", ""));

        if (!string.IsNullOrEmpty(model.Notes))
        {
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(model.Notes);
            builder.Append(Out.Tab("</div>", ""));
        }
        //更新版块在线人数
        if (pageIndex == 1)
        {
            new BCW.BLL.User().UpdateEndForumID(meid, forumid);
            int ForumLine = new BCW.BLL.User().GetForumNum(forumid);
            if (ForumLine != model.Line)
            {
                new BCW.BLL.Forum().UpdateLine(forumid, ForumLine);
            }
        }
        builder.Append(Out.Tab("<div>", ""));
        if (ub.GetSub("BbsIsOnline", "/Controls/bbs.xml") == "0")
        {
            builder.Append(Out.Tab("", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/online.aspx?forumid=" + forumid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">在线" + model.Line + "人.最高" + model.TopLine + "人</a>");
        }
        //下级版块
        builder.Append(BCW.User.Users.ShowForumNode(model.IsNode, forumid));
        builder.Append(Out.Tab("</div>", ""));

        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        if (model.GroupId > 0)
        {
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + model.GroupId + "") + "\">" + ub.GetSub("GroupName", "/Controls/group.xml") + "主页</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("/bbs/forum.aspx?forumid=" + model.NodeId + "") + "\">上级论坛</a>");
        }

        builder.Append(Out.Tab("</div>", ""));

        if (!string.IsNullOrEmpty(model.FootUbb))
        {
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(model.FootUbb)));
            builder.Append(Out.Tab("</div>", ""));
        }
    }
Beispiel #23
0
    private void ReloadPage(int forumid, int bid)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int hid = int.Parse(Utils.GetRequest("hid", "all", 1, @"^[0-9]\d*$", "0"));

        if (hid == 0)
        {
            hid = meid;
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("查看参赛记录");
        builder.Append(Out.Tab("</div>", "<br />"));
        BCW.Model.Text model = new BCW.BLL.Text().GetText(bid);

        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("<b>记录:连中" + model.Glznum + "期,月中" + model.Gmnum + "期,历史" + model.Gaddnum + "中" + model.Gwinnum + "</b>");
        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = 10;
        string strWhere = string.Empty;

        string[] pageValUrl = { "forumid", "bid", "hid", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        //查询条件
        strWhere = "Forumid=" + forumid + " and BID=" + bid + " and UsID=" + hid + "";
        // 开始读取列表
        IList <BCW.Model.Forumvote> listForumvote = new BCW.BLL.Forumvote().GetForumvotes(pageIndex, pageSize, strWhere, out recordCount);

        if (listForumvote.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Forumvote n in listForumvote)
            {
                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.Append("[" + n.qiNum + "]期:" + n.Notes + "");
                if (n.state == 0)
                {
                    builder.Append("[开?]");
                }
                else
                {
                    if (n.IsWin == 0)
                    {
                        builder.Append("[未中]");
                    }
                    else
                    {
                        builder.Append("[中]");
                    }
                }

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("topic.aspx?forumid=" + forumid + "&amp;bid=" + bid + "") + "\">&lt;&lt;返回主題</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = BCW.User.Users.userId();

        //if (meid == 0)
        //Utils.Login();

        if (meid > 0)
        {
            meid = new BCW.User.Users().GetUsId();
            BCW.User.Users.ShowVerifyRole("c", meid);                                       //非验证会员提示
            new BCW.User.Limits().CheckUserLimit(BCW.User.Limits.enumRole.Role_Game, meid); //会员本身权限
        }
        BCW.User.Master.ShowMaster(meid, _Title);

        //底部
        builder.Append(Out.Tab("<div class=\"ft\">", "<br />"));
        builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteGameUbb")).Replace("[@功能]", Utils.Function(_IsFoot))));
        builder.Append(Out.Tab("</div>", ""));
        //版本
        builder.Append("<!--Powered by kubao.cc " + ub.Get("SiteVersion") + " @author Light-->");

        string strAlign    = ub.Get("SiteAlign");
        bool   IsNetwork   = new BCW.BLL.Network().Exists();
        string builderText = "";

        if (meid > 0 || IsNetwork == true)
        {
            if (IsNetwork == true)
            {
                bool    IsView = false;
                DataSet ds     = new BCW.BLL.Network().GetList("TOP 1 ID,Title,UsID,UsName,OnIDs,IsUbb", "Types=2 and OverTime>='" + DateTime.Now + "' ORDER BY ID DESC");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    int    IsUbb = int.Parse(ds.Tables[0].Rows[0]["IsUbb"].ToString());
                    int    ID    = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                    string OnIDs = ds.Tables[0].Rows[0]["OnIDs"].ToString();
                    if (OnIDs.Contains("#" + meid + "#"))
                    {
                        int usid = int.Parse(ds.Tables[0].Rows[0]["UsID"].ToString());

                        if (IsUbb == 1 || new BCW.BLL.Role().IsAllMode(usid) || Utils.GetTopDomain().Contains("th"))
                        {
                            builderText += "[<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + usid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + ds.Tables[0].Rows[0]["UsName"] + "</a>]聊天:" + Out.SysUBB(ds.Tables[0].Rows[0]["Title"].ToString()) + "";
                        }
                        else
                        {
                            builderText += "[<a href=\"" + Utils.getUrl("/bbs/group.aspx?act=info&amp;id=" + usid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + ds.Tables[0].Rows[0]["UsName"] + "</a>]聊天:" + ds.Tables[0].Rows[0]["Title"] + "";
                        }

                        OnIDs = OnIDs.Replace("#" + meid + "#", "");
                        new BCW.BLL.Network().UpdateOnIDs(ID, OnIDs);
                        IsView = true;
                    }
                }
                if (!IsView)
                {
                    ds = new BCW.BLL.Network().GetList("TOP 1 Title,UsID,UsName,IsUbb", "Types<=1 and OverTime>='" + DateTime.Now + "' ORDER BY NEWID()");
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        string NetWorkTitle = ds.Tables[0].Rows[0]["Title"].ToString();
                        if (ds.Tables[0].Rows[0]["IsUbb"].ToString() == "1")
                        {
                            NetWorkTitle = Out.SysUBB(NetWorkTitle);
                        }

                        builderText += "[<a href=\"" + Utils.getUrl("/bbs/network.aspx?backurl=" + Utils.PostPage(1) + "") + "\">喇叭</a>]<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + ds.Tables[0].Rows[0]["UsID"] + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + ds.Tables[0].Rows[0]["UsName"] + "</a>:" + NetWorkTitle + "";
                    }
                }
            }
            if (builderText != "")
            {
                builder2.Append(Out.Tab("<div class=\"top\">", ""));
                builder2.Append(builderText);
                builder2.Append(Out.Tab("</div>", "</p><p align=\"" + ub.Get("SiteAlign") + "\">"));
                strAlign = "center";
            }

            //短消息提示
            if (string.IsNullOrEmpty(Request.Form.ToString()))
            {
                int smsCount  = new BCW.BLL.Guest().GetCount(meid);
                int smsXCount = new BCW.BLL.Guest().GetXCount(meid);
                if (smsCount > 0 || smsXCount > 0)
                {
                    string actUrl  = string.Empty;
                    string actUrl2 = string.Empty;
                    if (smsCount > 0)
                    {
                        actUrl = "act=newlist&amp;";
                    }

                    if (smsXCount > 0)
                    {
                        actUrl2 = "act=view&amp;hid=0&amp;";
                    }
                    else
                    {
                        actUrl2 = "ptype=1&amp;";
                    }

                    builderText = "<b>新内线<a href=\"" + Utils.getUrl("/bbs/guest.aspx?" + actUrl + "backurl=" + Utils.PostPage(1) + "") + "\">(" + smsCount + ")</a>系统<a href=\"" + Utils.getUrl("/bbs/guest.aspx?" + actUrl2 + "backurl=" + Utils.PostPage(1) + "") + "\">(" + smsXCount + ")</a></b>";

                    builder3.Append(Out.Tab("<div>", ""));
                    builder3.Append(builderText);
                    builder3.Append(Out.Tab("</div>", "<br />"));
                }
            }
        }
        //头部
        if (_Refresh == 0)
        {
            new Out().head(Utils.ForWordType(_Title), strAlign);
        }
        else
        {
            new Out().head(Utils.ForWordType(_Title), _Gourl, _Refresh.ToString(), strAlign);
        }
        //顶部Ubb
        string GameTopUbb = string.Empty;

        if (ub.Get("SiteGameTopUbb") != "")
        {
            GameTopUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteGameTopUbb")));
            if (GameTopUbb.IndexOf("</div>") == -1)
            {
                builder3.Append(Out.Tab("<div>", ""));
                builder3.Append(GameTopUbb);
                builder3.Append(Out.Tab("</div>", ""));
            }
            else
            {
                builder3.Append(GameTopUbb);
            }
        }

        //顶部提示
        Response.Write(Utils.ForWordType(builder1.ToString()));
        //消息提示
        Response.Write(Utils.ForWordType(builder2.ToString()));
        //顶部Ubb
        Response.Write(Utils.ForWordType(builder3.ToString()));
        //顶部滚动
        Response.Write(Utils.ForWordType(BCW.User.Master.OutTopRand(4)));

        //游戏闲聊抽奖动态
        string xmlPath = "/Controls/spkadmin.xml";

        try
        {
            DateTime dt = Convert.ToDateTime(ub.GetSub("SpkCentTime", xmlPath));
            if (dt.AddMinutes(2) > DateTime.Now)
            {
                string OutText = ub.GetSub("SpkOutText", xmlPath);
                Response.Write(Out.Tab("<div>", ""));
                Response.Write(Utils.ForWordType(Out.SysUBB(OutText)));
                Response.Write(Out.Tab("</div>", "<br />"));
            }
        }
        catch { }
        //尾部
        builder.Append(new Out().foot());
    }
Beispiel #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int meid = new BCW.User.Users().GetUsId();

        //维护提示
        if (ub.Get("SitebbsStatus") == "1")
        {
            Utils.Safe("社区系统");
        }
        else if (ub.Get("SitebbsStatus") == "2")
        {
            if (meid == 0)
            {
                Utils.Login();//显示登录
            }
        }

        int    id       = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0"));
        string strWhere = string.Empty;

        if (id != 0)
        {
            if (!new BCW.BLL.Topics().ExistsIdLeibie(id, 1))
            {
                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";
            }

            BCW.Model.Topics 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&amp;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=1 AND Hidden=0 ORDER BY Paixu ASC";
            }
            else
            {
                strWhere = "NodeId=0 AND Leibie=1 AND Hidden<=1 ORDER BY Paixu ASC";
            }

            Master.Title = ub.Get("SitebbsName");
            string Logo = ub.Get("SitebbsLogo");
            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.Game.GiftFlows.ShowGiftFlows(15));
            //顶部滚动
            builder.Append(BCW.User.Master.OutTopRand(1));
        }

        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 + "&amp;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("forum.aspx?forumid=" + Content + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + Title + "</a>");
                break;

            case "10":
                builderIndex.Append(BCW.User.AdminCall.ShowAdvert());
                break;

            default:
                builderIndex.Append("");
                break;
            }

            builderIndex.Append(Br);
        }
        if (!Utils.Isie())
        {
            builder.Append(builderIndex.ToString().Replace((Convert.ToChar(10).ToString()), "<br />"));
        }
        else
        {
            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>", ""));
                }
            }
        }

        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("uinfo.aspx") + "\">我的空间</a>");
        if (id != 0)
        {
            int NodeId = new BCW.BLL.Topics().GetNodeId(id);
            if (NodeId != 0)
            {
                builder.Append("-<a href=\"" + Utils.getUrl("default.aspx?id=" + NodeId + "") + "\">" + new BCW.BLL.Topics().GetTitle(NodeId) + "</a>");
            }
        }
        builder.Append(Out.Tab("</div>", ""));
        //-----------友链链入开始
        int kid = int.Parse(Utils.GetRequest("kid", "get", 1, @"^[0-9]\d*$", "0"));

        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));
                    }
                }
            }
        }
        //-----------友链链入结束
    }
Beispiel #26
0
    private void OpenSavePage(int forumid)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string GsAdminID = ub.GetSub("BbsGsAdminID", xmlPath);

        if (!("#" + GsAdminID + "#").Contains("#" + meid + "#"))
        {
            Utils.Error("权限不足", "");
        }
        DateTime GsStopTime = Utils.ParseTime(ub.GetSub("BbsGsStopTime", xmlPath));
        int      GsqiNum    = Utils.ParseInt(ub.GetSub("BbsGsqiNum", xmlPath));

        if (GsqiNum == 0)
        {
            Utils.Error("本期尚未设置", "");
        }
        if (GsStopTime > DateTime.Now)
        {
            //Utils.Error("本期第" + GsqiNum + "期截止时间" + GsStopTime + ",截止时间未到不能开奖", "");
        }
        string qiNum = Utils.GetRequest("qiNum", "post", 2, @"^[0-9]\d*$", "期数错误");
        string sNum  = Utils.GetRequest("sNum", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "特别号码填写错误");
        string pNum1 = Utils.GetRequest("pNum1", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码1填写错误");
        string pNum2 = Utils.GetRequest("pNum2", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码2填写错误");
        string pNum3 = Utils.GetRequest("pNum3", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码3填写错误");
        string pNum4 = Utils.GetRequest("pNum4", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码4填写错误");
        string pNum5 = Utils.GetRequest("pNum5", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码5填写错误");
        string pNum6 = Utils.GetRequest("pNum6", "post", 2, @"^(0)?[1-9]$|^[1-4]([0-9])?$", "平.码6填写错误");

        DataSet ds = null;                                       //ID,Types,qiNum,ForumID,BID,UsID,UsName,Notes,AddTime,IsWin,state

        if (new BCW.User.ForumInc().IsForum113(forumid) == true) //六肖
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0 and ','+Notes+',' Like '%," + GetSX(sNum) + ",%'");
        }
        else if (new BCW.User.ForumInc().IsForum114(forumid) == true)//波色
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0");
        }
        else if (new BCW.User.ForumInc().IsForum115(forumid) == true)//大小
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0 and Notes='" + GetDX(sNum) + "'");
        }
        else if (new BCW.User.ForumInc().IsForum121(forumid) == true)//单双
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0 and Notes='" + GetDS(sNum) + "'");
        }
        else if (new BCW.User.ForumInc().IsForum122(forumid) == true)//家野
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0 and Notes='" + GetQS(sNum) + "'");
        }
        else if (new BCW.User.ForumInc().IsForum116(forumid) == true)//平特一肖
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0 and (Notes='" + GetSX(sNum) + "' OR Notes='" + GetSX(pNum1) + "' OR Notes='" + GetSX(pNum2) + "' OR Notes='" + GetSX(pNum3) + "' OR Notes='" + GetSX(pNum4) + "' OR Notes='" + GetSX(pNum5) + "' OR Notes='" + GetSX(pNum6) + "')");
        }
        else if (new BCW.User.ForumInc().IsForum117(forumid) == true)//五不中
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0");
        }
        else if (new BCW.User.ForumInc().IsForum119(forumid) == true)//五尾
        {
            ds = new BCW.BLL.Forumvote().GetList("ID,BID,UsID,UsName,Notes", "ForumID=" + forumid + " and qiNum=" + qiNum + " and state=0");
        }
        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                int    ID     = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());
                int    BID    = int.Parse(ds.Tables[0].Rows[i]["BID"].ToString());
                int    UsID   = int.Parse(ds.Tables[0].Rows[i]["UsID"].ToString());
                string UsName = ds.Tables[0].Rows[i]["UsName"].ToString();
                string Notes  = ds.Tables[0].Rows[i]["Notes"].ToString();

                bool IsWin = false;
                if (new BCW.User.ForumInc().IsForum113(forumid) == true)//六肖
                {
                    IsWin = true;
                }
                else if (new BCW.User.ForumInc().IsForum114(forumid) == true)//波色
                {
                    string bs = "";
                    if (Notes.Contains("波"))
                    {
                        bs = GetBS(sNum);
                    }
                    else
                    {
                        bs = GetBBS(sNum);
                    }

                    if (Notes.Contains(bs))
                    {
                        IsWin = true;
                    }
                }
                else if (new BCW.User.ForumInc().IsForum115(forumid) == true)//大小
                {
                    IsWin = true;
                }
                else if (new BCW.User.ForumInc().IsForum121(forumid) == true)//单双
                {
                    IsWin = true;
                }
                else if (new BCW.User.ForumInc().IsForum122(forumid) == true)//家野
                {
                    IsWin = true;
                }
                else if (new BCW.User.ForumInc().IsForum116(forumid) == true)//平特一肖
                {
                    IsWin = true;
                }
                else if (new BCW.User.ForumInc().IsForum117(forumid) == true)//五不中
                {
                    IsWin = true;
                    string   BVote = "," + Convert.ToInt32(sNum) + "," + Convert.ToInt32(pNum1) + "," + Convert.ToInt32(pNum2) + "," + Convert.ToInt32(pNum3) + "," + Convert.ToInt32(pNum4) + "," + Convert.ToInt32(pNum5) + "," + Convert.ToInt32(pNum6) + ",";
                    string[] temp  = Notes.Split(',');
                    for (int k = 0; k < temp.Length; k++)
                    {
                        if (BVote.Contains("," + Convert.ToInt32(temp[k]) + ","))
                        {
                            IsWin = false;
                            break;
                        }
                    }
                }
                else if (new BCW.User.ForumInc().IsForum119(forumid) == true)//五尾
                {
                    string ws = Utils.Right(sNum, 1) + "尾";
                    if (("," + Notes + ",").Contains("," + ws + ","))
                    {
                        IsWin = true;
                    }
                }
                //------------公共部分---------------
                if (IsWin)
                {
                    int glznum = 1;
                    //if (new BCW.BLL.Forumvote().Exists(forumid, BID, UsID))
                    //{
                    //    glznum = 1;
                    //}
                    //更新中奖
                    new BCW.BLL.Forumvote().UpdateIsWin(ID, 1);
                    //增加总中奖记录数和连中、月中
                    int MonthCount = new BCW.BLL.Forumvote().GetMonthCount(forumid, BID, UsID);
                    new BCW.BLL.Text().UpdategGsNum(BID, 1, glznum, MonthCount);
                }
                //------------5连中或近6期中5加精,近6期错2取消精华------------

                int     winnum  = 0;
                int     lostnum = 0;
                DataSet ds2     = new BCW.BLL.Forumvote().GetList("TOP 6 IsWin", "ForumID=" + forumid + " and BID=" + BID + " and UsID=" + UsID + " order by id desc");
                if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
                {
                    for (int k = 0; k < ds2.Tables[0].Rows.Count; k++)
                    {
                        int iswin = int.Parse(ds2.Tables[0].Rows[k]["IsWin"].ToString());
                        if (iswin == 1)
                        {
                            winnum++;
                        }
                        else
                        {
                            lostnum++;
                        }
                    }
                }
                //帖子加精状态
                int IsGood = new BCW.BLL.Text().GetIsGood(BID);
                //加精操作,前提是非精华的帖子
                if (IsGood == 0)
                {
                    int Getglznum = new BCW.BLL.Text().Getglznum(BID);
                    if (Getglznum >= 5 || winnum >= 5)
                    {
                        new BCW.BLL.Text().UpdateIsGood(BID, 1);
                        //new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_GoodText, UsID);
                        string strLog = "主题[url=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + BID + "]《" + new BCW.BLL.Text().GetTitle(BID) + "》[/url]6期中5,被系统加为精华!";
                        new BCW.BLL.Forumlog().Add(1, forumid, BID, "[url=/bbs/uinfo.aspx?uid=" + UsID + "]" + UsName + "[/url]的" + strLog);
                        new BCW.BLL.Guest().Add(0, UsID, UsName, "您的" + strLog);
                    }
                }
                else
                {
                    //去精操作
                    if (lostnum >= 2)
                    {
                        new BCW.BLL.Text().UpdateIsGood(BID, 0);
                        string strLog = "主题[url=/bbs/topic.aspx?forumid=" + forumid + "&amp;bid=" + BID + "]《" + new BCW.BLL.Text().GetTitle(BID) + "》[/url]6期错2,被系统去掉精华!";
                        new BCW.BLL.Forumlog().Add(1, forumid, BID, "[url=/bbs/uinfo.aspx?uid=" + UsID + "]" + UsName + "[/url]的" + strLog);
                        new BCW.BLL.Guest().Add(0, UsID, UsName, "您的" + strLog);
                    }
                }

                //------------5连中或近6期中5加精,近6期错2取消精华------------
            }
        }
        //更新本论坛本期全部开奖结束
        string stat = "特" + sNum + ",平" + pNum1 + "-" + pNum2 + "-" + pNum3 + "-" + pNum4 + "-" + pNum5 + "-" + pNum6 + "";

        new BCW.BLL.Forumvote().UpdateState(Convert.ToInt32(qiNum), forumid, 1, stat);
        Utils.Success("开奖", "本坛开奖成功..", Utils.getUrl("Gsopen.aspx?forumid=" + forumid + ""), "1");
    }
Beispiel #27
0
    private void ReloadPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string TypeName = "文件";
        int    ptype    = 13;
        int    nid      = int.Parse(Utils.GetRequest("nid", "all", 2, @"^[1-9]\d*$", "ID无效"));

        if (!new BCW.BLL.Topics().ExistsIdTypes(nid, ptype))
        {
            Utils.Error("不存在的上传栏目", "");
        }
        if (!Utils.Isie())
        {
            Master.Title = "温馨提示";
            string VE  = ConfigHelper.GetConfigString("VE");
            string SID = ConfigHelper.GetConfigString("SID");
            builder.Append("<a href=\"addfile.aspx?nid=" + nid + "&amp;backurl=" + Utils.getPage(0) + "&amp;" + VE + "=2a&amp;" + SID + "=" + Utils.getstrU() + "\">[切换2.0上传]</a>");
        }
        else
        {
            Master.Title = "上传文件";
            builder.Append(Out.Tab("<div class=\"title\">WAP2.0上传文件</div>", ""));

            //上传个数
            int max = Convert.ToInt32(ub.GetSub("UpbMaxFileNum", xmlPath));
            int nn  = int.Parse(Utils.GetRequest("nn", "get", 1, @"^[0-9]\d*$", "1"));
            if (nn > max)
            {
                nn = max;
            }
            int num = int.Parse(Utils.GetRequest("num", "get", 1, @"^[0-9]\d*$", "1"));
            if (num > max)
            {
                num = max;
            }

            builder.Append(Out.Tab("<div>", "<br />"));

            builder.Append("上传:");
            for (int i = 1; i <= max; i++)
            {
                builder.Append("<a href=\"" + Utils.getUrl("addfile.aspx?num=" + i + "&amp;nn=" + nn + "") + "\"><b>" + i + "</b></a> ");
            }

            builder.Append(Out.Tab("</div>", ""));

            //编辑状态时的显示
            string sUpType = string.Empty;
            string sText   = string.Empty;
            string sName   = string.Empty;
            string sType   = string.Empty;
            string sValu   = string.Empty;
            string sEmpt   = string.Empty;

            sUpType = "上传";
            sText   = "" + TypeName + "标题:/," + TypeName + "描述:/,适用机型(多个逗号分开,可空):/,需要签证:/,";
            sName   = "Title,Content,Model,IsVisa,";
            sType   = "text,big,textarea,select,";
            sValu   = "'''0'";
            sEmpt   = "false,false,true,1|未知|2|需要|3|不需要,";


            strText += ",是否" + sUpType + "截图:/";
            strName += ",blpic";
            strType += ",select";
            strValu += "'False";
            strEmpt += ",True|上传|False|不上传";
            nn       = 0; //截图标识
            for (int i = 0; i < num; i++)
            {
                string y = ",";
                if (num == 1)
                {
                    strText = strText + y + "选择" + sUpType + "附件:/," + sUpType + "附件描述:/";
                }
                else
                {
                    strText = strText + y + "" + sUpType + "第" + (i + 1) + "个附件:/," + sUpType + "附件描述" + (i + 1) + ":/";
                }
                strName = strName + y + "file" + (i + 1) + y + "stext" + (i + 1);
                if (!Utils.Isie())
                {
                    strType = strType + y + "text" + y + "text";
                }
                else
                {
                    strType = strType + y + "file" + y + "text";
                }
                strValu = strValu + "''";
                strEmpt = strEmpt + y + y;
            }

            strText = sText + Utils.Mid(strText, 1, strText.Length) + ",,,,,";
            strName = sName + Utils.Mid(strName, 1, strName.Length) + ",ptype,nid,act,num,nn";
            strType = sType + Utils.Mid(strType, 1, strType.Length) + ",hidden,hidden,hidden,hidden,hidden";

            strValu = sValu + Utils.Mid(strValu, 1, strValu.Length) + "'" + ptype + "'" + nid + "'soft'" + num + "'" + nn + "";
            strEmpt = sEmpt + Utils.Mid(strEmpt, 1, strEmpt.Length) + ",,,,,";
            strIdea = "/";
            strOthe = "上传" + TypeName + "|reset,addfileok.aspx,post,2,red|blue";

            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("=上传帮助说明=<br />1.上传成功后将由管理员审核方可显示.<br />2.只有部分wap2.0手机支持上传,详情请咨询手机供应商.<br />3.文件上传需要时间较长,请耐心等待.");
            builder.Append(Out.Tab("</div>", ""));
        }
        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>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #28
0
    private void ReloadPage(int forumid)
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string GsAdminID = ub.GetSub("BbsGsAdminID", xmlPath);

        if (!("#" + GsAdminID + "#").Contains("#" + meid + "#"))
        {
            Utils.Error("权限不足", "");
        }

        int qiNum = int.Parse(Utils.GetRequest("qiNum", "all", 1, @"^[0-9]\d*$", "0"));

        if (qiNum == 0)
        {
            qiNum = Utils.ParseInt(ub.GetSub("BbsGsqiNum", xmlPath));
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("forum.aspx?forumid=" + forumid + "") + "\">" + new BCW.BLL.Forum().GetTitle(forumid) + "</a>");
        builder.Append("&gt;&gt;高手");
        builder.Append(Out.Tab("</div>", "<br />"));


        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("<b>本期第" + qiNum + "期,截止时间" + ub.GetSub("BbsGsStopTime", xmlPath) + "</b>");
        string sNum = new BCW.BLL.Forumvote().GetsNum(forumid, qiNum);

        if (sNum != "")
        {
            builder.Append("<br />本期已开奖:" + sNum + "");
        }
        else
        {
            builder.Append("<br /><a href=\"" + Utils.getUrl("Gsopen.aspx?act=open&amp;forumid=" + forumid + "&amp;qiNum=" + qiNum + "") + "\">马上开奖&gt;&gt;</a>");
        }

        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
        builder.Append("==第" + qiNum + "期参赛帖子==");
        builder.Append(Out.Tab("</div>", ""));
        int    pageIndex;
        int    recordCount;
        int    pageSize = 10;
        string strWhere = string.Empty;
        string strOrder = string.Empty;

        string[] pageValUrl = { "forumid", "qiNum", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        //查询条件
        strWhere = "Forumid=" + forumid + " and Types=8 and IsDel=0 and Gqinum=" + qiNum + "";
        //排序条件
        strOrder = "Istop Desc,ReTime Desc";
        // 开始读取列表
        IList <BCW.Model.Text> listText = new BCW.BLL.Text().GetTexts(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listText.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Text n in listText)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    builder.Append(Out.Tab("<div>", "<br />"));
                }

                builder.Append(BCW.User.AppCase.CaseIsTop(n.IsTop));
                builder.Append(BCW.User.AppCase.CaseIsGood(n.IsGood));
                builder.Append(BCW.User.AppCase.CaseIsRecom(n.IsRecom));
                builder.Append(BCW.User.AppCase.CaseIsLock(n.IsLock));
                builder.Append(BCW.User.AppCase.CaseIsOver(n.IsOver));
                builder.Append(BCW.User.AppCase.CaseText(n.Types));
                string TextTab = string.Empty;

                builder.AppendFormat("<a href=\"" + Utils.getUrl("/bbs/topic.aspx?forumid={0}&amp;bid={1}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}.{3}{4}</a><br />", n.ForumId, n.ID, (pageIndex - 1) * pageSize + k, TextTab, n.Title);
                builder.Append("" + n.UsName);
                builder.AppendFormat("/阅{0}/回<a href=\"" + Utils.getUrl("/bbs/reply.aspx?forumid={1}&amp;bid={2}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{3}</a>", n.ReadNum, n.ForumId, n.ID, n.ReplyNum);

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.ForumMultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "<br />没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("manwork.aspx?forumid=" + forumid + "") + "\">&lt;&lt;返回版务</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #29
0
    /// <summary>
    /// 手机验证
    /// </summary>
    private void validate()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        string keys = "";

        BCW.Model.User model = new BCW.BLL.User().GetKey(meid);
        keys = BCW.User.Users.SetUserKeys(meid, model.UsPwd, model.UsKey);
        string info   = Utils.GetRequest("info", "all", 1, "", "");
        string mobile = new BCW.BLL.User().GetMobile(meid);
        string code   = Utils.GetRequest("code", "all", 1, @"^[0-9]{4}$", "请输入验证码!"); //界面图形验证码                                                                      ////   string phoneCode = Utils.GetRequest("phoneCode", "post", 2, @"^[0-9]{4}$", "请输入手机验证码");  //手机验证码
        string mycode = "";

        try
        {
            mycode = Request.Cookies["validateCookie"].Values["ChkCode"].ToString();// 图形验证码
        }
        catch { }

        if (info == "")
        {
            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
            //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
            builder.Append(Out.Tab("</div>", ""));
            BCW.Model.tb_Validate getmo = null;
            DateTime endtime            = DateTime.Now.AddMinutes(-1);
            if (new BCW.BLL.tb_Validate().ExistsPhone(mobile, 1))              //注册验证码
            {
                getmo   = new BCW.BLL.tb_Validate().Gettb_Validate(mobile, 1); //获取注册验证码
                endtime = getmo.codeTime;
                string Reg = string.Empty;
                if (!Utils.Isie() && !Utils.GetUA().ToLower().Contains("opera/8"))
                {
                    Reg = new BCW.JS.somejs().daojishi2("Reg", endtime);
                }
                else
                {
                    Reg = new BCW.JS.somejs().daojishi("Reg", endtime);
                }
                if (endtime > DateTime.Now)
                {
                    builder.Append(Out.Tab("<div class=\"\">", Out.Hr()));
                    builder.Append("请在<b style=\"color:red\">" + Reg + "</b>秒后再次获取手机验证码<br/>");
                    builder.Append(Out.Tab("</div>", ""));
                }
            }
            string strText = "*请输入手机验证码:/,*请输入验证码:/,,,,";
            string strName = "phoneCode,code,info,mobile,act,backurl";
            string strType = "text,text,hidden,hidden,hidden,hidden";
            string strValu = "''ok'" + mobile + "'validate'" + Utils.getPage(0) + "";
            string strEmpt = "false,false,false,false,false,false";
            string strIdea = "<a href=\"" + Utils.getUrl("reg.aspx?act=validate&amp;info=ok&amp;ac=ok") + "\">获取手机验证码</a>'<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("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
            //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            string ac = Utils.GetRequest("ac", "all", 1, "", "");
            if (Utils.ToSChinese(ac).Contains("获取手机验证码") || ac == "ok")    //判断哪一个按键
            {
                #region 获取手机验证码
                if (!code.Equals(mycode))//验证码相等
                {
                    //   Utils.Error("很抱歉,您输入图形验证按不对,请刷新页面", "");
                }
                if (new BCW.BLL.tb_Validate().ExistsPhone(mobile, 1))//存在注册验证
                {
                    BCW.Model.tb_Validate getmo = new BCW.BLL.tb_Validate().Gettb_Validate(mobile, 1);
                    if (getmo.codeTime > DateTime.Now)//验证码存在切是新发的
                    {
                        string   dateDiff = null;
                        TimeSpan x        = getmo.codeTime - DateTime.Now;
                        dateDiff = x.TotalSeconds.ToString();
                        Utils.Error("很抱歉,请在" + dateDiff.Split('.')[0] + "秒之后再次获取手机验证码", "");
                    }
                }
                char[] character = { '0', '1', '2', '3', '4', '5', '6', '8', '9' };
                string mesCode   = string.Empty; //手机验证码
                Random rnd       = new Random();
                //生成验证码字符串
                for (int i = 0; i < 4; i++)
                {
                    mesCode += character[rnd.Next(character.Length)];
                }

                //int tm = 2;//短信过期时间分钟
                //int total = 15;//每天可以发的总短信量
                //int ipCount = 10;
                //int phoneCount = 10;
                int tm         = int.Parse(ub.GetSub("msgTime", "/Controls/guestlist.xml"));
                int total      = int.Parse(ub.GetSub("dayCount", "/Controls/guestlist.xml"));
                int ipCount    = int.Parse(ub.GetSub("IPCount", "/Controls/guestlist.xml"));
                int phoneCount = int.Parse(ub.GetSub("phoneCount", "/Controls/guestlist.xml"));
                int msgremain  = int.Parse(ub.GetSub("msgremain", "/Controls/guestlist.xml"));
                int callID     = int.Parse(ub.GetSub("callID", "/Controls/guestlist.xml"));
                if (new BCW.BLL.tb_Validate().ExistsPhone(mobile))//不是第一次获取短信
                {
                    DataSet  data       = new BCW.BLL.tb_Validate().GetList(" Top 1 *", "Phone=" + mobile + " order by time desc");
                    DateTime changeTime = Convert.ToDateTime(data.Tables[0].Rows[0]["Time"].ToString());
                    int      changeday  = changeTime.DayOfYear;
                    if ((DateTime.Now.DayOfYear - changeday) >= 1)//上一条短信不是在当天
                    {
                        BCW.Model.tb_Validate validate = new BCW.Model.tb_Validate();
                        validate.Phone    = mobile;
                        validate.IP       = Utils.GetUsIP();
                        validate.Time     = DateTime.Now.AddMinutes(0);
                        validate.Flag     = 1;
                        validate.mesCode  = mesCode;
                        validate.codeTime = DateTime.Now.AddMinutes(tm);
                        validate.type     = 1;
                        Mesege.Soap57ProviderService MesExt = new Mesege.Soap57ProviderService();
                        string result = "";
                        result = MesExt.Submit("000379", "123456", "1069032239089369", "【" + ub.GetSub("SiteName", "/Controls/wap.xml") + "】亲,您的验证码是:" + mesCode, mobile);
                        string[] results = result.Split('#');
                        if (results[8] != "0")
                        {
                            Utils.Error("请确认手机号的正确性,如不能为空号!", "");
                        }
                        if ((int.Parse(results[2]) / 80) < msgremain)
                        {
                            new BCW.BLL.Guest().Add(0, callID, "", "剩余短信数量低于" + msgremain + "条了,请注意!");
                        }
                        if (results[8] == "0")
                        {
                            new BCW.BLL.tb_Validate().Add(validate);
                            Utils.Success("获取手机验证码", "正在发送手机验证码,请查收", Utils.getUrl("reg.aspx?act=validate"), "2");
                        }
                    }
                    else//当天时间内
                    {
                        //获取当天的短信数量
                        DataSet dt2 = new BCW.BLL.tb_Validate().GetList("*", "Phone=" + mobile + " and time>='" + DateTime.Now.ToShortDateString() + "' order by time desc");
                        if (dt2.Tables[0].Rows.Count >= total)//当天时间内超过特定数
                        {
                            Utils.Error("抱歉!当天时间内过于频繁获取短信,请明天再试!", "");
                        }
                        DateTime check = DateTime.Now.AddMinutes(-30);
                        if (check.DayOfYear < DateTime.Now.DayOfYear)
                        {
                            check = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                        }
                        else
                        {
                            check = DateTime.Now.AddMinutes(-30);
                        }
                        //获取最近半小时的短信量
                        string  str = "Phone=" + mobile + " and time>='" + check + "' and time <='" + DateTime.Now + "' order by time desc";
                        DataSet dt1 = new BCW.BLL.tb_Validate().GetList("*", str);
                        if (data.Tables[0].Rows[0]["Flag"].ToString() == "0")//最新一条显示当天不能发送了
                        {
                            Utils.Error("抱歉!由于之前你存在频繁获取短信,请明天再试!", "");
                        }
                        string IP = Utils.GetUsIP();
                        //查看限制IP
                        string  str1 = "IP= '" + IP + "' and time>='" + check + "' and time <='" + DateTime.Now + "' order by time desc";
                        DataSet dt3  = new BCW.BLL.tb_Validate().GetList("*", str1);
                        if (dt3.Tables[0].Rows.Count >= ipCount)//半小时内超过10条
                        {
                            ////跟新标示
                            //int ID = int.Parse(dt3.Tables[0].Rows[0]["ID"].ToString());
                            //new BCW.BLL.tb_Validate().UpdateFlag(0, ID);
                            Utils.Error("当前IP过于频繁获取短信,请明天再试!" + dt3.Tables[0].Rows.Count, "");
                        }
                        if (dt1.Tables[0].Rows.Count >= phoneCount)//半小时内超过10条
                        {
                            //跟新标示
                            int ID = int.Parse(dt1.Tables[0].Rows[0]["ID"].ToString());
                            new BCW.BLL.tb_Validate().UpdateFlag(0, ID);
                            Utils.Error("请勿频繁获取短信,请明天再试!", "");
                        }
                        else
                        {
                            BCW.Model.tb_Validate validate = new BCW.Model.tb_Validate();
                            validate.Phone    = mobile;
                            validate.IP       = Utils.GetUsIP();
                            validate.Time     = DateTime.Now.AddMinutes(0);
                            validate.Flag     = 1;
                            validate.mesCode  = mesCode;
                            validate.codeTime = DateTime.Now.AddMinutes(tm);
                            validate.type     = 1;
                            Mesege.Soap57ProviderService MesExt = new Mesege.Soap57ProviderService();
                            string result = "";
                            result = MesExt.Submit("000379", "123456", "1069032239089369", "【" + ub.GetSub("SiteName", "/Controls/wap.xml") + "】亲,您的验证码是:" + mesCode, mobile);
                            string[] results = result.Split('#');
                            if (results[8] != "0")
                            {
                                Utils.Error("请确认手机号的正确性,如不能为空号!", "");
                            }
                            if ((int.Parse(results[2]) / 80) < msgremain)
                            {
                                new BCW.BLL.Guest().Add(0, callID, "", "剩余短信数量低于" + msgremain + "条了,请注意!");
                            }
                            if (results[8] == "0")
                            {
                                new BCW.BLL.tb_Validate().Add(validate);
                                Utils.Success("获取手机验证码", "正在发送手机验证码,请查收", Utils.getUrl("reg.aspx?act=validate"), "2");
                            }
                        }
                    }
                }
                else
                {
                    BCW.Model.tb_Validate validate = new BCW.Model.tb_Validate();
                    validate.Phone    = mobile;
                    validate.IP       = Utils.GetUsIP();
                    validate.Time     = DateTime.Now.AddMinutes(0);
                    validate.Flag     = 1;
                    validate.mesCode  = mesCode;
                    validate.codeTime = DateTime.Now.AddMinutes(tm);
                    validate.type     = 1;
                    Mesege.Soap57ProviderService MesExt = new Mesege.Soap57ProviderService();
                    string result = "";
                    result = MesExt.Submit("000379", "123456", "1069032239089369", "【" + ub.GetSub("SiteName", "/Controls/wap.xml") + "】亲,您的验证码是:" + mesCode, mobile);
                    string[] results = result.Split('#');
                    if (results[8] != "0")
                    {
                        Utils.Error("请确认手机号的正确性,如不能为空号!", "");
                    }
                    if ((int.Parse(results[2]) / 80) < msgremain)
                    {
                        new BCW.BLL.Guest().Add(0, callID, "", "剩余短信数量低于" + msgremain + "条了,请注意!");
                    }
                    if (results[8] == "0")
                    {
                        new BCW.BLL.tb_Validate().Add(validate);
                        Utils.Success("获取手机验证码", "正在发送手机验证码,请查收", Utils.getUrl("reg.aspx?act=validate"), "2");
                    }
                }


                #endregion
            }
            else
            {
                //  Utils.Error("come here", "");
                string phoneCode = Utils.GetRequest("phoneCode", "post", 2, @"^[0-9]{4}$", "请输入正确的四位手机验证码"); //手机验证码
                if (!code.Equals(mycode))                                                                    //验证码相等
                {
                    Utils.Error("很抱歉,您输入图形验证按不对,请刷新页面", "");
                }
                BCW.Model.tb_Validate getmo = null;
                if (new BCW.BLL.tb_Validate().ExistsPhone(mobile, 1))//有发送注册过验证码
                {
                    getmo = new BCW.BLL.tb_Validate().Gettb_Validate(mobile, 1);
                    if (getmo.codeTime > DateTime.Now)        //验证码存在且是新发的
                    {
                        if (!phoneCode.Equals(getmo.mesCode)) //验证码不相等
                        {
                            Utils.Error("很抱歉,您输入手机验证码不对222", "");
                        }
                    }
                    else
                    {
                        Utils.Error("手机验证码过期,请重新获取", "");
                    }
                }
                else//没发送过注册验证码
                {
                    Utils.Error("很抱歉,您输入手机验证码不对111", "");
                }
                //积分操作
                new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_RegUser, meid);
                //if (rd > 0 && model.IsVerify == 1)
                //{
                //    new BCW.User.Cent().UpdateCent(BCW.User.Cent.enumRole.Cent_RecomUser, rd);
                //}
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>");
                //   builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
                //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
                builder.Append(Out.Tab("</div>", ""));
                new BCW.BLL.User().UpdateIsVerify(mobile, 1);
                //string strText = "";
                //string strName = "act";
                //string strType = "hidden";
                //string strValu = "recommended";
                //string strEmpt = "false";
                //string strIdea = "/";
                //string strOthe = "马上填写推荐人ID,reg.aspx,post,0,red";
                //builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                Utils.Success("验证成功,请填写推荐人ID", "验证成功,请填写推荐人ID", Utils.getUrl("reg.aspx?act=recommended"), "3");
                builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
                builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">首页</a>");
                //   builder.Append("<a href=\"/bbs/uinfo.aspx?ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">空间</a>");
                //  builder.Append("<a href=\"/bbs/myedit.aspx?act=basic&amp;ve=" + Utils.getstrVe() + "&amp;u=" + keys + "\">-完善资料</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
        }
    }
Beispiel #30
0
    private void UIDOkPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        Master.Title = "兑换靓号";

        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误"));

        BCW.Model.SellNum model = new BCW.BLL.SellNum().GetSellNum(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.UsID != meid)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.State == 1)
        {
            Utils.Error("请等待系统报价", "");
        }
        if (model.State == 3)
        {
            Utils.Error("已申请兑换,请等待系统回复", "");
        }
        if (model.State == 4)
        {
            Utils.Error("此条记录已完成", "");
        }
        string info = Utils.GetRequest("info", "all", 1, "", "");

        if (info == "ok")
        {
            string mobile = Utils.GetRequest("mobile", "post", 2, @"^(?:13|14|15|18)\d{9}$", "请正确输入十一位数的手机号码");

            if (new BCW.BLL.SellNum().Exists(0, model.BuyUID, 3))
            {
                Utils.Error("此靓号已被别人抢先兑换了", "");
            }
            //再次确定此号已注册
            if (new BCW.BLL.User().Exists(model.BuyUID))
            {
                Utils.Error("此靓号已被别人抢先注册了", "");
            }

            if (new BCW.BLL.User().Exists(mobile))
            {
                Utils.Error("此手机号" + mobile + "已绑定在其它ID上", "");
            }
            long gold = new BCW.BLL.User().GetGold(meid);
            if (gold < model.Price)
            {
                Utils.Error("你的" + ub.Get("SiteBz") + "不足", "");
            }
            //支付安全提示
            string[] p_pageArr = { "act", "mobile", "id", "info", "backurl" };
            BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr, "post", false);

            new BCW.BLL.SellNum().UpdateState3(id, mobile);
            //扣币
            string mename = new BCW.BLL.User().GetUsName(meid);
            new BCW.BLL.User().UpdateiGold(meid, mename, -model.Price, "兑换靓号ID" + model.BuyUID + "");

            //发信息通知管理员
            new BCW.BLL.Guest().Add(10086, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]兑换ID" + model.BuyUID + ",请进入后台处理");
            new BCW.BLL.Guest().Add(19611, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]兑换ID" + model.BuyUID + ",请进入后台处理");
            //if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th"))
            //{
            //    new BCW.BLL.Guest().Add(1010, "靓号管理员", "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]兑换ID" + model.BuyUID + ",请进入后台处理");
            //}
            //动态记录
            new BCW.BLL.Action().Add(meid, mename, "在[URL=/bbs/spaceapp/sellnum.aspx?act=uidbuy]兑换靓号处[/URL]成功兑换靓号ID" + model.BuyUID + "");


            Utils.Success("靓号", "靓号兑换成功,请等待系统回复...", Utils.getUrl("sellnum.aspx?act=uidlist&amp;ptype=3"), "2");
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"title\">兑换靓号</div>", ""));

            builder.Append(Out.Tab("<div>", ""));
            builder.Append("你要兑换的ID:" + model.BuyUID + ",兑换价为" + model.Price + "" + ub.Get("SiteBz") + "");
            builder.Append(Out.Tab("</div>", "<br />"));
            string strText = "输入你要绑定的手机号:/,,,,";
            string strName = "mobile,id,act,info,backurl";
            string strType = "num,hidden,hidden,hidden,hidden";
            string strValu = "'" + id + "'uidok'ok'" + Utils.getPage(0) + "";
            string strEmpt = "true,false,false,false,false";
            string strIdea = "";
            string strOthe = "确定兑换,sellnum.aspx,post,3,red";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

            builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
            builder.Append("温馨提示:<br />在兑换成功7天内可以用支出" + ub.Get("SiteBz") + "的ID内线<a href=\"" + Utils.getUrl("/bbs/guest.aspx?act=add&amp;hid=10086") + "\">客服(10086)</a>把现用的ID资料(包括发帖、回帖、" + ub.Get("SiteBz") + "等)全部转移到兑换的新ID中,超过7天不再受理.");
            builder.Append("<a href=\"" + Utils.getUrl("sellnum.aspx?act=uidlist") + "\">我的靓号记录</a>");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
            builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
            builder.Append("<a href=\"" + Utils.getPage("../uinfo.aspx") + "\">上级</a>-");
            builder.Append("<a href=\"" + Utils.getUrl("../uinfo.aspx") + "\">空间</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
    }