DTcms.Web/downindex.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;

namespace DTcms.Web
{
    public partial class downindex : System.Web.UI.Page
    {
        protected string webtitle = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session[DTKeys.SESSION_ADMIN_INFO] == null)
                {
                    Response.Redirect("Ulogin.aspx");
                }
                else
                {
                    int id;
                    if (int.TryParse(Request.QueryString["id"], out id))
                    {
                        BLL.article bll = new BLL.article();


                        this.rptList_gdpic.DataSource = bll.GetList(8, id, " channel_id=1 and  status=0   and  img_url<>'' ", "is_red desc, sort_id asc, add_time desc");
                        this.rptList_gdpic.DataBind();//最新图文

                        this.rptList_top.DataSource = bll.GetList(20, id, "channel_id=1 and  status=0 ", "click desc");
                        this.rptList_top.DataBind();//热门文章


                        BLL.article_category bllcat = new BLL.article_category();
                        this.repCategory.DataSource = bllcat.GetList(id, 1, 1);
                        this.repCategory.DataBind();//当前一级菜单下二级栏目

                        this.rptList_cat.DataSource = bllcat.GetList(id, 1, 2);
                        this.rptList_cat.DataBind();//当前一级菜单下左侧二级栏目

                        Model.article_category model = bllcat.GetModel(id);
                        Litlocal1.Text = " <a href='#'>" + model.title + "</a> ";
                        webtitle = model.title;

                    }
                    else
                    {
                        Response.Redirect("index.aspx");
                    }

                }
            }
        }


        protected void bsClassList(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
后面还有 30 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。