<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager" %>
<%@ Page CodeBehind="allfolder.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Webdisk.allfolder" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
		<% @ Import Namespace="Webdisk" %>
		<link href="<%=xml.GetStyle()%>" rel="stylesheet" type="text/css">
<script language="javascript">
function over(obj){
obj.className=(obj.className == "GridMove" ? "GridItem" : "GridMove")
}
function getUrlParam(paramName){	
	var s=location.search;
	if(s!=null){
	var sarr=s.substr(1).split("&");
	var tarr;
	for(i=0;i<sarr.length;i++){
	tarr=sarr[i].split("=");
	if(tarr.length==2&&tarr[0].toLowerCase()==paramName){
	return tarr[1];
	}
	}
	return "";
	}
}
function gosearch()
{
	var str="";
	if ((getUrlParam('type')!=null) && (getUrlParam('type')!="")) str="&type="+getUrlParam('type');
	if ((getUrlParam('asc')!=null) && (getUrlParam('asc')!="")) str=str+"&asc="+getUrlParam('asc');
	if ((getUrlParam('page')!=null) && (getUrlParam('page')!="")) str=str+"&page="+getUrlParam('page');
	if (document.all.key.value!="") str=str+"&key="+document.all.key.value;
	if (document.all.friend.value!="未指定") str=str+"&friend="+document.all.friend.value;
	if (document.all.kind1.value!="全部") str=str+"&kind1="+document.all.kind1.value;
	if (document.all.kind2.value!="全部") str=str+"&kind2="+document.all.kind2.value;
	if (document.all.me.checked == true) str=str+"&me=1";
	if (document.all.user.value!="") str=str+"&user="+document.all.user.value;
	if (document.all.txtnote.value!="") str=str+"&txtnote="+document.all.txtnote.value;
	str="?"+str.substring(1,str.length);
	window.location='allfolder.aspx'+str;
}
</script>
            <style type="text/css">
.STYLE1 { COLOR: #0000ff }
</style>
</HEAD>
	<body topmargin="0">
		<form id="Form1" method="post">
			<br>
			<div align="center">
				<TABLE cellSpacing="0" cellPadding="0" width="98%" align="center">
					<TR>
						<TD width="5" background="pics/wenbenkuan_02.gif"><IMG height="5" src="pics/wenbenkuan_01.gif" width="5"></TD>
						<TD width="874" background="pics/wenbenkuan_02.gif"><IMG height="5" src="pics/wenbenkuan_02.gif" width="5"></TD>
						<TD><IMG height="5" src="pics/wenbenkuan_03.gif" width="5"></TD>
					</TR>
					<TR>
						<TD background="pics/wenbenkuan_04.gif">&nbsp;</TD>
						<TD background="pics/wenbenkuan_05.gif" bgColor="#ffffff"><TABLE width="100%">
								<TR>
									<TD class="tabletop"><img src="pics/folder2.gif" width="18" height="18" align="absmiddle"> 全部共享目录&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:history.go(-1);"><img src="pics/link_back.gif" border="0" align="absmiddle"></a></TD>
								<TR class="tablebg">
									<TD><div align="center">查看好友共享文件：
                                        <select name="friend" id="friend" runat="server" onChange="gosearch();">
                                        </select>
查看大类：
<select name="kind1" id="kind1" runat="server" onChange="gosearch();">
</select>
查看小类：
<select name="kind2" id="kind2" runat="server" onChange="gosearch();">
  <option selected>全部</option>
</select>
<INPUT name=me type=checkbox id=me runat="server" onClick="gosearch();">
                  <label for=me><span class="STYLE1">只列出指定共享给我的目录</span></label></span>
									</TD>
								</TR>
								<TR class="tablebg">
									<TD><asp:datagrid id="DataGrid" runat="server" CssClass="GridBody" PageSize="20" Width="100%" AutoGenerateColumns="False"
											AllowSorting="True" EnableViewState="False">
<AlternatingItemStyle CssClass="GridLine">
</AlternatingItemStyle>

<ItemStyle CssClass="GridItem">
</ItemStyle>

<HeaderStyle CssClass="GridHead">
</HeaderStyle>

<Columns>
<asp:TemplateColumn>
<HeaderStyle HorizontalAlign="Center">
</HeaderStyle>

<HeaderTemplate>
<%=dirname%>
</HeaderTemplate>

<ItemTemplate>
<%# showdir(DataBinder.Eval(Container, "DataItem.username").ToString(),DataBinder.Eval(Container, "DataItem.postion").ToString(),DataBinder.Eval(Container, "DataItem.dirname").ToString(),DataBinder.Eval(Container, "DataItem.top").ToString(),DataBinder.Eval(Container, "DataItem.good").ToString(),DataBinder.Eval(Container, "DataItem.note").ToString(),DataBinder.Eval(Container, "DataItem.OpenPass").ToString()) %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderStyle HorizontalAlign="Center" Width="15%">
</HeaderStyle>

<ItemStyle HorizontalAlign="Center">
</ItemStyle>

<HeaderTemplate>
<%=username%>
</HeaderTemplate>

<ItemTemplate>
<asp:HyperLink id=HyperLink1 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.UserName") %>' NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.UserName", "userinfo.aspx?username={0}") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderStyle HorizontalAlign="Center" Width="15%">
</HeaderStyle>

<ItemStyle HorizontalAlign="Center">
</ItemStyle>

<HeaderTemplate>
<%=update%>
</HeaderTemplate>

<ItemTemplate>
<%# DataBinder.Eval(Container, "DataItem.LastTime", "{0:yyyy-MM-dd}") %>
</ItemTemplate>

<EditItemTemplate>
<%# DataBinder.Eval(Container, "DataItem.LastTime", "{0:yyyy-MM-dd}") %>
</EditItemTemplate>
</asp:TemplateColumn>
</Columns>

<PagerStyle PageButtonCount="20" Mode="NumericPages">
</PagerStyle>
										</asp:datagrid>
										<webdiyer:AspNetPager id="Pager" runat="server" PageSize="20" HorizontalAlign="Right" AlwaysShow="True"
											ShowCustomInfoSection="Left" NumericButtonCount="15" ShowBoxThreshold="21" UrlPaging="True" 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"></webdiyer:AspNetPager>
										<br>
										<div align=center><input class="btn" id="but" type="button" value="↓高级查找↓" name="but" onClick="javascript:document.getElementById('search').style.display=(document.getElementById('search').style.display=='none' ? '' : 'none');document.getElementById('but').value=(document.getElementById('but').value=='↓高级查找↓' ? '↑高级查找↑' : '↓高级查找↓');">
									    <table width="100%" border="0" id="search" style="display:none;">
                                          <tr>
                                            <td><div align="right">目录名：</div></td>
                                            <td><input name="key" class="kuan" id="key" value="<%if (Request["key"]!=null) Response.Write(Request["key"].ToString());%>">
                                            （可模糊输入，不填为不限）</td>
                                          </tr>
                                          <tr>
                                            <td width="31%"><div align="right">用户名：</div></td>
                                            <td width="69%"><input name="user" class="kuan" id="user" value="<%if (Request["user"]!=null) Response.Write(Request["user"].ToString());%>">
                                            （精确输入，不填为不限）</td>
                                          </tr>
                                          <tr>
                                            <td><div align="right">目录注释：</div></td>
                                            <td><input name="txtnote" class="kuan" id="txtnote" value="<%if (Request["txtnote"]!=null) Response.Write(Request["txtnote"].ToString());%>">（不填为不限）</td>
                                          </tr>
                                          <tr>
                                            <td>&nbsp;</td>
                                            <td><input class="btn" id="submit2" type="button" value=" 查 找 " name="submit22" onClick="gosearch();"></td>
                                          </tr>
                                        </table></div>
									</TD>
								</TR>
							</TABLE>
						</TD>
						<TD width="5" background="pics/wenbenkuan_06.gif"><IMG height="5" src="pics/wenbenkuan_06.gif" width="5"></TD>
					</TR>
					<TR>
						<TD background="pics/wenbenkuan_08.gif"><IMG height="5" src="pics/wenbenkuan_07.gif" width="5"></TD>
						<TD background="pics/wenbenkuan_08.gif"><IMG height="5" src="pics/wenbenkuan_08.gif" width="5"></TD>
						<TD><IMG height="5" src="pics/wenbenkuan_09.gif" width="5"></TD>
					</TR>
				</TABLE>
			</div>
		</form>
	</body>
</HTML>
<script>
if ((getUrlParam('key')!="") || (getUrlParam('user')!="") || (getUrlParam('txtnote')!="")) document.getElementById("but").click();
</script>
