idx.master.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class idx : System.Web.UI.MasterPage
{
SqlHelper data = new SqlHelper();
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
if (key.Value == "请输入关键字")
{
Alert.Alertjs("关键字不能为空");
return;
}
Response.Redirect("list.aspx?k=" + Server.UrlEncode(key.Value));
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "")
{
Alert.Alertjs("请输入用户名");
return;
}
if (TextBox2.Text == "")
{
Alert.Alertjs("请输入密码");
return;
}
string mima = TextBox2.Text;
//获取加密服务
System.Security.Cryptography.MD5CryptoServiceProvider md5CSP = new System.Security.Cryptography.MD5CryptoServiceProvider();
//获取要加密的字段,并转化为Byte[]数组
byte[] testEncrypt = System.Text.Encoding.Unicode.GetBytes(mima);
//加密Byte[]数组
byte[] resultEncrypt = md5CSP.ComputeHash(testEncrypt);
//将加密后的数组转化为字段(普通加密)
string testResult = System.Text.Encoding.Unicode.GetString(resultEncrypt);
string pass1 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(mima, "MD5");
DataSet ds = data.GetDs("select * from members where lname='" + TextBox1.Text + "' and pass='" + pass1 + "'", "ds");
//判断用户是否存在
if (ds.Tables[0].Rows.Count > 0)
{
DataRow dr = ds.Tables[0].Rows[0];
//把用户信息存入到Session
Session["lname"] = dr["lname"].ToString();
//跳转
Response.Redirect(Request.Url.ToString());
}
else
{
后面还有 5 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
