step4.aspx.cs

来自「最好用的站点内容管理系统 全部源代码都有」· CS 代码 · 共 59 行

CS
59
字号
//======================================================
//==     (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 + =
减小字号Ctrl + -
显示快捷键?