using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using xabaraCOM;

public partial class update_clear : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        admin a = new admin();
        fileDocument f = new fileDocument();

        //清除升级文件包
        del(f.uploadFolder + "update.zip");

        //升级文件
        del("/update/default.aspx");
        del("/update/default.aspx.cs");
        del("/update/clear.aspx");
        del("/update/clear.aspx.cs");

        //安装文件
        del("/setup/step01.aspx");
        del("/setup/step01.aspx.cs");
        del("/setup/step02.aspx");
        del("/setup/step02.aspx.cs");
        del("/setup/step03.aspx");
        del("/setup/step03.aspx.cs");
        del("/setup/default.aspx");
        del("/setup/default.aspx.cs");

        Response.Redirect(a.adminFolder, true);
    }

    public void del(string path)
    {
        if (File.Exists(Server.MapPath(path)))
        {
            File.Delete(Server.MapPath(path));
        }
    }
}