<%@ Page language="c#" Inherits="Discuz.ForumPage.Admin.usergrid" Codebehind="global_usergrid.aspx.cs" %>
<%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<title>用户列表</title>
		<link href="../styles/datagrid.css" type="text/css" rel="stylesheet">
		
		<link href="../styles/calendar.css" type="text/css" rel="stylesheet">
		<script language="javascript" src="../js/common.js"></script>
        <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet">        
   	    <link href="../styles/modelpopup.css" type="text/css" rel="stylesheet">
		<script type="text/javascript" src="../js/modalpopup.js"></script>
	</head>
	<body>
		<form id="Form1" method="post" runat="server">
		<div class="ManagerForm">
		<fieldset>
		<legend style="background:url(../images/icons/icon32.jpg) no-repeat 6px 50%;">搜索用户</legend>
		<asp:Panel id="searchtable" runat="server"  Visible="true">
				<table id="Table1" class="table1" cellspacing="0" cellPadding="4" width="100%" border="0">
					<tr>
						<td class="td1" width="15%">用 户 名:</td>
						<td class="td1" width="35%">
							<cc1:TextBox id="Username" runat="server" RequiredFieldType="暂无校验" width="200"></cc1:TextBox>
							<br />
							模糊查找 <input id="islike" type="checkbox" value="1" name="cins" runat="server"></td>
						<td class="td2" width="15%">昵 称:</td>
						<td class="td2" width="35%">
							<cc1:TextBox id="nickname" runat="server" RequiredFieldType="暂无校验" width="200"></cc1:TextBox></td>
					</tr>
					<tr>
						<td class="td1">用 户 组:</td>
						<td class="td1">
							<cc1:DropDownList id="UserGroup" runat="server"></cc1:DropDownList>
						</td>
						<td class="td2">Email 包含:</td>
						<td class="td2">
							<cc1:TextBox id="email" runat="server" RequiredFieldType="暂无校验" width="200"></cc1:TextBox>
						</td>
					</tr>
					<tr>
						<td class="td1">用户ID (UID):</td>
						<td class="td1">
							<cc1:TextBox id="uid" runat="server" RequiredFieldType="暂无校验" width="200"></cc1:TextBox><br />格式:1,2,3
							<asp:RegularExpressionValidator 
       id="homephone" runat="SERVER" 
       ControlToValidate="uid" 
       ErrorMessage="输入错误"
       ValidationExpression="^([1-9]*,)*[0-9]*$">
     </asp:RegularExpressionValidator>
						</td>
						<td class="td2">注册日期:</td>
						<td class="td2">
						    从<cc1:Calender id="joindateStart" runat="server" ReadOnly="False" ScriptPath="../js/calendar.js"></cc1:Calender>
							<br />到<cc1:Calender id="joindateEnd" runat="server" ReadOnly="False" ScriptPath="../js/calendar.js"></cc1:Calender>
							<br />使用日期查找<input id="ispostdatetime" type="checkbox" value="1" name="cins" runat="server">
						</td>
					</tr>
					<tr>
						<td class="td1">用户积分:</td>
						<td class="td1">
						    大于或等于:<cc1:TextBox id="credits_start" runat="server" RequiredFieldType="数据校验" size="8" maxlength="9"></cc1:TextBox>
							<br />小于或等于:<cc1:TextBox id="credits_end" runat="server" RequiredFieldType="数据校验" size="8" maxlength="9"></cc1:TextBox>
						</td>
						<td class="td2">最后登陆IP:</td>
						<td class="td2"><cc1:TextBox id="lastip" runat="server" RequiredFieldType="IP地址" width="200"></cc1:TextBox>
						</td>
					</tr>
					<tr>
						<td class="td1">用户发帖数:</td>
						<td class="td1">大于或等于:<cc1:TextBox id="posts" runat="server" RequiredFieldType="数据校验" width="100"></cc1:TextBox>
						</td>
						<td class="td2">用户精华帖数:</td>
						<td class="td2">大于或等于:<cc1:TextBox id="digestposts" runat="server" RequiredFieldType="数据校验" width="100"></cc1:TextBox>
						</td>
					</tr>
					<tr>
					    <td align="center" colspan="4"><cc1:Button ID="Search" runat="server" Text="开始搜索" designtimedragdrop="247"></cc1:Button></td>
					</tr>
				</table>
		</asp:Panel>
		</fieldset>
		</div>
		<br />
		<div style="clear:both;margin:0 auto; width:98%;">
			<table width="100%" align="center" cellpadding=0>	
				<tr>
				<td>
					<input title="选中/取消选中 本页所有Case" onClick="CheckByName(this.form,'uid','no')" type="checkbox" name="chkall" id="chkall">全选/取消全选&nbsp;
					<cc1:Button ID="StopTalk" runat="server" Text=" 禁 言 " designtimedragdrop="247"></cc1:Button>&nbsp;&nbsp;
					<cc1:Button id="DeleteUser" runat="server" Text=" 删 除 "  ButtonImgUrl="../images/del.gif"></cc1:Button>
				</td>
				<td>
					<cc1:checkboxlist id="deltype" runat="server" RepeatColumns="2">
						<asp:ListItem Value="1">删除但保留该用户所发帖子</asp:ListItem>
						<asp:ListItem Value="2">删除但保留该用户已发送的短消息</asp:ListItem>
					</cc1:checkboxlist>
				</td>
				</tr>
			</table>
			<p><cc1:Button ID="ResetSearchTable" runat="server" Text="重设搜索条件" Visible="False"></cc1:Button></p>
		</div>
        <table width="100%">				
          <tr>
             <td width="2px"></td>
             <td>
				<cc1:datagrid id="DataGrid1" runat="server" OnPageIndexChanged="DataGrid_PageIndexChanged" align="center">
					<Columns>
					
					<asp:TemplateColumn HeaderText="选择">
						<ItemTemplate>
						    <%# DataBinder.Eval(Container, "DataItem.uid").ToString()!="1"?"<INPUT id=\"uid\" onclick=\"javascript:SH_SelectOne()\" type=\"checkbox\" value=\""+DataBinder.Eval(Container, "DataItem.uid").ToString() +"\"	name=\"uid\">":""%>
							
						</ItemTemplate>
					</asp:TemplateColumn>
					
					<asp:TemplateColumn HeaderText="">
						<ItemTemplate>
							<a href="#" onclick="javascript:window.location.href='global_edituser.aspx?uid=<%# DataBinder.Eval(Container, "DataItem.uid").ToString()%>&condition=<%=ViewState["condition"]==null?"":Discuz.Common.Utils.HtmlEncode(ViewState["condition"].ToString().Replace("'","~^").Replace("%","~$"))%>';">编辑</a>
						</ItemTemplate>
					</asp:TemplateColumn>
					
					<asp:TemplateColumn HeaderText="">
						<ItemTemplate>
					    	<a href="#" onclick="javascript:window.location.href='global_givemedals.aspx?uid=<%# DataBinder.Eval(Container, "DataItem.uid").ToString()%>&condition=<%=ViewState["condition"]==null?"":Discuz.Common.Utils.HtmlEncode(ViewState["condition"].ToString().Replace("'","~^").Replace("%","~$"))%>';">勋章</a>
						</ItemTemplate>
					</asp:TemplateColumn>
						<asp:BoundColumn DataField="uid" HeaderText="用户ID" Visible="false"></asp:BoundColumn>
						<asp:BoundColumn DataField="username" HeaderText="用户名"></asp:BoundColumn>
						<asp:BoundColumn DataField="grouptitle" HeaderText="所属组"></asp:BoundColumn>
						<asp:BoundColumn DataField="nickname" HeaderText="昵称"></asp:BoundColumn>
						<asp:BoundColumn DataField="posts" HeaderText="发帖数"></asp:BoundColumn>
						<asp:BoundColumn DataField="lastactivity" HeaderText="最后活动时间"></asp:BoundColumn>
						<asp:BoundColumn DataField="joindate" HeaderText="注册时间" DataFormatString="{0:yyyy-MM-dd}"></asp:BoundColumn>
						<asp:BoundColumn DataField="credits" HeaderText="积分"></asp:BoundColumn>
						<asp:BoundColumn DataField="email" HeaderText="邮箱"></asp:BoundColumn>
						
						<asp:BoundColumn DataField="lastvisit" HeaderText="上次访问时间"></asp:BoundColumn>
					</Columns>
				</cc1:datagrid>
				</td>
			</tr>
		</table>			
		</form>
		<%=footer%>
	</body>
</html>
