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);
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            int    specialId  = BasePage.RequestInt32("SpecialID");
            int    categoryId = BasePage.RequestInt32("SpecialCategoryID");
            string str        = BasePage.RequestString("SpecialName");

            if (PEContext.Current.Admin.IsSuperAdmin)
            {
                this.m_Administrator = true;
            }
            if (!base.IsPostBack)
            {
                this.DropRescentQuery.SelectedValue = BasePage.RequestStringToLower("ListType");
                this.HdnListType.Value = BasePage.RequestStringToLower("ListType");
                this.HdnStatus.Value   = BasePage.RequestStringToLower("status", "100");
                if (!string.IsNullOrEmpty(str))
                {
                    this.SmpNavigator.AdditionalNode = this.InitSiteMapCategory(categoryId) + " >> " + str;
                }
                else
                {
                    this.SmpNavigator.AdditionalNode = this.InitSiteMapCategory(categoryId);
                }
            }
            if (!this.m_Administrator)
            {
                if (specialId > 0)
                {
                    this.m_IsManage = RolePermissions.AccessCheckSpecialPermission(OperateCode.SepcialContentManage, specialId);
                }
                else if (categoryId > 0)
                {
                    foreach (SpecialCommonModelInfo info in ContentManage.GetCommonModelInfoListBySpecialIdOrSpecialCategoryId(0, 0, 0, categoryId, ContentSortType.None, 100))
                    {
                        if (RolePermissions.AccessCheckSpecialPermission(OperateCode.SepcialContentManage, info.SpecialId))
                        {
                            this.m_IsManage = true;
                            break;
                        }
                    }
                }
                else
                {
                    this.m_IsManage = RolePermissions.AccessCheckSpecialPermission(OperateCode.SepcialContentManage, -1);
                }
                if (!this.m_IsManage)
                {
                    this.EBtnDelete.Enabled             = false;
                    this.EBtnAddToSpecial.Enabled       = false;
                    this.EBtnMoveToOtherSpecial.Enabled = false;
                }
            }
        }
 protected void EgvSpecialInfos_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         int length = 0;
         SpecialCommonModelInfo dataItem = (SpecialCommonModelInfo)e.Row.DataItem;
         Label label = e.Row.FindControl("LblIsCreateHtml") as Label;
         if (!dataItem.CreateTime.HasValue || (dataItem.CreateTime.Value <= dataItem.UpdateTime))
         {
             label.Text = "<span style=\"color:Red\"><b>\x00d7</b></span>";
         }
         else
         {
             label.Text = "<b>√</b>";
         }
         LinkImage image    = e.Row.FindControl("LinkImageModel") as LinkImage;
         string    itemIcon = ModelManager.GetCacheModelById(dataItem.ModelId).ItemIcon;
         if (string.IsNullOrEmpty(itemIcon))
         {
             itemIcon = "Default.gif";
         }
         image.Icon = itemIcon;
         if (dataItem.LinkType != 0)
         {
             image.IsShowLink = true;
         }
         HyperLink link = e.Row.FindControl("HypTitle") as HyperLink;
         length           = 0x25 - length;
         link.Text        = StringHelper.SubString(dataItem.Title, length, "...");
         link.ToolTip     = dataItem.Title;
         link.NavigateUrl = "ContentView.aspx?GeneralID=" + dataItem.GeneralId.ToString();
         if (!this.m_Administrator)
         {
             LinkButton button = (LinkButton)e.Row.FindControl("DeleteSpecialInfoById");
             if (BasePage.RequestInt32("SpecialID") > 0)
             {
                 button.Enabled = this.m_IsManage;
             }
             else if (!RolePermissions.AccessCheckSpecialPermission(OperateCode.SepcialContentManage, dataItem.SpecialId))
             {
                 button.Enabled = false;
             }
         }
     }
 }