SysManage/ChangePwd.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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;
public partial class ChangePwd : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["RoleName"] == null)
{
Response.Redirect("Login.aspx");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string pwd_old = txt_old_pwd.Text.Trim();
string pwd_new = txt_new_pwd.Text.Trim();
string roleName = Session["RoleName"].ToString();
string userName=Session["UserName"].ToString();
string sql = "";
if (roleName == "管理员")
{
sql = "select * from Admins where UserName='" + userName + "' and UserPwd='" + pwd_old + "'";
}
else if (roleName == "学生")
{
sql = "select * from Users where UserName='" + userName + "' and UserPassword='" + pwd_old + "'";
}
else if (roleName == "辅导员")
{
sql = "select * from Instructors where UserName='" + userName + "' and UserPassword='" + pwd_old + "'";
}
else
{
sql = "select * from Teachers where UserName='" + userName + "' and UserPassword='" + pwd_old + "'";
}
bool bl = DB.isExists(sql);
if (bl)
{
if (roleName == "管理员")
{
sql = "update Admins set UserPwd='" + pwd_new + "' where UserName='" + userName + "'";
}
else if (roleName == "学生")
{
sql = "update Users set UserPassword='" + pwd_new + "' where UserName='" + userName + "'";
}
else if (roleName == "辅导员")
{
sql = "update Instructors set UserPassword='" + pwd_new + "' where UserName='" + userName + "'";
}
else
{
后面还有 15 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
