namespace free.bbs
{
	using System;
	using System.Collections;
	using System.ComponentModel;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.SessionState;
	using System.Web.UI;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using System.Data.SqlClient;

	/// <summary>
	///		Summary description for head1.
	/// </summary>
	public class head1 : System.Web.UI.UserControl
	{

		private void Page_Load(object sender, System.EventArgs e)
		{
			SqlConnection conn=new SqlConnection(Session["str_connection"].ToString());
			conn.Open();
			SqlCommand cmd=new SqlCommand("select neirong,banzhu,banzhu1,banzhu2,banzhu3,banzhu4 from ancestor where ancestor_id='"+Request.Params["ancestor_id"].ToString()+"'",conn);
			SqlDataReader r;
			r=cmd.ExecuteReader();
			if(r.Read())
			{
				Session["leibie"]=r["neirong"].ToString().Trim();
				if(r["banzhu"].ToString().Trim()!="")
					Session["name"]="<A title='点击查看版主资料' href='hyziliaochakan.aspx?UserId='"+r["banzhu"].ToString().Trim()+"'' target='_blank'><font face='宋体'><font color=Red>"+r["banzhu"].ToString().Trim()+"</font></font> </b></A>";
				if(r["banzhu1"].ToString().Trim()!="")
					Session["name1"]="|<A title='点击查看版主资料' href='hyziliaochakan.aspx?UserId='"+r["banzhu1"].ToString().Trim()+"'' target='_blank'><font face='宋体'><font color=#800000>"+r["banzhu1"].ToString().Trim()+"</font></font> </b></A>";
				if(r["banzhu2"].ToString().Trim()!="")
					Session["name2"]="|<A title='点击查看版主资料' href='hyziliaochakan.aspx?UserId='"+r["banzhu1"].ToString().Trim()+"'' target='_blank'><font face='宋体'><font color=#800000>"+r["banzhu2"].ToString().Trim()+"</font></font> </b></A>";
				if(r["banzhu3"].ToString().Trim()!="")
					Session["name3"]="|<A title='点击查看版主资料' href='hyziliaochakan.aspx?UserId='"+r["banzhu1"].ToString().Trim()+"'' target='_blank'><font face='宋体'><font color=#800000>"+r["banzhu3"].ToString().Trim()+"</font></font> </b></A>";
				if(r["banzhu4"].ToString().Trim()!="")
					Session["name4"]="|<A title='点击查看版主资料' href='hyziliaochakan.aspx?UserId='"+r["banzhu1"].ToString().Trim()+"'' target='_blank'><font face='宋体'><font color=#800000>"+r["banzhu4"].ToString().Trim()+"</font></font> </b></A>";
			}
			r.Close();
			conn.Close();
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}
