<%@ page language="C#" autoeventwireup="true" inherits="use.WebAdmin_UserEdit, LebiMall" %>
<!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 id="Head1" runat="server">
    <title>修改会员信息</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script type="text/javascript">
        function validate(){
            var flag=true;
            var sel=document.getElementById("Select1").value;
            var sel2=document.getElementById("Select2").value;
            if(sel==sel2){
                flag=false;
                document.getElementById("msg_sub").innerHTML="密保提示问题不能相同";
                document.getElementById("msg_sub").style.visibility="visible";
            }
            if(document.getElementById("txt_uname").value==""){
                document.getElementById("msg_uname").innerHTML="<span  class='msg_submit'>姓名不能为空！</span>"
                flag=false;
            }else{
                document.getElementById("msg_uname").innerHTML="";
            }
            if(document.getElementById("txt_ubirthday").value==""){
                document.getElementById("msg_birthday").innerHTML="<span  class='msg_submit'>生日不能为空！</span>"
                flag=false;
            }else{
                document.getElementById("msg_birthday").innerHTML="";
            }
            return flag;
        }
        function onshow(){
            document.getElementById("msg_username").innerHTML="";
        }
        function changeStatus(_value){
            if(_value == "学生"){
                document.getElementById("tr_Status").style.visibility = "visible";
                document.getElementById("tr_Status").style.position = "relative";
                document.getElementById("td_Status").innerHTML = "学 校：";
            }else if(_value == "上班族"){
                document.getElementById("tr_Status").style.visibility = "visible";
                document.getElementById("tr_Status").style.position = "relative";
                document.getElementById("td_Status").innerHTML = "单 位：";
            }else{
                document.getElementById("tr_Status").style.visibility = "visible";
                document.getElementById("tr_Status").style.position = "relative";
                document.getElementById("td_Status").innerHTML = "其 他：";
            }
         }
         function resizeEditor2(name,size) {   
	        var newheight = parseInt(document.getElementById(name).style.height) + size;
	        if(newheight >= 60) {   
		        document.getElementById(name).style.height = newheight + 'px';   
	        }   
         }
         function maxCount(){
            var tt=document.getElementById("txt_Introduce");

            if(tt.value.length>400){
                tt.value=tt.value.substring(0, 400);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <script>header(4,0,"images/");</script>
        <div class="blank clearfix">
        </div>
        <script type="text/javascript">
            var $=jQuery;
            var f="<%=returnValue %>";
            var i=2;
            if(f=="true"){
                tipsWindown('操作结果','text:操作成功！','250','100','true','2000','true','text');
                setInterval("fun()", 1000);
            }
            if(f=="false"){
                tipsWindown('操作结果','text:操作失败！','250','100','true','2000','true','text');
            }
            function fun() {
                if (i == 1) {
                    window.location.href="UserList.aspx?page="+<%=page %>;
                }
                i--;
            }
        </script>
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="UserList.aspx"><span>会员管理</span></a></li>
                <li class="current"><a href="UserEdit.aspx"><span>会员编辑</span></a></li>                
                <li><a href="UserAdd.aspx"><span>会员添加</span></a></li>
                <li><a href="UserSelect.aspx"><span>会员查询</span></a></li>
            </ul>
        </div>
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix">
                    <div style="float: left;">
                        <asp:Button ID="Button2" runat="server" CssClass="btn-app" OnClick="Button1_Click" OnClientClick="return validate();" />
                        <input type="image" title=" 重填 " onClick="reset();return false;" src="images/bt_res.gif" align="absmiddle" />
                        <input type="image" title=" 返回 " onclick="history.back();return false;" src="images/bt_bak.gif" align="absmiddle" />
                    </div>
                    <div style="float: right;">
                    </div>
                </div>
                <div id="datalist">
                <table cellspacing="0" width="100%" cellpadding="0" id="list">
                <tr>
                    <th>修改会员信息</th><th><span class="title_r" id="msg_sub"></span></th>
                </tr>
                <tr>
                    <td style="width:15%">
                        用户名：
                    </td>
                    <td style="width:85%">
                        <%=ds.Tables[0].Rows[0]["username"] %>
                    </td>
                </tr>
                <tr>
                    <td style="height: 26px">
                        密 码：
                    </td>
                    <td style="height: 26px">
                        <input type=password runat=server id="txt_pwd" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        真实姓名：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_uname" class="input" />&nbsp;<span id="msg_uname"></span>
                    </td>
                </tr>
                <tr>
                    <td>
                        性 别：
                    </td>
                    <td>
                        <input id="Radio1" type="radio" runat=server />男<input id="Radio2" type="radio" runat=server />女
                    </td>
                </tr>
                <tr>
                    <td>
                        生 日：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_ubirthday" class="texttime" style="width:100px;"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',skin:'whyGreen',autoPickDate:'null'})" />&nbsp;<span id="msg_birthday"></span>
                    </td>
                </tr>
                <tr>
                    <td>
                        密保提示问题1：
                    </td>
                    <td>
                        <select id="Select1" runat="server">
                            <option>您父亲的名字是?</option>
                            <option>您母亲的名字是?</option>
                            <option>您配偶的名字是?</option>
                            <option>您的出生地是?</option>
                            <option>您高中班主任的名字是?</option>
                            <option>您初中班主任的名字是?</option>
                            <option>您小学班主任的名字是?</option>
                            <option>您的小学校名是?</option>
                            <option>您的学号（或工号）是?</option>
                            <option>您父亲的生日是?</option>
                            <option>您母亲的生日是?</option>
                            <option>您配偶的生日是?</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        答 案1：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_da1" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        密保提示问题2：
                    </td>
                    <td>
                       <select id="Select2" runat="server">
                            <option>您父亲的名字是?</option>
                            <option>您母亲的名字是?</option>
                            <option>您配偶的名字是?</option>
                            <option>您的出生地是?</option>
                            <option>您高中班主任的名字是?</option>
                            <option>您初中班主任的名字是?</option>
                            <option>您小学班主任的名字是?</option>
                            <option>您的小学校名是?</option>
                            <option>您的学号（或工号）是?</option>
                            <option>您父亲的生日是?</option>
                            <option>您母亲的生日是?</option>
                            <option>您配偶的生日是?</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        答 案2：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_da2" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        身 份：
                    </td>
                    <td>
                        <select id="txt_status" runat="server" onchange="changeStatus(this.value);">
                            <option>学生</option>
                            <option>上班族</option>
                            <option>其他</option>
                        </select>
                    </td>
                </tr>
                <tr id="tr_Status">
                    <td id="td_Status">
                        学 校：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_ucompany" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        籍 贯：
                    </td>
                    <td>
                       <select id="hw_1" runat="server" name="hw_1" onchange="hw_select()">
                       </select>
                       <select id="hw_2" runat="server" name="hw_2" onchange="hw_select()">
                       </select>
                       <input type="hidden" id="hidd_diqu" runat="server" />
                       <script type="text/javascript" src="../images/js/area1.js"></script>
                    </td>
                </tr>
                <tr>
                    <td>
                        所在地：
                    </td>
                    <td>
                        <select id="hw_3" runat="server" name="hw_3" onchange="hw_select2()">
                        </select>
                        <select id="hw_4" runat="server" name="hw_4" onchange="hw_select2()">
                        </select>
                        <input type="hidden" id="hidd_diqu2" runat="server" />
                        <script type="text/javascript" src="../images/js/area2.js"></script>
                    </td>
                </tr>
                <tr>
                    <td>
                        所在小区：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_address" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        个人介绍：
                    </td>
                    <td>
                        <textarea id="txt_Introduce" cols="60" style="height:60px;" class="input-textarea" runat=server></textarea>&nbsp;&nbsp;<em>少于400字</em><br />
                        <a href="javascript:resizeEditor2('txt_Introduce',-20)"><img src="images/bt_close.gif" border='0'></a>
                        <a href="javascript:resizeEditor2('txt_Introduce',20)"><img src="images/bt_open.gif" border='0'></a>
                    </td>
                </tr>
                <tr>
                    <td>
                        邮箱 ：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_email" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        手 机：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_cellphone" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        固定电话：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_tel" class="input" />
                    </td>
                </tr>
                <tr>
                    <td>
                        QQ：
                    </td>
                    <td>
                        <input type=text runat=server id="txt_otherstyle" class="input" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="list-foot">
                        <asp:Button ID="Button1" runat="server" CssClass="btn-app" OnClick="Button1_Click" OnClientClick="return validate();" />
                        <input type="image" title=" 重填 " onClick="reset();return false;" src="images/bt_res.gif" align="absmiddle" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">tdshowm("list");
                    document.getElementsByName("hw_1")[0].value = "<%=this.hw1 %>";
                    hw_select();
                    document.getElementsByName("hw_2")[0].value = "<%=this.hw2 %>";
                    document.getElementsByName("hw_3")[0].value = "<%=this.hw3 %>";
                    hw_select2();
                    document.getElementsByName("hw_4")[0].value = "<%=this.hw4 %>";
                    document.getElementById("hidd_diqu").value = "<%=this.hw1 %>,<%=this.hw2 %>";
                    document.getElementById("hidd_diqu2").value = "<%=this.hw3 %>,<%=this.hw4 %>";
                </script>
            </div>
        </div>
    </form>
</body>
</html>
