<%@ Page language="c#" Codebehind="Member.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Admin.Member" %>
<!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>Member</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script language="javascript">
			function CheckDelBox(box)    
			{
					for (var i=0;i<document.Form1.elements.length;i++)
				{
					var e = document.Form1.elements[i];
					if ( (e.type=='checkbox') )
					{
						var o=e.name.lastIndexOf('deleteCheckbox');
			            
						if(o!=-1)
						{
							e.checked = box.checked;
						}
					}
				}
			}
		</script>
	</HEAD>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="../default.aspx" target="_blank">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />会员列表</div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title">会员管理</div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				        <tr>
					        <td align="center">搜索：
						        <asp:TextBox id="txtKeyword" runat="server"></asp:TextBox>
						        <asp:DropDownList id="ddlSearch" runat="server">
							        <asp:ListItem Value="0">选择搜索条件</asp:ListItem>
							        <asp:ListItem Value="Name">会员帐户</asp:ListItem>
							        <asp:ListItem Value="Realname">真实姓名</asp:ListItem>
							        <asp:ListItem Value="Email">电子邮件</asp:ListItem>
							        <asp:ListItem Value="QQ">QQ号码</asp:ListItem>
						        </asp:DropDownList>
						        <asp:DropDownList id="ddlGroup" runat="server"></asp:DropDownList>
						        <asp:Button id="btnSearch" runat="server" Text="GO"></asp:Button></td>
				        </tr>
				        <tr>
					        <td class="forumRowHighlight" height="23">
						        <asp:Button id="btnDelete" runat="server" Text="删除会员"></asp:Button>
						        <asp:datagrid id="dgList" runat="server" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							        Width="100%" DataKeyField="MemberID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages"
							        AllowPaging="True" PageSize="15">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn>
									        <HeaderTemplate>
										        <input type="checkbox" id="checkDel" onclick="CheckDelBox(this)" />
									        </HeaderTemplate>
									        <ItemTemplate>
										        <asp:CheckBox id="deleteCheckbox" runat="server" AutoPostBack="False"></asp:CheckBox>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="会员帐户">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"Name")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="真实姓名">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"RealName")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="手机">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"Mobile")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>								        
								        <asp:TemplateColumn HeaderText="地址">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem,"Address").ToString()==",,," ? "" : DataBinder.Eval(Container.DataItem,"Address").ToString().Replace(",","")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="电子邮件">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"Email")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="QQ号码">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"QQ")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="积分">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"Score")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="注册时间">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%#DataBinder.Eval(Container.DataItem,"AddDate","{0:d}")%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="有效">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href="#" onclick='ChangeMemberStatus(<%# DataBinder.Eval(Container.DataItem, "MemberID") %>)'>
											        <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "Status")%>.png' border="0"></a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='MemberAdd.aspx?MemberID=<%#DataBinder.Eval(Container.DataItem,"MemberID")%>'>
											        修改</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="60px"></ItemStyle>
									        <ItemTemplate>
										        <a href='MemberPassModify.aspx?MemberName=<%#DataBinder.Eval(Container.DataItem,"Name")%>'>
											        密码重设</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('真的要删除吗？')&quot;&gt;删除&lt;/div&gt;"
									        CommandName="Delete">
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
						        <input id="funcID" type="hidden" value="0" name="funcID" runat="server">
						        <asp:linkbutton id="ChangeMemberStatus" onclick="ChangeMemberStatus_Click" Runat="server"></asp:linkbutton>
						        <script language="javascript">
				        function ChangeMemberStatus(MemberID)
				        {
					        document.Form1.funcID.value = MemberID;
					        __doPostBack('ChangeMemberStatus','');
				        }
						        </script>
						        <TABLE cellSpacing="0" cellPadding="0" width="100%" align="center" id="tablePage">
							        <TR>
								        <TD vAlign="middle">
									        <asp:label id="lblPager" Runat="server"></asp:label></TD>
								        <TD vAlign="middle" align="right"><INPUT id="controlID" type="hidden" name="controlID" runat="server">
									        <asp:textbox id="txtPage" Runat="server" Width="30px" BorderWidth="1px" BackColor="White" BorderColor="Black"></asp:textbox>&nbsp;&nbsp;
									        <asp:button id="btnJump" Runat="server" Text=" Go "></asp:button></TD>
							        </TR>
						        </TABLE>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
