Web/system/pass.aspx.cs
(完整代码) 1KB using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using System.Data.SqlClient;
public partial class admin_Add : PageBase
{
BS.BLL.admin bll = new BS.BLL.admin();
BS.BLL.users bll2 = new BS.BLL.users();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
protected void btnAdd_Click(object sender, EventArgs e)
{
//声明数据集
DataSet ds = null;
//根据不同的用户,得到不用的用户信息
if (Session["userpower"].ToString() == "读者")
{
ds = bll2.GetList(" uno='" + Session["userid"].ToString() + "' and pwd='" + txt_yhm.Text + "'");
}
else
{
ds = bll.GetList(" aid=" + Session["userid"].ToString() + " and pwd='" + txt_yhm.Text + "'");
}
//判断原密码是否正确
if (ds.Tables[0].Rows.Count > 0)
{
//更新新密码
if (Session["userpower"].ToString() == "读者")
{
bll2.Update(" pwd='" + txt_mm.Text + "'"," uno='" + Session["userid"].ToString()+"' ");
}
else
{
bll.Update(" pwd='" + txt_mm.Text + "' "," aid=" + Session["userid"].ToString() + " ");
}
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('修改成功!');</script>");
}
else
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('原密码不正确!');</script>");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。