亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? moderatedforums.cs

?? 微軟的.NET論壇的源代碼(COOL!!!)
?? CS
?? 第 1 頁 / 共 2 頁
字號:
/***************************** ModeratedForums Web control **********************************
 * 
 * SUMMARY:
 *		This Web control has two purposes: it can display the forums that a particular user can
 *		moderate, and provide a means for the end user to add and remove from this list of forums
 *		that can be moderated by a particular user; also, it can list the users that can moderate
 *		a particular forum.  However, this control does not allow for users to be added and removed
 *		as moderators for a particular forum.
 *
 * GENERAL COMMENTS:
 *		Chances are, the end developer will never need to use this control from a page itself.
 *		An instance of this control is created in both the UserAdmin and EditForum user
 *		controls.
 *
 ******************************************************************************************/


using System;
using System.Collections;
using System.Collections.Specialized;
using System.Web;
using System.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using AspNetForums;
using AspNetForums.Components;
using System.ComponentModel;

namespace AspNetForums.Controls.Moderation {
    [ ToolboxItemAttribute(false) ]

    /// <summary>
    /// This Web control has two purposes: it can display the forums that a particular user can
    /// moderate, and provide a means for the end user to add and remove from this list of forums
    /// that can be moderated by a particular user; also, it can list the users that can moderate
    /// a particular forum.  However, this control does not allow for users to be added and removed
    /// as moderators for a particular forum.
    /// </summary>
    /// <remarks>Chances are, the end developer will never need to use this control from a page itself.
    /// An instance of this control is created in both the UserAdmin and EditForum user
    /// controls.</remarks>
    public class ModeratedForums : WebControl, INamingContainer {

        /********** DECLARE PRIVATE CONSTANTS **************/
        // the default ModeratedForumMode setting
        const ModeratedForumMode _defaultMode = ModeratedForumMode.ViewForUser;

        const int _defaultCellPadding = 3;		// the default cell padding for the datagrid
        const int _defaultCellSpacing = 0;		// the default cell spacing for the datagrid

        readonly String _defaultForUserDataGridTitle = "Currently Moderator of the Following Forums:" + Globals.HtmlNewLine;
        readonly String _defaultForForumDataGridTitle = "This Forum Currently is Moderated by the Following Users:" + Globals.HtmlNewLine;
        /***************************************************/


        /********** DECLARE PRIVATE VARIABLES **************/
        // Create the styles
        TableItemStyle _headerStyle = new TableItemStyle();		// the style for the datagrid's header
        TableItemStyle _itemStyle = new TableItemStyle();			// the style for each item in the datagrid

        // Create the datagrid
        DataGrid dgModeratedForums;
        /***************************************************/



        /***********************************************************************
        CreateChildControls Event Handler
        ---------------------------------
            This event handler adds the children controls.
        ************************************************************************/
        protected override void CreateChildControls() {

            if (this.CheckUserPermissions && !((User) Users.GetUserInfo(Context.User.Identity.Name, true)).IsAdministrator)
                // this user isn't an administrator
                Context.Response.Redirect(Globals.UrlMessage + Convert.ToInt32(Messages.UnableToAdminister));

			
            // make sure we have a username/forumID
            if (Mode == ModeratedForumMode.ViewForUser && Username.Length == 0)
                throw new Exception("When specifying Mode as ViewForUser you must pass in the Username of the user whose forum moderation informaion you wish to view.");

            if (Mode == ModeratedForumMode.ViewForForum && ForumID == -1)
                throw new Exception("When specifying Mode as ViewForForum you must pass in the ForumID of the forum whose moderators you wish to view.");

            // add the title
            Label lblTmp = new Label();
            lblTmp.CssClass = "head";
            lblTmp.Text = DataGridTitle + Globals.HtmlNewLine;
            Controls.Add(lblTmp);


            // add the datagrid
            dgModeratedForums = new DataGrid();

            dgModeratedForums.AutoGenerateColumns = false;
            dgModeratedForums.CellPadding = CellPadding;
            dgModeratedForums.CellSpacing = CellSpacing;
            dgModeratedForums.ItemCommand += new DataGridCommandEventHandler(dgModeratedForums_RemoveForum);

            // build up the DataGrid's columns
            BuildDataGridColumns();
            Controls.Add(dgModeratedForums);

            // if we are viewing this from the User Admin page (that is, we are viewing a list of the
            // forums administrated by a particular user), then we need to show the panel that allows
            // the end user to add/remove forums that this particular user can administer.
            if (Mode == ModeratedForumMode.ViewForUser) {
                Panel tmpPanel = new Panel();
                tmpPanel.ID = "panelAddForum";

                // add the listbox that lists the forums that the user can add
                tmpPanel.Controls.Add(new LiteralControl(Globals.HtmlNewLine + "<b>Add a Forum for this User to Moderate:</b>" + Globals.HtmlNewLine));
				
                ListBox lstTmp = new ListBox();
                lstTmp.ID = "lstForums";
                lstTmp.Rows = 1;
                lstTmp.CssClass = "normalListbox";
                lstTmp.DataValueField = "ForumID";
                lstTmp.DataTextField = "Name";
                tmpPanel.Controls.Add(lstTmp);

                CheckBox chkTmp = new CheckBox();
                chkTmp.ID = "chkEmailNotification";
                chkTmp.Checked = true;
                tmpPanel.Controls.Add(chkTmp);

                tmpPanel.Controls.Add(new LiteralControl("Receive Email Notification when a New Post Needs to be Moderated..." + Globals.HtmlNewLine));

                // add a submit button
                Button btnTmp = new Button();
                btnTmp.Text = "Add Forum";
                btnTmp.CssClass = "normalButton";
                btnTmp.ToolTip = "Click to add the selected forum to this user's list of moderateable forums.";
                btnTmp.Click += new EventHandler(btnAddForum_Click);
                btnTmp.ID = "btnAddForum";
                tmpPanel.Controls.Add(btnTmp);
			
                Controls.Add(tmpPanel);
            }
            else {
                // add a label that explains to moderate the users of a forum, you
                // must visit the user's admin page
                lblTmp = new Label();
                lblTmp.Text = Globals.HtmlNewLine + "In order to alter the moderators for this forum, you must visit the administration page for the specific user.";
                lblTmp.CssClass = "warning";
                Controls.Add(lblTmp);
            }
        }





        /***********************************************************************
        btnAddForum_Click Event Handler
        -------------------------------
            This event handler is fired when the user clicks on the Add Forum button.
            It needs to add a new forum to this users list of moderatable forums.
            Fortunately, the AddModeratedForumForUser statis method of the Users
            class does all of the nitty gritty work for us.
        ************************************************************************/
        private void btnAddForum_Click(Object sender, EventArgs e) {
            // add to the users list of acceptable forums the selected forum
            int iForumID = Convert.ToInt32(((ListBox) FindControl("lstForums")).SelectedItem.Value);
            bool bolEmailNotification = ((CheckBox) FindControl("chkEmailNotification")).Checked;

            ModeratedForum forum = new ModeratedForum();
            forum.Username = Username;
            forum.ForumID = iForumID;
            forum.EmailNotification = bolEmailNotification;

            Users.AddModeratedForumForUser(forum);

            // rebind the datagrid
            RebindData();
        }





        /***********************************************************************
        void BuildDataGridColumns function
        ----------------------------------
            This helper function builds up the columns for the datagrid.  The columns
            that are built-up depend on whether the page is being viewed for a particular
            user or for a particular forum.  If for a user, four columns are constructed:
                1.) The Remove Button
                2.) A hidden column that stores the Forum's ID
                3.) The name of the forum that is moderated
                4.) The date the user was assigned to moderate this forum
			
            If we are viewing the users who moderate a particular forum, only two
            columns are created - the Username of each of the forum's moderators, and
            the Date/Time they were given moderation privledges.
        ************************************************************************/
        private void BuildDataGridColumns() {
            ButtonColumn btcolTmp;
            BoundColumn bndcolTmp;

            if (Mode == ModeratedForumMode.ViewForUser) {
                // add the pushbutton to remove existing forums, but only if we are viewing
                // the list of forums moderated by a particular user
                btcolTmp = new ButtonColumn();
                btcolTmp.ButtonType = ButtonColumnType.PushButton;
                btcolTmp.Text = "Remove";
                btcolTmp.HeaderStyle.CopyFrom(this._headerStyle);
                btcolTmp.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                btcolTmp.ItemStyle.CssClass = "normalButton";
                btcolTmp.HeaderText = "Remove";            
                dgModeratedForums.Columns.Add(btcolTmp);

                // add a hidden bound column to perserve the forum id to remove
                bndcolTmp = new BoundColumn();
                bndcolTmp.Visible = false;
                bndcolTmp.DataField = "ForumID";
                dgModeratedForums.Columns.Add(bndcolTmp);

                // display the forumname
                bndcolTmp = new BoundColumn();
                bndcolTmp.HeaderStyle.CopyFrom(this._headerStyle);
                bndcolTmp.ItemStyle.CopyFrom(this._itemStyle);
                bndcolTmp.DataField = "Name";
                bndcolTmp.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                bndcolTmp.HeaderText = "Forum";
                dgModeratedForums.Columns.Add(bndcolTmp);
            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品自拍三区| 亚洲超碰精品一区二区| 欧美疯狂做受xxxx富婆| 91小视频免费看| 91视频国产观看| av毛片久久久久**hd| 99精品久久只有精品| 99精品久久久久久| 欧美亚洲日本一区| 欧美日韩国产一二三| 欧美情侣在线播放| 日韩精品最新网址| 国产午夜精品久久久久久久 | 日韩不卡一二三区| 婷婷久久综合九色国产成人 | 欧美理论片在线| 欧美剧情电影在线观看完整版免费励志电影 | 欧美视频自拍偷拍| 91.xcao| 日韩一区二区三区在线视频| 日韩午夜三级在线| 国产色婷婷亚洲99精品小说| ...xxx性欧美| 午夜视频一区二区三区| 精品一二线国产| caoporen国产精品视频| 欧美丝袜自拍制服另类| 久久亚洲欧美国产精品乐播| 最好看的中文字幕久久| 日日夜夜免费精品视频| 久久精品国产亚洲高清剧情介绍| 国产剧情一区在线| 欧美在线一区二区三区| 26uuu国产一区二区三区| 国产精品久久久久影院亚瑟 | 91精品综合久久久久久| 久久婷婷综合激情| 亚洲福利视频三区| 国产盗摄一区二区三区| 欧美男同性恋视频网站| 国产精品欧美久久久久一区二区| 性做久久久久久免费观看 | 国产精品五月天| 亚洲国产成人porn| 不卡的电视剧免费网站有什么| 日本高清不卡aⅴ免费网站| www亚洲一区| 香蕉久久夜色精品国产使用方法 | 国产精品久久久久久久久免费丝袜 | 91小视频免费观看| 26uuu亚洲婷婷狠狠天堂| 亚洲国产成人av网| 91最新地址在线播放| 久久综合av免费| 日本欧美加勒比视频| 欧洲精品在线观看| 国产精品久久久爽爽爽麻豆色哟哟 | 精品一区二区三区在线播放 | 91免费在线视频观看| 26uuu亚洲| 久久精品国产澳门| 欧美亚洲禁片免费| 亚洲欧美日韩国产综合在线| 国产传媒久久文化传媒| 精品国产乱码久久久久久闺蜜| 亚洲一级二级三级| 在线精品亚洲一区二区不卡| 国产精品女主播av| 大胆欧美人体老妇| 日本一区二区三区四区| 国产精品亚洲人在线观看| 欧美mv日韩mv亚洲| 韩国女主播成人在线| 日韩欧美不卡在线观看视频| 免费国产亚洲视频| 欧美一二三区在线| 久国产精品韩国三级视频| 精品免费国产一区二区三区四区| 久久精品国产亚洲一区二区三区| 日韩女优视频免费观看| 日本免费新一区视频| 日韩视频在线一区二区| 老司机免费视频一区二区三区| 欧美一区二区成人| 国产精一区二区三区| 国产精品全国免费观看高清| 不卡电影一区二区三区| 亚洲精品免费视频| 欧美日韩中文一区| 久久不见久久见中文字幕免费| 精品国内二区三区| 成人高清伦理免费影院在线观看| 亚洲欧洲国产日韩| 欧美日韩一级大片网址| 久久99深爱久久99精品| 欧美激情一区在线| 欧美性高清videossexo| 美日韩一区二区| 欧美韩国日本综合| 欧美性一级生活| 久国产精品韩国三级视频| 国产精品久久777777| 欧美精品精品一区| 国产精品996| 亚洲国产精品一区二区久久| 91精品国产欧美一区二区成人 | 亚洲欧美激情一区二区| 91精品国产一区二区三区| 国产成人精品免费视频网站| 亚洲男同1069视频| 精品国精品国产| 色8久久人人97超碰香蕉987| 另类小说一区二区三区| 亚洲欧洲日韩在线| 欧美电影精品一区二区| 在线亚洲精品福利网址导航| 国产一区二区三区四区五区入口| 亚洲女人的天堂| 国产午夜久久久久| 日韩视频免费观看高清完整版在线观看| 国产精品影音先锋| 日韩精品亚洲一区| 亚洲欧美日本在线| 国产亚洲精品超碰| 欧美一级搡bbbb搡bbbb| 91国偷自产一区二区使用方法| 国产精品一区二区视频| 日韩av网站免费在线| 亚洲精品成人天堂一二三| 26uuu欧美| 日韩女优电影在线观看| 欧美日韩成人一区| 色狠狠综合天天综合综合| 国产69精品一区二区亚洲孕妇| 日韩黄色免费电影| 亚洲福利一区二区三区| 一区二区三区欧美视频| 国产精品久久久一区麻豆最新章节| 日韩一区二区在线观看| 欧美精品乱码久久久久久按摩| 色哟哟一区二区三区| av欧美精品.com| aa级大片欧美| 99久免费精品视频在线观看| 国产盗摄视频一区二区三区| 国产精品伊人色| 国产精品一二三四五| 精品一区二区三区日韩| 精品在线一区二区| 毛片基地黄久久久久久天堂| 免费在线看成人av| 奇米影视一区二区三区小说| 日韩av一级片| 久久国产精品99精品国产| 韩国精品一区二区| 国产精品一区二区在线观看网站| 国精产品一区一区三区mba桃花| 免费看欧美美女黄的网站| 精品在线播放免费| 国产夫妻精品视频| 成人污污视频在线观看| 成人黄色综合网站| 91丨porny丨国产| 欧美电影影音先锋| 91精品国产一区二区三区| 91精品国产综合久久香蕉麻豆| 日韩视频中午一区| 久久精品免视看| 亚洲欧美另类在线| 日韩一区欧美二区| 国产精品亚洲成人| 色哟哟亚洲精品| 日韩一区二区不卡| 亚洲国产高清aⅴ视频| 亚洲精品欧美综合四区| 午夜精品一区在线观看| 久久99精品国产麻豆婷婷洗澡| 国产成人日日夜夜| 日本韩国欧美国产| 日韩欧美激情一区| 17c精品麻豆一区二区免费| 亚洲一区二区视频| 久久er精品视频| 97久久超碰精品国产| 欧美一区二区女人| 中文字幕一区免费在线观看 | 欧美变态tickling挠脚心| 国产精品青草综合久久久久99| 亚洲一区在线观看视频| 麻豆91在线播放| 99re热这里只有精品视频| 欧美一区二区不卡视频| 亚洲婷婷综合久久一本伊一区| 三级欧美韩日大片在线看| 国产不卡高清在线观看视频| 欧美日韩欧美一区二区| 国产精品乱码久久久久久| 午夜国产精品影院在线观看| 国产成人在线观看免费网站| 欧美人xxxx|