<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Page language="c#" Codebehind="admin_user.aspx.cs" AutoEventWireup="True" Inherits="Webdisk.admin_user" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>网络硬盘后台管理</title>
		<% @ Import Namespace="Webdisk" %>
		<script type="text/javascript" src="../js/calendar.js"></script>
		<script language="javascript">
   var CalendarWebControl = new atCalendarControl();
		</script>
		<link href="img/main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" language="javascript" src="../js/function.js"></script>
			<style type="text/css">
.style1 { COLOR: #ffffff }
</style>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" id="brb" height="27">
				<tr>
					<td colSpan="3" class="td_title">用户管理（点击表头可升降排序）
					</td>
				</tr>
			</table>
			<asp:datagrid id="DataGrid" runat="server" AutoGenerateColumns="False" PageSize="20" Width="100%"
				AllowSorting="True" CssClass="GridBody" GridLines="None">
				<AlternatingItemStyle CssClass="GridLine"></AlternatingItemStyle>
				<ItemStyle CssClass="GridItem"></ItemStyle>
				<HeaderStyle CssClass="GridHead"></HeaderStyle>
				<Columns>
						<asp:TemplateColumn HeaderText="选择">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<HeaderTemplate>
								<input type="checkbox" name="chkSelect" id="chkSelect" onClick='checkAll();' />
							</HeaderTemplate>
							<ItemTemplate>
								<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"uusername")%>' name=checkbox>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:HyperLinkColumn Text="用户名" DataNavigateUrlField="uusername" DataNavigateUrlFormatString="admin_edituser.aspx?username={0}"
							DataTextField="uusername" SortExpression="uusername" HeaderText="用户名">
							<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:HyperLinkColumn>
						<asp:BoundColumn DataField="regdate" SortExpression="regdate" HeaderText="注册时间" DataFormatString="{0:yyyy-MM-dd}">
							<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:TemplateColumn HeaderText="到期时间" SortExpression="enddate">
							<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# showsj(DataBinder.Eval(Container, "DataItem.enddate", "{0:yyyy-MM-dd}").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn DataField="level" SortExpression="[level]" HeaderText="等级">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:BoundColumn DataField="spacetotal" SortExpression="spacetotal" HeaderText="已用空间">
							<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:BoundColumn>
						<asp:TemplateColumn HeaderText="锁定" SortExpression="ulock">
							<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label id=Label1 runat="server" Text='<%# showlock(DataBinder.Eval(Container, "DataItem.ulock").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn HeaderText="已审" SortExpression="umark">
							<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# showsh(DataBinder.Eval(Container, "DataItem.umark").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:HyperLinkColumn Text="编辑" DataNavigateUrlField="uusername" DataNavigateUrlFormatString="admin_edituser.aspx?username={0}"
							HeaderText="编辑">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:HyperLinkColumn>
						<asp:HyperLinkColumn Text="管理" Target="_blank" DataNavigateUrlField="uusername" DataNavigateUrlFormatString="../ContentPane.aspx?admin=1&amp;username={0}"
							HeaderText="文件">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:HyperLinkColumn>
				</Columns>
				<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
			</asp:datagrid>
			<div align="center">
				
				<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
					<tr>
					  <td height="25"><webdiyer:AspNetPager id="Pager" runat="server" PageSize="20" AlwaysShow="True" ShowCustomInfoSection="Left"
					NumericButtonCount="15" HorizontalAlign="Right" ShowBoxThreshold="21" FirstPageText="<font face=webdings>9</font>"
					PrevPageText="<font face=webdings>3</font>" NextPageText="<font face=webdings>4</font>" LastPageText="<font face=webdings>:</font>"
					Height="20px" CssClass="page" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
				  </tr>
					<tr>
						<th height="25">
							操作区</th>
					</tr>
					<tr>
						<td align="center"><strong>查找用户：</strong>
							<asp:textbox id="key" runat="server" CssClass="tableTdtext"></asp:textbox>
							&nbsp;&nbsp;
							<asp:button id="Button2" runat="server" Width="50px" class="formbutton" Text="查找" onclick="Button2_Click"></asp:button>
							<STRONG>（请输入用户名）
								<asp:CheckBox id="mo" runat="server" Text="模糊查找"></asp:CheckBox>
								<br>
								<br>
							</STRONG>
							<DIV align="center">勾选记录：
								<asp:button id="btnlock" runat="server" Width="50px" class="formbutton" Text="锁定" onclick="btnlock_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btnunlock" runat="server" Width="50px" class="formbutton" Text="解锁" onclick="btnunlock_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btnmark" runat="server" Width="50px" class="formbutton" Text="审核" onclick="btnmark_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btnunmark" runat="server" Width="50px" class="formbutton" Text="未审" onclick="btnunmark_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btndelete" runat="server" Width="50px" class="formbutton" Text="删除" onclick="btndelete_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btnclear" runat="server" Width="50px" class="formbutton" Text="清空" onclick="btnclear_Click"></asp:button>
								&nbsp;&nbsp;
								<asp:button id="btnsend" runat="server" Width="87px" class="formbutton" Text="发短信/邮件" onclick="btnsend_Click"></asp:button>
								<asp:Panel id="Panel1" runat="server" Visible="False">
									<DIV align="center"><BR>
										标题： <INPUT class="tableTdtext" id="title" type="text" name="Title" 
                                            runat="server">
										<asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" ErrorMessage="请输入标题" Display="None"
											EnableViewState="False" ControlToValidate="Title"></asp:RequiredFieldValidator></DIV>
									<DIV align="right">
										<DIV align="right">
											<DIV align="center">内容： <TEXTAREA class="tableTdtext" id="Content" name="Content" rows="7" cols="50" runat="server"></TEXTAREA>
												<asp:RequiredFieldValidator id="RequiredFieldValidator6" runat="server" ErrorMessage="请输入内容" Display="None"
													EnableViewState="False" ControlToValidate="Content"></asp:RequiredFieldValidator></DIV>
										</DIV>
										<DIV align="center"><INPUT class="formbutton" id="sendsms" type="submit" value="发短信" name="sendsms" runat="server" onserverclick="sendsms_ServerClick">
											&nbsp;&nbsp; <INPUT class="formbutton" id="sendmail" type="submit" value="发邮件" name="sendmail" runat="server" onserverclick="sendmail_ServerClick">
											&nbsp;&nbsp;
											<asp:button id="Button12" runat="server" CssClass="formbutton" Width="70px" Text="取消发送" CausesValidation="False" onclick="Button12_Click"></asp:button>
											<asp:ValidationSummary id="ValidationSummary2" runat="server" ShowSummary="False" ShowMessageBox="True"
												DisplayMode="List"></asp:ValidationSummary></DIV>
									</DIV>
								</asp:Panel>
						  </DIV>
							<p><br>
							等级：
							  <asp:DropDownList ID="level" runat="server"></asp:DropDownList>
&nbsp;&nbsp;
							<asp:Button ID="Button3" runat="server" Width="70px" class="formbutton" Text="修改等级" onclick="Button3_Click"></asp:Button>
							<br>
							<br>
							有效期至：
							<asp:TextBox ID="enddate" runat="server" CssClass="tableTdtext"></asp:TextBox>
&nbsp;&nbsp;
							<asp:Button ID="Button6" runat="server" Width="80px" class="formbutton" Text="修改有效期" onclick="Button6_Click"></asp:Button>
						  （不填修改为不限）</p>
							<p>有效期增加：
                              <asp:TextBox ID="enddate2" runat="server" CssClass="tableTdtext" Columns="5"></asp:TextBox>
天 &nbsp;&nbsp;
<asp:Button ID="Button" runat="server" Width="80px" class="formbutton" Text="修改有效期" onclick="Button_Click"></asp:Button>
<br>
						      <br>
						      <asp:CheckBox ID="all" runat="server" Text="以上操作对列出的所有页用户都生效（不选此项则仅对勾选的用户生效）"></asp:CheckBox>
						      <input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">
					        </p></td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</HTML>
