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

<%@ Register TagName="meta" TagPrefix="UC" Src="~/e/meta.ascx" %>
<%@ Register TagName="head" TagPrefix="UC" Src="~/e/head.ascx" %>
<%@ Register TagName="foot" TagPrefix="UC" Src="~/e/foot.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">
    <UC:meta ID="meta1" runat="server" />
</head>
<body>
    <form id="form1" runat="server" autocomplete="off">
    <asp:Label ID="pathcode" runat="server" Style="display: none">
   &nbsp;&raquo;&nbsp;修改个人信息
    </asp:Label>
    <UC:head ID="head1" runat="server" />
    <%--main start--%>
    <div class="c1">
        <div class="b1">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="b1_l">
                    </td>
                    <td>
                        <div class="con1">
                            <ul>
                                <li class="on" style="width: 90px"><a href="my.aspx">修改个人信息</a></li>
                                <li><a href="pwd.aspx">修改密码</a></li>
                            </ul>
                            <div class="clear">
                            </div>
                        </div>
                    </td>
                    <td align="right">
                        <div class="con2">
                        </div>
                    </td>
                    <td class="b1_r">
                    </td>
                </tr>
            </table>
        </div>
        <div class="v1">
            <div class="do1">
                <asp:HiddenField ID="HiddenField_ID" runat="server" />

                <script type="text/javascript">ContinueMake=1;
function check_u(){ContinueMake=0;ajax("get",location.href.substring(0,location.href.indexOf(".aspx")+5)+"?act=ajax&field=u&value="+base64en(document.getElementById("u").value)+"&id="+document.getElementById("HiddenField_ID").value+"&msg="+encodeURI("该用户名已被占用，请重新输入用户名！")+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){document.getElementById("msg_u").innerHTML=xmlHttp.responseText;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;}
if(document.getElementById("u").value==""){alert("请输入用户名");return false;}
if(document.getElementById("tel").value!=""){if (!telReg.test(document.getElementById("tel").value)){alert("请输入正确的手机号码！");return false;}}   
if(document.getElementById("qq").value!=""){if (!qqReg.test(document.getElementById("qq").value)){alert("请输入正确的QQ号！");return false;}}  
if(document.getElementById("email").value!=""){if (!emailReg.test(document.getElementById("email").value)){alert("请输入正确的邮箱！");return false;}}    
       
var arr1="u,tel,qq,email".split(",");var arr2="用户名,手机号码,QQ号,邮箱".split(",");
for(var i=0;i<arr1.length;i++){if(document.getElementById("msg_"+arr1[i]).innerHTML!=""&&document.getElementById("msg_"+arr1[i]).innerHTML.indexOf("建议设置您的管理员邮箱")==-1){alert(arr2[i]+"被占用！");return false;}}
           
if(document.getElementById("msg_pold")){
if(document.getElementById("pold").value==""){alert("请输入登录密码！");return false;}
if(document.getElementById("msg_pold").innerHTML.indexOf("原密码不正确！")!=-1){alert("原密码不正确！");return false;}
}
            
}
                </script>

                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table1">
                    <tr>
                        <td width="90" class="tt">
                            <b>输入密码：</b>
                        </td>
                        <td>
                            <asp:TextBox ID="pold" runat="server" TextMode="Password" MaxLength="20" CssClass="inp1"
                                Width="150" onblur="check_pold()"></asp:TextBox><span id="msg_pold" style="margin-left: 10px"><span
                                    class="msgon">请输入登录密码！</span></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            <b>用户名： </b>
                        </td>
                        <td>
                            <asp:TextBox ID="u" runat="server" MaxLength="20" CssClass="inp1" Width="150" onkeyup="replaceCharLegal(this,this.value,1)"
                                onblur="replaceCharLegal(this,this.value,0);check_u()"></asp:TextBox><span id="msg_u"
                                    style="margin-left: 10px"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            手机号码：
                        </td>
                        <td>
                            <asp:TextBox ID="tel" runat="server" MaxLength="11" CssClass="inp1" 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="inp1" Width="150" onblur="check_qq()"></asp:TextBox><span
                                id="msg_qq" style="margin-left: 10px"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            邮箱：
                        </td>
                        <td>
                            <asp:TextBox ID="email" runat="server" MaxLength="100" CssClass="inp1" Width="300"
                                onblur="check_email()" onfocus="document.getElementById('msg_email').className='';document.getElementById('msg_email').innerHTML=''"></asp:TextBox><span id="msg_email" style="margin-left: 10px"></span>

                            <script type="text/javascript">
                                    if(document.getElementById("email").value==""){document.getElementById("msg_email").className="msgon";document.getElementById("msg_email").innerHTML="建议设置您的管理员邮箱，以便今后忘记密码时可以通过此邮箱找回密码！";}
                            </script>

                        </td>
                    </tr>
                    <tr>
                        <td class="tt">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="ButtonSubmit" runat="server" CssClass="but1" Text="修改" OnClick="ButtonSubmit_Click"
                                OnClientClick="return check()" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <%--main end--%>
    <UC:foot ID="foot1" runat="server" />
    </form>
</body>
</html>
