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.Data.SqlClient;

public partial class Admin_DenLu : System.Web.UI.Page
{
    private 访问 访问;
    protected void Page_Load(object sender, EventArgs e)
    {
        访问 = new 访问(this.Context);
        访问.开始处理("登录后台", "网站后台", "登录后台", null);
        访问.关闭连接();
    }
    private void 登录提交()
    {
        if (Request.Cookies["UUN_UUN3G_YanZhengMa"] == null)
            throw new Exception("验证码错误");

        if (Request.Cookies["UUN_UUN3G_YanZhengMa"].Value != YanZhengMa.Text.ToUpper())
        {
            Response.Cookies.Remove("UUN_UUN3G_YanZhengMa");
            throw new Exception("验证码错误");
        }

        用户 用户 = new 用户(this.Context,访问.连接);
        String 标识=用户.管理员登录(NiChen.Text, MiMa.Text);

        Response.Cookies.Add(new HttpCookie("UUN_UUN3G_BiaoShi", 标识));

        Response.Redirect("Default.aspx");
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        访问.连接.Open();
        访问.排错调用(new 访问.回调委托(登录提交));
        访问.关闭连接();
    }
}
