📄 step4.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;
public partial class Install_step4 : NetCMS.Web.UI.BasePage
{
public string gError = string.Empty;
NetCMS.Content.Install rd = new NetCMS.Content.Install();
protected void Page_Load(object sender, EventArgs e)
{
this.Button1.Attributes.Add("onclick", "return showLoading();");
gError = Request.QueryString["error"];
}
protected void Button1_Click(object sender, EventArgs e)
{
string s_initialcatalog = Request.QueryString["Dbname"];
if (s_initialcatalog == null || s_initialcatalog == "")
Response.Redirect("step4.aspx?error=\"参数传递错误\"");
string adminUserName = this.UserName.Text;
string Password = this.Password.Text;
string cPassword = this.confimPassword.Text;
if (adminUserName.Length < 1)
{
Response.Redirect("step4.aspx?Dbname=" + s_initialcatalog + "&error=\"请输入管理员用户名\"");
}
if (Password.Length < 3)
{
Response.Redirect("step4.aspx?Dbname=" + s_initialcatalog + "&error=\"密码不能小于3位\"");
}
if (Password != cPassword)
{
Response.Redirect("step4.aspx?Dbname=" + s_initialcatalog + "&error=\"2次密码不一致!\"");
}
if (rd.InserAdmin(adminUserName, Password) > 0)
{
Response.Redirect("step_End.aspx?Dbname=" + s_initialcatalog + "&error=false");
}
else
{
Response.Redirect("step4.aspx?Dbname=" + s_initialcatalog + "&error=\"安装失败,可能已经有管理员存在!\"");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -