Backup/Discuz.Web/admin/global/global_detachtable.aspx.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Text;
using System.Web.UI.WebControls;
using System.Web.UI;
using Discuz.Common;
using Discuz.Forum;
using Discuz.Config;
namespace Discuz.Web.Admin
{
/// <summary>
/// 分表设置
/// </summary>
public partial class detachtable : AdminPage
{
protected void Page_Load(object sender, EventArgs e)
{
string currentpost_tablename = "";
currentpost_tablename = Discuz.Forum.Posts.GetPostTableName();
info2.Text = "系统当前使用的帖子分表是: <b>" + currentpost_tablename + "</b>";
if (!Page.IsPostBack)
{
if (!Databases.IsFullTextSearchEnabled())
{
StartFullIndex.Visible = false;
DataGrid1.Columns[0].Visible = false;
}
BindData();
detachtabledescription.AddAttributes("maxlength", "50");
SaveInfo.Attributes.Add("onclick", "if(!confirm('您目前表中帖子数不足" + Posts.GetPostTableCount(currentpost_tablename) + "万,要进行帖子分表吗?')){return false;}");
}
}
public void BindData()
{
DataGrid1.DataSource = Posts.GetPostTableList();
DataGrid1.DataBind();
}
protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
{
DataView dv = new DataView(Posts.GetPostTableList());
dv.Sort = e.SortExpression.ToString();
DataGrid1.DataSource = dv;
DataGrid1.DataBind();
}
protected void DataGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
{
DataGrid1.CurrentPageIndex = e.NewPageIndex;
BindData();
}
protected void DataGrid_Edit(Object sender, DataGridCommandEventArgs E)
{
后面还有 241 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
