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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		
		<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('username')!=null) && (getUrlParam('username')!="")) str="&username="+getUrlParam('username');
	if ((getUrlParam('page')!=null) && (getUrlParam('page')!="")) str=str+"&page="+getUrlParam('page');
	if ((getUrlParam('dirid')!=null) && (getUrlParam('dirid')!="")) str=str+"&dirid="+getUrlParam('dirid');
	str=str+"&sort="+document.all.sort.value;
	str="?"+str.substring(1,str.length);
	window.location='myspace_photos.aspx'+str;
}
			</script>
        <style type="text/css">
<!--
.tip {
	border: 1 solid #C4C4C4;
	background: #FFFFC6;
	padding: 8 8 8 8;
	text-align: left;
	}
-->
        </style>
	</HEAD>
	<body class="body_1" scroll="no">
		<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" Current="MyAlbum"></uc1:uiframeleft></td>
							<td class="frame_body_1" vAlign="top">
								<form id="Form1" name="Form1" runat="server">
									<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
										<tr>
											<td class="main_title_1" height="32">
												<table cellSpacing="2" cellPadding="3" width="100%" border="0">
													<tr>
														<td><IMG src="images/icon_album.gif" align="absMiddle"> &nbsp;<A href="MySpace.aspx?username=<%=username%>" ><%=username%>的相册</A> -&gt; <A href="MySpace_Photos.aspx?DirID=<%=AlbumID%>" ><%=lAlbumName%></A> &nbsp;排序：
															<select name="sort" id="sort" runat="server" onChange="gosearch();">
																<option value="ID|Desc" selected>按上传日期[最近的]</option>
																<option value="ID|ASC">按上传日期[最早的]</option>
																<option value="(Width * Height)|Desc">按图片尺寸[最大的]</option>
																<option value="(Width * Height)|ASC">按图片尺寸[最小的]</option>
																<option value="FileSize|Desc">按图片大小[最大的]</option>
																<option value="FileSize|ASC">按图片大小[最小的]</option>
                                                                <option value="Click|Desc">按查看数</option>
                                                                <option value="PL|Desc">按评论数</option>
                                                                <option value="dig|Desc">按投票数</option>
																<option value="0">自排序</option>
															</select></td>
														<td><div align="right"><A href="javascript:history.back();"><IMG src="images/link_back.gif" align="absMiddle"></A></div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td class="main_content_1">
                                            <div class="tip" style="padding:5px; margin:3px; border:#999999 solid 1px" id="showtip" runat=server>　相册：<asp:Label ID="dirname" runat="server"></asp:Label>
                                                　分类：<asp:Label ID="dirkind" runat="server"></asp:Label>
                                                　标签：<asp:Label ID="dirlabel" runat="server"></asp:Label>
                                                　简介：<asp:Label ID="dirnote" runat="server"></asp:Label></div>
												<div class="main_content_2" id="content"><div align="center" id="div1" runat="server">
														<p>&nbsp;</p>
														<p>&nbsp;</p>
														<p><FONT face="宋体"></FONT>&nbsp;</p>
														<p>此相册需要输入密码才可查看，请输入密码： <input name="password" type="password" class="kuan" id="password" size="10" runat="server">
															<input class="btn" id="Submit2" type="button" value="确定" name="submit2" runat="server" onserverclick="Submit2_ServerClick">
														</p>
													</div>
													<div id="div2" runat="server"><asp:repeater id="dPhotos" runat="server" EnableViewState="False">
															<ItemTemplate>
																<div class="photo" title='<%# DataBinder.Eval(Container.DataItem, "fileName") %>'>
																	<div class="pic" align="center">
																		<div align="center" style="WIDTH: 120px;  ; PADDING-TOP: expression(this.style.top+(this.offsetHeight-a<%# Container.ItemIndex + 1 %>.offsetHeight)/2);  HEIGHT: 100px" ><a href='MySpace_Detail.aspx?PhotoID=<%# DataBinder.Eval(Container.DataItem, "ID") %>'>
																				<img src='<%# tuurl(DataBinder.Eval(Container.DataItem, "alias").ToString()) %>' border="0" id='a<%# Container.ItemIndex + 1 %>'></a></div>
																	</div>
																	<div class="title">
																		<a href='MySpace_Detail.aspx?PhotoID=<%# DataBinder.Eval(Container.DataItem, "ID") %>'>
																			<%# DataBinder.Eval(Container.DataItem, "fileName") %>
																		</a>
																		<br>
																		评论:<%# DataBinder.Eval(Container.DataItem, "pl") %></div>
																</div>
															</ItemTemplate>
														</asp:repeater></div>
												</div>
											</td>
										</tr>
										<tr>
											<td class="main_title_1" height="32">
												<table width="100%">
													<tr>
														<td align="right" width="90%"><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" onpagechanged="Pager_PageChanged"></webdiyer:AspNetPager></td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</form>
							</td>
						</tr>
					</table> 
				</td>
			</tr>
		</table>
	</body>
</HTML>
