<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Page CodeBehind="admin_share_dir.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.sharemanage" %>
<% @ Import Namespace="Webdisk" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>共享管理</title>
		<link href="img/main.css" rel="stylesheet" type="text/css">
		<style type="text/css">
.style1 { FONT-WEIGHT: bold; COLOR: #ffffff }
		</style>
<script type="text/javascript" language="javascript" src="../js/function.js"></script>
	</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>
		  <div align="center">
				<asp:datagrid id="DataGrid" runat="server"
					AutoGenerateColumns="False" Width="100%" PageSize="20" CssClass="GridBody" GridLines="None"
					AllowSorting="True">
				<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" id="CheckBox2" onClick="checkAll()">
							</HeaderTemplate>
							<ItemTemplate>
								<INPUT id=chkSelect onclick=AddRemoveValues(this) type=checkbox value='<%#DataBinder.Eval(Container.DataItem,"id")%>' name=checkbox>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
						<asp:TemplateColumn SortExpression="dirname" HeaderText="共享目录">
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# ShowDirName(DataBinder.Eval(Container, "DataItem.username").ToString(),DataBinder.Eval(Container, "DataItem.postion").ToString(),DataBinder.Eval(Container, "DataItem.dirname").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:HyperLinkColumn Text="用户名" DataNavigateUrlField="username" DataNavigateUrlFormatString="admin_edituser.aspx?username={0}"
							DataTextField="username" SortExpression="username" HeaderText="用户名">
							<HeaderStyle HorizontalAlign="Center" Width="15%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
						</asp:HyperLinkColumn>
						<asp:TemplateColumn SortExpression="share" HeaderText="共享类型">
							<HeaderStyle HorizontalAlign="Center" Width="20%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# showtype(DataBinder.Eval(Container, "DataItem.Share").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn SortExpression="[top]" HeaderText="固顶">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label id=Label1 runat="server" Text='<%# showtop(DataBinder.Eval(Container, "DataItem.top").ToString()) %>'>
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
						<asp:TemplateColumn SortExpression="good" HeaderText="精华">
							<HeaderStyle HorizontalAlign="Center" Width="5%"></HeaderStyle>
							<ItemStyle HorizontalAlign="Center"></ItemStyle>
							<ItemTemplate>
								<asp:Label runat="server" Text='<%# showtop(DataBinder.Eval(Container, "DataItem.good").ToString()) %>' ID="Label2">
								</asp:Label>
							</ItemTemplate>
						</asp:TemplateColumn>
					</Columns>
					<PagerStyle PageButtonCount="20" Mode="NumericPages"></PagerStyle>
  </asp:datagrid>
				<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>
                      <asp:Button ID="Button2" runat="server" class="formbutton" Width="50px" Text="查找" onclick="Button2_Click"></asp:Button>
                    <input id="HdnSelectedValues" type="hidden" name="HdnSelectedValues" runat="server">
                    <br>
                    <br>
                    勾选记录：
                    <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" BorderStyle="Solid" Text="解固" class="formbutton" onclick="btnunlock_Click"></asp:Button>
&nbsp;&nbsp;
<asp:Button ID="btnmark" runat="server" Width="50px" Text="精华" class="formbutton" 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="btncancel" runat="server" Width="50px" class="formbutton" Text="取消" onclick="btndelete_Click"></asp:Button>
&nbsp;&nbsp;
<asp:Button ID="btndel" runat="server" Width="50px" class="formbutton" Text="删除" onclick="btndel_Click"></asp:Button></td>
                  </tr>
                </table>
			</div>
		</form>
	</body>
</HTML>
