<%@ Page Language="C#" MasterPageFile="Member.master"  AutoEventWireup="true" Inherits="Ruiao.WebSite.Public.Member.InfoManage" Codebehind="InfoEdit.aspx.cs" %>
<asp:Content ID="MyHead" ContentPlaceHolderID="cphHead" runat="Server">
<script type="text/javascript" src="<%=AppUrl %>/Common/Script/Common.js"></script>
</asp:Content>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMain" runat="Server">
<div id="ContentContainer">
    <form id="InfoEdit_MainForm" class="MainForm" runat="server">
        <table id="InfoEdit_MainTable" class="MainTable" style="border-bottom:none;">
            <tr id="InfoEdit_TitleTR" class="TR, Title">
                <td id="InfoEdit_TitleTD" colspan="2"><%=MyTitle %></td>
            </tr>
            
            <tr class="TR, SubTitle">
                <td colspan="2">会员基本资料，带"*"号的部分必须填写。</td>
            </tr>
            
            <tr>
                <td style="width:40%"><div class="TD_Title">登录名</div><div class="TD_Notes">您登录时用到的帐户名称，不可修改</div></td>
                <td style="width:60%"><input id="tbLoginName" class="Input_01" disabled="disabled" runat="server" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">显示名称</div><div class="TD_Notes">您显示于页面上的帐户名称，不可修改</div></td>
                <td><input id="tbDisplayName" class="Input_01" disabled="disabled" runat="server" /></td>
            </tr>
            <tr>
                <td><div class="TD_Title">您的密码</div><div class="TD_Notes">请输入您现在的密码，否则不允许修改资料</div></td>
                <td><asp:TextBox ID="OldPassword" runat="server" TextMode="Password" CssClass="Input_01" /></td>
            </tr>            
            <tr>
                <td><div class="TD_Title">电子邮件</div><div class="TD_Notes">注册信箱，不可修改</div></td>
                <td><input id="tbEmail" class="Input_01" disabled="disabled" runat="server" /></td>
            </tr>
            <tr>
                <td><div class="TD_Title">密码提示问题</div><div class="TD_Notes">用于取回密码，请使用<%=Ruiao.Public.Entity.pbMember.Question_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Question_MaxLength%>个中英文与数字，填写后不可修改。</div></td>
                <td><asp:TextBox ID="tbQuestion" runat="server" CssClass="Input_01" /></td>
            </tr>
            <tr>
                <td><div class="TD_Title">密码提示答案</div><div class="TD_Notes">提示答案使用单向加密，不允许查看到原始值，填写后不可修改。</div><div class="TD_Notes">与密码提示问题对应填写，请使用<%=Ruiao.Public.Entity.pbMember.Answer_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Answer_MaxLength%>个中英文与数字。</div></td>
                <td><asp:TextBox ID="tbAnswer" runat="server" CssClass="Input_01" /></td>
            </tr>
            <tr class="TR, SubTitle">
                
                <td colspan="2">以下为选填内容</td>
            </tr>
        </table>
        <table id="InfoEdit_ExInfoTable" class="MainTable" cellspacing="1" style="border-top:none; border-bottom:none;">
        <tr>
                <td style="width:40%; border-top:none;"><div class="TD_Title">修改密码</div><div class="TD_Notes">您的新密码，请使用<%=Ruiao.Public.Entity.pbMember.Password_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Password_MaxLength%>个中英文与数字，如不修改则请留空</div></td>
                <td style="width:60%; border-top:none;"><asp:TextBox ID="tbPassword" runat="server" TextMode="Password" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">密码确认</div><div class="TD_Notes">请再次输入您的密码，以确认输入无误</div></td>
                <td><asp:TextBox ID="tbPasswordEnter" runat="server" TextMode="Password" CssClass="Input_01" /></td>
            </tr>
            <tr>
                <td><div class="TD_Title">您的性别</div><div class="TD_Notes">请选择您的性别，如果需要可以选择保密</div></td>
                <td><asp:RadioButtonList ID="rblSex" runat="server" RepeatColumns="3" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">婚姻状况</div><div class="TD_Notes">请选择您的婚姻状况，如果需要可以选择保密</div></td>
                <td><asp:RadioButtonList ID="rblWedlock" runat="server" RepeatColumns="5" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">工作描述</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Work_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Work_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbWork" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">您的地址</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Address_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Address_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbAddress" runat="server" CssClass="Input_01" /></td>
            </tr>

            <tr>
                <td><div class="TD_Title">真实姓名</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.RealName_MixLength%>-<%=Ruiao.Public.Entity.pbMember.RealName_MaxLength%>位中英文</div></td>
                <td><asp:TextBox ID="tbRealName" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">联系电话</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Phone_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Phone_MaxLength%>位数字与符号</div></td>
                <td><asp:TextBox ID="tbPhone" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">移动电话</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Mobile_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Mobile_MaxLength%>位数字与符号</div></td>
                <td><asp:TextBox ID="tbMobile" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">MSN帐户</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.MSN_MixLength%>-<%=Ruiao.Public.Entity.pbMember.MSN_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbMSN" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">QQ号码</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.QQ_MixLength%>-<%=Ruiao.Public.Entity.pbMember.QQ_MaxLength%>位数字</div></td>
                <td><asp:TextBox ID="tbQQ" runat="server" CssClass="Input_01" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">头像</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.QQ_MixLength%>-<%=Ruiao.Public.Entity.pbMember.QQ_MaxLength%>位数字</div></td>
                <td>                    
                    <div style="float:left;">
                        系统头象选择：<asp:DropDownList ID="ddlFace" runat="server" ></asp:DropDownList><br />
                        自定义头像地址：<asp:TextBox ID="tbFace" runat="server" CssClass="Input_01" /> <span><a href="javascript:FacePreViewReload()">预览头象</a></span><br />
                        本地头像上传：<input id="file1" name="file1" type="file" /><asp:Button ID="btUploadFace" runat="server" Text="上传" OnClick="btUploadFace_Click" /><br />
                        宽 &nbsp; &nbsp;度：<asp:TextBox ID="tbFaceWidth" runat="server" CssClass="Input_01" Width="30" Text="32" />0-120的整数
                        <br />
                        高 &nbsp; &nbsp;度：<asp:TextBox ID="tbFaceHeight" runat="server" CssClass="Input_01" Width="30" Text="32" />0-120的整数
                    </div>
                    <div style="float:right;"><img id="FacePreView" /></div>
                    <script type="text/javascript">
                    function ChangeFacePreView(ImgUrl)
                    {
                        var tbFace = document.getElementById("<%=tbFace.ClientID %>");
                        tbFace.value = ImgUrl;
                        FacePreViewReload();
                    }
                    function FacePreViewReload()
                    {
                        var MaxWidth=120;//设置图片宽度界限
                        var MaxHeight=120;//设置图片高度界限

                        var tbFace = document.getElementById("<%=tbFace.ClientID %>");
                        var FacePreView = document.getElementById("FacePreView");
                        FacePreView.src = tbFace.value;
                        
//                        FacePreView.width = FacePreView.offsetWidth;
//                        FacePreView.height = FacePreView.offsetHeight;
                        
                        var HeightWidth = FacePreView.offsetHeight/FacePreView.offsetWidth;//设置高宽比
                        var WidthHeight = FacePreView.offsetWidth/FacePreView.offsetHeight;//设置宽高比
                        
                        document.getElementById("<%=tbFaceWidth.ClientID %>").value = FacePreView.offsetWidth;
                        document.getElementById("<%=tbFaceHeight.ClientID %>").value = FacePreView.offsetHeight;
                        
                        if(FacePreView.offsetWidth > MaxWidth){ 
                            document.getElementById("<%=tbFaceWidth.ClientID %>").value = MaxWidth; 
                            document.getElementById("<%=tbFaceHeight.ClientID %>").value = MaxWidth*HeightWidth; 
                        } 
                        if(FacePreView.offsetHeight > MaxHeight){ 
                            document.getElementById("<%=tbFaceHeight.ClientID %>").value = MaxHeight; 
                            document.getElementById("<%=tbFaceWidth.ClientID %>").value = MaxHeight*WidthHeight; 
                        } 
                        
//                        FacePreView.width = document.getElementById("<%=tbFaceWidth.ClientID %>").value;
//                        FacePreView.height = document.getElementById("<%=tbFaceHeight.ClientID %>").value;
                    }
                    </script>
                </td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">相片</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.QQ_MixLength%>-<%=Ruiao.Public.Entity.pbMember.QQ_MaxLength%>位数字</div></td>
                <td><asp:TextBox ID="tbPhoto" runat="server" CssClass="Input_01" /></td>
            </tr>
				
            <tr>
                <td><div class="TD_Title">个性签名</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Signature_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Signature_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbSignature" runat="server" TextMode="MultiLine" CssClass="Input_02" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">爱好描述</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.MyLike_MixLength%>-<%=Ruiao.Public.Entity.pbMember.MyLike_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbMyLike" runat="server" TextMode="MultiLine" CssClass="Input_02" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">自我介绍</div><div class="TD_Notes">请使用<%=Ruiao.Public.Entity.pbMember.Intro_MixLength%>-<%=Ruiao.Public.Entity.pbMember.Intro_MaxLength%>个中英文与数字</div></td>
                <td><asp:TextBox ID="tbIntro" runat="server" TextMode="MultiLine" CssClass="Input_02" /></td>
            </tr>
            
            <tr>
                <td><div class="TD_Title">自我介绍</div><div class="TD_Notes">请正确选择您的出生年月日，以便我们为您提供更好的服务。</div></td>
                <td>
                    <asp:DropDownList ID="ddlBirthday_Year" runat="server"></asp:DropDownList>年
                    <asp:DropDownList ID="ddlBirthday_Month" runat="server"></asp:DropDownList>月
                    <asp:DropDownList ID="ddlBirthday_Day" runat="server"></asp:DropDownList>日
                </td>
            </tr>
        </table>
        <table id="InfoEdit_SubmitTable" class="MainTable" cellspacing="1" style="border-top:none;">
            <tr>
                <td style=" text-align:center; border-top:none;"><asp:Button ID="btMemberSave" runat="server" Text="保存设置" OnClick="btMemberSave_Click" CssClass="SubmitButton" /></td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">FacePreViewReload();</script>
</asp:Content>