<%@ Register TagPrefix="webdiyer" Namespace="Wuqi.Webdiyer" Assembly="AspNetPager"%>
<%@ Page CodeBehind="Share_Album.aspx.cs" Language="c#" AutoEventWireup="True" Inherits="Typhoto.Search_Default" enableViewState="False"%>
<%@ Register TagPrefix="uc1" TagName="UIFrameLeft" Src="Controls/UIFrameLeft.ascx" %>
<%@ Register TagPrefix="uc1" TagName="UIFrameTop" Src="Controls/UIFrameTop.ascx" %>
<%@ Register TagPrefix="uc1" TagName="UIHead" Src="Controls/UIHead.ascx" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		
		<style type="text/css">
.STYLE1 { COLOR: #0000ff }
</style>
		<script language="javascript">
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('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";
	str="?"+str.substring(1,str.length);
	window.location='Share_Album.aspx'+str;
}
		</script>
</HEAD>
	<body class="body_1" scroll="no">
		<form runat="server">
			<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td height="60"><uc1:uihead id="UIHead1" runat="server"></uc1:uihead></td>
				</tr>
				<tr>
					<td height="10"><uc1:uiframetop id="UIFrameTop1" runat="server"></uc1:uiframetop></td>
				</tr>
				<tr>
					<td>
						<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr>
								<td class="frame_left_1" vAlign="top" width="193"><uc1:uiframeleft id="UIFrameLeft1" runat="server"></uc1:uiframeleft></td>
								<td class="frame_body_1" vAlign="top">
									<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td height="32" colspan="2" class="main_title_1">
												<table height="100%" cellSpacing="0" cellPadding="0" width="99%" border="0">
													<tr>
														<td align="left"><IMG src="images/icon_sort.gif" align="absMiddle">&nbsp;&nbsp;过滤条件</td>
														<td align="right"><A href="javascript:history.back();"><IMG src="images/link_back.gif" align="absMiddle"></A>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td class="main_content_1" height="32">大类：
													<select name="kind1" id="kind1" runat="server" onChange="gosearch();">
													</select>
													&nbsp;小类：
													<select name="kind2" id="kind2" runat="server" onChange="gosearch();">
														<option selected>全部</option>
													</select>
													&nbsp;好友：
													<select name="friend" id="friend" runat="server" onChange="gosearch();">
													</select>
												<span id="showme" runat="server">
													<INPUT name="me" type="checkbox" id="me" runat="server" onClick="gosearch();">
													<label for="me">
														<font color="#0000ff">仅列出指定共享给我的相册</font>
													</label>
												</span></td>
											<td class="main_content_1"><div align="right">
													<input class="text1" id="key" type="text" name="key" runat="server"> &nbsp; <input class="button1" id="Button1" onClick="gosearch();" type="button" value=" 查 询 " name="bSearch">
													&nbsp;&nbsp;</div>
											</td>
										</tr>
										<tr>
											<td height="32" colspan="2" class="main_title_1">
												<div style="TEXT-ALIGN: left">&nbsp; <IMG src="images/icon_album.gif" align="absMiddle">&nbsp; 
													共享相册</div>
											</td>
										</tr>
										<tr>
											<td colspan="2" vAlign="top" class="main_content_1">
												<div class="main_content_2"><asp:datalist id="dAlbums" runat="server" RepeatColumns="2" cellpadding="0" cellspacing="3" Width="100%">
														<ItemStyle Width="50%"></ItemStyle>
														<ItemTemplate>
															<TABLE cellSpacing="1" cellPadding="3" width="100%" bgColor="#AAC1DE" border="0">
																<TR>
																	<TD width="120" align="center" valign="middle" bgColor="#ffffff">
																		<a href='Share_Photo.aspx?DirID=<%# DataBinder.Eval(Container.DataItem, "ID") %>'><img src='<%# ShowFace(DataBinder.Eval(Container.DataItem, "Face").ToString(),DataBinder.Eval(Container.DataItem, "username").ToString(),DataBinder.Eval(Container.DataItem, "OpenPass").ToString()) %>' border="0"></a></TD>
																	<TD bgColor="#ffffff" valign="top">
																		<div style="width:100%;height:100px;line-height:18px;padding:3px;">
																			·<a href='Share_Photo.aspx?DirID=<%# DataBinder.Eval(Container.DataItem, "ID") %>' class="link1">
																				<%# showname(DataBinder.Eval(Container.DataItem, "DirName").ToString()) %>
																			</a>
																			<br>
																			照片数：<%# FileCount(DataBinder.Eval(Container.DataItem, "id").ToString()) %><br>
																			标签：<%# DataBinder.Eval(Container.DataItem, "tag") %><br>
																			所属用户：<a href='user_info.aspx?UserName=<%# DataBinder.Eval(Container.DataItem, "username") %>'><%# DataBinder.Eval(Container.DataItem, "username") %></a></div>
																	</TD>
																</TR>
															</TABLE>
														</ItemTemplate>
													</asp:datalist></div>
											</td>
										</tr>
										<tr>
											<td colspan="2" vAlign="top" class="main_title_1">
												<table width="100%">
													<tr>
														<td><webdiyer:AspNetPager id="Pager" runat="server" PageSize="24" HorizontalAlign="Right" AlwaysShow="True"
																ShowCustomInfoSection="Left" NumericButtonCount="15" 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" UrlPaging="True"></webdiyer:AspNetPager></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
