private void Initial()
        {
            string str = BasePage.RequestString("Id");

            if (!this.Page.IsPostBack)
            {
                IList <SpecialInfo> specialList = Special.GetSpecialList();
                this.LstSpecial.DataSource     = specialList;
                this.LstSpecial.DataTextField  = "SpecialName";
                this.LstSpecial.DataValueField = "SpecialId";
                this.LstSpecial.DataBind();
            }
            this.TxtGeneralId.Text = str;
            StringBuilder builder = new StringBuilder();

            builder.Append("<script type=\"text/javascript\">");
            builder.Append("function SelectAll(){");
            builder.Append("for(var i=0;i<document.getElementById('");
            builder.Append(this.LstSpecial.ClientID);
            builder.Append("').length;i++){");
            builder.Append("document.getElementById('");
            builder.Append(this.LstSpecial.ClientID);
            builder.Append("').options[i].selected=true;}}");
            builder.Append("function UnSelectAll(){");
            builder.Append("for(var i=0;i<document.getElementById('");
            builder.Append(this.LstSpecial.ClientID);
            builder.Append("').length;i++){");
            builder.Append("document.getElementById('");
            builder.Append(this.LstSpecial.ClientID);
            builder.Append("').options[i].selected=false;}}");
            builder.Append("</script>");
            base.ClientScript.RegisterClientScriptBlock(base.GetType(), "Select", builder.ToString());
        }
 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);
         }
     }
 }
Ejemplo n.º 3
0
        public void CreateSpecial()
        {
            IList <SpecialInfo> specialList = Special.GetSpecialList(this.m_SpecialIdArray);

            this.CreateCount     = specialList.Count;
            this.CreateStartTime = DateTime.Now;
            this.CreateMessage   = "";
            foreach (SpecialInfo info in specialList)
            {
                this.CreateMessage = "正在生成:" + info.SpecialName;
                if (CheckIsNeedCreatHtml(info))
                {
                    if (!this.CreateAndCheckFolderPermission(info))
                    {
                        this.CreateMessage = "<li>专题ID:" + info.SpecialId.ToString() + "&nbsp;&nbsp;专题名: " + info.SpecialName + " 生成失败! 失败原因:请检查服务器是否给网站" + SiteConfig.SiteOption.CreateHtmlPath + info.SpecialDir + "文件夹写入权限!</li>";
                        break;
                    }
                    this.CreateSpecialsHtml(info);
                    this.CreateCompleted++;
                    continue;
                }
                this.CreateMessage = "<li><font color='red'>专题ID:" + info.SpecialId.ToString() + "&nbsp;&nbsp;专题名: " + info.SpecialName + "因设置不需要生成而跳过生成!</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);
         }
     }
 }
Ejemplo n.º 5
0
 private void Initial()
 {
     if (!this.Page.IsPostBack)
     {
         IList <SpecialInfo> specialList = Special.GetSpecialList();
         this.DropFromSpecial.DataSource     = specialList;
         this.DropFromSpecial.DataTextField  = "SpecialName";
         this.DropFromSpecial.DataValueField = "SpecialId";
         this.DropFromSpecial.DataBind();
         this.DropToSpecial.DataSource     = specialList;
         this.DropToSpecial.DataTextField  = "SpecialName";
         this.DropToSpecial.DataValueField = "SpecialId";
         this.DropToSpecial.DataBind();
     }
 }
 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);
         }
     }
 }
 public void ListDataBind(ListControl dropName)
 {
     dropName.Items.Clear();
     foreach (SpecialInfo info in Special.GetSpecialList())
     {
         ListItem item = new ListItem();
         if (info.NeedCreateHtml)
         {
             item.Text = info.SpecialName + "(需要重新生成)";
         }
         else
         {
             item.Text = info.SpecialName;
         }
         item.Value   = info.SpecialId.ToString();
         item.Enabled = info.IsCreateListPage;
         dropName.Items.Add(item);
     }
 }
        private void Initial()
        {
            this.InitCreateHtmlControl();
            if (!this.Page.IsPostBack)
            {
                this.RadNeedCache0.Attributes.Add("onclick", "javascript:TrSetCacheTime.style.display='none';");
                this.RadNeedCache1.Attributes.Add("onclick", "javascript:TrSetCacheTime.style.display='';");
                IList <NodeInfo> nodeNameForContainerItems = Nodes.GetNodeNameForContainerItems();
                if (nodeNameForContainerItems.Count < 1)
                {
                    ListItem item = new ListItem("无节点,请先添加节点", "0");
                    item.Enabled = false;
                }
                else
                {
                    this.LstNodes.DataSource = nodeNameForContainerItems;
                    this.LstNodes.DataBind();
                }
            }
            StringBuilder builder = new StringBuilder();

            builder.Append("<script type=\"text/javascript\">");
            builder.Append("function SelectAll(){");
            builder.Append("for(var i=0;i<document.getElementById('");
            builder.Append(this.LstNodes.ClientID);
            builder.Append("').length;i++){");
            builder.Append("document.getElementById('");
            builder.Append(this.LstNodes.ClientID);
            builder.Append("').options[i].selected=true;}}");
            builder.Append("function UnSelectAll(){");
            builder.Append("for(var i=0;i<document.getElementById('");
            builder.Append(this.LstNodes.ClientID);
            builder.Append("').length;i++){");
            builder.Append("document.getElementById('");
            builder.Append(this.LstNodes.ClientID);
            builder.Append("').options[i].selected=false;}}");
            builder.Append("</script>");
            base.ClientScript.RegisterClientScriptBlock(base.GetType(), "Select", builder.ToString());
            if (!this.Page.IsPostBack)
            {
                IList <NodeInfo> nodeNameForItemsExceptOutLinks = Nodes.GetNodeNameForItemsExceptOutLinks();
                this.LstRelationNodes.DataSource     = nodeNameForItemsExceptOutLinks;
                this.LstRelationNodes.DataTextField  = "NodeName";
                this.LstRelationNodes.DataValueField = "NodeId";
                this.LstRelationNodes.DataBind();
                IList <UserGroupsInfo> userGroupList = UserGroups.GetUserGroupList(0, 0);
                this.EgvPermissions.DataSource = userGroupList;
                this.EgvPermissions.DataBind();
                this.EgvRoleView.DataSource = UserRole.GetRoleList();
                this.EgvRoleView.DataBind();
                IList <ModelInfo> modelList = ModelManager.GetModelList(ModelType.Content, ModelShowType.Enable);
                this.RepContentModelTemplate.DataSource = modelList;
                this.RepContentModelTemplate.DataBind();
                this.RepShopModelTemplate.DataSource = ModelManager.GetModelList(ModelType.Shop, ModelShowType.Enable);
                this.RepShopModelTemplate.DataBind();
                IList <WorkFlowsInfo> workFlowsList = WorkFlow.GetWorkFlowsList();
                this.DropWorkFlow.DataSource = workFlowsList;
                this.DropWorkFlow.DataBind();
                this.LstRelationSpecial.DataSource = Special.GetSpecialList();
                this.LstRelationSpecial.DataBind();
            }
            bool flag  = RolePermissions.AccessCheck(OperateCode.AdministratorManage);
            bool flag2 = RolePermissions.AccessCheck(OperateCode.UserGroupManage);

            if (!flag)
            {
                this.TdRolePermissions.Style.Add("display", "none");
            }
            if (!flag2)
            {
                this.TdGroupPermissions.Style.Add("display", "none");
            }
            if (!flag && !flag2)
            {
                this.TabTitle5.Style.Add("display", "none");
            }
            if (!SiteConfig.SiteOption.EnablePointMoneyExp)
            {
                this.TabTitle2.Style.Add("display", "none");
            }
        }
Ejemplo n.º 9
0
        protected StringBuilder CtrlProc(string aname, string avalue, string defaultValue, string aintro, string[] sArray)
        {
            StringBuilder builder = new StringBuilder();

            if (sArray.Length > 1)
            {
                builder.Append("<tr><td align=\"right\"><span class=\"listspan\" sid=\"" + aname + "\" defaultvalue=\"" + defaultValue + "\" stype=\"1\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
                builder.Append("<td align=\"left\"><select name=\"" + aname + "\">");
                for (int i = 0; i < sArray.Length; i++)
                {
                    if (i == DataConverter.CLng(avalue))
                    {
                        builder.Append(string.Concat(new object[] { "<option value='", i, "' selected>", sArray[i], "</option>" }));
                    }
                    else
                    {
                        builder.Append(string.Concat(new object[] { "<option value='", i, "'>", sArray[i], "</option>" }));
                    }
                }
                builder.Append("</select></td></tr>");
                return(builder);
            }
            if (string.Compare(aname.ToLower(), "nodelist", StringComparison.Ordinal) == 0)
            {
                builder.Append("<tr><td align=\"right\"><span class=\"listspan\" sid=\"" + aname + "\"  defaultvalue=\"" + defaultValue + "\" stype=\"3\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
                builder.Append("<td  align=\"left\"><select name=\"" + aname + "\" style=\"height:100px;width:200px;\" multiple>");
                foreach (NodeInfo info in Nodes.GetNodeNameForContainerItems())
                {
                    if (info.NodeType != NodeType.Container)
                    {
                        continue;
                    }
                    bool flag = true;
                    if (!string.IsNullOrEmpty(avalue))
                    {
                        char     ch       = Convert.ToChar(",");
                        string[] strArray = avalue.Split(new char[] { ch });
                        for (int j = 0; j < strArray.Length; j++)
                        {
                            if (DataConverter.CLng(strArray[j], -1) == info.NodeId)
                            {
                                flag = false;
                                builder.Append("<option value='" + info.NodeId.ToString() + "' selected>" + info.NodeName + "</option>");
                            }
                        }
                    }
                    if (flag)
                    {
                        builder.Append("<option value='" + info.NodeId.ToString() + "'>" + info.NodeName + "</option>");
                    }
                }
                builder.Append("</select></td></tr>");
                return(builder);
            }
            if (string.Compare(aname.ToLower(), "speciallist", StringComparison.Ordinal) == 0)
            {
                builder.Append("<tr><td align=\"right\"><span class=\"listspan\" sid=\"" + aname + "\" defaultvalue=\"" + defaultValue + "\" stype=\"3\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
                builder.Append("<td  align=\"left\"><select name=\"" + aname + "\" style=\"height:100px;width:200px;\" multiple>");
                foreach (SpecialInfo info2 in Special.GetSpecialList())
                {
                    bool flag2 = true;
                    if (!string.IsNullOrEmpty(avalue))
                    {
                        char     ch2       = Convert.ToChar(",");
                        string[] strArray2 = avalue.Split(new char[] { ch2 });
                        for (int k = 0; k < strArray2.Length; k++)
                        {
                            if (DataConverter.CLng(strArray2[k], -1) == info2.SpecialId)
                            {
                                flag2 = false;
                                builder.Append("<option value='" + info2.SpecialId.ToString() + "' selected>" + info2.SpecialName + "</option>");
                            }
                        }
                    }
                    if (flag2)
                    {
                        builder.Append("<option value='" + info2.SpecialId.ToString() + "'>" + info2.SpecialName + "</option>");
                    }
                }
                builder.Append("</select></td></tr>");
                return(builder);
            }
            switch (avalue)
            {
            case "false":
                builder.Append("<tr><td align=\"right\"><span sid=\"" + aname + "\" defaultvalue=\"" + defaultValue + "\" stype=\"2\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
                builder.Append("<td align=\"left\"><input type=\"checkbox\" id=\"" + aname + "\" /></td></tr>");
                return(builder);

            case "true":
                builder.Append("<tr><td align=\"right\"><span sid=\"" + aname + "\" defaultvalue=\"" + defaultValue + "\" stype=\"2\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
                builder.Append("<td align=\"left\"><input type=\"checkbox\" id=\"" + aname + "\" checked /></td></tr>");
                return(builder);
            }
            builder.Append("<tr><td align=\"right\"><span sid=\"" + aname + "\" defaultvalue=\"" + defaultValue + "\" stype=\"0\" title=\"" + aname + "\">" + aintro + "</span>:</td>");
            builder.Append("<td align=\"left\"><input type=\"text\" id=\"" + aname + "\" value=\"" + avalue + "\"/></td></tr>");
            return(builder);
        }