|
Server : Microsoft-IIS/10.0 System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586 User : jxgj ( 0) PHP Version : 7.0.33 Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server Directory : D:/tmp_aspnet/root/712bd9e6/ca967f19/ |
?#pragma checksum "D:\wwwroot\bgsciences\wwwroot\sysmanage\files\left\uppwd.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "D890CC07D86936628392DA84D4B4F76AF13C8C4A"
#line 1 "D:\wwwroot\bgsciences\wwwroot\sysmanage\files\left\uppwd.aspx.cs"
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Data;
public partial class sysmanage_files_left_uppwd : System.Web.UI.Page
{
protected string strtitle = "密码批改";
protected void Page_Load(object sender, EventArgs e)
{
login.OnLine();
//if (Session["UserName"] == null)
//{
// Page.Response.Write("<script language='javascript'> top.window.location = '../../login.aspx' </script>");
//}
}
protected void bt_add_Click(object sender, EventArgs e)
{
if (this.txt_newpwd.Text.Trim() == this.txt_renewpwd.Text.Trim())
{
if (Session["UserName"] != null)
{
string strname = Session["UserName"].ToString();
string pwd = FormsAuthentication.HashPasswordForStoringInConfigFile(this.txt_oldpwd.Text.Trim(), "MD5");
string strWhere = string.Format(" select id from S_Users where username='{0}' and passwords='{1}'", strname, pwd);
DataTable dt = SQLServerHelper.ExecuteTable(strWhere);
if (dt.Rows.Count > 0)
{
string strsql = "update S_Users set passwords = '" + FormsAuthentication.HashPasswordForStoringInConfigFile(this.txt_newpwd.Text.Trim(), "MD5") + "' where id = " + dt.Rows[0]["id"] + "";
if (SQLServerHelper.execNonQuery(strsql))
{
MessageBox.Show(this, "密码批改成功");
}
}
else
{
MessageBox.Show(this, "原密码谬误");
return;
}
}
else
{
Page.Response.Write("<script language='javascript'> top.window.location = '../../login.aspx' </script>");
}
}
else
{
MessageBox.Show(this, "两次新密码输入不一致");
return;
}
}
}
#line default
#line hidden