private static void SpecialSelectXml(XTreeCollection xTreeList)
 {
     if (DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"]) <= 0)
     {
         foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
         {
             string str  = "javascript:category();";
             string str2 = "";
             if (Special.ExistsSpecialCategoryIdInSpecials(info.SpecialCategoryId))
             {
                 str2 = "SpecialSelectTreeXml.aspx?Action=SpecialSelect&SpecialCategoryID=" + info.SpecialCategoryId;
             }
             XTreeItem item = new XTreeItem();
             item.Text         = "[专题类别]" + info.SpecialCategoryName;
             item.ArrModelId   = "1";
             item.ArrModelName = "";
             item.Icon         = "Container";
             item.NodeId       = info.SpecialCategoryId.ToString();
             item.Target       = "";
             item.Expand       = "0";
             item.AnchorType   = "1";
             item.XmlSrc       = str2;
             item.Action       = str;
             xTreeList.Add(item);
         }
     }
     else
     {
         foreach (SpecialInfo info2 in Special.GetSpecialList(DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"])))
         {
             string    str3  = "javascript:going(" + info2.SpecialId.ToString() + ");";
             XTreeItem item2 = new XTreeItem();
             item2.Text         = info2.SpecialName;
             item2.ArrModelId   = "0";
             item2.ArrModelName = "";
             item2.NodeId       = info2.SpecialId.ToString();
             item2.Icon         = "Container";
             item2.Target       = "";
             item2.Expand       = "0";
             if (!PEContext.Current.Admin.IsSuperAdmin)
             {
                 if (RolePermissions.AccessCheckSpecialPermission(OperateCode.SpecialContentInput, info2.SpecialId))
                 {
                     item2.AnchorType = "1";
                 }
                 else
                 {
                     item2.AnchorType = "0";
                 }
             }
             else
             {
                 item2.AnchorType = "1";
             }
             item2.XmlSrc = "";
             item2.Action = str3;
             xTreeList.Add(item2);
         }
     }
 }
        private void CreateSpecialCategory()
        {
            IList <SpecialCategoryInfo> specialCategoryList = Special.GetSpecialCategoryList(this.m_SpecialCategoryIdArray);

            this.CreateCount     = specialCategoryList.Count;
            this.CreateStartTime = DateTime.Now;
            this.CreateMessage   = "";
            foreach (SpecialCategoryInfo info in specialCategoryList)
            {
                if (CheckIsNeedCreatHtml(info))
                {
                    if (!this.CreateAndCheckFolderPermission(info))
                    {
                        this.CreateMessage = "<li>专题类别ID:" + info.SpecialCategoryId.ToString() + "&nbsp;&nbsp;专题类别名: " + info.SpecialCategoryName + " 生成失败! 失败原因:请检查服务器是否给网站" + SiteConfig.SiteOption.CreateHtmlPath + info.SpecialCategoryDir + "文件夹写入权限!</li>";
                        break;
                    }
                    this.CreateSpecialsCategoryHtml(info);
                    this.CreateCompleted++;
                    continue;
                }
                this.CreateMessage = "<li><font color='red'>专题类别ID:" + info.SpecialCategoryId.ToString() + "&nbsp;&nbsp;专题类别名: " + info.SpecialCategoryName + "因设置不需要生成而跳过生成!</font></li>" + this.CreateMessage;
            }
            this.CreateMessage   = "全部生成完成!" + this.CreateMessage;
            this.CreateCompleted = this.CreateCount;
            this.CreateEndTime   = DateTime.Now;
        }
 private static void SpecialXml(XTreeCollection xTreeList)
 {
     if (DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"]) <= 0)
     {
         foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
         {
             string str  = "SpecialManage.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
             string str2 = "";
             string str3 = "2";
             if (Special.ExistsSpecialCategoryIdInSpecials(info.SpecialCategoryId))
             {
                 str3 = "1";
                 str2 = "SpecialTreeXml.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
             }
             XTreeItem item = new XTreeItem();
             item.Text         = info.SpecialCategoryName;
             item.ArrModelId   = str3;
             item.ArrModelName = "";
             item.Icon         = "Container";
             item.NodeId       = info.SpecialCategoryId.ToString();
             item.Target       = "main_right";
             item.Expand       = "0";
             item.AnchorType   = "2";
             item.XmlSrc       = str2;
             item.Action       = str;
             item.Title        = "小贴士:您可以在节点名称上点击鼠标右键,从弹出菜单中选择相关操作。";
             xTreeList.Add(item);
         }
     }
     else
     {
         foreach (SpecialInfo info2 in Special.GetSpecialList(DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"])))
         {
             string    str4  = "Special.aspx?Action=Modify&amp;SpecialID=" + info2.SpecialId;
             XTreeItem item2 = new XTreeItem();
             item2.Text         = info2.SpecialName;
             item2.ArrModelId   = "0";
             item2.ArrModelName = "";
             item2.NodeId       = info2.SpecialId.ToString();
             item2.Icon         = "Container";
             item2.Target       = "main_right";
             item2.Expand       = "0";
             item2.AnchorType   = "2";
             item2.XmlSrc       = "";
             item2.Action       = str4;
             item2.Title        = "小贴士:您可以在节点名称上点击鼠标右键,从弹出菜单中选择相关操作。";
             xTreeList.Add(item2);
         }
     }
 }
 public static void SpecialInfoXml(XTreeCollection xTreeList)
 {
     if (DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"]) <= 0)
     {
         foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
         {
             XTreeItem item = new XTreeItem();
             string    str  = "";
             if (Special.ExistsSpecialCategoryIdInSpecials(info.SpecialCategoryId))
             {
                 str = "SpecialInfoTreeXml.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
             }
             item.Text         = info.SpecialCategoryName;
             item.ArrModelId   = "1";
             item.ArrModelName = "";
             item.Icon         = "Container";
             item.NodeId       = info.SpecialCategoryId.ToString();
             item.Target       = "main_right";
             item.Expand       = "0";
             item.AnchorType   = "2";
             item.XmlSrc       = str;
             item.Action       = "SpecialInfosManage.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
             xTreeList.Add(item);
         }
     }
     else
     {
         foreach (SpecialInfo info2 in Special.GetSpecialList(DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"])))
         {
             XTreeItem item2 = new XTreeItem();
             item2.Text         = info2.SpecialName;
             item2.ArrModelId   = "0";
             item2.ArrModelName = "";
             item2.NodeId       = info2.SpecialId.ToString();
             item2.Icon         = "Container";
             item2.Target       = "main_right";
             item2.Expand       = "0";
             item2.AnchorType   = "2";
             item2.XmlSrc       = "";
             item2.Action       = string.Concat(new object[] { "SpecialInfosManage.aspx?SpecialCategoryID=", info2.SpecialCategoryId, "&SpecialID=", info2.SpecialId, "&SpecialName=", HttpContext.Current.Server.UrlEncode(info2.SpecialName) });
             xTreeList.Add(item2);
         }
     }
 }
Exemple #5
0
 public void ListDataBind(ListControl dropName)
 {
     dropName.Items.Clear();
     foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
     {
         ListItem item = new ListItem();
         if (info.NeedCreateHtml)
         {
             item.Text = info.SpecialCategoryName + "(需要重新生成)";
         }
         else
         {
             item.Text = info.SpecialCategoryName;
         }
         item.Value   = info.SpecialCategoryId.ToString();
         item.Enabled = info.IsCreateHtml;
         dropName.Items.Add(item);
     }
 }
Exemple #6
0
        private void InitialText()
        {
            RolePermissions.AccessCheck(OperateCode.SpecialManage);
            string str = BasePage.RequestStringToLower("Action", "add");

            if (this.Page.IsPostBack)
            {
                return;
            }
            if (str == "copy")
            {
                this.specialId = Special.GetSpecialByIdCopySpecial(this.specialId);
                if (this.specialId > 0)
                {
                    this.InputPermissions(this.specialId);
                    this.InputRolePermission(this.specialId);
                    IncludeFile.CreateIncludeFileByAssociateType(AssociateType.Special);
                    base.Response.Write("<script type='text/javascript'>parent.frames[\"left\"].location.reload();</script>");
                    AdminPage.WriteSuccessMsg("<li>专题信息保存成功!</li>", "Special.aspx?Action=Modify&SpecialID=" + this.specialId.ToString());
                }
                else
                {
                    AdminPage.WriteErrMsg("<li>发生错误!</li>", "");
                }
            }
            IList <SpecialCategoryInfo> specialCategoryList = Special.GetSpecialCategoryList();

            this.DropSpecialCategory.SelectedValue = this.specialCategoryId.ToString();
            this.DropSpecialCategory.DataSource    = specialCategoryList;
            this.DropSpecialCategory.DataBind();
            ((DropDownList)this.PnlCustomFileds.FindControl("DropCustomNum")).Attributes.Add("onchange", "setFileFileds(this.value)");
            this.InitEChklPermission();
            string str2 = str;

            if (str2 != null)
            {
                if (!(str2 == "add"))
                {
                    if (str2 == "modify")
                    {
                        this.SmpNavigator.CurrentNode = "修改专题";
                        this.EBtnModify.Visible       = true;
                        if (!this.Page.IsPostBack)
                        {
                            this.BindSpecial();
                        }
                        goto Label_023A;
                    }
                }
                else
                {
                    this.SmpNavigator.CurrentNode = "添加专题";
                    this.EBtnAdd.Visible          = true;
                    BasePage.SetSelectedIndexByValue(this.DropSpecialCategory, this.specialCategoryId.ToString());
                    if (BasePage.RequestString("AddType").CompareTo("BatchSpecial") == 0)
                    {
                        this.SpecialName.Visible       = false;
                        this.SpecialIdentifier.Visible = false;
                        this.SpecialDir.Visible        = false;
                        this.BatchSpecial.Visible      = true;
                        this.TxtSpecialNames.Attributes.Add("onchange", "GetBatchInitial();");
                    }
                    else
                    {
                        this.TxtSpecialName.Attributes.Add("onchange", "GetInitial();");
                    }
                    goto Label_023A;
                }
            }
            this.SmpNavigator.CurrentNode = "添加专题";
            this.EBtnAdd.Visible          = true;
Label_023A:
            if (!RolePermissions.AccessCheck(OperateCode.AdministratorManage))
            {
                this.TabTitle1.Style.Add("display", "none");
            }
        }