admin/config.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 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;
using System.Data.SqlClient;
using System.IO;
public partial class admin_config : System.Web.UI.Page
{
DBhelper db = new DBhelper();
string DoSql, title, headpatch, keywords, description, self;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["Name"] == null)
{
Response.Redirect("../main.aspx");
}
else
{
Bind();
}
}
}
protected void Bind()
{
DoSql = "select * from Config";
SqlDataReader dr = db.Logins(DoSql);
if (dr.Read())
{
title = dr["Title"].ToString();
keywords = dr["KeyWords"].ToString();
description = dr["Description"].ToString();
self = dr["Self"].ToString();
headpatch = dr["HeadPath"].ToString();
BlogTitle.Text = title;
BlogKey.Text = keywords;
BlogDes.Text = description;
Image1.ImageUrl = headpatch;
Self.Text = self;
dr.Close();
dr.Dispose();
}
}
protected void BtSave_Click(object sender, EventArgs e)
{
title = Server.HtmlEncode(BlogTitle.Text.Trim().ToString());
keywords = Server.HtmlEncode(BlogKey.Text.Trim().ToString());
description = Server.HtmlEncode(BlogDes.Text.Trim().ToString());
self = Server.HtmlEncode(Self.Text.Trim().ToString());
DoSql = "update Config set Title='" + title + "',keywords='" + keywords + "',description='" + description + "',Self='" + self + "'";
Application.Lock();
Application["title"] = title;
Application["keywords"] = keywords;
后面还有 65 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
