manager/adminlogin.aspx.cs

(完整代码) 1KB

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class adminlogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("../index.aspx");
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        DB db1 = new DB();
        DataSet ds = new DataSet();
        //string username1, pwd1;
        //username1 = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox1.Text, "MD5");
        //pwd1 = FormsAuthentication.HashPasswordForStoringInConfigFile(TextBox2.Text, "MD5");
        ds = db1.getdatafromdb("select f_uname,f_pwd from t_admin where f_uname='" + TextBox1.Text + "'and f_pwd='" + TextBox2.Text + "'");
        if (ds != null)
        {
            string uname = TextBox1.Text.Trim();
            Session["loginUser"] = uname;
            Response.Redirect("~/manager/index1.aspx");

        }
        else
        {
            Response.Write("<script>alert('用户名或密码错误!')</script>");
        }

    }
}

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

AI 解读 AI

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

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