Ejemplo n.º 1
0
    /// <summary>
    /// 复制消息
    /// </summary>
    private void CopygPage(int uid)
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID错误"));

        if (!new BCW.BLL.Guest().Exists(id))
        {
            Utils.Error("不存在的记录", "");
        }
        BCW.Model.Guest model = new BCW.BLL.Guest().GetGuest(id);
        if (model.FromId == uid)
        {
            if (!new BCW.BLL.Guest().ExistsFrom(id, uid))
            {
                Utils.Error("不存在的记录", "");
            }
        }
        else
        {
            if (!new BCW.BLL.Guest().ExistsTo(id, uid))
            {
                Utils.Error("不存在的记录", "");
            }
        }

        string Content = model.Content;

        new BCW.BLL.User().UpdateCopytemp(uid, Content);
        Utils.Success("复制消息内容", "恭喜,复制消息内容成功,正在返回..", Utils.getUrl("guest.aspx?act=view&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + ""), "1");
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "新消息声音提示(本页20秒刷新一次)";
        //Master.IsFoot = false;
        Master.Refresh = 20;
        Master.Gourl   = Utils.getUrl("Sms10086.aspx");

        int uid = new BCW.User.Users().GetUsId();

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

        bool Isgo = false;

        if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th"))
        {
            if (uid == 111 || uid == 666 || uid == 888 || uid == 555 || uid == 10086 || uid == 100)
            {
                Isgo = true;
            }
        }
        else
        {
            if (uid == 1119 || uid == 8888 || uid == 666888 || uid == 388 || uid == 7888 || uid == 10086)
            {
                Isgo = true;
            }
        }
        if (Isgo)
        {
            int meid = uid;

            int smsCount  = new BCW.BLL.Guest().GetCount(meid);
            int smsXCount = new BCW.BLL.Guest().GetXCount(meid);
            if (smsCount > 0 || smsXCount > 0)
            {
                string GuestText = "<b>新内线(" + smsCount + ")系统(" + smsXCount + ")</b><br />";

                builder.Append(Out.Tab("<div>", ""));
                builder.Append(GuestText);
                builder.Append("<embed src=\"sms.wav\" height=\"0\" width=\"0\"/>使用IE、opera8.54等浏览器可以听到声音提示");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("暂无新消息");
                builder.Append(Out.Tab("</div>", ""));
            }
        }
    }
Ejemplo n.º 3
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.Users.ShowVerifyRole("c", meid);//非验证会员提示
        }
        try
        {
            BCW.User.Master.ShowMaster(meid, _Title);
        }
        catch { }

        #region 定期查询8波数据是否中断 注释
        ////定期查询8波数据是否中断
        //string xmlPath = "/Controls/guess2.xml";
        //Application.Remove(xmlPath);//清缓存
        //int checkgidsec = Utils.ParseInt(ub.GetSub("Sitecheckgidsec", xmlPath));
        //if (checkgidsec > 0)
        //{
        //    DateTime GuessOddsTime = new BCW.BLL.SysTemp().GetGuessOddsTime(1);//得到水位更新的最新时间

        //    string gidIDS = "";
        //    if (GuessOddsTime.AddSeconds(checkgidsec) < DateTime.Now)
        //    {
        //        DataSet ds = new TPR2.BLL.guess.BaList().GetBaListList("id", "p_active=0 and p_del=0 and p_ison=1");
        //        if (ds != null && ds.Tables[0].Rows.Count > 0)
        //        {
        //            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        //            {
        //                int gid = int.Parse(ds.Tables[0].Rows[i]["id"].ToString());
        //                //隐藏赛事
        //                TPR2.Model.guess.BaList model = new TPR2.Model.guess.BaList();
        //                model.ID = gid;
        //                model.p_del = 1;
        //                new TPR2.BLL.guess.BaList().Updatep_del(model);
        //                gidIDS += "#" + gid;
        //            }
        //            gidIDS = Utils.Mid(gidIDS, 1, gidIDS.Length);
        //        }
        //        if (gidIDS != "")
        //        {
        //            ub xml = new ub();
        //            xml.ReloadSub(xmlPath); //加载配置
        //            xml.dss["SitecheckgidIDS"] = gidIDS;
        //            System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //        }
        //    }
        //    else
        //    {
        //        //被隐藏的走地赛事显示出来

        //        gidIDS = ub.GetSub("SitecheckgidIDS", xmlPath);
        //        if (gidIDS != "")
        //        {
        //            string[] gidTemp = gidIDS.Split("#".ToCharArray());
        //            for (int i = 0; i < gidTemp.Length; i++)
        //            {
        //                int gid = Utils.ParseInt(gidTemp[i]);
        //                //显示赛事
        //                TPR2.Model.guess.BaList model = new TPR2.Model.guess.BaList();
        //                model.ID = gid;
        //                model.p_del = 0;
        //                new TPR2.BLL.guess.BaList().Updatep_del(model);
        //            }
        //            ub xml = new ub();
        //            xml.ReloadSub(xmlPath); //加载配置
        //            xml.dss["SitecheckgidIDS"] = "";
        //            System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //        }
        //    }
        //}


        ////定期查询8波数据是否中断
        //string xmlPath = "/Controls/guess2.xml";
        //Application.Remove(xmlPath);//清缓存
        //string checkgid = ub.GetSub("Sitecheckgid", xmlPath);
        //int checkgidsec = Utils.ParseInt(ub.GetSub("Sitecheckgidsec", xmlPath));
        //int checkgidzd = 0;
        //int getoldgid = 0;
        // TPR2.Model.guess.BaList model = new TPR2.Model.guess.BaList();
        // try
        // {


        //     if (checkgidsec > 0)
        //     {
        //         DataSet ds = null;
        //         int getgid = 0;
        //         DateTime gettime = DateTime.Parse("1990-1-1");



        //         //==============================判断旧一场比赛是否还可以继续参照开始====================================
        //         getoldgid = Utils.ParseInt(ub.GetSub("SitecheckgidID", xmlPath));
        //         if (getoldgid > 0)
        //         {
        //             //即时更新比赛水位
        //             int p_type = Utils.ParseInt(ub.GetSub("SitecheckgidType", xmlPath));
        //             int p_id = Utils.ParseInt(ub.GetSub("SitecheckgidPID", xmlPath));

        //             if (p_type == 1)
        //             {
        //                 new TPR2.Collec.Footbo().GetBoView(p_id, true);
        //             }
        //             else
        //             {
        //                 new TPR2.Collec.Basketbo().GetBoView(p_id, true);
        //             }
        //             model = new TPR2.BLL.guess.BaList().GetModel(getoldgid);
        //             if (model != null)
        //             {
        //                 if (model.p_ison == 1 && model.p_active == 0)
        //                 {
        //                     if (model.p_type == 1)
        //                     {
        //                         if (model.p_once.Contains("+") || model.p_once.Contains("加") || model.p_once.Contains("点") || model.p_once.Contains("中") || model.p_once.Contains("推迟") || model.p_once.Contains("腰斩") || model.p_once.Contains("取消"))
        //                             getoldgid = 0;

        //                         if (Utils.ParseInt(model.p_once) >= 85)
        //                             getoldgid = 0;
        //                     }
        //                     else
        //                     {
        //                         if (Convert.ToDateTime(model.p_TPRtime) < DateTime.Now.AddMinutes(-45))
        //                             getoldgid = 0;
        //                     }
        //                 }
        //                 else
        //                     getoldgid = 0;
        //             }
        //             else
        //             {
        //                 getoldgid = 0;
        //             }
        //         }
        //         //==============================判断旧一场比赛是否还可以继续参照结束====================================

        //         //==============================START如果旧参照比赛还可以继续使用则进行逻辑判断====================================

        //         if (getoldgid > 0)
        //         {

        //             //原数据
        //             string oldodds = ub.GetSub("SitecheckgidODDS", xmlPath);
        //             //新数据
        //             string newodds = model.p_one_lu + "_" + model.p_two_lu + "_" + model.p_big_lu + "_" + model.p_small_lu + "_" + model.p_bzs_lu + "_" + model.p_bzp_lu + "_" + model.p_bzx_lu + "";
        //             //更新时间
        //             DateTime dt = DateTime.Parse(ub.GetSub("SitecheckgidTIME", xmlPath));

        //             string gidIDS = "";
        //             if (oldodds == newodds && dt.AddSeconds(checkgidsec) < DateTime.Now)
        //             {
        //                 ds = new TPR2.BLL.guess.BaList().GetBaListList("id", "p_active=0 and p_del=0 and p_ison=1");
        //                 if (ds != null && ds.Tables[0].Rows.Count > 0)
        //                 {
        //                     for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        //                     {
        //                         int gid = int.Parse(ds.Tables[0].Rows[i]["id"].ToString());
        //                         //隐藏赛事
        //                         model.ID = gid;
        //                         model.p_del = 1;
        //                         new TPR2.BLL.guess.BaList().Updatep_del(model);
        //                         gidIDS += "#" + gid;
        //                     }
        //                     gidIDS = Utils.Mid(gidIDS, 1, gidIDS.Length);
        //                 }
        //                 if (gidIDS != "")
        //                 {
        //                     ub xml = new ub();
        //                     xml.ReloadSub(xmlPath); //加载配置
        //                     xml.dss["SitecheckgidIDS"] = gidIDS;
        //                     xml.dss["SitecheckgidTIME"] = DateTime.Now;
        //                     System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //                 }
        //             }
        //             if (oldodds != newodds)
        //             {

        //                 //被隐藏的走地赛事显示出来
        //                 if (checkgidzd == 0)
        //                 {
        //                     gidIDS = ub.GetSub("SitecheckgidIDS", xmlPath);
        //                     if (gidIDS != "")
        //                     {
        //                         string[] gidTemp = gidIDS.Split("#".ToCharArray());
        //                         for (int i = 0; i < gidTemp.Length; i++)
        //                         {
        //                             int gid = Utils.ParseInt(gidTemp[i]);
        //                             //显示赛事
        //                             model.ID = gid;
        //                             model.p_del = 0;
        //                             new TPR2.BLL.guess.BaList().Updatep_del(model);
        //                         }

        //                     }
        //                 }
        //                 ub xml = new ub();
        //                 xml.ReloadSub(xmlPath); //加载配置
        //                 xml.dss["SitecheckgidODDS"] = newodds;
        //                 xml.dss["SitecheckgidTIME"] = DateTime.Now;
        //                 xml.dss["SitecheckgidIDS"] = "";
        //                 System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //             }


        //         }
        //         //==============================OVER如果旧参照比赛还可以继续使用则进行逻辑判断====================================
        //         //==============================新增一场参照比赛开始====================================
        //         else
        //         {
        //             if (checkgid != "")
        //             {
        //                 string[] gidTemp = checkgid.Split("#".ToCharArray());
        //                 for (int i = 0; i < gidTemp.Length; i++)
        //                 {
        //                     int gid = Utils.ParseInt(gidTemp[i]);
        //                     ds = new TPR2.BLL.guess.BaList().GetBaListList("p_type,p_TPRTime,p_once", "id=" + gid + " and p_active=0 and p_ison=1");
        //                     if (ds != null && ds.Tables[0].Rows.Count > 0)
        //                     {
        //                         int p_type = int.Parse(ds.Tables[0].Rows[0]["p_type"].ToString());
        //                         DateTime p_TPRTime = Convert.ToDateTime(ds.Tables[0].Rows[0]["p_TPRTime"].ToString());
        //                         string p_once = ds.Tables[0].Rows[0]["p_once"].ToString();
        //                         if (p_type == 1)
        //                         {
        //                             if (p_once.Contains("+") || p_once.Contains("加") || p_once.Contains("点") || p_once.Contains("中") || p_once.Contains("推迟") || p_once.Contains("腰斩") || p_once.Contains("取消"))
        //                                 continue;

        //                             if (Utils.ParseInt(p_once) >= 85)
        //                                 continue;
        //                         }
        //                         else
        //                         {
        //                             if (p_TPRTime < DateTime.Now.AddMinutes(-45))
        //                                 continue;
        //                         }
        //                         if (p_TPRTime > gettime)
        //                         {
        //                             gettime = p_TPRTime;
        //                             getgid = gid;
        //                         }

        //                     }
        //                 }

        //             }
        //             //如果设定的赛事取不到getgid,gettime,则随机取一场
        //             if (getgid == 0)
        //             {
        //                 ds = new TPR2.BLL.guess.BaList().GetBaListList("id", "p_type=1 and p_active=0 and p_del=0 and p_ison=1 and p_TPRTime>'" + DateTime.Now.AddMinutes(-100) + "' order by NEWID()");
        //                 if (ds != null && ds.Tables[0].Rows.Count > 0)
        //                 {
        //                     getgid = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
        //                 }
        //                 else
        //                 {
        //                     ds = new TPR2.BLL.guess.BaList().GetBaListList("id", "p_type=2 and p_active=0 and p_del=0 and p_ison=1 and p_TPRTime>'" + DateTime.Now.AddMinutes(-45) + "' order by NEWID()");
        //                     if (ds != null && ds.Tables[0].Rows.Count > 0)
        //                     {
        //                         getgid = int.Parse(ds.Tables[0].Rows[0]["id"].ToString());
        //                     }
        //                 }
        //             }

        //             //得到ID取实体记录到XML
        //             if (getgid > 0)
        //             {
        //                 model = new TPR2.BLL.guess.BaList().GetModel(getgid);
        //                 if (model != null)
        //                 {
        //                     string NewOdds = model.p_one_lu + "_" + model.p_two_lu + "_" + model.p_big_lu + "_" + model.p_small_lu + "_" + model.p_bzs_lu + "_" + model.p_bzp_lu + "_" + model.p_bzx_lu + "";

        //                     ub xml = new ub();
        //                     //Application.Remove(xmlPath);//清缓存
        //                     xml.ReloadSub(xmlPath); //加载配置
        //                     xml.dss["SitecheckgidID"] = getgid;
        //                     xml.dss["SitecheckgidODDS"] = NewOdds;
        //                     xml.dss["SitecheckgidTIME"] = DateTime.Now;
        //                     xml.dss["SitecheckgidType"] = model.p_type;
        //                     xml.dss["SitecheckgidPID"] = model.p_id;
        //                     System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //                 }

        //             }
        //         }
        //         //==============================新增一场参照比赛结束====================================
        //     }
        // }
        // catch { }


        // if (getoldgid == 0)
        // {
        //     //被隐藏的走地赛事显示出来
        //     if (checkgidzd == 0)
        //     {
        //         string gidIDS = ub.GetSub("SitecheckgidIDS", xmlPath);
        //         if (gidIDS != "")
        //         {
        //             string[] gidTemp = gidIDS.Split("#".ToCharArray());
        //             for (int i = 0; i < gidTemp.Length; i++)
        //             {
        //                 int gid = Utils.ParseInt(gidTemp[i]);
        //                 //显示赛事
        //                 model.ID = gid;
        //                 model.p_del = 0;
        //                 new TPR2.BLL.guess.BaList().Updatep_del(model);
        //             }
        //             ub xml = new ub();
        //             xml.ReloadSub(xmlPath); //加载配置
        //             xml.dss["SitecheckgidTIME"] = DateTime.Now;
        //             xml.dss["SitecheckgidIDS"] = "";
        //             System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
        //         }
        //     }
        // }
        #endregion

        #region 走地赛事下注确认
        //走地赛事下注确认
        //HttpContext.Current.Application.Lock();
        //DataSet dss = new TPR2.BLL.guess.BaPay().GetBaPayList("pType,PayType,payview,ID,bcid,payusid,payusname,paytimes,payCent,types,p_result_temp1,p_result_temp2,state,payonLuone,payonLutwo,payonLuthr,p_pk,p_dx_pk,p_oncetime2,sure", "p_active=0 and (state=1 OR state=2 OR state=3 OR state=4) order by id desc");
        //if (dss != null && dss.Tables[0].Rows.Count > 0)
        //{
        //    for (int i = 0; i < dss.Tables[0].Rows.Count; i++)
        //    {
        //        #region 变量
        //        int pType = int.Parse(dss.Tables[0].Rows[i]["pType"].ToString());
        //        int PayType = int.Parse(dss.Tables[0].Rows[i]["PayType"].ToString());
        //        int zdtime = 0;
        //        if (pType == 1)
        //            zdtime = Convert.ToInt32(ub.GetSub("SiteStemp", "/Controls/guess2.xml"));
        //        else
        //            zdtime = Convert.ToInt32(ub.GetSub("SiteStempb", "/Controls/guess2.xml"));

        //        string payview = dss.Tables[0].Rows[i]["payview"].ToString();
        //        int ID = int.Parse(dss.Tables[0].Rows[i]["ID"].ToString());
        //        int bcid = int.Parse(dss.Tables[0].Rows[i]["bcid"].ToString());
        //        int payusid = int.Parse(dss.Tables[0].Rows[i]["payusid"].ToString());
        //        string payusname = dss.Tables[0].Rows[i]["payusname"].ToString();
        //        DateTime paytimes = DateTime.Parse(dss.Tables[0].Rows[i]["paytimes"].ToString());
        //        int types = int.Parse(dss.Tables[0].Rows[i]["types"].ToString());
        //        long payCent = Convert.ToInt64(dss.Tables[0].Rows[i]["payCent"]);
        //        int p_result_temp1 = int.Parse(dss.Tables[0].Rows[i]["p_result_temp1"].ToString());
        //        int p_result_temp2 = int.Parse(dss.Tables[0].Rows[i]["p_result_temp2"].ToString());
        //        int state = int.Parse(dss.Tables[0].Rows[i]["state"].ToString());
        //        decimal payonLuone = decimal.Parse(dss.Tables[0].Rows[i]["payonLuone"].ToString());
        //        decimal payonLutwo = decimal.Parse(dss.Tables[0].Rows[i]["payonLutwo"].ToString());
        //        decimal payonLuthr = decimal.Parse(dss.Tables[0].Rows[i]["payonLuthr"].ToString());
        //        decimal p_pk = decimal.Parse(dss.Tables[0].Rows[i]["p_pk"].ToString());
        //        decimal p_dx_pk = decimal.Parse(dss.Tables[0].Rows[i]["p_dx_pk"].ToString());
        //        int sure = int.Parse(dss.Tables[0].Rows[i]["sure"].ToString());
        //        string p_oncetime2 = "";
        //        if (dss.Tables[0].Rows[i]["p_oncetime2"].ToString() != "")
        //            p_oncetime2 = dss.Tables[0].Rows[i]["p_oncetime2"].ToString();
        //        #endregion

        //        #region 自定义设置ID的下注时间
        //        ///等于1为默认确认状态,0为人工确认状态
        //        if (sure == 1)
        //        {
        //            ///自定义设置ID的下注时间
        //            string zdIDS = "#" + ub.GetSub("SitezdIDS", "/Controls/guess2.xml") + "#";
        //            if (zdIDS.Contains("#" + payusid.ToString() + "#"))
        //            {
        //                zdtime = Convert.ToInt32(ub.GetSub("SiteZdtime", "/Controls/guess2.xml"));
        //            }
        //        }
        //        else
        //        {
        //            zdtime = 1;
        //        }
        //        #endregion

        //        #region 已开赛的下注处理
        //        if (state == 1 || state == 3 || state == 4)
        //        {
        //            int p_basketve = 0;
        //            if (state == 3)
        //                p_basketve = 9;

        //            if (DateTime.Now > paytimes.AddSeconds(zdtime))
        //            {
        //                bool IsPass = true;
        //                #region 检查球赛即时数据 确认下注状态
        //                //即时更新
        //                TPR2.Model.guess.BaList m = new TPR2.BLL.guess.BaList().Getp_temptime_p_id(bcid);
        //                if (m != null)
        //                {
        //                    #region 下注前检查盘口数据变动
        //                    int p_id = Convert.ToInt32(m.p_id);
        //                    DateTime temptime = Convert.ToDateTime(m.p_temptime);
        //                    if (pType == 1)
        //                    {
        //                        string s = "";
        //                        if (state == 1)
        //                            new TPR2.Collec.Footbo().GetBoView(p_id, true);
        //                        //else
        //                        //    new TPR2.Collec.FootFalf().FootFalfPageHtml(p_id, true);
        //                    }
        //                    else
        //                    {
        //                        new TPR2.Collec.Basketbo().GetBoView(p_id, true);
        //                    }
        //                    if (state == 4)
        //                    {

        //                        IsPass = false;
        //                    }
        //                    else
        //                    {
        //                        #region 得到即时比分和封盘时间
        //                        //得到即时比分和封盘时间
        //                        TPR2.Model.guess.BaList n = new TPR2.BLL.guess.BaList().GetTemp(p_id, p_basketve);

        //                        if (pType == 1 && n.p_result_temp1 != null)
        //                        {
        //                            if (n.p_result_temp1 != p_result_temp1 || n.p_result_temp2 != p_result_temp2)//比分不同
        //                            {
        //                                IsPass = false;
        //                            }
        //                        }
        //                        #endregion

        //                        #region 进球更新的时间不同
        //                        if (m.p_temptime != n.p_temptime)//进球更新的时间不同
        //                        {
        //                            IsPass = false;
        //                        }
        //                        if (temptime != Convert.ToDateTime("1990-1-1") && temptime > paytimes && paytimes > temptime.AddSeconds(-zdtime))
        //                        {
        //                            IsPass = false;
        //                        }
        //                        #endregion

        //                        #region 让球封盘时间不同
        //                        //让球封盘时间不同
        //                        if (PayType == 1 || PayType == 2)
        //                        {
        //                            if (m.p_temptime1 != n.p_temptime1)
        //                            {
        //                                IsPass = false;
        //                            }
        //                            if (n.p_temptime1 != Convert.ToDateTime("1990-1-1") && n.p_temptime1 > paytimes && paytimes > n.p_temptime1.AddSeconds(-zdtime))
        //                            {
        //                                IsPass = false;
        //                            }
        //                        }
        //                        #endregion

        //                        #region 大小盘封盘时间不同
        //                        //大小盘封盘时间不同
        //                        if (PayType == 3 || PayType == 4)
        //                        {
        //                            if (m.p_temptime2 != n.p_temptime2)
        //                            {
        //                                IsPass = false;
        //                            }
        //                            if (n.p_temptime2 != Convert.ToDateTime("1990-1-1") && n.p_temptime2 > paytimes && paytimes > n.p_temptime2.AddSeconds(-zdtime))
        //                            {
        //                                IsPass = false;
        //                            }
        //                        }
        //                        #endregion

        //                        #region 标准盘封盘时间不同
        //                        //标准盘封盘时间不同
        //                        if (PayType == 5 || PayType == 6 || PayType == 7)
        //                        {
        //                            if (m.p_temptime3 != n.p_temptime3)
        //                            {
        //                                IsPass = false;

        //                            }
        //                            if (n.p_temptime3 != Convert.ToDateTime("1990-1-1") && n.p_temptime3 > paytimes && paytimes > n.p_temptime3.AddSeconds(-zdtime))
        //                            {
        //                                IsPass = false;

        //                            }
        //                        }
        //                        #endregion
        //                    }
        //                    #endregion

        //                    if (IsPass == false)
        //                    {
        //                        #region 投注失败,删除投注记录并退币
        //                        //投注失败,删除投注记录并退币
        //                        new TPR2.BLL.guess.BaPay().Delete(ID);
        //                        string bzTypes = string.Empty;
        //                        if (types == 0)
        //                        {
        //                            bzTypes = ub.Get("SiteBz");
        //                            new BCW.BLL.User().UpdateiGold(payusid, payusname, payCent, "" + ub.Get("SiteGqText") + "" + payview + "下注失败退回");
        //                        }
        //                        else
        //                        {
        //                            bzTypes = ub.Get("SiteBz2");
        //                            new BCW.BLL.User().UpdateiMoney(payusid, payusname, payCent, "" + ub.Get("SiteGqText") + "" + payview + "下注失败退回");
        //                        }
        //                        #endregion

        //                        #region 记录失败日志
        //                        //记录失败日志
        //                        new BCW.BLL.Gamelog().Add(2, "" + payusname + "(" + payusid + ")" + payview + "" + ub.Get("SiteGqText") + "下注失败,系统退回您" + payCent + "" + bzTypes + "", bcid, "自动");
        //                        new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "" + ub.Get("SiteGqText") + "下注失败,系统退回您" + payCent + "" + bzTypes + "");
        //                        #endregion
        //                    }
        //                    else
        //                    {
        //                        #region 滚球投注成功 更新state=0
        //                        new TPR2.BLL.guess.BaPay().Updatestate(ID);
        //                        new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "" + ub.Get("SiteGqText") + "下注成功");
        //                        #endregion
        //                    }
        //                }
        //                #endregion
        //            }
        //        }
        //        #endregion

        //        #region 未开赛的下注处理
        //        else if (state == 2)//未开赛需要验证水位的投注
        //        {
        //            if (DateTime.Now > paytimes.AddSeconds(0))
        //            {
        //                #region 检查即时数据
        //                bool IsPass = true;
        //                //即时更新
        //                TPR2.Model.guess.BaList modelBaList = new TPR2.BLL.guess.BaList().GetModel(bcid);
        //                if (modelBaList == null)
        //                {
        //                    modelBaList = new TPR2.BLL.guess.BaList().GetModelByp_id(bcid);
        //                }
        //                if (modelBaList != null)
        //                {
        //                    int p_id = Convert.ToInt32(modelBaList.p_id);
        //                    if (modelBaList.p_type == 1)
        //                        new TPR2.Collec.Footbo().GetBoView(p_id, false);
        //                    else
        //                        new TPR2.Collec.Basketbo().GetBoView(p_id, false);

        //                    modelBaList = new TPR2.BLL.guess.BaList().GetModel(bcid);//同步以上更新的水位
        //                    if (modelBaList == null)
        //                    {
        //                        modelBaList = new TPR2.BLL.guess.BaList().GetModelByp_id(bcid);
        //                    }

        //                    if (PayType == 1)
        //                    {

        //                        decimal oldlu = payonLuone;
        //                        decimal newlu = Convert.ToDecimal(modelBaList.p_one_lu);
        //                        decimal oldpk = p_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_pk);
        //                        if (oldlu - newlu >= Convert.ToDecimal(0.1) || newlu - oldlu >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 2)
        //                    {

        //                        decimal oldlu2 = payonLutwo;
        //                        decimal newlu2 = Convert.ToDecimal(modelBaList.p_two_lu);
        //                        decimal oldpk = p_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_pk);

        //                        if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 3)
        //                    {

        //                        decimal oldlu = payonLuone;
        //                        decimal newlu = Convert.ToDecimal(modelBaList.p_big_lu);
        //                        decimal oldpk = p_dx_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_dx_pk);
        //                        if (oldlu - newlu >= Convert.ToDecimal(0.1) || newlu - oldlu >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 4)
        //                    {

        //                        decimal oldlu2 = payonLutwo;
        //                        decimal newlu2 = Convert.ToDecimal(modelBaList.p_small_lu);
        //                        decimal oldpk = p_dx_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_dx_pk);

        //                        if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 5)
        //                    {

        //                        decimal oldlu2 = payonLuone;
        //                        decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzs_lu);
        //                        decimal oldpk = p_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_pk);

        //                        if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 6)
        //                    {

        //                        decimal oldlu2 = payonLutwo;
        //                        decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzp_lu);
        //                        decimal oldpk = p_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_pk);

        //                        if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                    else if (PayType == 7)
        //                    {

        //                        decimal oldlu2 = payonLuthr;
        //                        decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzx_lu);
        //                        decimal oldpk = p_pk;
        //                        decimal newpk = Convert.ToDecimal(modelBaList.p_pk);

        //                        if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1))
        //                            IsPass = false;

        //                        if (!oldpk.Equals(newpk))
        //                            IsPass = false;

        //                    }
        //                }
        //                #endregion

        //                #region 下注确认
        //                if (IsPass == false)
        //                {
        //                    //投注失败,删除投注记录并退币
        //                    new TPR2.BLL.guess.BaPay().Delete(ID);
        //                    string bzTypes = string.Empty;
        //                    if (types == 0)
        //                    {
        //                        bzTypes = ub.Get("SiteBz");
        //                        new BCW.BLL.User().UpdateiGold(payusid, payusname, payCent, "" + payview + "下注失败退回");
        //                    }
        //                    else
        //                    {
        //                        bzTypes = ub.Get("SiteBz2");
        //                        new BCW.BLL.User().UpdateiMoney(payusid, payusname, payCent, "" + payview + "下注失败退回");
        //                    }
        //                    new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "下注失败,系统退回您" + payCent + "" + bzTypes + "");
        //                    //记录失败日志
        //                    new BCW.BLL.Gamelog().Add(2, "" + payusname + "(" + payusid + ")" + payview + "下注失败,标识ID" + ID + "", bcid, "自动");

        //                }
        //                else
        //                {
        //                    new TPR2.BLL.guess.BaPay().Updatestate(ID);
        //                    new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "下注成功");
        //                }
        //                #endregion
        //            }
        //        }
        //        #endregion
        //    }

        //}
        //HttpContext.Current.Application.UnLock();
        //-----------------------------------------------------------------------
        #endregion

        //DataSet ds2 = new TPR2.BLL.guess.BaList().GetBaListList("id,p_id", "p_ison=1 and p_del=0 and p_active=0 and p_updatetime < '" + DateTime.Now.AddMinutes(-10) + "'");
        //if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
        //{
        //    for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
        //    {
        //        int p_updateid = Convert.ToInt32(ds2.Tables[0].Rows[i]["id"].ToString());
        //        int p_updatep_id = Convert.ToInt32(ds2.Tables[0].Rows[i]["p_id"].ToString());
        //        new BCW.BLL.Guest().Add(10086, "客服", "[url=/bbs/guess2/showguess.aspx?gid=" + p_updateid + "]赛事ID" + p_updateid + "[/url]超过10分钟没有更新水位,请检查是否正常");
        //        new TPR2.BLL.guess.BaList().Updatep_updatetime(p_updatep_id);
        //    }
        //}
        #region 底部
        //底部
        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>", ""));
        #endregion

        #region 版本
        //版本
        builder.Append("<!-- " + ub.Get("SiteVersion") + " @author Light-->");
        #endregion


        string strAlign    = ub.Get("SiteAlign");
        bool   IsNetwork   = new BCW.BLL.Network().Exists();
        string builderText = "";
        if (meid > 0 || IsNetwork == true)
        {
            #region 聊天 喇叭
            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";
            }
            #endregion

            #region 短消息提示
            //短消息提示
            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)
                    {
                        if (Utils.GetDomain().Contains("lt388"))
                        {
                            actUrl = "act=view&amp;";
                        }
                        else
                        {
                            actUrl = "act=newlist&amp;";
                        }
                    }

                    if (smsXCount > 0)
                    {
                        if (Utils.GetDomain().Contains("lt388"))
                        {
                            actUrl2 = "act=view&amp;ptype=1&amp;";
                        }
                        else
                        {
                            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 />"));
                }
            }
            #endregion
        }

        #region 头部
        //头部
        if (_Refresh == 0)
        {
            new Out().head(Utils.ForWordType(_Title), strAlign);
        }
        else
        {
            new Out().head(Utils.ForWordType(_Title), _Gourl, _Refresh.ToString(), strAlign);
        }
        #endregion

        #region 顶部Ubb
        //顶部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);
            }
        }
        #endregion

        //消息提示
        Response.Write(Utils.ForWordType(builder2.ToString()));
        //顶部Ubb
        Response.Write(Utils.ForWordType(builder3.ToString()));
        //尾部
        //builder.Append(new Out().foot());
    }
Ejemplo n.º 4
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() == "/bbs/default.aspx")
        {
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteBbsIndexUbb")).Replace("[@功能]", Utils.Function(_IsFoot))));
        }
        else
        {
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteBbsUbb")).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 BbsTopUbb = string.Empty;

        if (ub.Get("SiteBbsTopUbb") != "")
        {
            BbsTopUbb = BCW.User.AdminCall.AdminUBB(Out.SysUBB(ub.Get("SiteBbsTopUbb")));
            if (BbsTopUbb.IndexOf("</div>") == -1)
            {
                builder3.Append(Out.Tab("<div>", ""));
                builder3.Append(BbsTopUbb);
                builder3.Append(Out.Tab("</div>", ""));
            }
            else
            {
                builder3.Append(BbsTopUbb);
            }
        }
        //消息提示
        Response.Write(Utils.ForWordType(builder2.ToString()));
        //顶部Ubb
        Response.Write(Utils.ForWordType(builder3.ToString()));
        //尾部
        builder.Append(new Out().foot());
    }
Ejemplo n.º 5
0
    //定时发送的内线
    /// <summary>
    /// 检测guestsendlist表的guestsendID标识
    /// type=1时
    /// </summary>
    public void SendGuestTimer()
    {
        string guestsendflash = ub.GetSub("guestsendflash", "/Controls/guestsend.xml");

        if (guestsendflash != "0")//0 自动刷新 12手动 关闭
        {
            return;
        }
        string strWhere = " isDone=1 and  sentDay>=isSendCount ";
        //内线控制表
        DataSet dssend     = new BCW.BLL.tb_GuestSend().GetList(" * ", strWhere);
        DataSet dssendList = null;

        BCW.Model.tb_GuestSend mm = new BCW.Model.tb_GuestSend();
        if (dssend != null && dssend.Tables[0].Rows.Count > 0)
        {
            string username                 = "";
            string guestContent             = "";
            int    guestid                  = 0;
            int    guessCount               = 0;
            BCW.Model.tb_GuestSendList list = new BCW.Model.tb_GuestSendList();
            for (int i = 0; i < dssend.Tables[0].Rows.Count; i++)
            {
                guestContent = dssend.Tables[0].Rows[i]["guestContent"].ToString();
                //发送列控制表
                dssendList = new BCW.BLL.tb_GuestSendList().GetList("  usid,guestsendID,type ", " type=1 and guestsendID=" + dssend.Tables[0].Rows[i]["ID"].ToString() + " group by usid,guestsendID,type ");
                int userid = 0;
                //string sendtime = DateTime.Now.ToString("yyyyMMdd") + dssend.Tables[0].Rows[i]["sendTime"].ToString();
                //builder.Append("====" + DateTime.Now.Hour + "====" + dssend.Tables[0].Rows[i]["sendTime"].ToString() + DateTime.Now.Hour.ToString().Equals(dssend.Tables[0].Rows[i]["sendTime"].ToString()));
                //同一小时内比较
                if (DateTime.Now.Hour.ToString() == (dssend.Tables[0].Rows[i]["sendTime"].ToString().Trim()))
                {
                    //builder.Append((DateTime.Now.Hour.ToString() + "==" + dssend.Tables[0].Rows[i]["sendTime"].ToString().Trim()));
                    // builder.Append("当前检测GuestSend :" + dssend.Tables[0].Rows[i]["ID"].ToString() + "<br/>----------<br/>");
                    mm = new BCW.BLL.tb_GuestSend().Gettb_GuestSend(Convert.ToInt32(dssend.Tables[0].Rows[i]["ID"]));
                    if (Convert.ToDateTime(mm.sendDateTime).Day == DateTime.Now.Day)
                    {
                        continue;
                    }
                    if (dssendList != null && dssendList.Tables[0].Rows.Count > 0)
                    {
                        for (int j = 0; j < dssendList.Tables[0].Rows.Count; j++)
                        {
                            if (!("#" + dssend.Tables[0].Rows[i]["seeUidList"].ToString()).Contains("#" + dssendList.Tables[0].Rows[j]["usid"].ToString() + "#"))
                            {
                                //为1时未阅读
                                if (dssendList.Tables[0].Rows[j]["type"].ToString().Trim() == "1")
                                {
                                    guessCount++;
                                    userid           = Convert.ToInt32(dssendList.Tables[0].Rows[j]["usid"]);
                                    username         = new BCW.BLL.User().GetUsName(userid);
                                    guestid          = new BCW.BLL.Guest().AddNew(5, userid, username, guestContent);
                                    list.addtime     = DateTime.Now;
                                    list.getGold     = 0;
                                    list.guestID     = guestid;
                                    list.guestsendID = Convert.ToInt32(dssendList.Tables[0].Rows[j]["guestsendID"]);
                                    list.idDone      = 1;
                                    list.overtime    = DateTime.Now.AddDays(30);
                                    list.remark      = "";
                                    list.type        = 1;//未阅读
                                    list.usid        = userid;
                                    int aa = new BCW.BLL.tb_GuestSendList().Add(list);
                                    Response.Write("当前已发送tb_GuestSendList_ID:" + aa + "<br/>");
                                }
                            }
                        }
                    }
                    mm.remark       = " " + DateTime.Now.ToString("yyyy-MM-dd ") + mm.sendTime.ToString().Trim() + " 时内线刷新机已发送";
                    mm.sendCount   += guessCount;//总发送量
                    mm.isSendCount += 1;
                    mm.sendDateTime = DateTime.Now;
                    if (mm.isSendCount == mm.sentDay)
                    {
                        mm.overtime = DateTime.Now;
                        mm.isDone   = 0;//正式停止标识s
                        mm.remark   = " " + DateTime.Now.ToString("yyyy-MM-dd ") + mm.sendTime.ToString().Trim() + " 时内线已发送(已完结)";
                    }
                    //操作,放回guestsend
                    new BCW.BLL.tb_GuestSend().Update(mm);
                    Response.Write("当前已放回tb_GuestSend_ID:" + mm.ID + "<br/>");
                }

                #region
                //guestContent = dssend.Tables[0].Rows[i]["guestContent"].ToString();
                //senduserID = dssend.Tables[0].Rows[i]["notSeenIDList"].ToString();
                //userID = senduserID.Split('#');
                //for (int j = 0; j < userID.Length; j++)
                //{
                //    usid = Convert.ToInt32(userID[i]);
                //    username = new BCW.BLL.User().GetUsName(Convert.ToInt32(userID[j]));
                //    guestid = new BCW.BLL.Guest().AddNew(5, usid, username, guestContent);
                //    //uidlist += usid.ToString() + "#";
                //    guessCount++;//已发送内线的id
                //    list.addtime = DateTime.Now;
                //    list.getGold = 0;
                //    list.guestID = guestid;
                //    list.guestsendID = Convert.ToInt32(dssend.Tables[i].Rows[i]["ID"]);
                //    list.idDone = 1;
                //    list.overtime = DateTime.Now.AddDays(30);
                //    list.remark = "";
                //    list.type = 1;//未阅读
                //    list.usid = usid;
                //    new BCW.BLL.tb_GuestSendList().Add(list);
                //}
                #endregion
            }
        }
        // Utils.Success("刷新成功,3s后返回", "刷新成功,3s后返回...", Utils.getUrl("guestsend.aspx?act=view&amp;backurl=" + Utils.getPage(0) + ""), "3")
    }
Ejemplo n.º 6
0
    //开始返彩
    public void Open_price(string phase)
    {
        //如果这个期号前面有未开奖的期号,就算这期有开奖号码,都不开奖,内线提示10086
        //查询是否有开奖为空的期号
        if (new BCW.JQC.BLL.JQC_Internet().Exists_wei(int.Parse(phase)))
        {
            DataSet ds = new BCW.BLL.Guest().GetList("*", "Content LIKE '%进球彩%' AND ToId=52784 AND ToName='森林仔555' AND DateDiff(dd,AddTime,getdate())=0");
            if (ds == null && ds.Tables[0].Rows.Count <= 0)
            {
                new BCW.BLL.Guest().Add(1, 52784, "森林仔555", "注意:进球彩在第" + phase + "期前存在未开奖期号,请马上去后台检查开奖.");
            }

            DataSet ds1 = new BCW.BLL.Guest().GetList("*", "Content LIKE '%进球彩%' AND ToId=10086 AND ToName='客服10086' AND DateDiff(dd,AddTime,getdate())=0");
            if (ds1 == null && ds1.Tables[0].Rows.Count <= 0)
            {
                new BCW.BLL.Guest().Add(1, 10086, "客服10086", "注意:进球彩在第" + phase + "期前存在未开奖期号,请马上去后台检查开奖.");
            }
            Response.Write("<br/>在" + phase + "期前存在未开奖期号,请马上检查开奖.ok1<br/>");
        }
        else
        {
            #region
            string where = string.Empty;
            where        = "where phase='" + phase + "'";
            BCW.JQC.Model.JQC_Internet model = new BCW.JQC.BLL.JQC_Internet().GetJQC_Internet_model(where);

            string Result = model.Result;
            Response.Write("<br/>等待开奖期号:[" + model.phase + "]ok1<br/>");
            if (Result != "")//如果开奖号码为空,则不返奖
            {
                //取出当前期的奖池金额
                long get_jiangchi_kou = new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase((int.Parse(phase)));

                #region 判断系统是否有投入和开奖是否够币
                //如果奖池大于400w,则判断是否有系统投入,若有,则先扣除系统投入,再拿去派奖和扣税
                if (get_jiangchi_kou > jiangchi_guding)
                {
                    //通过比较type=4、InPrize次数和OutPrize次数对比
                    if (new BCW.JQC.BLL.JQC_Jackpot().Getxitong_toujin() > new BCW.JQC.BLL.JQC_Jackpot().Getxitong_huishou())
                    {
                        BCW.JQC.Model.JQC_Jackpot bb = new BCW.JQC.Model.JQC_Jackpot();
                        bb.AddTime  = DateTime.Now;
                        bb.BetID    = 0;
                        bb.InPrize  = 0;
                        bb.Jackpot  = get_jiangchi_kou - jiangchi;
                        bb.OutPrize = jiangchi;
                        bb.phase    = (int.Parse(phase)); //开奖的那期
                        bb.type     = 4;                  //系统
                        bb.UsID     = 10086;
                        new BCW.JQC.BLL.JQC_Jackpot().Add(bb);
                    }
                }
                //判断该期最后的奖池是否大于最低的200w,如果是,则增加200w
                if (get_jiangchi_kou < jianchi_zuidi)
                {
                    BCW.JQC.Model.JQC_Jackpot aa = new BCW.JQC.Model.JQC_Jackpot();
                    aa.AddTime  = DateTime.Now;
                    aa.BetID    = 0;
                    aa.InPrize  = jiangchi;
                    aa.Jackpot  = jiangchi + get_jiangchi_kou;
                    aa.OutPrize = 0;
                    aa.phase    = (int.Parse(phase)); //开奖的那期
                    aa.type     = 4;                  //系统
                    aa.UsID     = 10086;
                    new BCW.JQC.BLL.JQC_Jackpot().Add(aa);
                }
                #endregion

                //取出当前期的奖池金额——系统增加或扣除后
                long get_jiangchi = new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase((int.Parse(phase)));
                //把金额存到相应的期号
                new BCW.JQC.BLL.JQC_Internet().Update_Result("nowprize='" + get_jiangchi + "'", "phase='" + phase + "'");
                //系统没收的金额并奖池减少
                long moshou = Convert.ToInt64(get_jiangchi * huishou * 0.01);
                BCW.JQC.Model.JQC_Jackpot aa1 = new BCW.JQC.Model.JQC_Jackpot();
                aa1.AddTime  = DateTime.Now;
                aa1.BetID    = 0;
                aa1.InPrize  = 0;
                aa1.Jackpot  = get_jiangchi - moshou;
                aa1.OutPrize = moshou;
                aa1.phase    = (int.Parse(phase));
                aa1.type     = 3;//系统扣税10%
                aa1.UsID     = 10086;
                new BCW.JQC.BLL.JQC_Jackpot().Add(aa1);


                //检查投注表是否存在没开奖数据
                //if (new BCW.JQC.BLL.JQC_Bet().Exists_num(model.phase))
                {
                    //得到每个奖的金额
                    long z4 = Convert.ToInt64(get_jiangchi * jqcFour * 0.01);
                    long z3 = Convert.ToInt64(get_jiangchi * jqcThree * 0.01);
                    long z2 = Convert.ToInt64(get_jiangchi * jqcTwo * 0.01);
                    long z1 = Convert.ToInt64(get_jiangchi * jqcOne * 0.01);

                    DataSet ds = new BCW.JQC.BLL.JQC_Bet().GetList("*", " State=0 and Lottery_issue='" + model.phase + "'");
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        int      count     = 0;
                        string[] resultnum = Result.Split(',');

                        //中奖判断
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            //投注数据
                            int      ID            = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());
                            int      UsID          = int.Parse(ds.Tables[0].Rows[i]["UsID"].ToString());
                            string   Lottery_issue = ds.Tables[0].Rows[i]["Lottery_issue"].ToString();
                            int      State         = int.Parse(ds.Tables[0].Rows[i]["State"].ToString());
                            long     Zhu_money     = Int64.Parse(ds.Tables[0].Rows[i]["Zhu_money"].ToString());
                            long     PutGold       = Int64.Parse(ds.Tables[0].Rows[i]["PutGold"].ToString());
                            long     GetMoney      = Int64.Parse(ds.Tables[0].Rows[i]["GetMoney"].ToString());
                            int      VoteRate      = int.Parse(ds.Tables[0].Rows[i]["VoteRate"].ToString());//投注倍率
                            DateTime Input_Time    = Convert.ToDateTime(ds.Tables[0].Rows[i]["Input_Time"]);
                            int      isRobot       = int.Parse(ds.Tables[0].Rows[i]["isRobot"].ToString());
                            string   Vote          = ds.Tables[0].Rows[i]["VoteNum"].ToString();        //投注号码
                            int      VoteNum       = int.Parse(ds.Tables[0].Rows[i]["Zhu"].ToString()); //投注注数

                            if (VoteNum == 1)                                                           //单注
                            {
                                #region 单式中奖算法
                                string[] votenum = Vote.Split('#');
                                if (Vote != "" && Result != "")
                                {
                                    for (int k = 0; k < 8; k++)
                                    {
                                        string aa = votenum[k];
                                        string bb = resultnum[k];
                                        if (True(aa, bb))
                                        {
                                            count++;
                                        }
                                    }
                                }
                                #endregion

                                #region 单式中奖更新数据库
                                if (count == 5)//4等奖----State=4
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize4=1", "ID='" + ID + "'");
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 1); //0未开1中2不中3已领4过期
                                }
                                else if (count == 6)                             //3等奖----State=3
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize3=1", "ID='" + ID + "'");
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 1);
                                }
                                else if (count == 7)//2等奖----State=2
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize2=1", "ID='" + ID + "'");
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 1);
                                }
                                else if (count == 8)//1等奖----State=1
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize1=1", "ID='" + ID + "'");
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 1);
                                }
                                else//不中奖
                                {
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 2);
                                }
                                count = 0;
                                #endregion
                            }
                            else//复式
                            {
                                #region  式中奖算法
                                int      num1 = 0; int num2 = 0; int num3 = 0; int num4 = 0;
                                string[] buyvote = Vote.Split('#');
                                string[] vote1   = buyvote[0].Split(',');
                                string[] vote2   = buyvote[1].Split(',');
                                string[] vote3   = buyvote[2].Split(',');
                                string[] vote4   = buyvote[3].Split(',');
                                string[] vote5   = buyvote[4].Split(',');
                                string[] vote6   = buyvote[5].Split(',');
                                string[] vote7   = buyvote[6].Split(',');
                                string[] vote8   = buyvote[7].Split(',');

                                List <string[]> list = new List <string[]>();
                                list.Add(vote1);
                                list.Add(vote2);
                                list.Add(vote3);
                                list.Add(vote4);
                                list.Add(vote5);
                                list.Add(vote6);
                                list.Add(vote7);
                                list.Add(vote8);
                                string[] totalResult;
                                string[] Finalresult = Result.Split(',');

                                totalResult = bianli(list);//得到投注数据

                                for (int iresult = 0; iresult < totalResult.Length; iresult++)
                                {
                                    //builder.Append(totalResult[iresult].Replace("#", ",") + "<br/>");
                                    string[] results = totalResult[iresult].Split('#');
                                    for (int j = 0; j < results.Length; j++)
                                    {
                                        if (results[j].Equals(Finalresult[j]))
                                        {
                                            count++;//遍历开奖数据是否相同,相同则count+1
                                        }
                                    }
                                    if (count == 5)//如果count出现的次数等于5,证明是四等奖
                                    {
                                        num4++;
                                    }
                                    if (count == 6)//如果count出现的次数等于6,证明是三等奖
                                    {
                                        num3++;
                                    }
                                    if (count == 7)//如果count出现的次数等于7,证明是二等奖
                                    {
                                        num2++;
                                    }
                                    if (count == 8)//如果count出现的次数等于8,证明是一等奖
                                    {
                                        num1 = 1;
                                    }
                                    count = 0;
                                }
                                #endregion

                                #region 单式中奖更新数据库
                                //更新各中几等奖
                                if (num1 > 0)
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize1=1", "ID='" + ID + "'");
                                }
                                if (num2 > 0)
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize2=" + num2 + "", "ID='" + ID + "'");
                                }
                                if (num3 > 0)
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize3=" + num3 + "", "ID='" + ID + "'");
                                }
                                if (num4 > 0)
                                {
                                    new BCW.JQC.BLL.JQC_Bet().update_GetMoney("Prize4=" + num4 + "", "ID='" + ID + "'");
                                }
                                //更新中奖状态
                                if (num1 == 0 && num2 == 0 && num3 == 0 && num4 == 0)
                                {
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 2);
                                }
                                else
                                {
                                    new BCW.JQC.BLL.JQC_Bet().Update_win(ID, 1);
                                }
                                #endregion
                            }
                        }
                    }

                    //计算当期各等奖总注数
                    int q4 = new BCW.JQC.BLL.JQC_Bet().count_renshu(model.phase, "Prize4");
                    int q3 = new BCW.JQC.BLL.JQC_Bet().count_renshu(model.phase, "Prize3");
                    int q2 = new BCW.JQC.BLL.JQC_Bet().count_renshu(model.phase, "Prize2");
                    int q1 = new BCW.JQC.BLL.JQC_Bet().count_renshu(model.phase, "Prize1");
                    //得到每注金额
                    long z_price4, z_price3, z_price2, z_price1 = 0;
                    if (q1 != 0)
                    {
                        z_price1 = z1 / q1;
                    }
                    else
                    {
                        z_price1 = z1;
                    }
                    if (q2 != 0)
                    {
                        z_price2 = z2 / q2;
                    }
                    else
                    {
                        z_price2 = z2;
                    }
                    if (q3 != 0)
                    {
                        z_price3 = z3 / q3;
                    }
                    else
                    {
                        z_price3 = z3;
                    }
                    if (q4 != 0)
                    {
                        z_price4 = z4 / q4;
                    }
                    else
                    {
                        z_price4 = z4;
                    }

                    string ai  = q1 + "," + q2 + "," + q3 + "," + q4;
                    string aii = z_price1 + "," + z_price2 + "," + z_price3 + "," + z_price4;

                    //把中奖注数和每注金额存到数据库对应的那期
                    new BCW.JQC.BLL.JQC_Internet().Update_Result("zhu='" + ai + "',zhu_money='" + aii + "'", "phase='" + phase + "'");

                    //派奖
                    DataSet ds1 = new BCW.JQC.BLL.JQC_Bet().GetList("*", " State>0 and Lottery_issue='" + model.phase + "'");
                    for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                    {
                        int  ID       = int.Parse(ds1.Tables[0].Rows[i]["ID"].ToString());
                        int  UsID     = int.Parse(ds1.Tables[0].Rows[i]["UsID"].ToString());
                        int  VoteRate = int.Parse(ds1.Tables[0].Rows[i]["VoteRate"].ToString());//投注倍率
                        int  isRobot  = int.Parse(ds1.Tables[0].Rows[i]["isRobot"].ToString());
                        int  Prize1   = int.Parse(ds1.Tables[0].Rows[i]["Prize1"].ToString());
                        int  Prize2   = int.Parse(ds1.Tables[0].Rows[i]["Prize2"].ToString());
                        int  Prize3   = int.Parse(ds1.Tables[0].Rows[i]["Prize3"].ToString());
                        int  Prize4   = int.Parse(ds1.Tables[0].Rows[i]["Prize4"].ToString());
                        long qian     = 0;

                        //奖池减少
                        BCW.JQC.Model.JQC_Jackpot bb = new BCW.JQC.Model.JQC_Jackpot();
                        bb.AddTime = DateTime.Now;
                        bb.BetID   = ID;
                        bb.InPrize = 0;
                        bb.phase   = int.Parse(phase);
                        bb.type    = 1;
                        bb.UsID    = UsID;

                        if (Prize1 > 0 || Prize2 > 0 || Prize3 > 0 || Prize4 > 0)
                        {
                            qian = z_price4 * VoteRate * Prize4 + z_price3 * VoteRate * Prize3 + z_price2 * VoteRate * Prize2 + z_price1 * VoteRate * Prize1;
                            new BCW.JQC.BLL.JQC_Bet().update_GetMoney("GetMoney='" + qian + "'", "ID=" + ID + "");
                            //奖池
                            bb.Jackpot  = new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase(int.Parse(phase)) - qian;
                            bb.OutPrize = qian;
                            new BCW.JQC.BLL.JQC_Jackpot().Add(bb);

                            if (isRobot == 0)
                            {
                                new BCW.BLL.Guest().Add(1, UsID, new BCW.BLL.User().GetUsName(UsID), "恭喜您在" + GameName + "第" + model.phase + "期获得了" + qian + "" + ub.Get("SiteBz") + "[url=/bbs/game/jqc.aspx?act=case]马上兑奖[/url]");
                            }
                            string wText = "[url=/bbs/uinfo.aspx?uid=" + UsID + "]" + new BCW.BLL.User().GetUsName(UsID) + "[/url]在[url=/bbs/game/jqc.aspx]" + GameName + "[/url]《" + model.phase + "期》获得了" + qian + "" + ub.Get("SiteBz") + "";
                            new BCW.BLL.Action().Add(1014, ID, UsID, "", wText);
                            System.Threading.Thread.Sleep(5);
                        }
                    }

                    System.Threading.Thread.Sleep(5);

                    //把剩余的奖池,加到下一期去,该期奖池清空
                    BCW.JQC.Model.JQC_Jackpot aa3 = new BCW.JQC.Model.JQC_Jackpot();
                    aa3.AddTime  = DateTime.Now;
                    aa3.BetID    = 0;
                    aa3.InPrize  = 0;
                    aa3.Jackpot  = 0;
                    aa3.OutPrize = get_jiangchi - moshou - new BCW.JQC.BLL.JQC_Bet().Get_paijiang(int.Parse(phase));
                    aa3.phase    = (int.Parse(phase));
                    aa3.type     = 5;//5是系统滚存
                    aa3.UsID     = 10086;
                    new BCW.JQC.BLL.JQC_Jackpot().Add(aa3);

                    BCW.JQC.Model.JQC_Jackpot aa2 = new BCW.JQC.Model.JQC_Jackpot();
                    aa2.AddTime  = DateTime.Now;
                    aa2.BetID    = 0;
                    aa2.InPrize  = get_jiangchi - moshou - new BCW.JQC.BLL.JQC_Bet().Get_paijiang(int.Parse(phase));
                    aa2.Jackpot  = new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase((int.Parse(phase) + 1)) + get_jiangchi - moshou - new BCW.JQC.BLL.JQC_Bet().Get_paijiang(int.Parse(phase));
                    aa2.OutPrize = 0;
                    aa2.phase    = (int.Parse(phase) + 1);
                    aa2.type     = 5;//5是系统滚存
                    aa2.UsID     = 10086;
                    new BCW.JQC.BLL.JQC_Jackpot().Add(aa2);


                    //滚存后,判断下一期是否够200w,如果不够则加200w
                    //查询滚存后的那期奖池
                    if (new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase((int.Parse(phase) + 1)) < jianchi_zuidi)
                    {
                        BCW.JQC.Model.JQC_Jackpot aa = new BCW.JQC.Model.JQC_Jackpot();
                        aa.AddTime  = DateTime.Now;
                        aa.BetID    = 0;
                        aa.InPrize  = jiangchi;
                        aa.Jackpot  = jiangchi + new BCW.JQC.BLL.JQC_Jackpot().GetGold_phase((int.Parse(phase) + 1));
                        aa.OutPrize = 0;
                        aa.phase    = (int.Parse(phase) + 1);
                        aa.type     = 4;//系统
                        aa.UsID     = 10086;
                        new BCW.JQC.BLL.JQC_Jackpot().Add(aa);
                    }
                }
            }
            #endregion
        }
    }
Ejemplo n.º 7
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());
    }