Example #1
0
    private void BackSavePage(string act)
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1)
        {
            Utils.Error("权限不足", "");
        }

        int iTar   = Utils.ParseInt(Utils.GetRequest("iTar", "post", 2, @"^[0-9]\d*$", "千分比填写错误"));
        int iPrice = Utils.ParseInt(Utils.GetRequest("iPrice", "post", 2, @"^[0-9]\d*$", "至少多少币才返填写错误"));

        if (act == "backsave")
        {
            DataSet ds = new BCW.BLL.Toplist().GetList("UsID,sum(WinGold + PutGold) as WinCents", "Types=9 group by UsID order by sum(WinGold + PutGold) desc");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                long Cents = Convert.ToInt64(ds.Tables[0].Rows[i]["WinCents"]);
                if (Cents > 0 && Cents >= iPrice)
                {
                    int  usid = Convert.ToInt32(ds.Tables[0].Rows[i]["UsID"]);
                    long cent = Convert.ToInt64(Cents * (iTar * 0.001));
                    new BCW.BLL.User().UpdateiGold(usid, cent, "大小庄返赢");
                    //发内线
                    string strLog = "根据你上期大小庄排行榜上的赢利情况,系统自动返还了" + cent + "" + ub.Get("SiteBz") + "[url=/bbs/game/bigsmall.aspx]进入大小庄[/url]";

                    new BCW.BLL.Guest().Add(0, usid, new BCW.BLL.User().GetUsName(usid), strLog);
                }
            }

            Utils.Success("返赢操作", "返赢操作成功", Utils.getUrl("bigsmall.aspx"), "1");
        }
        else
        {
            DataSet ds = new BCW.BLL.Toplist().GetList("UsID,sum(WinGold + PutGold) as WinCents", "Types=9 group by UsID order by sum(WinGold + PutGold) desc");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                long Cents = Convert.ToInt64(ds.Tables[0].Rows[i]["WinCents"]);
                if (Cents < 0 && Cents < (-iPrice))
                {
                    int  usid = Convert.ToInt32(ds.Tables[0].Rows[i]["UsID"]);
                    long cent = Convert.ToInt64((-Cents) * (iTar * 0.001));
                    new BCW.BLL.User().UpdateiGold(usid, cent, "大小庄返负");
                    //发内线
                    string strLog = "根据你上期大小庄排行榜上的亏损情况,系统自动返还了" + cent + "" + ub.Get("SiteBz") + "[url=/bbs/game/bigsmall.aspx]进入大小庄[/url]";
                    new BCW.BLL.Guest().Add(0, usid, new BCW.BLL.User().GetUsName(usid), strLog);
                }
            }

            Utils.Success("返负操作", "返负操作成功", Utils.getUrl("bigsmall.aspx"), "1");
        }
    }
Example #2
0
    /// <summary>
    /// 排行榜
    /// </summary>
    private void TopPage()
    {
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-2]$", "1"));

        Master.Title = "疯狂彩球排行榜";
        builder.Append(Out.Tab("<div class=\"title\">", ""));

        if (ptype == 1)
        {
            builder.Append("赚币排行|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=top&amp;ptype=1") + "\">赚币排行</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("胜率排行");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=top&amp;ptype=2") + "\">胜率排行</a>");
        }
        builder.Append(Out.Tab("</div>", "<br />"));

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

        string[] pageValUrl = { "act", "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        strWhere = "Types=6";
        if (ptype == 1)
        {
            strOrder = "(WinGold+PutGold) Desc";
        }
        else
        {
            strOrder = "(WinNum-PutNum) Desc";
        }

        // 开始读取列表
        IList <BCW.Model.Toplist> listToplist = new BCW.BLL.Toplist().GetToplists(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listToplist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Toplist n in listToplist)
            {
                n.UsName = BCW.User.Users.SetVipName(n.UsId, n.UsName, false);
                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 sText = string.Empty;
                if (ptype == 1)
                {
                    sText = "净赢" + (n.WinGold + n.PutGold) + "" + ub.Get("SiteBz") + "";
                }
                else
                {
                    sText = "胜" + (n.WinNum - n.PutNum) + "次";
                }

                builder.AppendFormat("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid={0}&amp;backurl=" + Utils.getPage(1) + "") + "\">{1}</a>{2}", n.UsId, n.UsName, sText);
                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("ball.aspx") + "\">彩球</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Example #3
0
    /// <summary>
    /// 排行榜
    /// </summary>
    private void TopPage()
    {
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-2]$", "1"));

        Master.Title = "排行榜";
        builder.Append(Out.Tab("<div class=\"title\">", ""));

        if (ptype == 1)
        {
            builder.Append("剪刀赌神|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=top&amp;ptype=1") + "\">剪刀赌神</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("剪刀狂人");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=top&amp;ptype=2") + "\">剪刀狂人</a>");
        }
        builder.Append(Out.Tab("</div>", "<br />"));

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

        string[] pageValUrl = { "act" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        strWhere = "Types=1";
        if (ptype == 1)
        {
            strOrder = "(WinGold+PutGold) Desc";
        }
        else
        {
            strOrder = "PutNum Desc";
        }

        // 开始读取列表
        IList <BCW.Model.Toplist> listToplist = new BCW.BLL.Toplist().GetToplists(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listToplist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Toplist n in listToplist)
            {
                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 sText = string.Empty;
                if (ptype == 1)
                {
                    sText = "净赢" + (n.WinGold - n.PutGold) + "" + ub.Get("SiteBz") + "";
                }
                else
                {
                    sText = "共出手" + n.PutNum + "次";
                }

                builder.AppendFormat("<a href=\"" + Utils.getUrl("uinfo.aspx?uid={0}") + "\">{1}</a>{2}", n.UsId, n.UsName, sText);
                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=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx?act=clear") + "\">清空排行榜</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("stone.aspx") + "\">返回上一级</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Example #4
0
    private void TopPage()
    {
        Master.Title = "排行榜管理";
        int ptype    = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-9]\d*$", "1"));
        int showtype = int.Parse(Utils.GetRequest("showtype", "all", 1, @"^[1-2]$", "1"));

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        if (sName.Length < ptype)
        {
            Utils.Error("不存在的类型", "");
        }

        builder.Append("" + sName[ptype - 1] + "排行榜");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (showtype == 1)
        {
            builder.Append("游戏赌神|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("toplist.aspx?act=top&amp;ptype=" + ptype + "&amp;showtype=1&amp;backurl=" + Utils.getPage(0) + "") + "\">游戏赌神</a>|");
        }

        if (showtype == 2)
        {
            builder.Append("游戏狂人");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("toplist.aspx?act=top&amp;ptype=" + ptype + "&amp;showtype=2&amp;backurl=" + Utils.getPage(0) + "") + "\">游戏狂人</a>");
        }

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

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

        //查询条件
        strWhere = "Types=" + ptype + "";

        //排序条件
        if (ptype == 1 || ptype == 2)
        {
            if (showtype == 1)
            {
                strOrder = "(WinGold+PutGold) Desc";
            }
            else
            {
                strOrder = "PutNum Desc";
            }
        }
        else
        {
            if (showtype == 1)
            {
                strOrder = "(WinGold+PutGold) Desc";
            }
            else
            {
                strOrder = "(WinNum-PutNum) Desc";
            }
        }
        // 开始读取列表
        IList <BCW.Model.Toplist> listToplist = new BCW.BLL.Toplist().GetToplists(pageIndex, pageSize, strWhere, strOrder, out recordCount);

        if (listToplist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Toplist n in listToplist)
            {
                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 sText = string.Empty;
                if (ptype == 1 || ptype == 2)
                {
                    if (showtype == 1)
                    {
                        sText = "净赢" + (n.WinGold + n.PutGold) + "" + ub.Get("SiteBz") + "";
                    }
                    else
                    {
                        sText = "共出手" + n.PutNum + "次";
                    }
                }
                else
                {
                    if (showtype == 1)
                    {
                        sText = "净赢" + (n.WinGold + n.PutGold) + "" + ub.Get("SiteBz") + "";
                    }
                    else
                    {
                        sText = "胜" + (n.WinNum - n.PutNum) + "次";
                    }
                }
                builder.AppendFormat("{0}.<a href=\"" + Utils.getUrl("uinfo.aspx?uid={1}&amp;backurl=" + Utils.getPage(1) + "") + "\">{2}</a>{3}", (pageIndex - 1) * pageSize + k, n.UsId, n.UsName, sText);
                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=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("toplist.aspx?act=del&amp;ptype=" + ptype + "&amp;backurl=" + Utils.getPage(0) + "") + "\">清空记录</a><br />");
        builder.Append("<a href=\"" + Utils.getPage("default.aspx") + "\">返回上一级</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }