📄 userinfo_safe.aspx.cs
字号:
//======================================================
//== (c)2008 aspxcms inc by NeTCMS v1.0 ==
//== Forum:bbs.aspxcms.com ==
//== Website:www.aspxcms.com ==
//======================================================
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;
using NetCMS.Content;
using NetCMS.Content.Common;
public partial class manage_user_userinfo_safe : NetCMS.Web.UI.ManagePage
{
UserMisc rd = new UserMisc();
rootPublic pd = new rootPublic();
protected void Page_Load(object sender, EventArgs e)
{
Response.Expires = 0;
Response.CacheControl = "no-cache";
if (!IsPostBack)
{
copyright.InnerHtml = CopyRight;
string uids =Request.QueryString["id"];
int uid = 0;
try
{
uid = int.Parse(uids);
}
catch (Exception US)
{
PageError("错误的参数"+US.ToString()+"", "");
}
suid.Value = uid.ToString();
DataTable dt = rd.sel_sysInfos(uid,2);
if (dt != null)
{
if (dt.Rows.Count > 0)
{
PassQuestion.Text = dt.Rows[0]["PassQuestion"].ToString();
}
}
}
}
protected void submitSave(object sender, EventArgs e)
{
if (Page.IsValid == true) //判断是否验证成功
{
string PassQuestion = this.PassQuestion.Text;
string oldpassword = this.oldpassword.Text;;
string PassKey = this.PassKey.Text;
string password = this.password.Text;
int suid = int.Parse(Request.Form["suid"].ToString());
if ((PassQuestion != null && PassQuestion != "") && (PassKey != null && PassKey != "") && (password != null && password != ""))
{
if (password.ToString() != oldpassword.ToString())
{
PageError("二次密码不一致", "userlist.aspx");
}
else
{
rd.UpdateUserSafe(suid, PassQuestion, PassKey, password);
PageRight("安全资料成功!", "userlist.aspx");
}
}
else
{
PageError("所有项目必须填写", "");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -