using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
public partial class Root_Home_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Unnamed1_Click(object sender, ImageClickEventArgs e)
    {
        string pwd = password.Text.Trim();
        if (pwd.Equals(""))
        {
            tip.Text = "请输入密码！";
            return;
        }
        XmlDocument doc = new XmlDocument();
        doc.Load(Server.MapPath("~/App_Data/site.xml"));
        string root_password = doc.GetElementsByTagName("root_password")[0].InnerText;
        if (!pwd.Equals(root_password))
        {
            tip.Text = "密码不正确！";
            return;
        }
        else
        {
            Session["root_login"] = DateTime.Now.ToString();
            Response.Redirect("Desktop.aspx");
        }
        
    }
}