Beispiel #1
0
    private void EditPage()
    {
        int id   = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误"));
        int meid = new BCW.User.Users().GetUsId();

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

        if (!new BCW.BLL.Network().Exists(id, meid))
        {
            Utils.Error("不存在的记录", "");
        }
        //读取实体
        BCW.Model.Network model = new BCW.BLL.Network().GetNetwork(id);

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("修改广播");
        builder.Append(Out.Tab("</div>", ""));
        string strText = "广播内容:限" + ub.GetSub("NetworksLength", xmlPath) + "-" + ub.GetSub("NetworkbLength", xmlPath) + "字/,允许其它用户延时:/,,,";
        string strName = "Title,Types,id,act,backurl";
        string strType = "text,hidden,hidden,hidden,hidden";
        string strValu = "" + model.Title + "'" + model.Types + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,false,false,false";
        string strIdea = "/";
        string strOthe = "修改|reset,network.aspx,post,1,red|blue";

        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append(" <a href=\"" + Utils.getPage("network.aspx") + "\">取消</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #2
0
    private void EditPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误"));

        if (!new BCW.BLL.Network().Exists(id))
        {
            Utils.Error("不存在的记录", "");
        }
        //读取实体
        BCW.Model.Network model = new BCW.BLL.Network().GetNetwork(id);

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("修改广播");
        builder.Append(Out.Tab("</div>", ""));
        string strText = "广播内容(500字内)/,显示时长:限0-" + ub.GetSub("NetworkbMinute", xmlPath) + "分钟/,允许其它用户延时:/,是否支持UBB:/,,,";
        string strName = "Title,Times,Types,IsUbb,id,act,backurl";
        string strType = "text,num,select,select,hidden,hidden,hidden";
        string strValu = "" + model.Title + "'0'" + model.Types + "'" + model.IsUbb + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,0|不允许|1|允许,0|否|1|是,false,false,false";
        string strIdea = "/显示时长填0则不延长/";
        string strOthe = "修改|reset,network.aspx,post,1,red|blue";

        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=del&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">删除广播</a><br />");
        if (Utils.getPage(1) != "")
        {
            builder.Append(" <a href=\"" + Utils.getPage(1) + "\">返回上一级</a><br />");
        }
        else
        {
            builder.Append(" <a href=\"" + Utils.getUrl("network.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 />"));
    }
Beispiel #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());
    }
Beispiel #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());
    }
Beispiel #5
0
    private void ReloadPage(string act)
    {
        int meid  = new BCW.User.Users().GetUsId();
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-2]$", "1"));

        Master.Title = ub.GetSub("NetworkName", xmlPath);
        if (ub.GetSub("NetworkLogo", xmlPath) != "")
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<img src=\"" + ub.GetSub("NetworkLogo", xmlPath) + "\" alt=\"load\"/>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        if (ub.GetSub("NetworkNotes", xmlPath) != "")
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("" + ub.GetSub("NetworkNotes", xmlPath) + "");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        if (ptype == 1)
        {
            builder.Append("正在广播|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=" + act + "&amp;ptype=1") + "\">正在</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("过期广播|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=" + act + "&amp;ptype=2") + "\">过期</a>|");
        }

        builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=add") + "\">发布</a>");

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

        string[] pageValUrl = { "act", "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        strWhere = "Types<=1 and  ";
        if (act == "me")
        {
            if (meid == 0)
            {
                Utils.Login();
            }

            strWhere += "UsID=" + meid + "AND ";
        }
        if (ptype == 1)
        {
            strWhere += " OverTime>='" + DateTime.Now + "'";
        }
        else
        {
            strWhere += " OverTime<'" + DateTime.Now + "'";
        }

        // 开始读取列表
        IList <BCW.Model.Network> listNetwork = new BCW.BLL.Network().GetNetworks(pageIndex, pageSize, strWhere, out recordCount);

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

                builder.Append("" + ((pageIndex - 1) * pageSize + k) + ".");

                if (n.IsUbb == 1 || Utils.GetTopDomain().Contains("th"))
                {
                    builder.Append(Out.SysUBB(n.Title));
                }
                else
                {
                    if (new BCW.BLL.Role().IsAllMode(n.UsID))
                    {
                        builder.Append(Out.SysUBB(n.Title));
                    }
                    else
                    {
                        builder.Append(n.Title);
                    }
                }
                if (ptype == 1)
                {
                    builder.Append("(" + DT.DateDiff2(DateTime.Now, n.OverTime) + "后过期)");
                }
                else
                {
                    builder.Append("(" + DT.DateDiff2(n.OverTime, DateTime.Now) + "前过期)");
                }

                builder.Append("<br /><a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>(" + DT.FormatDate(n.AddTime, 6) + ")");
                if (n.UsID == meid)
                {
                    builder.Append("|<a href=\"" + Utils.getUrl("network.aspx?act=edit&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">修改</a>");
                }

                //if (n.Types == 1)
                //    builder.Append("|<a href=\"" + Utils.getUrl("network.aspx?act=fill&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">延时</a>");

                if (new BCW.User.Role().IsUserRole(BCW.User.Role.enumRole.Role_NetWork, meid))
                {
                    builder.Append("|<a href=\"" + Utils.getUrl("network.aspx?act=del&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">删除</a>");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getPage("uinfo.aspx") + "\">上级</a>-");
        if (act == "me")
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx") + "\">所有广播</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=me") + "\">我的广播</a>");
        }

        builder.Append(Out.Tab("</div>", ""));
    }
Beispiel #6
0
    private void FillSavePage()
    {
        string info = Utils.GetRequest("info", "post", 1, "", "");
        int    id   = int.Parse(Utils.GetRequest("id", "all", 2, @"^[0-9]\d*$", "ID错误"));
        int    meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }
        string mename = new BCW.BLL.User().GetUsName(meid);
        long   megold = new BCW.BLL.User().GetGold(meid);

        //每分钟收费多少
        int iGold = Convert.ToInt32(ub.GetSub("NetworkiGold", xmlPath));

        int Times = int.Parse(Utils.GetRequest("Times", "post", 2, @"^[0-9]\d*$", "显示时长限1-" + ub.GetSub("NetworkbMinute", xmlPath) + "分钟"));

        if (Times < 1 || Times > Convert.ToInt32(ub.GetSub("NetworkbMinute", xmlPath)))
        {
            Utils.Error("显示时长限1-" + ub.GetSub("NetworkbMinute", xmlPath) + "分钟", "");
        }

        if (info != "ok")
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确定延时");
            builder.Append(Out.Tab("</div>", "<br />"));

            builder.Append(Out.Tab("<div>", ""));
            builder.Append("时长:" + Times + "分钟");

            builder.Append("<br />收费:" + (Times * iGold) + "" + ub.Get("SiteBz") + "");
            builder.Append("<br />自带:" + megold + "" + ub.Get("SiteBz") + "<br />");
            builder.Append(Out.Tab("</div>", ""));

            string strName = "Times,info,id,act,backurl";
            string strValu = "" + Times + "'ok'" + id + "'fillsave'" + Utils.getPage(0) + "";
            string strOthe = "确定延时,network.aspx,post,0,other";
            builder.Append(Out.wapform(strName, strValu, strOthe));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(" <a href=\"" + Utils.getUrl("network.aspx") + "\">取消</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            //扣币
            if (megold < Convert.ToInt64(Times * iGold))
            {
                Utils.Error("你的" + ub.Get("SiteBz") + "不足", "");
            }
            BCW.Model.Network model = new BCW.BLL.Network().GetNetwork(id);
            if (model == null)
            {
                Utils.Error("不存在的广播记录", "");
            }
            if (model.Types == 0 && model.UsID != meid)
            {
                Utils.Error("此广播不允许其它用户延时", "");
            }
            //未过期不能延时
            if (model.OverTime > DateTime.Now)
            {
                Utils.Error("未过期的广播不能延时", "");
            }

            new BCW.BLL.User().UpdateiGold(meid, mename, -Convert.ToInt64(Times * iGold), "发布广播");
            if (model.OverTime > DateTime.Now)
            {
                new BCW.BLL.Network().Update(id, model.OverTime.AddMinutes(Times));
            }
            else
            {
                new BCW.BLL.Network().Update(id, DateTime.Now.AddMinutes(Times));
            }

            Utils.Success("延时广播", "延时广播成功,正在返回..", Utils.getPage("network.aspx"), "1");
        }
    }
Beispiel #7
0
    private void ReloadPage()
    {
        int uid   = int.Parse(Utils.GetRequest("uid", "all", 1, @"^[0-9]\d*$", "0"));
        int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-2]$", "1"));

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("广播管理");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (ptype == 1)
        {
            builder.Append("正在广播|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx?uid=" + uid + "&amp;ptype=1") + "\">正在广播</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("过期广播");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("network.aspx?uid=" + uid + "&amp;ptype=2") + "\">过期广播</a>");
        }

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

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

        strWhere = "Types<=1 and ";
        //查询条件
        if (uid != 0)
        {
            strWhere += "UsID=" + uid + "and ";
        }
        if (ptype == 1)
        {
            strWhere += "OverTime>='" + DateTime.Now + "'";
        }
        else
        {
            strWhere += "OverTime<'" + DateTime.Now + "'";
        }

        // 开始读取列表
        IList <BCW.Model.Network> listNetwork = new BCW.BLL.Network().GetNetworks(pageIndex, pageSize, strWhere, out recordCount);

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

                builder.AppendFormat("<a href=\"" + Utils.getUrl("network.aspx?act=edit&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]</a>{1}.{2}", n.ID, (pageIndex - 1) * pageSize + k, Out.SysUBB(n.Title));
                if (ptype == 1)
                {
                    builder.Append("(" + DT.DateDiff2(DateTime.Now, n.OverTime) + "后过期)");
                }
                else
                {
                    builder.Append("(" + DT.DateDiff2(n.OverTime, DateTime.Now) + "前过期)");
                }

                builder.Append("<br /><a href=\"" + Utils.getUrl("uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>(" + DT.FormatDate(n.AddTime, 6) + ")");

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

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        string strText = "输入用户ID:/";
        string strName = "uid";
        string strType = "num";
        string strValu = "'";
        string strEmpt = "true";
        string strIdea = "/";
        string strOthe = "搜广播,network.aspx,post,1,red";

        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=add") + "\">发布广播</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("network.aspx?act=clear") + "\">清空广播</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 />"));
    }