Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        short  iErrorNumber = Shove._Convert.StrToShort(Shove._Web.Utility.GetRequest("ErrorNumber"), ErrorNumber.Unknow);
        string Tip          = Shove._Web.Utility.GetRequest("Tip");
        string ClassName    = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Web.Utility.GetRequest("ClassName"));

        labTip.Text           = Tip;
        labTipForNoIsuse.Text = Tip;
        labClassName1.Text    = ClassName;
        labClassName2.Text    = ClassName;

        if ((iErrorNumber == ErrorNumber.NoIsuse) || (iErrorNumber == ErrorNumber.NoData))
        {
            tabError.Visible           = false;
            tabErrorForNoIsuse.Visible = true;
        }
        else
        {
            tabError.Visible           = true;
            tabErrorForNoIsuse.Visible = false;
        }

        //自动跳转
        string Url = this.Request.Url.AbsoluteUri.ToLower();

        script = "window.setTimeout(function(){top.location.href='" + Shove._Web.Utility.GetUrl() + "';},5000);";
    }
Exemple #2
0
    private void ResponseTailor(bool b)
    {
        long num       = _Convert.StrToLong(this.hfID.Value, -1L);
        int  lotteryID = _Convert.StrToInt(this.tbLotteryID.Text, -1);
        int  num3      = -1;

        if (b)
        {
            num3 = lotteryID;
        }
        string str = string.Concat(new object[] { "followScheme(", num3, ");$Id(\"iframeFollowScheme\").src=\"../Home/Room/FollowFriendSchemeAdd.aspx?LotteryID=", num3, "&DzLotteryID=", num3 });

        if (num < 1L)
        {
            PF.GoError(1, "参数错误", base.GetType().FullName);
        }
        else if (!new Lottery().ValidID(lotteryID))
        {
            PF.GoError(1, "参数错误!(彩种)", base.GetType().FullName);
        }
        else
        {
            Users users = new Users(base._Site.ID)
            {
                ID = num
            };
            this.dingZhi = string.Concat(new object[] { "&FollowUserID=", num, "&FollowUserName="******"\"" });
            string returnDescription = "";
            if (users.GetUserInformationByID(ref returnDescription) == 0)
            {
                this.dingZhi = Encrypt.EncryptString(PF.GetCallCert(), str + this.dingZhi);
                base.Response.Redirect("../../Lottery/Buy_" + Lotteries[lotteryID] + ".aspx?DZ=" + this.dingZhi);
            }
        }
    }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            short  iErrorNumber = Shove._Convert.StrToShort(Shove._Web.Utility.GetRequest("ErrorNumber"), ErrorNumber.Unknow);
            string Tip          = Shove._Web.Utility.GetRequest("Tip");
            string ClassName    = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Web.Utility.GetRequest("ClassName"));

            labTip.Text           = Tip;
            labTipForNoIsuse.Text = Tip;
            labClassName1.Text    = ClassName;
            labClassName2.Text    = ClassName;

            if ((iErrorNumber == ErrorNumber.NoIsuse) || (iErrorNumber == ErrorNumber.NoData))
            {
                tabError.Visible           = false;
                tabErrorForNoIsuse.Visible = true;
            }
            else
            {
                tabError.Visible           = true;
                tabErrorForNoIsuse.Visible = false;
            }
            script = Shove._Web.Utility.GetUrl() + "/Lottery/buy.aspx";
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        short  num     = _Convert.StrToShort(Utility.GetRequest("ErrorNumber"), 1);
        string request = Utility.GetRequest("Tip");
        string str2    = Encrypt.UnEncryptString(PF.GetCallCert(), Utility.GetRequest("ClassName"));

        this.labTip.Text           = request;
        this.labTipForNoIsuse.Text = request;
        this.labClassName1.Text    = str2;
        this.labClassName2.Text    = str2;
        switch (num)
        {
        case 6:
        case 7:
            this.tabError.Visible           = false;
            this.tabErrorForNoIsuse.Visible = true;
            break;

        default:
            this.tabError.Visible           = true;
            this.tabErrorForNoIsuse.Visible = false;
            break;
        }
        base.Request.Url.AbsoluteUri.ToLower();
        this.script = "window.setTimeout(function(){top.location.href='" + Utility.GetUrl() + "';},5000);";
    }
Exemple #5
0
    public string GetBackUrl(string urls)
    {
        string url = "MyIcaile.aspx";

        url = Shove._Security.Encrypt.EncryptString(PF.GetCallCert(), url);
        return(url);
    }
    public DataSet GetNumberInformation(int AgentID, string TimeStamp, string Sign, string Number)
    {
        new Log(@"Agent\CardPassword").Write(string.Format("Method=GetNumberInformation\tAgentID={0}\tTimeStamp={1}\tSign={2}\tNumber={3}", new object[] { AgentID, TimeStamp, Sign, Number }));
        DataSet returnDS = new DataSet();
        short   state    = 0;

        if (this.Valid(ref returnDS, ref state, AgentID, TimeStamp, Sign, new object[] { Number }) >= 0)
        {
            int  agentID = -1;
            long num3    = new CardPassword().GetCardPasswordID(PF.GetCallCert(), Number, ref agentID);
            if ((num3 < 0L) || (agentID != AgentID))
            {
                this.BuildReturnDataSetForError(-5, "卡号不存在", ref returnDS);
                return(returnDS);
            }
            DataTable table = new Tables.T_CardPasswords().Open("[DateTime], [Money], Period, State", string.Concat(new object[] { "AgentID = ", AgentID, " and [ID] = ", num3.ToString() }), "");
            if (table == null)
            {
                this.BuildReturnDataSetForError(-9999, "未知错误", ref returnDS);
                return(returnDS);
            }
            this.BuildReturnDataSet(0L, ref returnDS);
            returnDS.Tables.Add(table);
        }
        return(returnDS);
    }
    public DataSet GetNumbers(int AgentID, string TimeStamp, string Sign, string StartTime, string EndTime)
    {
        StartTime = Utility.FilteSqlInfusion(StartTime);
        EndTime   = Utility.FilteSqlInfusion(EndTime);
        new Log(@"Agent\CardPassword").Write(string.Format("Method=GetNumbers\tAgentID={0}\tTimeStamp={1}\tSign={2}\tStartTime={3}\tEndTime={4}", new object[] { AgentID, TimeStamp, Sign, StartTime, EndTime }));
        DataSet returnDS = new DataSet();
        short   state    = 0;

        if (this.Valid(ref returnDS, ref state, AgentID, TimeStamp, Sign, new object[] { StartTime, EndTime }) >= 0)
        {
            DataTable table = new Tables.T_CardPasswords().Open("[ID], [DateTime], [Money], State, Period", "AgentID = " + AgentID.ToString() + " and (DateTime between '" + StartTime + "' and '" + EndTime + "' )", "[ID]");
            if (table == null)
            {
                this.BuildReturnDataSetForError(-9999, "未知错误", ref returnDS);
                return(returnDS);
            }
            table.Columns.Add("Number", typeof(string));
            CardPassword password = new CardPassword();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                table.Rows[i]["Number"] = password.GenNumber(PF.GetCallCert(), AgentID, _Convert.StrToLong(table.Rows[i]["ID"].ToString(), -1L));
                table.AcceptChanges();
            }
            table.Columns.Remove(table.Columns[0]);
            this.BuildReturnDataSet(0L, ref returnDS);
            returnDS.Tables.Add(table);
        }
        return(returnDS);
    }
Exemple #8
0
    protected void btnGO_Click(object sender, EventArgs e)
    {
        string input = "LtnyeFVjxGloveshove19791130ea8g502shove!@#$%^&*()__";

        try
        {
            input = this.ViewState["MobileValidNumber_" + base._User.ID.ToString()].ToString();
            input = Encrypt.UnEncryptString(PF.GetCallCert(), Encrypt.Decrypt3DES(PF.GetCallCert(), input, PF.DesKey));
        }
        catch
        {
        }
        if (input != this.tbValidPassword.Text.Trim())
        {
            JavaScript.Alert(this.Page, "验证串错误。");
        }
        else
        {
            Users user = new Users(base._Site.ID);
            base._User.Clone(user);
            base._User.Mobile          = this.tbUserMobile.Text;
            base._User.isMobileValided = true;
            string returnDescription = "";
            if (base._User.EditByID(ref returnDescription) < 0)
            {
                user.Clone(base._User);
                JavaScript.Alert(this.Page, returnDescription);
            }
            else
            {
                JavaScript.Alert(this.Page, "手机绑定成功。", "UserMobileBind.aspx");
            }
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Buy.LogFileName = "c:/YeePay_HTML.txt";
        base.Response.ContentEncoding = Encoding.GetEncoding("gb2312");
        p1_MerId = this.so["OnlinePay_YeePay_UserNumber"].Value.ToString();
        keyValue = this.so["OnlinePay_YeePay_MD5Key"].Value.ToString();
        Buy.NodeAuthorizationURL = "https://www.yeepay.com/app-merchant-proxy/node";
        this.p3_Amt = Utility.GetRequest("PayMoney");
        long   newPayNumber      = -1L;
        string returnDescription = "";

        if (Procedures.P_GetNewPayNumber(base._Site.ID, base._User.ID, "yeepay", (double)_Convert.StrToLong(this.p3_Amt, 0L), 0.0, ref newPayNumber, ref returnDescription) < 0)
        {
            PF.GoError(4, "数据库繁忙,请重试", base.GetType().BaseType.FullName);
        }
        else if ((newPayNumber < 0L) || (returnDescription != ""))
        {
            PF.GoError(1, returnDescription, base.GetType().BaseType.FullName);
        }
        else
        {
            this.p2_Order        = newPayNumber.ToString();
            this.p4_Cur          = "CNY";
            this.p5_Pid          = "";
            this.p6_Pcat         = "";
            this.p7_Pdesc        = "";
            this.p8_Url          = Utility.GetUrl() + "/Home/Room/OnlinePay/YeePay/Receive.aspx";
            this.p9_SAF          = "0";
            this.pa_MP           = Encrypt.EncryptString(PF.GetCallCert(), base._User.ID.ToString());
            this.pd_FrpId        = "";
            this.pr_NeedResponse = "0";
            this.htmlCodeGet     = Buy.CreateBuyUrl(p1_MerId, keyValue, this.p2_Order, this.p3_Amt, this.p4_Cur, this.p5_Pid, this.p6_Pcat, this.p7_Pdesc, this.p8_Url, this.p9_SAF, this.pa_MP, this.pd_FrpId, this.pr_NeedResponse);
            base.Response.Redirect(this.htmlCodeGet);
        }
    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        string input = "LtnyeFVjxGloveshove19791130ea8g502shove!@#$%^&*()__";

        try
        {
            input = this.ViewState["CardPasswordValidNumber_" + base._User.ID.ToString()].ToString();
            input = Encrypt.UnEncryptString(PF.GetCallCert(), Encrypt.Decrypt3DES(PF.GetCallCert(), input, PF.DesKey));
        }
        catch
        {
        }
        if (input != this.tbCode.Text.Trim())
        {
            JavaScript.Alert(this.Page, "验证串错误。");
        }
        else
        {
            string returnDescription = "";
            if (new CardPassword().Use(input, base._Site.ID, base._User.ID, ref returnDescription) < 0)
            {
                JavaScript.Alert(this.Page, returnDescription);
            }
            else
            {
                new Tables.T_CardPasswordsValid {
                    UserID = { Value = base._User.ID }, Mobile = { Value = this.tbMobile.Text.Trim() }, CardPasswordsNum = { Value = this.tbCardPassword.Text.Trim() }
                }.Insert();
                JavaScript.Alert(this.Page, "卡密充值成功, 请点击“查看我的账户”查看投注卡账户余额情况。");
            }
        }
    }
Exemple #11
0
    protected void btnBind_Click(object sender, EventArgs e)
    {
        string email = Utility.FilteSqlInfusion(_Convert.ToDBC(this.tbEmail.Text.Trim()));
        string str2  = Utility.FilteSqlInfusion(_Convert.ToDBC(this.tbAnswer.Text.Trim()));

        if ((base._User.SecurityAnswer == "") || (base._User.SecurityQuestion == ""))
        {
            JavaScript.Alert(this.Page, "您尚未设置安全问题不能进行邮箱绑定。", "SafeSet.aspx?FromUrl=UserEmailBind.aspx");
        }
        else if (str2 == "")
        {
            JavaScript.Alert(this.Page, "问题答案输入有误。");
        }
        else if (str2 != base._User.SecurityAnswer)
        {
            JavaScript.Alert(this.Page, "问题答案输入有误。");
        }
        else if (email == "")
        {
            JavaScript.Alert(this.Page, "请输入 Email 地址。");
        }
        else if (!_String.Valid.isEmail(email))
        {
            JavaScript.Alert(this.Page, "输入 Email 格式不正确。");
        }
        else if ((email == base._User.Email) && base._User.isEmailValided)
        {
            this.Label1.Visible = true;
            this.Label1.Text    = "&nbsp;&nbsp;&nbsp;&nbsp;你的 Email 已经激活了,不需要再次激活。";
        }
        else
        {
            string returnDescription = "";
            base._User.Email          = email;
            base._User.isEmailValided = false;
            if (base._User.EditByID(ref returnDescription) < 0)
            {
                PF.GoError(-1, "数据库读写错误", base.GetType().FullName);
            }
            else
            {
                string s = Encrypt.EncryptString(PF.GetCallCert(), base._User.ID.ToString() + "," + DateTime.Now.ToString() + "," + email);
                MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
                string str5 = BitConverter.ToString(provider.ComputeHash(Encoding.UTF8.GetBytes(s))).Replace("-", "");
                s = str5.Substring(0, 0x10) + s + str5.Substring(0x10, 0x10);
                string        str6    = Utility.GetUrl() + "/Home/Room/EmailReg.aspx?emailvalidkey=" + s;
                StringBuilder builder = new StringBuilder();
                builder.Append("<div style='font-weight:bold;'>尊敬的" + base._Site.Name + "客户(").Append(base._User.Name).Append("):</div>").Append("<div>您好!</div>").Append("<div>系统已收到您的邮箱激活申请,请点击链接<a href='").Append(str6).Append("' target='_top'>").Append(str6).Append("</a>校验您的身份。</div>").Append("<div>为了您的安全,该邮件通知地址将在 24 小时后失效,谢谢合作。</div>").Append("<div>此邮件由系统发出,请勿直接回复!</div>").Append("<div>免费客服电话:400-811-8686</div>").Append("<div>意见收集与提交:[email protected]</div>").Append("<div>").Append(Utility.GetUrlWithoutHttp()).Append(" 版权所有(C) 2008-2009</div>");
                if (PF.SendEmail(base._Site, email, base._Site.Name + "邮箱激活验证", builder.ToString()) == 0)
                {
                    this.tbEmail.Enabled = false;
                    this.Label1.Text     = "&nbsp;&nbsp;&nbsp;&nbsp;您好,系统已经发送一封验证邮件您的邮箱,请到您的信箱点击链接完成激活。";
                }
                else
                {
                    new Log("System").Write(base.GetType().FullName + "发送邮件失败");
                }
            }
        }
    }
Exemple #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         string request = Utility.GetRequest("userId");
         this.HiddenUserID.Value = request;
         long num = _Convert.StrToLong(Encrypt.Decrypt3DES(PF.GetCallCert(), request, PF.DesKey), -1L);
         if (num >= 1L)
         {
             Users users = new Users(1L)[1L, num];
             if (users.ID >= 0L)
             {
                 this.lbName.Text        = users.Name;
                 this.lbRegTime.Text     = users.RegisterTime.ToString("yyyy-MM-dd HH:mm:ss");
                 this.lbRealityName.Text = users.RealityName;
                 this.lbBalance.Text     = users.Balance.ToString("N");
                 this.lbTel.Text         = users.Telephone;
                 this.lbMobile.Text      = users.Mobile;
                 this.lbQQ.Text          = users.QQ;
                 this.lbEmail.Text       = users.Email;
                 this.lbAlipayName.Text  = users.AlipayName;
                 this.BindInvest(users);
                 this.BindWin(users);
             }
         }
     }
 }
    public DataSet Exchange(int AgentID, string TimeStamp, string Sign, string CardsXml)
    {
        new Log(@"Agent\CardPassword").Write(string.Format("Method=Exchange\tAgentID={0}\tTimeStamp={1}\tSign={2}\tCardsXml={3}", new object[] { AgentID, TimeStamp, Sign, CardsXml }));
        DataSet   ds    = new DataSet();
        short     state = 0;
        DataTable table = _Convert.XMLToDataTable(CardsXml);

        if ((table == null) || (table.Rows.Count < 1))
        {
            this.BuildReturnDataSetForError(-8, "参数不符合规定或者未提供", ref ds);
            return(ds);
        }
        if (this.Valid(ref ds, ref state, AgentID, TimeStamp, Sign, new object[] { CardsXml }) >= 0)
        {
            Regex regex = new Regex(@"^[\d]{20}$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
            CardsXml = "<Cards>";
            CardPassword password = new CardPassword();
            int          agentID  = -1;
            foreach (DataRow row in table.Rows)
            {
                string input = row["Number"].ToString();
                if (!regex.IsMatch(input))
                {
                    this.BuildReturnDataSetForError(-8, "参数不符合规定或者未提供", ref ds);
                    return(ds);
                }
                long num3 = password.GetCardPasswordID(PF.GetCallCert(), input, ref agentID);
                if ((num3 < 0L) || (agentID != AgentID))
                {
                    this.BuildReturnDataSetForError(-5, "卡号不存在", ref ds);
                    return(ds);
                }
                CardsXml = CardsXml + "<Card ID=\"" + num3.ToString() + "\" />";
            }
            CardsXml = CardsXml + "</Cards>";
            int    returnValue       = -1;
            string returnDescription = "";
            this.BuildReturnDataSet(0L, ref ds);
            if (Procedures.P_CardPasswordExchange(ref ds, AgentID, CardsXml, ref returnValue, ref returnDescription) < 0)
            {
                this.BuildReturnDataSetForError(-9999, "未知错误", ref ds);
                return(ds);
            }
            if (returnValue < 0)
            {
                this.BuildReturnDataSetForError(returnValue, returnDescription, ref ds);
                return(ds);
            }
            DataTable table2 = ds.Tables[1];
            table2.Columns.Add("Number", typeof(string));
            for (int i = 0; i < table2.Rows.Count; i++)
            {
                table2.Rows[i]["Number"] = password.GenNumber(PF.GetCallCert(), AgentID, _Convert.StrToLong(table2.Rows[i]["ID"].ToString(), -1L));
                table2.AcceptChanges();
            }
            table2.Columns.Remove(table2.Columns[0]);
        }
        return(ds);
    }
Exemple #14
0
    private void ResponseTailor(bool b)
    {
        if (_User.ID < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "请重新登陆", this.GetType().FullName);

            return;
        }

        long userid = Shove._Convert.StrToLong(hfUserID.Value, -1);

        int lotteryid = Shove._Convert.StrToInt(hffLotteryID.Value, -1);

        if (lotteryid < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().FullName);

            return;
        }

        int temp = -1;

        if (b)
        {
            temp = lotteryid;
        }
        string headMethod = "followScheme(" + temp + ");$Id(\"iframeFollowScheme\").src=\"../Home/Room/FollowFriendSchemeAdd.aspx?LotteryID=" + temp + "&DzLotteryID=" + temp;

        if (userid < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().FullName);

            return;
        }
        if (!new SLS.Lottery().ValidID(lotteryid))
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误!(彩种)", this.GetType().FullName);

            return;
        }

        Users tu = new Users(1);

        tu.ID   = userid;
        dingZhi = "&FollowUserID=" + userid + "&FollowUserName="******"\"";
        string ReturnDescription = "";

        if (tu.GetUserInformationByID(ref ReturnDescription) != 0)
        {
            return;
        }

        dingZhi = Shove._Security.Encrypt.EncryptString(PF.GetCallCert(), headMethod + dingZhi);

        if ((lotteryid != 72) || (lotteryid != 73))
        {
            Response.Redirect("../Lottery/Buy_" + Lotteries[lotteryid] + ".aspx?DZ=" + dingZhi + "");
        }
    }
Exemple #15
0
    /// <summary>
    ///当天注册会员前12名,免费送2元彩金,同一个支付宝账号只能领取一次。
    /// </summary>
    /// <param name="UserID"></param>
    private void Reward(long UserID, string AlipayName)
    {
        int AgentID = 1016;

        if (UserID < 1 || AlipayName == "")
        {
            return;
        }

        DataTable dt = Shove.Database.MSSQL.Select("select * from T_ActivitiesMytv365 where Convert(varchar(10), DateTime, 120) = '" + DateTime.Now.ToString("yyyy-MM-dd") + "'", new Shove.Database.MSSQL.Parameter[0]);//new DAL.Tables.T_TomActivities().Open("", Condition, "");

        if (dt == null)
        {
            return;
        }

        DataRow[] dr = dt.Select("AlipayName = '" + AlipayName + "'");

        int a = 0;

        //无重复的,并且在前12
        if (dr.Length == 0 && dt.Rows.Count < 12)
        {
            string ReturnDescription = "";

            CardPassword cp = new CardPassword();

            long CardPasswordID = (long)cp.Add(AgentID, 1, 2, 1, ref ReturnDescription);

            if (CardPasswordID < 0)
            {
                new Log("System").Write("添加卡密失败。" + ReturnDescription + this.GetType().FullName + "(150)");

                return;
            }

            int i = cp.Use(cp.GenNumber(PF.GetCallCert(), AgentID, CardPasswordID), 1, UserID, ref ReturnDescription);

            if (i < 0)
            {
                new Log("System").Write("卡密使用失败。" + ReturnDescription + this.GetType().FullName + "(159)");

                return;
            }

            a = 1;

            string sql = "insert into T_ActivitiesMytv365 (IsReward1,UserID,AlipayName)values(" + a.ToString() + "," + UserID.ToString() + ",'" + AlipayName + "')";

            int result = Shove.Database.MSSQL.ExecuteNonQuery(sql, new Shove.Database.MSSQL.Parameter[0]);

            if (result < 0)
            {
                new Log("System").Write("写入 T_ActivitiesMytv365 失败。" + this.GetType().FullName + "(178)");

                return;
            }
        }
    }
Exemple #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(Lottery_Buy_JQC), this.Page);
        LotteryID = 2;

        bool   result         = false;
        string UseLotteryList = Shove._Web.Cache.GetCacheAsString("Site_UseLotteryList" + _Site.ID, "");

        string[] Lottery = null;

        if (UseLotteryList == "")
        {
            UseLotteryList = DAL.Functions.F_GetUsedLotteryList(_Site.ID);

            if (UseLotteryList != "")
            {
                Shove._Web.Cache.SetCache("Site_UseLotteryList" + _Site.ID, UseLotteryList);
            }
        }

        Lottery = UseLotteryList.Split(',');
        for (int i = 0; i < Lottery.Length; i++)
        {
            if (LotteryID.ToString().Equals(Lottery[i]))
            {
                result = true;
                break;
            }
        }

        if (result == false)
        {
            Response.Redirect("../Default.aspx");
        }

        hlAgreement.NavigateUrl = "../Home/Room/BuyProtocol.aspx?LotteryID=" + LotteryID;

        LotteryName = DataCache.Lotteries[LotteryID];

        if (!IsPostBack)
        {
            long BuyID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("BuyID"), -1);
            if (BuyID > 0)
            {
                BindDataForAliBuy(BuyID);
            }

            tbSFC.InnerHtml   = GetWinListHM(74, 0);
            tbRJC.InnerHtml   = GetWinListHM(75, 1);
            tbJQC.InnerHtml   = GetWinListHM(2, 0);
            tbLCJQC.InnerHtml = GetWinListHM(15, 0);

            tbWin1.InnerHtml = BindWinList(DataCache.GetWinInfo(LotteryID));

            DZ = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Web.Utility.GetRequest("DZ"));

            BindIsuses();
        }
    }
    private void BindData()
    {
        DataTable dt = Shove._Web.Cache.GetCacheAsDataTable("CardPassword_QueryCardPassword_All");

        if (dt == null)
        {
            string Condition = "";

            if (rbExp.Checked)
            {
                Condition += "state = -1";
            }
            else if (rbUse.Checked)
            {
                Condition += "state = 1";
            }
            else if (rbNoUse.Checked)
            {
                Condition += "state = 0";
            }

            if (tbCardPasswordID.Text.Trim() != "")
            {
                int _AgentID = -1;
                Condition += " and ID = " + new CardPassword().GetCardPasswordID(PF.GetCallCert(), Shove._Web.Utility.FilteSqlInfusion(tbCardPasswordID.Text.Trim()), ref _AgentID).ToString();
            }

            if (tbDateTime.Text.Trim() != "")
            {
                DateTime dtFrom = DateTime.Parse("1981-01-01");

                try
                {
                    dtFrom = DateTime.Parse(tbDateTime.Text.Trim());
                }
                catch
                {
                    Shove._Web.JavaScript.Alert(this.Page, "时间格式填写有错误!");

                    return;
                }

                Condition += " and DateTime > '" + dtFrom.ToString() + "'";
            }

            dt = new DAL.Views.V_CardPasswordDetails().Open("ID, Money, Period, State, AgentID, UseDateTime, RealityName", Condition, "");

            if (dt == null)
            {
                PF.GoError(ErrorNumber.DataReadWrite, "数据库繁忙,请重试", "CardPassword_QueryCardPassword");

                return;
            }

            Shove._Web.Cache.SetCache("CardPassword_QueryCardPassword_All", dt, 1200);
        }

        PF.DataGridBindData(g, dt, gPager);
    }
 public string GenNumber(string CallCert, int AgentID, long CardPasswordID)
 {
     if (CallCert != PF.GetCallCert())
     {
         throw new Exception("Call the CardPassword.GenNumber is request a CallCert.");
     }
     return(SLS.Security.CardPassword.GenNumber(CallCert, AgentID, CardPasswordID));
 }
Exemple #19
0
 protected void g_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.EditItem)
     {
         e.Item.Cells[0].Text = new CardPassword().GenNumber(PF.GetCallCert(), Shove._Convert.StrToInt(_CardPasswordAgentUser.ID.ToString(), 0), Shove._Convert.StrToLong(e.Item.Cells[5].Text, 0));
         e.Item.Cells[1].Text = Shove._Convert.StrToDouble(e.Item.Cells[1].Text, 0).ToString("N");
     }
 }
Exemple #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         string s = Utility.GetRequest("key").Trim();
         if ((s == "") || (s.Length <= 0x20))
         {
             this.pSetp1.Visible = false;
             this.pStep2.Visible = true;
             this.lbError.Text   = "非法访问。";
         }
         else
         {
             string str2 = s.Substring(0, 0x10) + s.Substring(s.Length - 0x10, 0x10);
             s = s.Substring(0x10, s.Length - 0x20);
             try
             {
                 if (str2 != BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(Encoding.UTF8.GetBytes(s))).Replace("-", ""))
                 {
                     this.pSetp1.Visible = false;
                     this.pStep2.Visible = true;
                     this.lbError.Text   = "非法访问。";
                 }
                 else
                 {
                     s = Encrypt.UnEncryptString(PF.GetCallCert(), s);
                     long num = _Convert.StrToLong(s.Split(new char[] { ',' })[0], 0L);
                     if (Convert.ToDateTime(s.Split(new char[] { ',' })[1]).AddDays(1.0).CompareTo(DateTime.Now) < 0)
                     {
                         this.pSetp1.Visible = false;
                         this.pStep2.Visible = true;
                         this.lbError.Text   = "该地址已过期。";
                     }
                     else if (num <= 0L)
                     {
                         this.pSetp1.Visible = false;
                         this.pStep2.Visible = true;
                         this.lbError.Text   = "非法访问。";
                     }
                     else
                     {
                         this.pSetp1.Visible = true;
                         this.pStep2.Visible = false;
                         bool flag = base._Site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);
                         this.CheckCode.Visible = flag;
                         new Login().SetCheckCode(base._Site, this.ShoveCheckCode1);
                     }
                 }
             }
             catch
             {
                 this.pSetp1.Visible = false;
                 this.pStep2.Visible = true;
                 this.lbError.Text   = "非法访问。";
             }
         }
     }
 }
 public long GetCardPasswordID(string CallCert, string Number, ref int AgentID)
 {
     if (CallCert != PF.GetCallCert())
     {
         throw new Exception("Call the CardPassword.GenNumber is request a CallCert.");
     }
     AgentID = -1;
     return(SLS.Security.CardPassword.GetCardPasswordID(CallCert, Number, ref AgentID));
 }
Exemple #22
0
 protected void g1_ItemCommand(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "DZ")
     {
         string s = "followScheme(" + e.Item.Cells[8].Text + ");$Id(\"iframeFollowScheme\").src=\"Home/Room/FollowFriendSchemeAdd.aspx?LotteryID=" + e.Item.Cells[8].Text + "&FollowUserID=" + e.Item.Cells[9].Text + "&FollowUserName="******"\"";
         s = Encrypt.EncryptString(PF.GetCallCert(), s);
         base.Response.Redirect(this.GetURL(e.Item.Cells[8].Text, s));
     }
 }
    private void ResponseTailor(string headMethod)
    {
        long num = -1L;

        try
        {
            num = _Convert.StrToLong(Utility.GetRequest("id"), -1L);
        }
        catch
        {
        }
        if (num < 1L)
        {
            PF.GoError(1, "参数错误", base.GetType().FullName);
        }
        else if (!new Lottery().ValidID(this.LotteryID))
        {
            PF.GoError(1, "参数错误!(彩种)", base.GetType().FullName);
        }
        else
        {
            Users users = new Users(base._Site.ID)
            {
                ID = num
            };
            string returnDescription = "";
            if (users.GetUserInformationByID(ref returnDescription) != 0)
            {
                PF.GoError(1, returnDescription, base.GetType().FullName);
            }
            else
            {
                this.dingZhi = Encrypt.EncryptString(PF.GetCallCert(), headMethod + this.dingZhi);
                if (this.LotteryID == 0x1d)
                {
                    base.Response.Redirect("../Room/Buy_SSL.aspx?DZ=" + this.dingZhi);
                }
                else if (this.LotteryID == 0x3e)
                {
                    base.Response.Redirect("../Room/Buy_SYYDJ.aspx?DZ=" + this.dingZhi);
                }
                else if (this.LotteryID == 0x3d)
                {
                    base.Response.Redirect("../Room/Buy_SSC.aspx?DZ=" + this.dingZhi);
                }
                else if (((this.LotteryID == 1) || (this.LotteryID == 2)) || (this.LotteryID == 15))
                {
                    base.Response.Redirect(string.Concat(new object[] { "../Room/Buy_ZC.aspx?LotteryID=", this.LotteryID, "&DZ=", this.dingZhi }));
                }
                else
                {
                    base.Response.Redirect(string.Concat(new object[] { "../Room/Buy.aspx?LotteryID=", this.LotteryID, "&ID=", this.LotteryID, "&DZ=", this.dingZhi }));
                }
            }
        }
    }
Exemple #24
0
    protected void Login_Click(object sender, EventArgs e)
    {
        int    Result            = -1;
        string ReturnDescription = "";

        string textName = UserName.Value;
        string textPwd  = PassWord.Value;
        string textCode = Verify.Value;

        if (textName.Trim() == "" || textPwd.Trim() == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "用户名或密码为空!");
            return;
        }
        bool Opt_isUseCheckCode = _Site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);

        if (Opt_isUseCheckCode)
        {
            if (textCode.Trim() != Session["CheckCode"].ToString())
            {
                Shove._Web.JavaScript.Alert(this.Page, "验证码错误!");
                return;
            }
        }
        Result = new Login().LoginSubmit(this.Page, _Site, textName.Trim(), textPwd.Trim(), ref ReturnDescription);
        if (Result < 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);
            return;
        }

        object Url = Shove._Web.Cache.GetCache("OnGotoLoginUrl");

        if (Url != null)
        {
            Shove._Web.Cache.GetCache("OnGotoLoginUrl");
            Response.Redirect(Url.ToString());
        }
        else if (Shove._Web.Utility.GetRequest("Rollback") != null || Shove._Web.Utility.GetRequest("Rollback") != "")
        {
            string strReturn = Shove._Web.Utility.GetRequest("Rollback");
            strReturn = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), strReturn);
            if (strReturn == "MyIcaile.aspx")
            {
                new Login().GoToRequestLoginPage("Home/Room/AccountDetail.aspx");
            }
            else
            {
                new Login().GoToRequestLoginPage("index.aspx");
            }
        }
        else
        {
            new Login().GoToRequestLoginPage("index.aspx");
        }
    }
    private void ResponseTailor(bool b, long userid)
    {
        int lotteryID = _Convert.StrToInt(this.HidLotteryID.Value, -1);
        int num2      = -1;

        if (b)
        {
            num2 = lotteryID;
        }
        string str = string.Concat(new object[] { "followScheme(", num2, ");$Id(\"iframeFollowScheme\").src=\"FollowFriendSchemeAdd.aspx?LotteryID=", num2, "&DzLotteryID=", num2 });

        if (userid < 1L)
        {
            PF.GoError(1, "参数错误", base.GetType().FullName);
        }
        else if (!new Lottery().ValidID(lotteryID))
        {
            PF.GoError(1, "参数错误!(彩种)", base.GetType().FullName);
        }
        else
        {
            Users users = new Users(base._Site.ID)
            {
                ID = userid
            };
            this.dingZhi = string.Concat(new object[] { "&FollowUserID=", userid, "&FollowUserName="******"\"" });
            string returnDescription = "";
            if (users.GetUserInformationByID(ref returnDescription) == 0)
            {
                this.dingZhi = Encrypt.EncryptString(PF.GetCallCert(), str + this.dingZhi);
                switch (lotteryID)
                {
                case 0x1d:
                    base.Response.Redirect("Buy_SSL.aspx?DZ=" + this.dingZhi);
                    return;

                case 0x3e:
                    base.Response.Redirect("Buy_SYYDJ.aspx?DZ=" + this.dingZhi);
                    return;

                case 0x3d:
                    base.Response.Redirect("Buy_SSC.aspx?DZ=" + this.dingZhi);
                    return;

                case 1:
                case 2:
                case 15:
                    base.Response.Redirect(string.Concat(new object[] { "Buy_ZC.aspx?LotteryID=", lotteryID, "&DZ=", this.dingZhi }));
                    return;
                }
                base.Response.Redirect(string.Concat(new object[] { "Buy.aspx?LotteryID=", lotteryID, "&ID=", lotteryID, "&DZ=", this.dingZhi }));
            }
        }
    }
Exemple #26
0
    protected void btnGetPassword_Click(object sender, EventArgs e)
    {
        Thread.Sleep(500);
        string str   = Utility.FilteSqlInfusion(this.tbFormUserName.Text.Trim());
        string email = Utility.FilteSqlInfusion(this.tbEmail.Text.Trim());

        this.tbFormCheckCode.Text.Trim();
        if (str == "")
        {
            JavaScript.Alert(this, "用户名不能为空。");
        }
        else if (email == "")
        {
            JavaScript.Alert(this, "邮箱地址不能为空。");
        }
        else if (!_String.Valid.isEmail(email))
        {
            JavaScript.Alert(this, "邮箱地址格式不正确。");
        }
        else if (base._Site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true) && !this.ShoveCheckCode1.Valid(this.tbFormCheckCode.Text.Trim()))
        {
            JavaScript.Alert(this, "验证码输入错误。");
        }
        else
        {
            DataTable table = new Tables.T_Users().Open("", "Name = '" + str + "' and Email = '" + email + "'", "");
            if ((table == null) || (table.Rows.Count < 1))
            {
                JavaScript.Alert(this, "用户名或邮箱不正确。");
            }
            else if (!_Convert.StrToBool(table.Rows[0]["isEmailValided"].ToString(), false))
            {
                JavaScript.Alert(this, "您的邮箱当前还没有激活,不能使用密码找回功能,请联系客服人员帮你找回密码,谢谢合作。");
            }
            else
            {
                string s = Encrypt.EncryptString(PF.GetCallCert(), table.Rows[0]["ID"].ToString() + "," + DateTime.Now.ToString());
                MD5CryptoServiceProvider provider = new MD5CryptoServiceProvider();
                string str4 = BitConverter.ToString(provider.ComputeHash(Encoding.UTF8.GetBytes(s))).Replace("-", "");
                s = str4.Substring(0, 0x10) + s + str4.Substring(0x10, 0x10);
                string        str5    = Utility.GetUrl() + "/Home/Room/ResetPassword.aspx?key=" + s;
                StringBuilder builder = new StringBuilder();
                builder.Append("<div style='font-weight:bold;'>尊敬的" + base._Site.Name + "客户(").Append(str).Append("):</div>").Append("<div>您好!</div>").Append("<div>系统已收到您的密码找回申请,请点击链接<a href='").Append(str5).Append("' target='_top'>").Append(str5).Append("</a>重设您的密码。</div>").Append("<div>为了您的安全,该邮件通知地址将在 24 小时后失效,谢谢合作。</div>").Append("<div>此邮件由系统发出,请勿直接回复!</div>").Append("<div>上海福彩投诉电话:021-64175077</div>").Append("<div>意见收集与提交:[email protected] </div>").Append("<div>").Append(Utility.GetUrlWithoutHttp()).Append(" 版权所有(C) 2008-2009</div>");
                if (PF.SendEmail(base._Site, email, "密码找回通知信", builder.ToString()) < 0)
                {
                    new Log("System").Write(base.GetType().FullName + "发送邮件失败");
                }
                this.pSetp1.Visible = false;
                this.pStep2.Visible = true;
                this.script         = "window.setInterval('DisplayTimer()', 1000);";
            }
        }
    }
Exemple #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(Lottery_Buy_ZJTC6J1), this.Page);

        LotteryID = 41;

        bool   result         = false;
        string UseLotteryList = Shove._Web.Cache.GetCacheAsString("Site_UseLotteryList" + _Site.ID, "");

        string[] Lottery = null;

        if (UseLotteryList == "")
        {
            UseLotteryList = DAL.Functions.F_GetUsedLotteryList(_Site.ID);

            if (UseLotteryList != "")
            {
                Shove._Web.Cache.SetCache("Site_UseLotteryList" + _Site.ID, UseLotteryList);
            }
        }

        Lottery = UseLotteryList.Split(',');
        for (int i = 0; i < Lottery.Length; i++)
        {
            if (LotteryID.ToString().Equals(Lottery[i]))
            {
                result = true;
                break;
            }
        }

        if (result == false)
        {
            Response.Redirect("../Default.aspx");
        }

        LotteryName = "浙江体彩6+1";

        if (!IsPostBack)
        {
            long BuyID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("BuyID"), -1);
            if (BuyID > 0)
            {
                BindDataForAliBuy(BuyID);
            }

            tbWin1.InnerHtml = BindWinList(DataCache.GetWinInfo(LotteryID));

            DZ = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Web.Utility.GetRequest("DZ"));
        }
    }
Exemple #28
0
 protected void gUserPay_ItemDataBound(object sender, DataGridItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.EditItem)
     {
         try
         {
             e.Item.Cells[3].Text = new CardPassword().GenNumber(PF.GetCallCert(), Shove._Convert.StrToInt(e.Item.Cells[5].Text, 0), Shove._Convert.StrToLong(e.Item.Cells[4].Text, 0));
         }
         catch
         {
             e.Item.Cells[3].Text = e.Item.Cells[6].Text;
         }
     }
 }
Exemple #29
0
    protected void btnLogin_Click(object sender, System.EventArgs e)
    {
        string ReturnDescription = "";
        int    Result            = -1;

        if (hLogin.Value == "1")
        {
            Result = new Login().LoginSubmit(this.Page, _Site, tbFormUserName.Text, tbFormUserPassword.Text, tbFormCheckCode.Text, ShoveCheckCode1, ref ReturnDescription);
        }
        else
        {
            Result = new Login().LoginSubmit(this.Page, _Site, tbFormUserName.Text, tbFormUserPassword.Text, ref ReturnDescription);
        }

        object fromURL = Shove._Web.Cache.GetCache("OnGotoLoginUrl");

        if (Result < 0)
        {
            this.Panel1.Visible = true;
            hLogin.Value        = "1";

            Shove._Web.JavaScript.Alert(this.Page, ReturnDescription);

            return;
        }

        if (fromURL != null)
        {
            Shove._Web.Cache.ClearCache("OnGotoLoginUrl");
            Response.Redirect(fromURL.ToString());
        }
        else if (Shove._Web.Utility.GetRequest("Rollback") != null || Shove._Web.Utility.GetRequest("Rollback") != "")
        {
            string strReturn = Shove._Web.Utility.GetRequest("Rollback");
            strReturn = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), strReturn);
            if (strReturn == "MyIcaile.aspx")
            {
                new Login().GoToRequestLoginPage("~/Home/Room/AccountDetail.aspx");
            }
            else
            {
                new Login().GoToRequestLoginPage("~/Default.aspx");
            }
        }
        else
        {
            new Login().GoToRequestLoginPage("~/Default.aspx");
        }
    }
Exemple #30
0
    public static ElectronTicketAgents GetCurrentUser()
    {
        string Key = (System.Web.HttpContext.Current.Session.SessionID + "").ToLower() + "_ElectronTicketAgents";

        // 从 Cookie 中取出 UserID
        HttpCookie cookieUser = HttpContext.Current.Request.Cookies[Key];

        if ((cookieUser == null) || (String.IsNullOrEmpty(cookieUser.Value)))
        {
            return(null);
        }

        string CookieUserID = cookieUser.Value;

        try
        {
            CookieUserID = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Security.Encrypt.Decrypt3DES(PF.GetCallCert(), CookieUserID, PF.DesKey));
        }
        catch
        {
            CookieUserID = "";
        }

        if (String.IsNullOrEmpty(CookieUserID))
        {
            return(null);
        }

        int UserID = Shove._Convert.StrToInt(CookieUserID, -1);

        if (UserID < 1)
        {
            return(null);
        }

        ElectronTicketAgents electronTicketAgents = new ElectronTicketAgents();

        electronTicketAgents.ID = UserID;

        string ReturnDescription = "";
        int    Result            = electronTicketAgents.GetInformationByID(ref ReturnDescription);

        if (Result < 0)
        {
            return(null);
        }

        return(electronTicketAgents);
    }