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 UUN;
using System.IO;
using System.Text;

public partial class Install_Step4 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        String 位置 = File.ReadAllText(Server.MapPath("install.txt"), Encoding.UTF8);

        if (位置 != "4")
            if (位置 == "1")
                Response.Redirect("Default.aspx");
            else
                Response.Redirect("Step" + 位置 + ".aspx");

        if (!this.IsPostBack)
        {
            WangZhanMingChen.Text = "网站名称";
            WangZhanYuMing.Text = Request.Url.Authority;
            ShouYeBanBen_2.Checked = true;
            BiaoShiMingChen.Text = "sid";
            LiXianShiJian.Text = "30";
            NanXingMingCi.Text = "男";
            NvXingMingCi.Text = "女";
            JiFenMingCi.Text = "积分";
            JiFenDanWei.Text = "点";
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        程序.设置["网站名称"] = WangZhanMingChen.Text;
        程序.设置["网站域名"] = WangZhanYuMing.Text;
        if (ShouYeBanBen_0.Checked)
            程序.设置["默认首页"] = "0";
        else if (ShouYeBanBen_1.Checked)
            程序.设置["默认首页"] = "1";
        else
            程序.设置["默认首页"] = "2";
        程序.设置["标识名称"] = BiaoShiMingChen.Text;
        程序.设置["离线时间"] = LiXianShiJian.Text;
        程序.设置["单位名词_男性名词"] = NanXingMingCi.Text;
        程序.设置["单位名词_女性名称"] = NvXingMingCi.Text;
        程序.设置["单位名词_积分名词"] = JiFenMingCi.Text;
        程序.设置["单位名词_积分单位"] = JiFenDanWei.Text;

        File.WriteAllText(Server.MapPath("~/Data/XML/SheZhi.xml"), 程序.设置.生成XML(), Encoding.UTF8);

        File.WriteAllText(Server.MapPath("install.txt"), "5", Encoding.UTF8);

        Response.Redirect("Step5.aspx");
    }
}
