Web/Admin/Templates/List.aspx.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.IO;
using System.Collections;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
namespace Web.Admin.Templates
{
public partial class List : Web.UI.ManagePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
chkLoginLevel("viewTemplates");
RptBind();
}
}
#region 模板列表绑定
private void RptBind()
{
DataTable dt = new DataTable();
dt.Columns.Add("skinname", Type.GetType("System.String"));
dt.Columns.Add("name", Type.GetType("System.String"));
dt.Columns.Add("img", Type.GetType("System.String"));
dt.Columns.Add("author", Type.GetType("System.String"));
dt.Columns.Add("createdate", Type.GetType("System.String"));
dt.Columns.Add("ver", Type.GetType("System.String"));
dt.Columns.Add("fordntver", Type.GetType("System.String"));
DirectoryInfo dirInfo = new DirectoryInfo(Utils.GetMapPath("../../Templates/"));
foreach (DirectoryInfo dir in dirInfo.GetDirectories())
{
DataRow dr = dt.NewRow();
Model.Templates aboutInfo = GetTemplateAboutInfo(dir.FullName);
dr["skinname"] = dir.Name;// 文件夹名称
dr["name"] = aboutInfo.name;// 模板名称
dr["img"] = "../../Templates/" + dir.Name + "/about.png";// 模板图片
dr["author"] = aboutInfo.author;// 作者
dr["createdate"] = aboutInfo.createdate;// 创建日期
dr["ver"] = aboutInfo.ver;// 模板版本
dr["fordntver"] = aboutInfo.fordntver;// 适用的版本
dt.Rows.Add(dr);
}
this.rptList.DataSource = dt;
this.rptList.DataBind();
}
#endregion
//生成或启用
protected void rptList_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
{
chkLoginLevel("markTemplates");
HiddenField hideSkinName = (HiddenField)e.Item.FindControl("hideSkinName");
后面还有 41 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。