using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Spaces;
public partial class SiteSkins_Login : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.User.Identity.Name == string.Empty && !Page.User.Identity.IsAuthenticated)
        {
            divForm.Visible = true;
            divUserInfo.Visible = false;
        }
        else
        {
            UserConfig uc = Users.GetUserConfig(Page.User.Identity.Name);
            if (uc == null) return;
            divForm.Visible = false;
            divUserInfo.Visible =true;
            lDesc.Text = "欢迎您 Bfor会员";
            lnkAdmin.Text = "管理中心";
            lnkAdmin.NavigateUrl = Globals.GetSiteUrls().Manage();

            lnkBBS.Text = "讨论区";
            lnkBBS.NavigateUrl = string.Format("{0}/BBS",Globals.ApplicationPath);

            lnkHome.Text = "我的空间";
            lnkHome.NavigateUrl = Globals.GetSiteUrls().Default(uc.Account);

            lnkLogout.Text = "退出系统";
            lnkLogout.NavigateUrl = Globals.GetSiteUrls().Logout();

            
        }
        
    }  
}
