⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forummoderators.cs

📁 community server 源码
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System.Collections;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using CommunityServer.Components;namespace CommunityServer.Discussions.Controls 
{

    public class ForumModerators : Label 
    {

        CSContext csContext = CSContext.Current;

        protected override void CreateChildControls() 
        {
            // List roles that can moderate this forum
            ArrayList roles = Moderate.GetForumModeratorRoles ( csContext.SectionID );


            if (roles.Count <= 0)
                return;

            Label label = new Label();
            label.Text = ResourceManager.GetString("ViewThreads_Moderators");
            
            Controls.Add(label);

            for (int i = 0; i < roles.Count; i++) 
            {
                HtmlAnchor anchor = new HtmlAnchor();
                anchor.InnerText = ((Role) roles[i]).Name;
                anchor.HRef = Globals.GetSiteUrls().UserRoles( ((Role) roles[i]).Name );

                Controls.Add(anchor);

                if (i + 1 != roles.Count)
                    Controls.Add(new LiteralControl(", "));
            }


        }

    }
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -