FLOWER/Admin/User/AddMoney.aspx.cs
(完整代码) 2KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
namespace FLOWER.Admin.User
{
public partial class AddMoney : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack) { }
}
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)
{
kamimaxulie = RandomNum("time");
}
return kamimaxulie;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (new Common.SQLHelper().Exists("select LoginName from [User] where LoginName = '"+TextBox1.Text+"'"))
{
int id = int.Parse(new Common.SQLHelper().GetSingle("select userid from [User] where LoginName = '" + TextBox1.Text + "'").ToString());
Hashtable ht = new Hashtable();
ht.Add("userid", id);
ht.Add("mid", DateTime.Now.ToString("yyyyMMddHHmmssfff") + RandomNum("second"));
ht.Add("action", DropDownList1.SelectedValue);
ht.Add("usermoney", TextBox2.Text);
ht.Add("msg", TextBox3.Text);
new Common.SQLHelper().AddContent("UserLog", ht);
decimal m = 0;
if (DropDownList1.SelectedValue == "用户充值")
{
m = Math.Abs(decimal.Parse(TextBox2.Text));
}
else
{
m = - Math.Abs(decimal.Parse(TextBox2.Text));
}
new Common.SQLHelper().ExecuteSql("update [User] set UserMoney = UserMoney +" + m + " where userid = " + id);
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('操作成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0}, function () { location.href = 'UserLog.aspx';})", true);
}
else
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('用户不存在!', {icon: 2,kin: 'layer-ext-moon',closeBtn: 0 });", true);
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。