<%@ Page language="c#" Codebehind="MemberAdd.aspx.cs" AutoEventWireup="true" enableEventValidation="false" Inherits="XpShop.Manage.MemberAdd" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>MemberAdd</title>
		<script type="text/javascript" src="inc/commond.js"></script>
		<script src="inc/jquery.validate.js" type="text/javascript"></script>
	    <script src="inc/messages_cn.js" type="text/javascript"></script>		
	    <script src="inc/memberAdd.js" type="text/javascript"></script>
		<script type="text/javascript">
		    //20110105 add by liwenhai
//		    $(document).ready(function(){
//	           setInterval(function(){
//                   $('div.sub_container_page').css('top',$(window.parent.frames.right).height()-$('div.sub_container_page').height()); //设置底部分页区域的位置
//                   $('div.sub_container_content').css('height',$(window.parent.frames.right).height()-$('div.sub_container_title').height()-$('div.sub_container_operation').height()-$('div.sub_container_listhead').height()-$('div.sub_container_page').height()-10); //设置内容区域的高度
//                },1000);
//		    $(document).ready(function(){
//				setInterval(function(){
//				    if(getQueryStringRegExp('from') != 'list'){
//						    $('div.sub_container_content').css('height',$(window.parent.frames.right).height()-$(".sub_container_title").height()-10); //设置内容区域的高度
//				    }else{//从列表页面链接过来修改
//						    var windowHeight = $('#frmHeight',window.parent.document).val();
//						    $('div.sub_container_content').css('height',windowHeight-$(".sub_container_title").height()-10); //设置内容区域的高度
//					    }
//				    },1000);
//		        $('#btnShowTxt').toggle(function(){
//		            $('#modify').show();
//		            $(this).val('取消');
//		        },function(){
//		            $('#modify').hide();
//		            $('#txtChangeScore').val('0');
//		            $(this).val('修改积分');
//		        });
//		        
//		        $('#txtChangeScore').blur(function(){
//		            var reg = new RegExp("^[1-9]\\d*$");
//		            var value = $(this).val().Trim();
//		            if(parseInt($(this).val().Trim())>2147483647){
//		                alert("积分太大");
//		                $(this).focus();
//		                return false;
//		            }
//		            if(!reg.test(value)){
//		                alert('积分填写有误');
//		                $(this).focus();
//		                return false;
//		            };
//		        });
//				
//				
//				$('#btnShowTxtS').toggle(function(){
//		            $('#modifyS').show();
//		            $(this).val('取消');
//		        },function(){
//		            $('#modifyS').hide();
//		            $('#txtChangeSpending').val('0');
//		            $(this).val('修改积分');
//		        });
//		        
//		        $('#txtChangeSpending').blur(function(){
//		            CheckMoney($(this));
//		        });				
//		        
//		        if('<%=Request.QueryString["from"] %>' == 'list'){
//		            $('#btnCancel').click(function(){
//		                $('#frmModify',window.parent.document).hide().siblings(':not("#loadingContainer")').show();
//                        window.parent.BindList();
//                        return false;
//		            });
//		        };
//				
//				function CheckMoney(obj){
//					var dot = 0;//小数点个数
//					var tmp = obj.val();
//					while(tmp.indexOf('.') != -1){
//						dot += 1;
//						tmp = tmp.replace('.','_');
//					};
//					var reg = new RegExp(/[^\d\.]/g);
//		            if(parseInt($(obj).val().Trim())>2147483647){
//		                alert("消费金额太大");
//		                obj.focus();
//		                return false;
//		            }
//					if(reg.test(obj.val()) || obj.val().Trim() == '' || dot > 1){
//						alert('消费金额填写错误');
//						obj.focus();
//						return false;
//					};
//				}
//		        
//		        function checkLoginStatus(data){
//                    var result = true;
//                    if(data.indexOf('<!DOCTYPE') != -1){
//                        result = false;
//                        alert('身份已过期,请重新登陆!');
//                    };
//                    return result;
//                };
//		        
//		        $('#ddlTopAreas').change(function(){
//                    $('#ddlSubAreas').remove();$('#ddlThirdAreas').remove();
//                    if($(this).val() == '0'){return false;};
//                    var areas = $('#hideAddressIDs').val().split(',');
//                    $.ajax({
//                        url:'Actions.aspx?Nocopyright=1&Action=GetSubArea&ParentID=' + $('#ddlTopAreas').val(),
//                        cache:false,
//                        success:function(data){
//                            if(!checkLoginStatus(data)){return false;}//是否要重新登陆
//                            var objSubArea = $('<select id="ddlSubAreas" name="ddlSubAreas" class="searchvalue"></select>');
//                            objSubArea.html(data);
//                            objSubArea.insertAfter($('#ddlTopAreas'));
//                            if(areas[1]){objSubArea.val(areas[1])};
//                            objSubArea.change(function(){
//                                $('#ddlThirdAreas').remove();
//                                if($(this).val() == '0'){return false;};
//                                $.ajax({
//                                    url:'Actions.aspx?Nocopyright=1&Action=GetSubArea&ParentID=' + $('#ddlSubAreas').val(),
//                                    cache:false,
//                                    success:function(data){
//                                        if(!checkLoginStatus(data)){return false;}//是否要重新登陆
//                                        var objthirdarea = $('<select id="ddlThirdAreas" name="ddlThirdAreas" class="searchvalue"></select>');
//                                        objthirdarea.html(data).insertAfter($('#ddlSubAreas'));
//                                        if(areas[2]){objthirdarea.val(areas[2])};
//                                    },error:function(){}
//                                });
//                            }).change();
//                        },error:function(){alert('get address error');}
//                    });//end ajax
//                }).change();//end change
//		    });//end ready

		</script>
	</HEAD>
	<body>
	    <div class="container">
		    <div class="sub_container">
		    <div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" /><asp:label id="lbTitle2" Runat="server" CssClass="tableHeaderText">会员添加</asp:label></div>
		    <div class="sub_container_content">
		    <form id="Form1" method="post" runat="server">
		        <div class="frame">
		            <div class="frame_title"><asp:label id="lbTitle" Runat="server" CssClass="tableHeaderText">会员添加</asp:label></div>
		            <div class="frame_content">
			            <table class="ptable" cellspacing="0" cellpadding="0" style="zoom:1;">
				            <tr>
					            <th class="tl">用户名：
					            </th>
					            <td class="tr"><asp:textbox id="txtName" runat="server" Size="20" MaxLength="50"></asp:textbox><FONT color="red">*</FONT></td>
				            </tr>
				            <tr>
					            <th class="tl">密 码：
					            </th>
					            <td class="tr"><asp:textbox id="txtPassword" runat="server" Size="20" MaxLength="50"></asp:textbox><FONT color="red">*</FONT></td>
				            </tr>
				            <tr>
					            <th class="tl">密 码(确认)：
					            </th>
					            <td class="tr"><asp:textbox id="txtPassword2" runat="server" Size="20" MaxLength="50"></asp:textbox><FONT color="red">*</FONT></td>
				            </tr>
				            <tr>
					            <th class="tl">e-mail：
					            </th>
					            <td class="tr"><asp:textbox id="txtEmail" runat="server" Size="20" MaxLength="80"></asp:textbox><FONT color="red">*</FONT>
						            <br>
						            <asp:checkbox id="cbxHideEmail" runat="server" Text="是否接收本站的Email信息" Checked="True" Visible="false"></asp:checkbox></td>
				            </tr>
				            <tr style="display:none;">
					            <th class="tl">找回密码问题：
					            </th>
					            <td class="tr"><asp:textbox id="txtQuestion" runat="server" Size="50" MaxLength="100"></asp:textbox><FONT color="red">*</FONT></td>
				            </tr>
				            <tr style="display:none;">
					            <th class="tl">找回密码答案：
					            </th>
					            <td class="tr"><asp:textbox id="txtAnswer" runat="server" Size="50" MaxLength="100"></asp:textbox><FONT color="red">*</FONT></td>
				            </tr>
				            <tr>
					            <th class="tl">积分：</th>
					            <td class="tr">
					                <asp:textbox id="txtScore" runat="server" Size="20" MaxLength="100" ReadOnly="true">0</asp:textbox><FONT color="red">*</FONT>
					                <input type="button" id="btnShowTxt" name="btnShowTxt" value="修改积分" class="inputbtn" />
					                <span id="modify" style="display:none;">
					                    <input type="radio" id="rbMode_1" name="rbMode" value="1" checked="checked" /><label for="rbMode_1">加</label>
					                    <input type="radio" id="rbMode_2" name="rbMode" value="0" /><label for="rbMode_2">减</label>
					                    <input type="text" id="txtChangeScore" name="txtChangeScore" value="0" />(填写增加或减少的数值)
					                </span>
    					            
					            </td>
				            </tr>
							<tr>
					            <th class="tl">消费金额：</th>
					            <td class="tr">
					                <asp:textbox id="txtSpending" runat="server" Size="20" MaxLength="100" ReadOnly="true">0</asp:textbox><FONT color="red">*</FONT>
					                <input type="button" id="btnShowTxtS" name="btnShowTxtS" value="修改消费额" class="inputbtn" />
					                <span id="modifyS" style="display:none;">
					                    <input type="radio" id="rbModeS_1" name="rbModeS" value="1" checked="checked" /><label for="rbModeS_1">加</label>
					                    <input type="radio" id="rbModeS_2" name="rbModeS" value="0" /><label for="rbModeS_2">减</label>
					                    <input type="text" id="txtChangeSpending" name="txtChangeSpending" value="0" />(填写增加或减少的数值)
					                </span>
    					            
					            </td>
				            </tr>
				            <tr>
					            <th class="tl">所属会员组：</th>
					            <td class="tr"><asp:dropdownlist id="ddlGroup" runat="server"></asp:dropdownlist></td>
				            </tr>
                            <tr>
					            <th class="tl">会员来源类型：</th>
					            <td class="tr"><asp:dropdownlist id="ddlFrom" runat="server">
					                <asp:ListItem Value="0">网上注册</asp:ListItem>
					                <asp:ListItem Value="1">电话注册</asp:ListItem>
					                <asp:ListItem Value="2">会员推荐</asp:ListItem>
					                <asp:ListItem Value="3">其它推广方式</asp:ListItem>
					            </asp:dropdownlist></td>
				            </tr>
							<tr>
					            <th class="tl">推荐人：
					            </th>
					            <td class="tr"><asp:textbox id="txtCmd" runat="server" Size="20" MaxLength="20"></asp:textbox></td>
				            </tr>
				            <tr>
					            <th class="tl">固定电话：
					            </th>
					            <td class="tr"><asp:textbox id="txtPhone" runat="server" Size="20" MaxLength="20"></asp:textbox></td>
				            </tr>
				            <tr>
					            <th class="tl">手机：
					            </th>
					            <td class="tr"><asp:textbox id="txtMobile" runat="server" Size="20" MaxLength="20"></asp:textbox></td>
				            </tr>
				            <tr>
					            <th class="tl">QQ：
					            </th>
					            <td class="tr"><asp:textbox id="txtQQ" runat="server" Size="20" MaxLength="20"></asp:textbox></td>
				            </tr>
				            <tr>
					            <th class="tl">MSN：
					            </th>
					            <td class="tr"><asp:textbox id="txtMSN" runat="server" Size="20" MaxLength="100"></asp:textbox></td>
				            </tr>
							<tr>
								<th class="tl">姓名：</th>
								<td class="tr">
									<asp:TextBox id="txtRealName" MaxLength="20" Size="20" runat="server" />
								</td>
							</tr>
							<tr>
								<th class="tl">
									性别：</th>
								<td class="tr">
									<asp:RadioButtonList id="rblSex" runat="server" RepeatDirection="Horizontal">
										<asp:ListItem Value="1" Selected="True">男</asp:ListItem>
										<asp:ListItem Value="0">女</asp:ListItem>
									</asp:RadioButtonList></td>
							</tr>
							<tr>
								<th class="tl">
									出生日期：
								</th>
								<td class="tr"><asp:textbox id="txtBirthday" runat="server" Size="20" MaxLength="20"></asp:textbox>(格式:1990-1-1)</td>
							</tr>
							<tr>
								<th class="tl">
									地区：</th>
								<td class="tr">
									<asp:DropDownList id="ddlTopAreas" runat="server"><asp:ListItem Value="0">选择地区</asp:ListItem></asp:DropDownList>
									<asp:DropDownList id="ddlSubAreas" runat="server"><asp:ListItem Value="0">选择地区</asp:ListItem></asp:DropDownList>
									<asp:dropdownlist id="ddlThirdAreas" runat="server"><asp:ListItem Value="0">选择地区</asp:ListItem></asp:dropdownlist>
									<input type="hidden" id="hideAddressIDs" name="hideAddressIDs" runat="server" />
								</td>
							</tr>
							<tr>
								<th class="tl">
									详细地址：
								</th>
								<td class="tr"><asp:textbox id="txtAddress" runat="server" Size="60" MaxLength="255"></asp:textbox></td>
							</tr>
							<tr>
								<th class="tl">
									邮政编码：
								</th>
								<td class="tr"><asp:textbox id="txtPostCode" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
							</tr>
				            <tr>
				                <th class="tl">状态</th>
				                <td class="tr">
					                <asp:RadioButtonList runat="server" ID="rblStatus" RepeatDirection="horizontal">
					                    <asp:ListItem Text="正常" Value="1" Selected="true"></asp:ListItem>
					                    <asp:ListItem Text="禁用" Value="0"></asp:ListItem>
					                </asp:RadioButtonList>
				                </td>
				            </tr>
				            <tr>
					            <th class="tl">
					            </th>
						        <td class="tr">    
						        <asp:button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:button>
						        <asp:button id="btnCancel" OnClick="btnCancel_Click" runat="server" Text="取消" CausesValidation="False" CssClass="inputbtn"></asp:button></td>
				            </tr>
			            </table>
		            </div>
	            </div>
		    </form>
		    </div>
		    </div>
		</div>
	</body>
</HTML>
