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 reg_step2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string username = Request.QueryString["user"];
        if (username != null)
        {
            BindUser(username);
        }
        else
        {
            linkHome.Visible = false;
            linkManage.Visible = false;
            litlAddress.Visible = false;
        }
       
    }

    private void BindUser(string username)
    {
        User u = Users.GetUser(username);
        if (u == null)
        {
            linkHome.Visible = false;
            linkManage.Visible = false;
            litlAddress.Visible = false;
        }
        else
        {
            linkHome.NavigateUrl = string.Format(Config.GetConfig().DefaultDomain, u.Account);
            linkHome.Text = Globals.Text["Register_GetinBLOG"];
            linkManage.NavigateUrl = Globals.GetSiteUrls().Manage();
            linkManage.Text = Globals.Text["Register_GetinBackControl"];
            litlAddress.Text = string.Format("您的URL地址是<font color=red> {0} </font>请牢记", string.Format(Config.GetConfig().DefaultDomain, u.Account));
        
        }
    }
}
