web/yg.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
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 System.Data.OleDb;
using System.Data.SqlClient;
using System.Data.Common;
public partial class yg : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string username = TextBox1.Text.ToString();
string password = TextBox2.Text.ToString();
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data\\users.xls";
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+path+";Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(connstr);
conn.Open();
string cmdtext = "select * from [Sheet1$] where username='" + username + "' and password='" + password + "'";
OleDbCommand cmd = new OleDbCommand(cmdtext, conn);
OleDbDataReader myreader = null;
myreader = cmd.ExecuteReader();
if (myreader.Read())
{
Response.Write("<script>alert('登录成功');location.href='yg1.aspx';</script>");
}
else Response.Write("<script>alert('登录失败');location.href='yg.aspx';</script>");
conn.Close();
//string username = TextBox1.Text.ToString();
//string password = TextBox2.Text.ToString();
//string connstr = @"Data Source=(local);Initial Catalog=test;Integrated Security=SSPI";
//SqlConnection conn = new SqlConnection(connstr);
//conn.Open();
//string cmdtext = "select * from users where username='" + username + "' and password='" + password + "'"; ;
//SqlCommand cmd = new SqlCommand(cmdtext, conn);
//SqlDataReader myreader = null;
//myreader = cmd.ExecuteReader();
//if (myreader.Read())
//{
// Response.Write("<script>alert('登录成功');location.href='yg1.aspx';</script>");
//}
//else Response.Write("<script>alert('登录失败');location.href='yg.aspx';</script>");
//conn.Close();
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。