<%@ Page Language="C#" ContentType="text/html" %>
<%@ Register TagPrefix="My" TagName="MyHead" Src="head.ascx" %>
<%@ Register TagPrefix="My" TagName="MyFoot" Src="foot.ascx" %>
<%@ Register TagPrefix="My" TagName="MyMessage" Src="message.ascx" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!-- #INCLUDE file="../inc/Function.aspx" -->
<script runat="server">
     String strSQL;
     String strConn = ConfigurationSettings.AppSettings["ConnectionString"];
	 string AdvUserName;
protected void Page_Load(Object Src, EventArgs E)
{
    //------判断用户是否登录---
     if(Session["Login_UserName"]==null || Session["IsLogin"]==null || Session["Userclass"]==null || Session["Login_UserName"]=="" || Session["IsLogin"].ToString().ToLower()!="true" )
   {   
      Response.Write("<script language=javascript>alert ('登录超时');document.location='../ ';<");
	  Response.Write("/script>");
	  Response.End();
    }
   AdvUserName=Session["Login_UserName"].ToString();
  //-------------------------
 
  if (!IsPostBack)
  {
      strSQL="Select * From AdvHost where UserName='"+ AdvUserName +"'";
      SqlConnection cn = new SqlConnection(strConn);
      SqlCommand cmd= new SqlCommand(strSQL,cn);
	  cn.Open();
	 SqlDataReader myReader=cmd.ExecuteReader();
	  if (myReader.Read())
	  {
       UserName.Text=myReader["UserName"].ToString();
	    if(myReader["UserType"].ToString()=="1")
	     {UserType.Text="个人";}else{UserType.Text="单位";}
		 
	     if(myReader["Appearance"].ToString()=="1")
	     {Appearance.Text="正常";}
		  else
		  {
		  if(myReader["Appearance"].ToString()=="2")
		  {
		  Appearance.Text="禁止";
		  }else
		   {
		   Appearance.Text="等待审核";
		   }
		  }
		  
	     Money.Text=string.Format("{0:c}",myReader["Money"].ToString());
		 
		 Name.Text=myReader["Name"].ToString();
		 Company.Text=myReader["Company"].ToString();
		 Email.Text=myReader["Email"].ToString();
		 QQ.Text=myReader["QQ"].ToString();
		 Tel.Text=myReader["Tel"].ToString();
		 Fax.Text=myReader["Fax"].ToString();
		 Postal.Text=myReader["Postal"].ToString();
		 Address.Text=myReader["Address"].ToString();
		 url.Text=myReader["url"].ToString();
		 RegDate.Text=myReader["RegDate"].ToString();
	   }
	   else
	   { 
	    cn.Close();
	    alertmsg("出错!!记录不存","MangerAdvList.aspx");
		Response.End();
	    }

    
   }
}
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>5507广告联盟 - 广告商管理后台 - 注册信息</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<my:MyHead runat="server"/>

<table width="980" border="0" align="center" cellpadding="0" cellspacing="0" class="table_3">
  <tr>
    <td width="20" height="15"><img src="../web/images/body_1.gif" /></td>
    <td width="926" background="../web/images/body_2.gif"></td>
    <td width="20"><img src="../web/images/body_3.gif" width="20" height="15" /></td>
  </tr>
</table>
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="15" background="../web/images/body_7.gif" bgcolor="#FFFFFF"><p>&nbsp;</p>
        <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
    <td width="953" valign="top" bgcolor="#FFFFFF"><table width="950" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="140" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30"><table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%"><div align="center"><img src="../images/adv_list.gif" width="25" height="25" /></div></td>
                <td width="30%"><strong>用户资料</strong></td>
                <td width="64%">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="30">
			<form runat="server">
			<table width="715" border="0" cellpadding="0" cellspacing="1" bgcolor="#E4E4E4">
              <tr>
                <td height="25" colspan="4" background="../web/images/top_img.gif" bgcolor="#FFFFFF"><div align="center"><strong>注册信息</strong></div></td>
                </tr>
              <tr>
                <td width="150" height="30" bgcolor="#F7F7F7"><div align="right">用户名:</div></td>
                <td width="200" bgcolor="#FFFFFF">&nbsp;
                  <asp:Label ID="UserName" runat="server" />                </td>
                <td width="150" bgcolor="#F7F7F7"><p align="right">用户类型:</p></td>
                <td width="210" bgcolor="#FFFFFF">&nbsp;<asp:Label ID="UserType" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">账号状态:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Appearance" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">账户金额:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Money" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">联系人:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Name" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">公司名字:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Company" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">电子邮件:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Email" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">QQ:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="QQ" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">电话:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Tel" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">传真:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Fax" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">邮编:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Postal" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">地址:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="Address" runat="server" /></td>
              </tr>
              <tr>
                <td height="30" bgcolor="#F7F7F7"><div align="right">公司网址:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="url" runat="server" /></td>
                <td bgcolor="#F7F7F7"><div align="right">注册时间:</div></td>
                <td bgcolor="#FFFFFF">&nbsp;<asp:Label ID="RegDate" runat="server" /></td>
              </tr>
              <tr>
                <td height="33" colspan="4" bgcolor="#F7F7F7"><div align="center"><a href="EditInformation.aspx"><img src="../web/images/editbody.gif" width="150" height="25" border="0" /></a></div></td>
                </tr>
            </table>
			</form>
			</td>
          </tr>
          <tr>
            <td height="30">&nbsp;</td>
          </tr>
        </table></td>
        <td width="220" valign="top"><my:MyMessage runat="server"/></td>
      </tr>
    </table></td>
    <td width="15" background="../web/images/body_8.gif" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
</table>

<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20"><img src="../web/images/body_4.gif" width="20" /></td>
    <td width="926" background="../web/images/body_5.gif">&nbsp;</td>
    <td width="20"><div align="right"><img src="../web/images/body_6.gif" width="20" height="20" /></div></td>
  </tr>
</table>

<my:MyFoot runat="server"/>

</body>
</html>
