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 Index : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
        //if (DateTime.Now.ToShortDateString() == "2009-6-1")
        //{
        //    Session["username"] = "";
        //    Response.Redirect("TestDateTimeOut.html");
        //} else if (Convert.ToString(Session["username"]) == "")
        //{
        //    Response.Write("<script language=javascript>alert('请登录');location='login.aspx'</script>");
        //}
        //this.Label1.Text = Convert.ToString(Session["username"]);
        //this.Label2.Text = Convert.ToString(DateTime.Today.ToShortDateString());


        if (Convert.ToString(Session["username"]) == "")
        {
            Response.Write("<script language=javascript>alert('请登录');location='login.aspx'</script>");
        }
        this.Label1.Text = Convert.ToString(Session["username"]);
        this.Label2.Text = Convert.ToString(DateTime.Today.ToShortDateString());
	}

	protected void LinkButton1_Click(object sender, EventArgs e)
	{
		Session["username"] = "";
		Response.Redirect("login.aspx");
	}
}
