Exemplo n.º 1
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0) || !MyTeam.OnlineList.OnlineList.isUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,content,qishu,kaisai,isclose FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         if (reader.Read())
         {
             this.msg     = this.msg + MyFunc.ConvertStr(reader["content"].ToString().Trim());
             this.qishu   = reader["qishu"].ToString().Trim();
             this.kaisai  = reader["kaisai"].ToString().Trim();
             this.isclose = reader["isclose"].ToString();
         }
         reader.Close();
         base2.Dispose();
         this.AHHTContent();
         this.DataBind();
     }
 }
Exemplo n.º 2
0
        private void submitdeal()
        {
            MyFunc.isRefUrl();
            string text  = MyFunc.ConvertStr(base.Request["TextBoxUserName"].Trim().ToLower());
            string text2 = MyFunc.ConvertStr(base.Request["TextBoxUserPass"].Trim());

            if ((text == "") || (text2 == ""))
            {
                MyFunc.showmsg("请输入用户名或密码!");
                base.Response.End();
            }
            else
            {
                DataBase      db     = new DataBase(MyFunc.GetConnStr(2));
                SqlDataReader reader = db.ExecuteReader("SELECT userid,username,userpass,abc,(select top 1 gdid from agence where userid = member.gdid) as gsid,(select top 1 gsbl from agence where userid = member.gdid) as gscs FROM member WHERE username='******' AND isuseable=1");
                if (!reader.Read())
                {
                    reader.Close();
                    db.Dispose();
                    MyFunc.showmsg("帐号或密码错误!");
                    base.Response.End();
                }
                else if ((text != reader["username"].ToString().ToLower().Trim()) || (text2 != reader["userpass"].ToString().ToLower().Trim()))
                {
                    reader.Close();
                    db.Dispose();
                    MyFunc.showmsg("帐号或密码错误!");
                    base.Response.End();
                }
                else
                {
                    this.Session.Contents["userid"]   = reader["userid"].ToString().Trim();
                    this.Session.Contents["username"] = reader["username"].ToString().ToLower().Trim();
                    this.Session.Contents["userpass"] = reader["userpass"].ToString().Trim();
                    this.Session.Contents["sessid"]   = this.Session.SessionID;
                    this.Session.Contents["classid"]  = "20";
                    this.Session.Contents["ABC"]      = reader["abc"].ToString().Trim();
                    this.Session.Contents["usergsid"] = reader["gsid"].ToString().Trim();
                    this.Session.Contents["usergscs"] = reader["gscs"].ToString().Trim();
                    reader.Close();
                    string place = "";
                    string text4 = "";
                    string ip    = "";
                    if ((base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"] != null) && (base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim() != ""))
                    {
                        ip    = base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim();
                        place = MyFunc.GetPlace(db, MyFunc.ChgIP(base.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString().Trim()));
                    }
                    ip = ip + "|" + base.Request.UserHostAddress.ToString().Trim();
                    MyFunc.WriteUserEvent(db, this.Session.Contents["userid"].ToString(), this.Session.Contents["username"].ToString(), base.Request.UserHostAddress.ToString(), this.Session.Contents["classid"].ToString(), "1");
                    db.ExecuteNonQuery("UPDATE member SET curmoney=(usemoney-(select ISNULL(sum(tzmoney),0) from ball_order where userid=" + this.Session.Contents["userid"].ToString().Trim() + " AND tztype in (15,14) and datediff(day,balltime,getdate())=0)),moneyupdate=GetDate() WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " AND DateDiff(day,moneyupdate,GetDate())<>0");
                    text4 = MyFunc.GetPlace(db, MyFunc.ChgIP(base.Request.UserHostAddress.ToString().Trim()));
                    db.Dispose();
                    MyTeam.OnlineList.OnlineList.NewUserLogin(this.Session.Contents["username"].ToString().Trim(), this.Session.SessionID.ToString().Trim(), DateTime.Now.ToString(), ip, this.Session.Contents["classid"].ToString().Trim(), place + "|" + text4);
                    base.Response.Redirect("imp_rules.aspx");
                    base.Response.End();
                }
            }
        }
Exemplo n.º 3
0
 public string dealcontent(string content)
 {
     if (content.Length > 40)
     {
         return MyFunc.ConvertStr(content.Substring(0, 40));
     }
     return MyFunc.ConvertStr(content);
 }
Exemplo n.º 4
0
 private void Page_Load(object sender, EventArgs e)
 {
     if (this.Session.Contents["adminclassid"].ToString().Trim() != "5")
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         this.kyglContent = "";
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,content FROM affiche WHERE le=2 ORDER BY updatetime DESC");
         while (reader.Read())
         {
             this.kyglContent = this.kyglContent + MyFunc.ConvertStr(reader["content"].ToString().Trim()) + "&nbsp;&nbsp;&nbsp;";
         }
         reader.Close();
         base2.Dispose();
         this.DataBind();
     }
 }
Exemplo n.º 5
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(1) || !MyTeam.OnlineList.OnlineList.isUserLogin(1))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         this.kyglContent = "";
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,content FROM affiche WHERE le=2 ORDER BY updatetime DESC");
         while (reader.Read())
         {
             this.kyglContent = this.kyglContent + MyFunc.ConvertStr(reader["content"].ToString().Trim()) + "&nbsp;&nbsp;&nbsp;";
         }
         reader.Close();
         base2.Dispose();
         this.DataBind();
     }
 }
Exemplo n.º 6
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0) || !MyTeam.OnlineList.OnlineList.isUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else
     {
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,tupdatetime,content,qishu,kaisai FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         while (reader.Read())
         {
             this.msg    = this.msg + MyFunc.ConvertStr(reader["content"].ToString().Trim());
             this.qishu  = reader["qishu"].ToString().Trim();
             this.kaisai = reader["tupdatetime"].ToString().Trim();
         }
         reader.Close();
         string sql = "SELECT member.userid,member.username,member.usemoney,member.MoneySort,member.MoneyRate,member.curMoney,member.ABC,";
         sql    = (sql + "userhs.MAXC1,userhs.MAXC2,userhs.MAXC3,userhs.MAXC4,userhs.MAXC5,userhs.MAXC6,userhs.MAXC7,userhs.MAXC8,userhs.MAXC9,userhs.MAXC10,userhs.MAXC11," + "userhs.MAXC12,userhs.MAXC13,userhs.MAXC14,userhs.MAXC15,userhs.MAXC18,userhs.MAXC19,userhs.MAXC20,userhs.MAXC21,userhs.MAXC22,userhs.MAXC23,userhs.MAXC28,userhs.MAXZ1,userhs.MAXZ2,userhs.MAXZ3,userhs.MAXZ4,userhs.MAXZ5,userhs.MAXZ6,userhs.MAXZ7,userhs.MAXZ8,userhs.MAXZ9,userhs.MAXZ10,") + "userhs.MAXZ11,userhs.MAXZ12,userhs.MAXZ13,userhs.MAXZ14,userhs.MAXZ15,userhs.MAXZ18,userhs.MAXZ19,userhs.MAXZ20,userhs.MAXZ21,userhs.MAXZ22,userhs.MAXZ23,userhs.MAXZ28 FROM member LEFT OUTER JOIN userhs ON member.userid = userhs.userid WHERE member.userid = " + this.Session.Contents["userid"].ToString().Trim() + " AND member.isuseable=1";
         reader = base2.ExecuteReader(sql);
         if (!reader.Read())
         {
             this.curmoney   = "0";
             this.singlebet  = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
             this.singlegame = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0";
             reader.Close();
         }
         else
         {
             this.curmoney  = reader["curmoney"].ToString().Trim();
             this.singlebet = "0";
             for (int i = 0; i < 0x31; i++)
             {
                 this.singlebet = this.singlebet + "," + reader["Maxz1"].ToString().Trim();
             }
             for (int j = 0; j < 0x31; j++)
             {
                 this.singlebet = this.singlebet + reader["Maxz1"].ToString().Trim();
             }
             string singlebet = this.singlebet;
             this.singlebet  = singlebet + reader["Maxz2"].ToString().Trim() + "," + reader["Maxz2"].ToString().Trim() + "," + reader["Maxz3"].ToString().Trim() + "," + reader["Maxz3"].ToString().Trim() + "," + reader["Maxz4"].ToString().Trim() + "," + reader["Maxz4"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim() + "," + reader["Maxz13"].ToString().Trim();
             this.singlegame = "0";
             for (int k = 0; k < 0x31; k++)
             {
                 this.singlegame = this.singlegame + "," + reader["Maxc1"].ToString().Trim();
             }
             for (int m = 0; m < 0x31; m++)
             {
                 this.singlegame = this.singlegame + reader["Maxc1"].ToString().Trim();
             }
             string singlegame = this.singlegame;
             this.singlegame = singlegame + reader["Maxc2"].ToString().Trim() + "," + reader["Maxc2"].ToString().Trim() + "," + reader["Maxc3"].ToString().Trim() + "," + reader["Maxc3"].ToString().Trim() + "," + reader["Maxc4"].ToString().Trim() + "," + reader["Maxc4"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim() + "," + reader["Maxc13"].ToString().Trim();
             reader.Close();
         }
         for (int n = 0x23; n < 0x54; n++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + n.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         for (int num6 = 1; num6 < 7; num6++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + num6.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         for (int num7 = 0xd4; num7 < 0xd7; num7++)
         {
             this.singlegames = this.singlegames + base2.ExecuteScalar("SELECT isnull(sum(tzmoney),0) FROM ball_order WHERE userid=" + this.Session.Contents["userid"].ToString().Trim() + " and ballid=" + num7.ToString() + " and datediff(day,updatetime,getdate())=0").ToString() + ",";
         }
         base2.Dispose();
         this.MainContent();
         this.MainContent1();
         this.DataBind();
     }
 }
Exemplo n.º 7
0
 private void Page_Load(object sender, EventArgs e)
 {
     MyFunc.isRefUrl();
     if (!MyFunc.CheckUserLogin(0) || !MyTeam.OnlineList.OnlineList.isUserLogin(0))
     {
         MyFunc.goToLoginPage();
         base.Response.End();
     }
     else if (!base.IsPostBack)
     {
         this.kyglContent = "";
         DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
         SqlDataReader reader = base2.ExecuteReader("SELECT convert(nvarchar,updatetime,11) as updatetime,content FROM affiche WHERE le=1 ORDER BY updatetime DESC");
         while (reader.Read())
         {
             string kyglContent = this.kyglContent;
             this.kyglContent = kyglContent + "<TR class=hover><TD width=\"11%\">" + reader["updatetime"].ToString().Trim() + "</TD><TD>" + MyFunc.ConvertStr(reader["content"].ToString().Trim()) + "</TD></TR>";
         }
         reader.Close();
         base2.Dispose();
         this.DataBind();
     }
 }
Exemplo n.º 8
0
        private void Page_Load(object sender, EventArgs e)
        {
            if (hashtable.hash1 == null)
            {
                Hashtable hashtable1 = new Hashtable(0x18, 0.5f);
                hashtable1.Add("EVEN", 0);
                hashtable1.Add("SP", 1);
                hashtable1.Add("NA", 2);
                hashtable1.Add("NO", 3);
                hashtable1.Add("CH", 4);
                hashtable1.Add("SPA", 5);
                hashtable1.Add("SPB", 6);
                hashtable1.Add("pr", 7);
                hashtable1.Add("future", 8);
                hashtable1.Add("SX", 9);
                hashtable1.Add("HF", 10);
                hashtable.hash1 = hashtable1;
            }
            DataBase      base2  = new DataBase(MyFunc.GetConnStr(2));
            SqlDataReader reader = base2.ExecuteReader("SELECT top 1 convert(nvarchar,updatetime,11) as updatetime,tupdatetime,content,qishu,kaisai,isclose FROM affiche WHERE le=1 ORDER BY updatetime DESC");

            while (reader.Read())
            {
                DateTime time;
                this.msg   = this.msg + "<TR ><TD width=100%>" + MyFunc.ConvertStr(reader["content"].ToString().Trim()) + "</TD></TR>";
                this.qishu = reader["qishu"].ToString().Trim();
                if ((base.Request.QueryString["rtype"].Trim() == "SP") || (base.Request.QueryString["rtype"].Trim() == "SPA"))
                {
                    time = Convert.ToDateTime(reader["tupdatetime"].ToString().Trim());
                }
                else
                {
                    time = Convert.ToDateTime(reader["kaisai"].ToString().Trim());
                }
                TimeSpan span = time.Subtract(DateTime.Now);
                int      num  = ((span.Hours * 0xe10) + (span.Minutes * 60)) + span.Seconds;
                if (num > 0)
                {
                    if ((base.Request.QueryString["rtype"].Trim() == "SP") || (base.Request.QueryString["rtype"].Trim() == "SPA"))
                    {
                        this.kaisai = reader["tupdatetime"].ToString().Trim();
                    }
                    else
                    {
                        this.kaisai = reader["kaisai"].ToString().Trim();
                    }
                    this.isclose = reader["isclose"].ToString();
                }
            }
            reader.Close();
            base2.Dispose();
            if (this.isclose == "1")
            {
                this.kaisai = "";
            }
            if (this.kaisai != "")
            {
                switch (base.Request.QueryString["rtype"].Trim())
                {
                case "EVEN":
                    this.rContent();
                    this.wtype = "EVEN";
                    goto Label_0649;

                case "SP":
                    this.vContent();
                    this.wtype = "SP";
                    goto Label_0649;

                case "NA":
                    this.reContent();
                    this.wtype = "NA";
                    goto Label_0649;

                case "NO":
                    this.pdContent();
                    this.wtype = "NO";
                    goto Label_0649;

                case "CH":
                    this.tContent();
                    this.wtype = "CH";
                    goto Label_0649;

                case "SPA":
                    this.fContent();
                    this.wtype = "SPA";
                    goto Label_0649;

                case "SPB":
                    this.pContent();
                    this.wtype = "SPB";
                    goto Label_0649;

                case "pr":
                    this.prContent();
                    this.wtype = "SPB";
                    goto Label_0649;

                case "future":
                    this.futureContent();
                    this.wtype = "NO";
                    goto Label_0649;

                case "SX":
                    this.sxContent();
                    this.wtype = "SX";
                    goto Label_0649;

                case "HF":
                    this.hfContent();
                    this.wtype = "HF";
                    goto Label_0649;
                }
                this.ErrorContent();
            }
            else
            {
                object obj3;
                if (((obj3 = base.Request.QueryString["rtype"].Trim()) != null) && ((obj3 = hashtable.hash1[obj3]) != null))
                {
                    switch (((int)obj3))
                    {
                    case 0:
                        this.wtype = "EVEN";
                        goto Label_0649;

                    case 1:
                        this.wtype = "SP";
                        goto Label_0649;

                    case 2:
                        this.wtype = "NA";
                        goto Label_0649;

                    case 3:
                        this.wtype = "NO";
                        goto Label_0649;

                    case 4:
                        this.wtype = "CH";
                        goto Label_0649;

                    case 5:
                        this.wtype = "SPA";
                        goto Label_0649;

                    case 6:
                        this.wtype = "SPB";
                        goto Label_0649;

                    case 7:
                        this.wtype = "SPB";
                        goto Label_0649;

                    case 8:
                        this.wtype = "NO";
                        goto Label_0649;

                    case 9:
                        this.wtype = "SX";
                        goto Label_0649;

                    case 10:
                        this.wtype = "HF";
                        goto Label_0649;
                    }
                }
                this.ErrorContent();
            }
Label_0649:
            this.DataBind();
        }