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

<!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">
                        <select name="gender" id="gender" runat="server"><option value="1">男</option><option value="0" selected="selected">女</option></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        生日</td>
                    <td align="left" style="width: 678px">
                       <input type="text" id="txtBrith" runat="server" value="2008-1-1" onchange="signs();"/> ( 格式如：2008-1-1 )
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        生日显示方式</td>
                    <td align="left" style="width: 678px">
                       <select name="birthPrivacy" id="birthPrivacy" runat="server"><option value="0" selected="selected">显示年月日</option><option value="1">显示月和日</option><option value="2">显示年</option><option value="3">不显示</option></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        所属行业</td>
                    <td align="left" style="width: 678px">
                       <select name="selVocation" id="selVocation" runat="server"><option value="0">请选择行业</option></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        家乡</td>
                    <td align="left" style="width: 678px">
                       <select name="homeprovince" id="homeprovince" runat="server" onchange="ShowC(this.value);"></select><input type="hidden" id="hidProvince" runat="server" value="" />		
                       <select name="SelCity" id="SelCity" runat="server" style="display:none;" ></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        星座</td>
                    <td align="left" style="width: 678px">
                        <select name="zodiac" id="zodiac" runat="server"></select>
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        MSN
                    </td>
                    <td align="left" style="width: 678px">
                        <input type="text" id="txtMSN" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist" id="Tr_City">
                    <td align="right" style="width: 200px;">
                        GTalk
                    </td>
                    <td align="left" style="width: 678px">
                <input type="text" id="txtGTalk" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        QQ</td>
                    <td align="left" style="width: 678px">
                       <input type="text" id="txtQQ" runat="server" /></td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px; height: 26px;">
                        Skype</td>
                    <td align="left" style="width: 678px; height: 26px;">
                        <input type="text" id="txtSkype" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        手机</td>
                    <td align="left" style="width: 678px">
                        <input type="text" id="txtMobile" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        电话</td>
                    <td align="left" style="width: 678px">
                       <input type="text" id="txtTel" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px; height: 26px;">
                        住址</td>
                    <td align="left" style="width: 678px; height: 26px;">
                        <input type="text" id="txtAddress" runat="server" />
                    </td>
                </tr>
                <tr class="maintablelist">
                    <td align="right" style="width: 200px;">
                        个人网址</td>
                    <td align="left" style="width: 678px">
                       <input type="text" id="txtHttp" runat="server" />
                    </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);}
ShowC('<%=pID %>');
function Load()
{
    if($("SelCity").length==0)
    {
       $("SelCity").style.display="none"; 
    }
    else
    {
        $("SelCity").style.display=""; 
    }
}
Load();

//星座
function signs() 
{
    var brith=$("txtBrith").value;
    var res=brith.split('-');
    var birthyear = res[0], date=res[2], month=res[1];
    
    with ($("zodiac"))
    {
        if (month == 3  &&  date >=21 || month == 4  &&  date <=19) {value = "1";}
        if (month == 3  &&  date > 31) {value = "OK.  Whatever.";}
        if (month == 4  &&  date >=20 || month == 5  &&  date <=20) {value = "2";}
        if (month == 4  &&  date > 30) {value = "I'm soooo sorry!";}
        if (month == 5  &&  date >=21 || month == 6  &&  date <=21) {value = "3";}
        if (month == 5  &&  date > 31) {value = "Umm ... no.";}
        if (month == 6  &&  date >=22 || month == 7  &&  date <=22) {value = "4";}
        if (month == 6  &&  date > 30) {value = "Sorry.";}
        if (month == 7  &&  date >=23 || month == 8  &&  date <=22) {value = "5";}
        if (month == 7  &&  date > 31) {value = "Excuse me?";}
        if (month == 8  &&  date >=23 || month == 9  &&  date <=22) {value = "6";}
        if (month == 8  &&  date > 31) {value = "Yeah. Right.";}
        if (month == 9  &&  date >=23 || month == 10  &&  date <=22) {value = "7";}
        if (month == 9  &&  date > 30) {value = "Try Again.";}
        if (month == 10  &&  date >=23 || month == 11  &&  date <=21) {value = "8";}
        if (month == 10  &&  date > 31) {value = "Forget it!";}
        if (month == 11  &&  date >=22 || month == 12  &&  date <=21) {value = "9";}
        if (month == 11  &&  date > 30) {value = "Invalid Date";}
        if (month == 12  &&  date >=22 || month == 1  &&  date <=19) {value = "10";}
        if (month == 12  &&  date > 31) {value = "No way!";}
        if (month == 1  &&  date >=20 || month == 2  &&  date <=18) {value = "11";}
        if (month == 1  &&  date > 31) {value = "Huh?";}
        if (month == 2  &&  date >=19 || month == 3  &&  date <=20) {value = "12";}
        if (month == 2  &&  date > 29) {value = "Say what?";}
    }
}

//根据省加载市
function ShowC(id)
{
     var  options={  
				   method:'post',  
				   parameters:"id="+id+"&r="+$("txtUserID").value+"&Type=City",  
				   onComplete:function(transport)
					{ 
					    var v=transport.responseText;
					    
					    if (v.indexOf("??")>-1)
					    {
					        $("SelCity").style.display="none";
                        }
					    else
					    {
                           var array=v.split('|');
                           var len=array.length;
                           if(len>0)
                           {  
                               $("SelCity").style.display="";
                               $("SelCity").length=0;
                               for(var i=0;i<array.length-1;i++)
                               { 
                                  var s=array[i].split(',');
                                  if(s.length>0)
                                  {
                                    $("SelCity").options.add(new Option(s[1],s[0]));
                                  }
                               }
                           } 
                           else
                           {
                                $("SelCity").style.display="none";
                           }
                        }
					}  
				  }; 
       new Ajax.Request('UserBase.aspx',options);
}
</script>