using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Stat.web.Control
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Skin3Head : System.Web.UI.UserControl
    {
        Security.ISecurity security = 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=\"/Manerger/Main.Aspx\">" + security.GetCurrentUserName() + "</a> ";
                uExit = " | <a href=\"/Manerger/logout.aspx\">退出</a>";
            }
        }
    }
}
