<%@ page language="C#" autoeventwireup="true" inherits="user_my, ZKCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register TagName="meta" TagPrefix="UC" Src="~/s/include/meta.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/s/include/head.ascx" %>
<%@ Register TagName="tip_bar" TagPrefix="UC" Src="~/s/include/tip_bar.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/s/include/foot.ascx" %>
<%@ Register TagName="side_menu" TagPrefix="UC" Src="~/user/side_menu.ascx" %>
<!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 runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>会员中心_
        <%=ZK.config("sitetitle") %></title>
    <meta name="keywords" content="<%=ZK.config("sitekeywords") %>" />
    <meta name="description" content="<%=ZK.config("sitedescription") %>" />
    <UC:meta ID="meta1" runat="server" />
    <script type="text/javascript">
        var _IsAdmin = 0; if ("<%=User.Identity.IsAuthenticated.ToString()%>" == "True") _IsAdmin = 1;
    </script>
</head>
<body>
    <div class="wrap">
        <a name="pagetop" id="pagetop"></a>
        <UC:head ID="head1" runat="server" />
        <UC:tip_bar ID="tip_bar1" runat="server" />
        <form id="form1" runat="server" autocomplete="off">
        <div class="box">
            <div class="hot">
                <div class="fl" style="width: 180px">
                    <div class="c1 mt5">
                        <div class="b">
                            <div class="fl">
                            </div>
                            <div class="con" style="width: 80px">
                                功能菜单</div>
                            <div class="fr">
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="v">
                            <UC:side_menu ID="side_menu1" runat="server" />
                            <script type="text/javascript">showonly_user_side_menu("1");</script>
                        </div>
                    </div>
                </div>
                <div class="fr flow" style="width: 765px">
                    <div class="c1 mt5">
                        <div class="b">
                            <div class="fl">
                            </div>
                            <div class="con">
                                修改个人资料</div>
                            <div class="fr">
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="v">
                            <div class="do1" style="padding-left: 100px; padding-top: 25px; padding-bottom: 25px">

                                <script type="text/javascript">ContinueMake=1;
            function check_tel(){ContinueMake=0;ajax("get",location.href.substring(0,location.href.indexOf(".aspx")+5)+"?act=ajax&field=tel&value="+base64en(document.getElementById("tel").value)+"&id="+document.getElementById("HiddenField_ID").value+"&msg="+encodeURI("该手机号码已被占用，请重新输入手机号码！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){document.getElementById("msg_tel").innerHTML=xmlHttp.responseText;ContinueMake=1;}});}
            function check_qq(){ContinueMake=0;ajax("get",location.href.substring(0,location.href.indexOf(".aspx")+5)+"?act=ajax&field=qq&value="+base64en(document.getElementById("qq").value)+"&id="+document.getElementById("HiddenField_ID").value+"&msg="+encodeURI("该QQ号已被占用，请重新输入QQ号！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){document.getElementById("msg_qq").innerHTML=xmlHttp.responseText;ContinueMake=1;}});}
            function check_email(){ContinueMake=0;ajax("get",location.href.substring(0,location.href.indexOf(".aspx")+5)+"?act=ajax&field=email&value="+base64en(document.getElementById("email").value)+"&id="+document.getElementById("HiddenField_ID").value+"&msg="+encodeURI("该邮箱已被占用，请重新输入邮箱！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){document.getElementById("msg_email").innerHTML=xmlHttp.responseText;ContinueMake=1;}});}
            function check_pold(){ContinueMake=0;ajax("get",location.href.substring(0,location.href.indexOf(".aspx")+5)+"?act=ajax&field=pold&value="+base64en(document.getElementById("pold").value)+"&id="+document.getElementById("HiddenField_ID").value+"&msg="+encodeURI("原密码不正确！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){document.getElementById("msg_pold").innerHTML=xmlHttp.responseText;ContinueMake=1;}});}
                
            function check(){if(ContinueMake!=1){setTimeout(check,1000);return false;}          
            var pold=document.getElementById("pold").value;
            var tel=document.getElementById("tel").value;
            var qq=document.getElementById("qq").value;
            var email=document.getElementById("email").value; 
            if(document.getElementById("u").value.length<20&&'<%=ZK.ifDZ.ToString() %>'.toLowerCase()=='false'){if(pold==""&&_IsAdmin!=1){alert("请输入您的登录密码！");return false;}}else {if(document.getElementById("nickname").value==""){alert("请输入您的昵称！");return false;}}          
         if(qq==""&&email==""){   if(tel==""){alert("请输入您的手机号！");return false;}   }          
            if(tel!=""){if (!telReg.test(tel)){alert("请输入正确的手机号码！");return false;}}
         if(tel==""&&email==""){   if(qq==""){alert("请输入您的QQ号！");return false;}   }
            if(qq!=""){if (!qqReg.test(qq)){alert("请输入正确的QQ号！");return false;}}              
         if(tel==""&&qq==""){   if(email==""){alert("请输入您的邮箱！");return false;}   }
            if(email!=""){if (!emailReg.test(email)){alert("请输入正确的邮箱！");return false;}}           
            var arr1="tel,qq,email".split(",");var arr2="手机号码,QQ号,邮箱".split(",");
            for(var i=0;i<arr1.length;i++){if(document.getElementById("msg_"+arr1[i]).innerHTML!=""){alert(arr2[i]+"被占用！");return false;}}          
            if(document.getElementById("msg_pold").innerHTML.indexOf("您的登录密码不正确")!=-1){alert("您的登录密码不正确！");return false;}            
            }
                                </script>

                                <table border="0" cellpadding="0" cellspacing="0" class="table1">
                                    <tr id="_u_tr">
                                        <td class="tt">
                                            会员帐号：<asp:HiddenField ID="HiddenField_ID" runat="server" />
                                        </td>
                                        <td>
                                            <asp:TextBox ID="u" runat="server" MaxLength="20" CssClass="inp4" Width="150" Enabled="false"></asp:TextBox><asp:Literal
                                                ID="_u_js" runat="server"></asp:Literal>
                                        </td>
                                    </tr>
                                    <tr id="old_pwd_box">
                                        <td class="tt">
                                            <b>输入密码：</b>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="pold" runat="server" TextMode="Password" MaxLength="20" CssClass="inp4"
                                                Width="150" onblur="if(_IsAdmin!=1){check_pold();}"></asp:TextBox><span id="msg_pold"
                                                    style="margin-left: 10px"><span class="msgon">请输入您的登录密码！</span></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                        <script type="text/javascript">if(document.getElementById("u").value.length>20||'<%=ZK.ifDZ.ToString() %>'.toLowerCase()=='true'){document.getElementById("old_pwd_box").style.display="none";}</script>
                                            昵称：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="nickname" runat="server" MaxLength="10" CssClass="inp4" Width="150"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            真实姓名：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="realname" runat="server" MaxLength="20" CssClass="inp4" Width="150"></asp:TextBox><%--<span id="realname_span_for_contact" class="none" style="margin-left: 10px"><span class="msgon" style="color:#f60">此项将作为其它频道的联系人姓名使用！</span></span><script type="text/javascript">if(location.href.indexOf("forfun=contact")!=-1){document.getElementById("realname_span_for_contact").className="";}</script>--%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            手机号码：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="tel" runat="server" MaxLength="11" CssClass="inp4" Width="150" onblur="check_tel()"></asp:TextBox><span id="msg_tel" style="margin-left: 10px"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            QQ：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="qq" runat="server" MaxLength="15" CssClass="inp4" Width="150" onblur="check_qq()"></asp:TextBox><span id="msg_qq" style="margin-left: 10px"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            <b>邮箱：</b>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="email" runat="server" MaxLength="100" CssClass="inp4" Width="300" onblur="check_email()" Enabled="false"></asp:TextBox><span id="msg_email"
                                                    style="margin-left: 10px"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tt">
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:Button ID="ButtonSubmit" runat="server" CssClass="but4" Text="确定修改" OnClick="ButtonSubmit_Click"
                                                OnClientClick="return check()" onmouseover="hover(this,0.8)" onmouseout="hover(this,1)" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        </form>
        <UC:foot ID="foot1" runat="server" />
    </div>
</body>
</html>
