using System;
using System.Web;

namespace web.Control
{
    /// <summary>
    /// 
    /// </summary>
    public partial class ccHead : System.Web.UI.UserControl
    {
        Stat.Security.ISecurity security = Stat.Security.DataFatory.CreateSecurity();
        Stat.Cache.IConfig config = Stat.Cache.CacheFatory.CreateConfig();
        /// <summary>
        /// 
        /// </summary>
        protected string uName, uSiteList, uData, uExit;
        /// <summary>
        /// 
        /// </summary>
        protected string WebLogo;
        /// <summary>
        /// 
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {

            WebLogo = config.WebLogo();
            /*-------------------------------------*/

                if (security.IsUser())//用户
                {
                    uName = security.GetCurrentUserName();
                    uData = " | <a href=\"/v/MemberCenter.aspx\">我的账号</a> ";
                    uSiteList = " | <a href=\"/v/WebsiteList.aspx\">站点列表</a> | ";
                    uExit = " | <a href=\"/v/logout.aspx\">退出</a>";
                }
                else if(security.IsMaster())
                {
                    uName = "欢迎：<a href=\"/Manager/Main.Aspx\">" + security.GetCurrentUserName() +"</a> ";
                    uExit = " | <a href=\"/Manager/logout.aspx\">退出</a>";
                }          
        }
    }
}