<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserEdit.aspx.cs" Inherits="JuSNS.Web.system.user.UserEdit" %>

<!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>
<title id="ptitle" runat="server">会员管理</title>
<link href="../images/css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../../js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="../../js/public.js"></script>

</head>
<body>
<table width="99%" border="0" align="center" cellpadding="5" cellspacing="1">
  <tr>
    <td width="120" align="center" valign="top">
        <div class="menu">
            <ul>
        	<%=this.GetSystemMenu(sort)%>
        	</ul>
      </div>
    </td>
    <td valign="top">
   <div class="navip">
    <span class="Blue"> <a href="UserEdit.aspx?r=<%=this.txtUserID.Value %>">编辑会员基本信息</a> <a href="UserFav.aspx?r=<%=this.txtUserID.Value %>">编辑爱好信息</a> <a href="UserBase.aspx?r=<%=this.txtUserID.Value %>">编辑联系信息</a> <a href="UserBasicPrivacy.aspx?r=<%=this.txtUserID.Value %>">编辑联系信息可见度</a></span> 
   </div> 
   <div id="DivErr" runat="server"></div>
   <form id="form1" runat="server"><input type="hidden" id="txtUserID" runat="server" /><input type="hidden" runat="server" id="Portrait" />
   <div id="mainbody">
            <table width="100%" border="0" cellpadding="3" cellspacing="1" class="maintable">
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        会员姓名</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="txtName" runat="server" MaxLength="50" ></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequireName" runat="server" ControlToValidate="txtName" Display="Dynamic"
                            ErrorMessage="会员姓名不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        电子邮箱</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="txtEmail" runat="server" MaxLength="255" ></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic"
                            ErrorMessage="电子邮箱不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        密码</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="txtPwd" runat="server" MaxLength="255" Text="" TextMode="Password" Width="127px"  > </asp:TextBox> (如果您不需修改密码，此项不填)<input type="hidden" runat="server" id="txthidPwd"/>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        所在省
                    </td>
                    <td align="left" style="width: 678px">
                        <select name="DrpProvince" id="DrpProvince" runat="server" onchange="ShowC(this.value);"></select>	
                    </td>
                </tr>
                <tr class="maintablelist" id="Tr_City">
                    <td align="right" style="width: 200px;">
                        所在市
                    </td>
                    <td align="left" style="width: 678px">
                <select name="DrpCity" id="DrpCity" runat="server" ></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        状态</td>
                    <td align="left" style="width: 678px">
                        <asp:RadioButtonList ID="radState" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True" Value="0">等待验证</asp:ListItem>
                            <asp:ListItem Value="1">锁定</asp:ListItem>
                            <asp:ListItem Value="2">正常，未验证电子邮件</asp:ListItem>
                            <asp:ListItem Value="5">正常</asp:ListItem>
                        </asp:RadioButtonList></td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px; height: 26px;">
                        登录次数</td>
                    <td align="left" style="width: 678px; height: 26px;">
                        <span id="spanLoginNumber" runat="server"></span>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        最后登录时间</td>
                    <td align="left" style="width: 678px">
                        <span id="spanLastLoginTime" runat="server"></span>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        最后登录IP</td>
                    <td align="left" style="width: 678px">
                        <span id="spanLastLoginIP" runat="server"></span>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px; height: 26px;">
                        注册时间</td>
                    <td align="left" style="width: 678px; height: 26px;">
                        <span id="spanRegTime" runat="server"></span>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        注册IP</td>
                    <td align="left" style="width: 678px">
                       <span id="spanRegIP" runat="server"></span>
                    </td>
                </tr>
               <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        积分</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="integral" runat="server" MaxLength="255" ></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator1" runat="server" ControlToValidate="integral" Display="Dynamic"
                            ErrorMessage="积分不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr> 
               <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        金币</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="inteyb" runat="server" MaxLength="255" ></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator2" runat="server" ControlToValidate="inteyb" Display="Dynamic"
                            ErrorMessage="金币不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>                 
               <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        被访问次数</td>
                    <td align="left" style="width: 678px">
                        <asp:TextBox ID="Click" runat="server" MaxLength="255" ></asp:TextBox><asp:RequiredFieldValidator
                            ID="RequiredFieldValidator3" runat="server" ControlToValidate="Click" Display="Dynamic"
                            ErrorMessage="访问次数不能为空"></asp:RequiredFieldValidator>
                    </td>
                </tr>     
               <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        邀请用户ID</td>
                    <td align="left" style="width: 678px">
                        <span id="InviterID" runat="server"></span>
                    </td>
                </tr>                     
               
                <tr class="maintablelist">
                    <td align="right" style="width: 200px">
                    </td>
                    <td align="left" colspan="2">
                        <asp:Button ID="Button1" runat="server" Text=" 保 存 " OnClick="Button1_Click" />
                    </td>
                </tr>
            </table>
            
    </div>
    </form>
    </td>
  </tr>
</table>
</body>
</html>
<script language="JavaScript" type="text/javascript">
//function $(o){return document.getElementById(o);}
function Load()
{
    if($("DrpCity").length==0)
    {
       $("Tr_City").style.display="none"; 
    }
    else
    {
        $("Tr_City").style.display=""; 
    }
}Load();
//根据省加载市
function ShowC(id)
{
     var  options={  
				   method:'post',  
				   parameters:"id="+$("DrpProvince").value+"&Type=City",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText;
					    
					    if (v.indexOf("??")>-1)
					    {
					        $("Tr_City").style.display="none";
                        }
					    else
					    {
                           var array=v.split('|');
                           var len=array.length;
                           if(len>0)
                           {  
                               $("Tr_City").style.display="";
                               $("DrpCity").length=0;
                               for(var i=0;i<array.length-1;i++)
                               { 
                                  var s=array[i].split(',');
                                  if(s.length>0)
                                  {
                                    $("DrpCity").options.add(new Option(s[1],s[0]));
                                  }
                               }
                           } 
                           else
                           {
                                $("Tr_City").style.display="none";
                           }
                        }
					}  
				  }; 
       new Ajax.Request('UserEdit.aspx?r='+$("txtUserID").value,options);
}
</script>