admin_login.aspx.cs

(完整代码) 1KB

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 admin_login : System.Web.UI.Page
{
    comman com = new comman();
    admins ad = new admins();
    protected void Page_Load(object sender, EventArgs e)
    {
        txt_user.Focus();
      if (Session["user"] != null ) 
        {

            Session.Abandon();

         // 下载于www.51aspx.com


            Response.Write("<script>window.location.href='Default.aspx'</script>");
         

        }
    }
  
    protected void LoginCmd_Click(object sender, EventArgs e)
    {
        if (ad.checkadmin(txt_user.Text, txt_pass.Text) == true)
        {
            Session["user"] = txt_user.Text;
            Response.Redirect("~/admin/admin_default.aspx");
        }
        else
        {
            Response.Write(comman.ShowMsg("用户名或密码错误!"));
        }
    }
    protected void btnclose_Click(object sender, EventArgs e)
    {
        txt_user.Text = "";
        txt_pass.Text = "";
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。