|
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/a99112df/ca2a8923/ |
?#pragma checksum "D:\wwwroot\ldxynb\wwwroot\Back\main\Admin_MdyPassword.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "D0EC71E9B64159D6318977DE0E8BF435"
#line 1 "D:\wwwroot\ldxynb\wwwroot\Back\main\Admin_MdyPassword.aspx.cs"
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.Data.OleDb;
using CoreClass;
public partial class Back_Main_Admin_MdyPassword : System.Web.UI.Page
{
protected int id;
protected CoreClass.PublicFunction pubfun = new PublicFunction();
protected void Page_Load(object sender, EventArgs e)
{
this.pubfun.checkAdminAccessRights(Page);//接见权限验证
this.id = Int32.Parse(Session["AdminId"].ToString());
this.btnOk.Attributes.Add("onclick", "javascript:return checkFormSumbit();");
pubfun.RegisterAdminPageClientScriptBlock(Page);
}
protected void btnOk_Click(object sender, EventArgs e)
{
CoreClass.DBCommon dbc = new DBCommon();
OleDbCommand cmd = dbc.GetCommandBySql("Select top 1 * From Admins Where Id=@id");
cmd.Parameters.Add("@id", SqlDbType.Int).Value = this.id;
cmd.Connection.Open();
OleDbDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
string oldhashkey = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.iptOldPass.Text.ToString(), "md5");
if (oldhashkey == dr["Passkey"].ToString())
{
dr.Close();
cmd.CommandText = "Update Admins Set Passkey=@Passkey Where Id=@id";
cmd.Parameters.Add("@Passkey", OleDbType.VarChar, 32).Value = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(this.iptPass.Text.ToString(), "md5");
cmd.ExecuteNonQuery();
cmd.Connection.Close();
cmd.Connection.Dispose();
cmd.Dispose();
btnOk.Enabled = false;
pubfun.RegisterStartupScript(Page, "PAGE", "window.location.href='Admin_MdyPassword.aspx';");
return;
}
else
{
dr.Close();
cmd.Connection.Close();
cmd.Connection.Dispose();
cmd.Dispose();
pubfun.RegisterStartupScript(Page, "pagetemplate", "批改失败,旧密码不正确!");
return;
}
}
else
{
dr.Close();
cmd.Connection.Close();
cmd.Connection.Dispose();
cmd.Dispose();
pubfun.RegisterStartupScript(Page, "pagetemplate", "批改失败,帐号不存在!");
return;
}
}
}
#line default
#line hidden