Backup/Discuz.Web/admin/forum/forum_addforums.aspx.cs
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Discuz.Cache;
using Discuz.Control;
using Discuz.Common;
using Discuz.Forum;
using Discuz.Config;
using Discuz.Entity;
using System.Web;
namespace Discuz.Web.Admin
{
/// <summary>
/// 添加版块
/// </summary>
public partial class addforums : AdminPage
{
public ForumInfo forumInfo = new ForumInfo();
protected string root = Utils.GetRootUrl(BaseConfigs.GetBaseConfig().Forumpath);
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//如果版块表中没有任何版块, 则跳转到"添加第一个版块"页面.
if (Forums.GetForumList().Count == 0)
{
Server.Transfer("forum_AddFirstForum.aspx");
}
}
}
public void InitInfo()
{
#region 初始化信息绑定
targetforumid.BuildTree(Forums.GetForumListForDataTable(), "name", "fid");
templateid.AddTableData(Templates.GetValidTemplateList(), "name", "templateid");
DataTable dt = UserGroups.GetUserGroupForDataTable();
int i = 1;
foreach (DataRow dr in dt.Rows)
{
HtmlTableRow tr = new HtmlTableRow();
HtmlTableCell td = new HtmlTableCell("td");
if (i % 2 == 1)
td.Attributes.Add("class", "td_alternating_item1");
else
td.Attributes.Add("class", "td_alternating_item2");
td.Controls.Add(new LiteralControl("<input type='checkbox' id='r" + i + "' onclick='selectRow(" + i + ",this.checked)'><label for='r" + i + "'>" + dr["grouptitle"].ToString() + "</lable>"));
tr.Cells.Add(td);
tr.Cells.Add(GetTD("viewperm", dr["groupid"].ToString(), i));
tr.Cells.Add(GetTD("postperm", dr["groupid"].ToString(), i));
tr.Cells.Add(GetTD("replyperm", dr["groupid"].ToString(), i));
tr.Cells.Add(GetTD("getattachperm", dr["groupid"].ToString(), i));
tr.Cells.Add(GetTD("postattachperm", dr["groupid"].ToString(), i));
powerset.Rows.Add(tr);
后面还有 259 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
