DTcms.Web/admin/article/category_list.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;
namespace DTcms.Web.admin.article
{
public partial class category_list : Web.UI.ManagePage
{
protected int channel_id;
protected string channel_name = string.Empty; //频道名称
protected void Page_Load(object sender, EventArgs e)
{
this.channel_id = DTRequest.GetQueryInt("channel_id");
this.channel_name = new BLL.channel().GetChannelName(this.channel_id); //取得频道名称
if (this.channel_id == 0)
{
JscriptMsg("频道参数不正确!", "back");
return;
}
if (!Page.IsPostBack)
{
ChkAdminLevel("channel_" + this.channel_name + "_category", DTEnums.ActionEnum.View.ToString()); //检查权限
RptBind();
}
}
//数据绑定
private void RptBind()
{
BLL.article_category bll = new BLL.article_category();
DataTable dt = bll.GetList(0, this.channel_id);
this.rptList.DataSource = dt;
this.rptList.DataBind();
}
//美化列表
protected void rptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
Literal LitFirst = (Literal)e.Item.FindControl("LitFirst");
HiddenField hidLayer = (HiddenField)e.Item.FindControl("hidLayer");
string LitStyle = "<span style=\"display:inline-block;width:{0}px;\"></span>{1}{2}";
string LitImg1 = "<span class=\"folder-open\"></span>";
string LitImg2 = "<span class=\"folder-line\"></span>";
int classLayer = Convert.ToInt32(hidLayer.Value);
if (classLayer == 1)
{
LitFirst.Text = LitImg1;
}
else
{
LitFirst.Text = string.Format(LitStyle, (classLayer - 2) * 24, LitImg2, LitImg1);
后面还有 43 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。