public string GetTitle(string ItemID,string NID,string Title)
 {
     string n = "";
     if (DataConverter.CLng(NID) == this.NodeID)
         n = "<a href=\"EditContent.aspx?GeneralID=" + ItemID + "\">" + Title + "</a>";
     else
     {
         B_Node bl = new B_Node();
         n = "<a href=\"EditContent.aspx?GeneralID=" + ItemID + "\"><strong>[" + bl.GetNode(DataConverter.CLng(NID)).NodeName + "]</strong>&nbsp;" + Title + "</a>";
     }
     return n;
 }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(base.Request.QueryString["NodeID"]))
            {
                int ItemID = DataConverter.CLng(base.Request.QueryString["NodeID"]);
                B_Node bnode = new B_Node();
                M_Node nodeinfo = bnode.GetNode(ItemID);
                if(nodeinfo.IsNull)
                    Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]");
                string TemplateDir = "";
                if(string.IsNullOrEmpty(nodeinfo.IndexTemplate))
                    TemplateDir = nodeinfo.ListTemplateFile;
                else
                    TemplateDir = nodeinfo.IndexTemplate;

                if (string.IsNullOrEmpty(TemplateDir))
                {
                    Response.Write("[产生错误的可能原因:该节点未指定模板!]");
                }
                else
                {
                    TemplateDir = SiteConfig.SiteOption.TemplateDir + TemplateDir;
                    int Cpage = 1;
                    if (string.IsNullOrEmpty(base.Request.QueryString["page"]))
                    {
                        Cpage = 1;
                    }
                    else
                    {
                        Cpage = DataConverter.CLng(base.Request.QueryString["page"]);
                    }
                    TemplateDir = base.Request.PhysicalApplicationPath + TemplateDir;
                    TemplateDir = TemplateDir.Replace("/", @"\");
                    string ContentHtml = this.bll.CreateHtml(FileSystemObject.ReadFile(TemplateDir), Cpage, ItemID);
                    Response.Write(ContentHtml);
                }
            }
            else
            {
                Response.Write("[产生错误的可能原因:没有指定栏目ID]");
            }
        }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         int t = DataConverter.CLng(Request.QueryString["t"]);
         if (t == 0)
             t = 1;
         B_Node bll = new B_Node();
         TreeNode tmpNd;
         tmpNd = new TreeNode();
         tmpNd.Value = "0";
         tmpNd.Text = SiteConfig.SiteInfo.SiteName;
         tmpNd.NavigateUrl = "MyContent.aspx";
         tmpNd.Target = "main_right";
         tmpNd.ImageUrl = "";
         tmpNd.ToolTip = "根节点";
         tvNav.Nodes.Add(tmpNd);
         bll.InitTreeNodeUser(tmpNd.ChildNodes, 0,t);
         tvNav.ExpandAll();
     }
 }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request.QueryString["ItemID"]))
     {
         int ItemID = DataConverter.CLng(base.Request.QueryString["ItemID"]);
         B_Content bcontent = new B_Content();
         B_Model bmode = new B_Model();
         B_Node bnode = new B_Node();
         M_CommonData ItemInfo = bcontent.GetCommonData(ItemID);
         if(ItemInfo.IsNull)
             Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]");
         M_ModelInfo modelinfo = bmode.GetModelById(ItemInfo.ModelID);
         string TempNode = bnode.GetModelTemplate(ItemInfo.NodeID, ItemInfo.ModelID);
         string TempContent = ItemInfo.Template;
         string TemplateDir = modelinfo.ContentModule;
         if (!string.IsNullOrEmpty(TempContent))
             TemplateDir = TempContent;
         else
         {
             if (!string.IsNullOrEmpty(TempNode))
                 TemplateDir = TempNode;
         }
         if (string.IsNullOrEmpty(TemplateDir))
         {
             Response.Write("[产生错误的可能原因:该内容所属模型未指定模板!]");
         }
         else
         {
             TemplateDir = base.Request.PhysicalApplicationPath + SiteConfig.SiteOption.TemplateDir + TemplateDir;
             TemplateDir = TemplateDir.Replace("/", @"\");
             string ContentHtml = this.bll.CreateHtml(FileSystemObject.ReadFile(TemplateDir), 0, ItemID);
             Response.Write(ContentHtml);
         }
     }
     else
     {
         Response.Write("[产生错误的可能原因:您访问的内容信息不存在!]");
     }
 }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     int t = 0;
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(base.Request.QueryString["t"]))
             t = DataConverter.CLng(base.Request.QueryString["t"]);
         else
             t = 0;
         B_Node bll = new B_Node();
         TreeNode tmpNd;
         tmpNd = new TreeNode();
         tmpNd.Value = "0";
         tmpNd.Text = SiteConfig.SiteInfo.SiteName;
         tmpNd.NavigateUrl = "~/" + this.GetManagePath() + "/Content/ContentManage.aspx?NodeID=0";
         tmpNd.Target = "main_right";
         tmpNd.ImageUrl = "";
         tmpNd.ToolTip = "根节点";
         tvNav.Nodes.Add(tmpNd);
         bll.InitTreeNode(tmpNd.ChildNodes, 0, t);
         tvNav.ExpandAll();
     }
 }