FLOWER/Pay.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace FLOWER
{
    public partial class Pay : System.Web.UI.Page
    {
        Common.SQLHelper hp = new Common.SQLHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack) 
            {
                Literal1.Text = Request["orderid"].ToString();
                Literal2.Text = "<span style='color:red'>" + decimal.Parse(hp.GetSingle("select IsNull(UserMoney,0) from [User] where userid = " + Session["UserId"].ToString()).ToString()).ToString("0.00") + "</span>";
                Literal3.Text = hp.GetSingle("select price from [bkorder] where orderid = '" + Request["orderid"].ToString() + "'").ToString();
            }
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            string qian = hp.GetSingle("select IsNull(UserMoney,0) as UserMoney from [User] where userid = " + Session["userid"].ToString()).ToString();
            if (decimal.Parse(qian) < decimal.Parse(Literal3.Text))
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('余额不足,请联系管理员进行充值!', { icon: 2, kin: 'layer-ext-moon', closeBtn: 0, success: function () { $(':focus').blur(); } });", true);
            }
            else 
            {
                if (hp.ExecuteSql("update bkorder set flag = 1 where flag = 0 and orderid = '" + Request["orderid"].ToString() + "'") > 0)
                {
                    hp.ExecuteSql("update [User] set UserMoney = convert(decimal,IsNull(UserMoney,0)) - " + decimal.Parse(Literal3.Text) + " where userid=" + Session["userid"].ToString());
                    Hashtable ht = new Hashtable();
                    ht.Add("userid", int.Parse(Session["userid"].ToString()));
                    ht.Add("mid", DateTime.Now.ToString("yyyyMMddHHmmssfff") + RandomNum("second"));
                    ht.Add("action", "用户消费");
                    ht.Add("usermoney",  decimal.Parse(Literal3.Text));
                    ht.Add("msg", "用户消费:" + decimal.Parse(Literal3.Text) + "元,订单号:" + Request["orderid"].ToString() + ",支付时间:" + DateTime.Parse(hp.GetSingle("select getdate()").ToString()).ToString("yyyy-MM-dd HH:mm:ss"));
                    hp.AddContent("UserLog", ht);
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('支付成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0 }, function () { location.href='UserInfo.aspx';})", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('订单状态已更改不能支付!', {icon: 2,kin: 'layer-ext-moon',closeBtn: 0 }, function () { location.href='UserInfo.aspx';})", true);
                }
            }

             
        }

        public string RandomNum(string addtype)
        {
            string kamimaxulie = "000000";
            Random Random1 = new Random();
            int icdd = Random1.Next(100000, 990000) + DateTime.Now.Second;
            kamimaxulie = icdd.ToString("000000");
            if (kamimaxulie.Length < 6)
后面还有 7 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。