www.pudn.com > flash-zhibo-yuanma.rar > admin_repass.aspx.cs, change:2007-03-23,size:1226b


using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
 
public partial class admin_admin_repass : Sp.baseadmin 
{ 
    protected override void Page_Load(object sender, EventArgs e) 
    { 
        base.Page_Load(sender, e); 
 
    } 
    protected void Submit1_ServerClick(object sender, EventArgs e) 
    { 
        string UserPass, UserPass1; 
        UserPass1 = Sp.Functions.Encrypt(Sp.Functions.Tosql(this.Password1.Value), 1); 
        UserPass = Sp.Functions.Encrypt(Sp.Functions.Tosql(this.Password3.Value), 1); 
 
        DataTable dt = Sp.Base.ExecuteSql4Ds("SELECT * FROM Sp_admin Where id='" + admin_id + "' and adminpass='" + UserPass1 + "'").Tables[0]; 
        if (dt.Rows.Count < 0) 
        { msg.Text = "您的原始密码输入有错!"; } 
        else 
        { 
            string sql = "UPDATE Sp_admin SET adminpass='" + UserPass + "' where id='" + admin_id + "'"; 
            Sp.Base.ExecuteSql(sql); 
            MessageBox.Show(this,"修改成功!"); 
        } 
    } 
}