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

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

?? sectionmenu.cs

?? 非常不錯的學校在線考試分析系統
?? CS
字號:
namespace ASPNET.StarterKit.Communities {

    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.Caching;
    using System.Configuration;
    using System.Collections;
    using System.Data;



    //*********************************************************************
    //
    // SectionMenu Class
    //
    // WebControl that displays top-level sections. This control
    // takes into account the roles of the current user and displays
    // private sections only to users who have the right roles. 
    //
    //*********************************************************************
    
    public class SectionMenu : SkinnedCommunityControl {
    
        string _skinFileName = "Sections_SectionMenu.ascx";

        Repeater rptSections;
        
 
        //*********************************************************************
        //
        // SectionMenu Constructor
        //
        // Calls the base SkinnedCommunityControl constructor
        // and assigns the default page skin.
        //
        //*********************************************************************

        public SectionMenu() : base() {
            // Assign a default template name
            if (SkinFileName == null)
                SkinFileName = _skinFileName;
        }


        //*********************************************************************
        //
        // SkinType Property
        //
        // Specifies the skins directory where this page's skin file is located.
        //
        //*********************************************************************
        
        override protected string SkinType {
            get { return "ControlSkins"; }
        }

   
        //*********************************************************************
        //
        // InitializeSkin Method
        //
        // Retrieves all the controls from the page skin.
        //
        //*********************************************************************
    
        override protected void InitializeSkin(Control skin) {

            // Get the Repeater from the Skin
            rptSections = (Repeater)GetControl( skin, "Sections" );
            rptSections.EnableViewState = false;
            rptSections.ItemDataBound += new RepeaterItemEventHandler(Repeater_ItemDataBound);
        }



        //*********************************************************************
        //
        // Repeater_ItemDataBound Method
        //
        // Assigns values to the controls contained in the item and 
        // alternating item templates of the Repeater used to display
        // the list of sections.
        //
        //*********************************************************************
        
        private void Repeater_ItemDataBound(Object s, RepeaterItemEventArgs e) {
            HyperLink lnkSection;
            SectionMenuLink _sectionMenuLink;
            
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {
                lnkSection = (HyperLink)GetControl(e.Item, "lnkSection");
                _sectionMenuLink = (SectionMenuLink)e.Item.DataItem;
                
                lnkSection.Text = _sectionMenuLink.SectionMenuTitle;
                lnkSection.NavigateUrl = _sectionMenuLink.SectionPath;    
            }
        }
        

        //*********************************************************************
        //
        // OnPreRender Method
        //
        // Binds the sections to the Repeater control.
        //
        //*********************************************************************

        override protected void OnPreRender(EventArgs e) {
            // Bind the results to the DataList
            rptSections.DataSource = GetTopLevelSections(objUserInfo);
            rptSections.DataBind();  
        }


        //*********************************************************************
        //
        // GetTopLevelSections Method
        //
        // Gets list of top-level sections. Displays different sections
        // depending on whether the current user is authenticated.
        //
        //*********************************************************************

        private ArrayList GetTopLevelSections(UserInfo user) {
            if (!user.IsAuthenticated)
                return GetPublicTopLevelSections();
            return GetTopLevelSectionsForUser(user);
        }
    

        //*********************************************************************
        //
        // GetPublicTopLevelSections Method
        //
        // Returns top-level sections from the cache, or if not available,
        // calculates top-level sections.
        //
        //*********************************************************************
    
        private ArrayList GetPublicTopLevelSections() {   
            ArrayList sections = (ArrayList)Context.Cache[CommunityGlobals.CacheKey("PublicTopLevelSections")];
            if (sections == null) {
                sections = CalculatePublicTopLevelSections();
                Context.Cache.Insert
                (
                    CommunityGlobals.CacheKey("PublicTopLevelSections"),
                    sections,
                    new CacheDependency( null, new string[] {CommunityGlobals.CacheKey("Sections")})
                );
            }
            return sections;
        }
        

        //*********************************************************************
        //
        // CalculatePublicTopLevelSections Method
        //
        // Determines public top-level sections by iterating through
        // the list of sections and finding sections that Everyone or
        // Authenticated can access.
        //
        //*********************************************************************
        
        private ArrayList CalculatePublicTopLevelSections() {
            ArrayList publicTopLevelSections = new ArrayList();
            
            ArrayList topLevelSections = GetTopLevelSections();
            foreach (SectionInfo section in topLevelSections)
                if (Array.IndexOf(section.ViewRoles, "Community-Everyone") != -1 || Array.IndexOf(section.ViewRoles, "Community-Authenticated") != -1)
                    publicTopLevelSections.Add(new SectionMenuLink(section.MenuTitle, section.Path));        
            return publicTopLevelSections;
        }
        


        //*********************************************************************
        //
        // GetTopLevelSections Method
        //
        // Retrieves all top-level sections.
        //
        //*********************************************************************
        
        private ArrayList GetTopLevelSections() {
            ArrayList topLevelSections = (ArrayList)Context.Cache[CommunityGlobals.CacheKey("TopLevelSections")];
            
            if (topLevelSections == null) {
                ArrayList sections = SectionUtility.GetAllEnabledSections().GetOrderedSections();
                topLevelSections = new ArrayList();
                foreach (SectionInfo section in sections)
                    if (section.ParentSectionID == -1 || section.ParentSectionID == SectionUtility.DefaultSectionID)
                        topLevelSections.Add(section);
            }
            return topLevelSections;
        }


        //*********************************************************************
        //
        // GetTopLevelSectionsForUser Method
        //
        // Determines top-level sections for an authenticated user.
        // This might include private sections.
        //
        //*********************************************************************

        private ArrayList GetTopLevelSectionsForUser(UserInfo user) {
            ArrayList colSections = new ArrayList();
            bool mayView = false;
            
            ArrayList topLevelSections = GetTopLevelSections();
            foreach (SectionInfo section in topLevelSections) {
                mayView = false;
				foreach (string role in section.ViewRoles) 
				{
					// KAB (StarPilot) - changed order of if statement.  Since it is ORed
					// once it hits a true statement it stops evaluating.  It is less steps
					// since 80% or better it is "Community-Everyone" or "Community-Authenticated"
					if (role=="Community-Everyone" || role=="Community-Authenticated" || objUserInfo.IsInRole(role)) 
					{
						mayView = true;
						break;	// KAB (StarPilot) - no reason to keep going if they can view...
					}
				}
                if (mayView)        
                    colSections.Add( new SectionMenuLink(section.MenuTitle, section.Path));
            }
            if (objUserInfo.IsAdministrator)
                colSections.Add( new SectionMenuLink( "Admin", CommunityGlobals.ResolveBase( "Admin/Default.aspx" ) ));
            return colSections;
        }

        
        
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线免费播放| 麻豆国产欧美一区二区三区| 成人avav在线| 国产精品久久夜| 不卡av免费在线观看| 亚洲欧美自拍偷拍色图| 在线视频观看一区| 日本欧美肥老太交大片| 欧美成人a在线| 国产成人免费视频网站高清观看视频| 国产日产欧美一区| 欧美午夜理伦三级在线观看| 丝袜诱惑亚洲看片| 国产视频一区在线观看| 色屁屁一区二区| 日韩国产在线观看| 久久久久久久综合色一本| av综合在线播放| 天天色综合天天| 国产亚洲欧美日韩在线一区| 91丨九色丨蝌蚪丨老版| 日韩在线一区二区三区| 国产午夜精品在线观看| 欧美中文字幕一区二区三区亚洲| 免费亚洲电影在线| 国产精品成人免费精品自在线观看| 欧洲精品在线观看| 国产尤物一区二区在线| 亚洲精品日韩一| 欧美精品一区二区三区在线| 99riav久久精品riav| 秋霞国产午夜精品免费视频| 亚洲欧洲国产专区| 精品日韩在线一区| 欧美自拍偷拍午夜视频| 国产成都精品91一区二区三| 亚洲综合激情小说| 国产欧美视频一区二区| 欧美人狂配大交3d怪物一区| 亚洲国产精品视频| 国产精品麻豆视频| 精品动漫一区二区三区在线观看| 色婷婷综合久色| 国产伦精一区二区三区| 五月天视频一区| 日韩理论片网站| 久久亚洲捆绑美女| 欧美高清视频不卡网| 99视频精品在线| 国产美女精品在线| 免费看欧美女人艹b| 亚洲资源中文字幕| 国产精品麻豆视频| 国产亚洲一区二区在线观看| 日韩欧美一级精品久久| 91在线观看污| 国产传媒欧美日韩成人| 免费成人你懂的| 日韩电影一区二区三区| 亚洲高清一区二区三区| 夜夜嗨av一区二区三区四季av| 日本一区二区三区免费乱视频| 欧美大片在线观看| 91精品国产91综合久久蜜臀| 欧美系列亚洲系列| 欧美日韩视频在线观看一区二区三区 | 日韩精品一区在线观看| 在线不卡中文字幕播放| 欧美日韩久久一区二区| 欧美日韩在线电影| 欧美日韩一区二区在线视频| 日本高清成人免费播放| 在线免费亚洲电影| 欧美三级一区二区| 欧美日韩国产美女| 欧美一级高清大全免费观看| 欧美一区二区私人影院日本| 日韩一区二区三| 日韩欧美国产一二三区| 26uuu久久综合| 国产日产精品1区| 中文字幕一区二区在线观看| 亚洲青青青在线视频| 一区二区在线观看免费视频播放| 亚洲免费观看高清完整版在线观看| √…a在线天堂一区| 亚洲摸摸操操av| 亚洲成人激情综合网| 日韩精品一区第一页| 日本中文字幕一区二区视频| 久久精品噜噜噜成人av农村| 毛片av一区二区| 国产在线一区二区| 成人av网址在线| 欧洲一区二区av| 欧美电视剧在线看免费| 26uuu国产电影一区二区| 亚洲国产成人私人影院tom| 亚洲蜜臀av乱码久久精品蜜桃| 一区二区三区中文字幕| 亚洲成a人片在线不卡一二三区| 青青国产91久久久久久| 久久精品72免费观看| 成人国产精品免费观看动漫| 色婷婷久久综合| 欧美一区二区三区白人| 欧美日本在线观看| 3d动漫精品啪啪一区二区竹菊| 欧美午夜一区二区三区| 国产传媒欧美日韩成人| 91在线视频官网| 欧美三级电影一区| 精品欧美一区二区在线观看| 欧美激情艳妇裸体舞| 亚洲午夜精品一区二区三区他趣| 美女一区二区三区在线观看| 国产不卡一区视频| 欧美日韩视频在线第一区| 久久精品视频免费| 亚洲v中文字幕| 国产成人精品网址| 欧美日韩精品一区二区天天拍小说 | 日韩一区二区中文字幕| 欧美激情一二三区| 奇米一区二区三区| 欧美在线看片a免费观看| 精品国产乱码久久久久久老虎| 亚洲精品国产a久久久久久| 麻豆精品国产91久久久久久| 久久综合九色综合欧美98| 午夜电影久久久| 免费人成网站在线观看欧美高清| 风间由美一区二区三区在线观看| 欧美色网一区二区| 国产精品毛片久久久久久| 麻豆成人在线观看| 欧美无砖砖区免费| 国产精品久久久久久久久免费丝袜| 日韩在线a电影| 色婷婷国产精品久久包臀| 国产亲近乱来精品视频| 美女尤物国产一区| 欧美蜜桃一区二区三区| 亚洲欧美成人一区二区三区| 国产麻豆成人传媒免费观看| 日韩免费高清视频| 天天影视涩香欲综合网| 色狠狠av一区二区三区| 国产情人综合久久777777| 精品一区二区综合| 欧美一二区视频| 亚洲大片在线观看| 91精品福利视频| 亚洲欧美日韩电影| 本田岬高潮一区二区三区| 国产香蕉久久精品综合网| 韩国三级电影一区二区| 欧美不卡一区二区三区四区| 日韩av中文字幕一区二区三区| 欧美三级电影在线看| 亚洲大片免费看| 欧美日韩国产经典色站一区二区三区| 有码一区二区三区| 在线观看亚洲精品视频| 亚洲精品日产精品乱码不卡| 色偷偷久久人人79超碰人人澡| 亚洲欧美日韩人成在线播放| 色婷婷综合久久久中文字幕| 一区二区三区欧美视频| 色综合久久天天| 亚洲综合色噜噜狠狠| 欧美日韩一区二区三区免费看| 亚洲综合色视频| 555夜色666亚洲国产免| 麻豆免费精品视频| 日韩一区二区三区电影在线观看 | 亚洲国产成人精品视频| 欧洲精品一区二区三区在线观看| 亚洲成人综合在线| 8x8x8国产精品| 精品亚洲欧美一区| 国产午夜一区二区三区| 99久久精品情趣| 亚洲影视在线播放| 91精品一区二区三区久久久久久| 美国十次了思思久久精品导航| 欧美精品一区二区三区视频| 成人黄色av网站在线| 亚洲一区二区三区国产| 日韩欧美在线影院| 福利电影一区二区| 亚洲电影你懂得| 日韩精品一区二区三区在线观看| 国产精品一区在线观看乱码| 国产精品久久夜| 欧美电影影音先锋| 狠狠色综合播放一区二区| 中文欧美字幕免费| 欧美日韩免费在线视频| 国产在线精品一区二区夜色|