<%@ Page PathInChannel="{#ID#}{#Page#}.htm" Object="Album" Pagination="List" PageSize="1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<ilghar:Get ID="Album" Object="Album" InnerID="Request.QueryString['ID']" />
<ilghar:Get ID="AlbumCategory" Object="AlbumCategory" Guid="Album[CategoryID]" />
<ilghar:List ID="PreviousAlbum" Object="Album" Page="1" PageSize="1" Condition="IsDeleted=false and IsChecked=true and InnerID > Request.QueryString['ID']" Sort="InnerID ASC" />
<ilghar:List ID="NextAlbum" Object="Album" Page="1" PageSize="1" Condition="IsDeleted=false and IsChecked=true and InnerID < Request.QueryString['ID']" Sort="InnerID DESC" />
<title><%=Album[Name]%> - <%=AlbumCategory[Name]%> - <%=ChannelName%> - <%=SiteName%></title>
<ilghar:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>common.css" />
<script type="text/javascript" src="/common/ajax.js"></script>
<script type="text/javascript">
function Up(obj)
{
	_ajax.Post("/ws.aspx?Object=Album&Operation=IncrementUp&ID=<%=Album[InnerID]%>", null, null);
	obj.disabled = true;
}

function Down(obj)
{
	_ajax.Post("/ws.aspx?Object=Album&Operation=IncrementDown&ID=<%=Album[InnerID]%>", null, null);
	obj.disabled = true;
}

function ReportError(obj, id)
{
	_ajax.Post("/ws.aspx?Object=Picture&Operation=IncrementError&ID=" + id, null, null);
	obj.disabled = true;
}
</script>
</head>
<body>
<div class="Header">
	<div class="Block5">
		<div class="Left"><a href="http://www.ilghar.cn"><img src="<%=ImagePath%>temp/logo_202x80.jpg" /></a></div>
		<div class="Center">
			<div class="SubMenu">
				<ul>
					<li><a href="javascript:" onclick="AddFavorite()">加入收藏</a></li>
					<li><a href="javascript:" onclick="SetHome()">设为主页</a></li>
				</ul>
			</div>
			<!-- TemplateBeginEditable name="菜单" -->
			<ilghar:Menu Object="WebMenuBar" Condition="CategoryID={CC636E36-E49A-4A20-98C9-31A582DAF115} and ParentID IS NULL">
				<div class="TabMenu">
					<ul>
						<ilghar:Record>
							<ilghar:Select>
								<ilghar:Yes>
									<li class="Current"><a href="<%=URL%>"><span><%=Name%></span></a></li>
								</ilghar:Yes>
								<ilghar:No>
									<li><a href="<%=URL%>"><span><%=Name%></span></a></li>
								</ilghar:No>
							</ilghar:Select>
						</ilghar:Record>
					</ul>
				</div>
			</ilghar:Menu>
			<!-- TemplateEndEditable -->
		</div>
		<div class="Right">
			<!-- TemplateBeginEditable name="广告位1" -->
			<ilghar:Ad InnerID="7" />
			<!-- TemplateEndEditable -->
		</div>
	</div>
</div>

<!-- TemplateBeginEditable name="影集类别" -->
<ilghar:List Object="AlbumCategory" Condition="ParentID IS NULL">
	<div class="Menu">
		<ilghar:Record>
			<a href="<%=BuildUrl()%>"><%=Name%></a>
		</ilghar:Record>
	</div>
</ilghar:List>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="搜索" -->
<div class="Block1">
	<form action="<%=BuildUrl('search.dwt')%>" method="get">
		<input type="text" name="q" size="40" class="<%=PageLang%>Font" />
		<input type="submit" value="搜索" />
	</form>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="广告位10" -->
<div class="Block2">
	<ilghar:Ad InnerID="13" />
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<!-- TemplateBeginEditable name="路径" -->
    <div class="Block15">
		<span>当前位置：</span>
		<ilghar:Path Object="AlbumCategory" Guid="Album[CategoryID]">
			<ilghar:Record>
				<a href="<%=URL%>"><%=Name%></a> &gt;
			</ilghar:Record>
		</ilghar:Path>
		查看影集
	</div>
	<!-- TemplateEndEditable -->
	<div class="Block9">
		<ilghar:List ID="List" Object="Picture" Condition="IsDeleted=false and IsChecked=true and AlbumID=Album[ID]" Sort="UpdateTime ASC">
			<ilghar:Record>
				<div class="BorderBottom">
					<%If PreviousAlbum[Count] == 1%>
						<a href="<%=BuildUrl("album.dwt", PreviousAlbum[0][InnerID])%>">上一组</a> 
					<%EndIf%>
					<%If _page > 1%>
						<a href="<%=_pageUrl.Replace("{#Page#}", "_" + (_page - 1))%>">上一个</a> 
					<%EndIf%>
					<%If _page < RecordCount%>
						<a href="<%=_pageUrl.Replace("{#Page#}", "_" + (_page + 1))%>">下一个</a>
					<%EndIf%>
					<%If NextAlbum[Count] == 1%>
						<a href="<%=BuildUrl("album.dwt", NextAlbum[0][InnerID])%>">下一组</a>
					<%EndIf%>
				</div>
				<h4><%=Name%></h4>
				<%If _page < RecordCount%>
					<a href="<%=_pageUrl.Replace("{#Page#}", "_" + (_page + 1))%>"><img src="<%=URL%>" alt="<%=Name%>" /></a>
				<%ElseIf NextAlbum[Count] == 1%>
					<a href="<%=BuildUrl("album.dwt", NextAlbum[0][InnerID])%>"><img src="<%=URL%>" alt="<%=Name%>" /></a>
				<%Else%>
					<img src="<%=URL%>" alt="<%=Name%>" />
				<%EndIf%>
				<br />
				<button onclick="Up(this)">顶 <%=Album[Up]%></button> <button onclick="Down(this)">踩 <%=Album[Down]%></button> <button onclick="ReportError(this, <%=InnerID%>)">报告错误</button>
				<p><%=Description%></p>
				<div class="BorderTop">
					<%If PreviousAlbum[Count] == 1%>
						<a href="<%=BuildUrl("album.dwt", PreviousAlbum[0][InnerID])%>">上一组</a> 
					<%EndIf%>
					<%If _page > 1%>
						<a href="<%=_pageUrl.Replace("{#Page#}", "_" + (_page - 1))%>">上一个</a> 
					<%EndIf%>
					<%If _page < RecordCount%>
						<a href="<%=_pageUrl.Replace("{#Page#}", "_" + (_page + 1))%>">下一个</a>
					<%EndIf%>
					<%If NextAlbum[Count] == 1%>
						<a href="<%=BuildUrl("album.dwt", NextAlbum[0][InnerID])%>">下一组</a>
					<%EndIf%>
				</div>
				
				<script type="text/javascript">
				_ajax.Post("/ws.aspx?Object=Album&Operation=IncrementHitCount&ID=<%=Album[InnerID]%>", null, null);
				_ajax.Post("/ws.aspx?Object=Picture&Operation=IncrementHitCount&ID=<%=InnerID%>", null, null);
				</script>
			</ilghar:Record>
		</ilghar:List>
	</div>
</div>

<!-- TemplateBeginEditable name="广告位11" -->
<div class="Block2">
	<ilghar:Ad InnerID="13" />
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="脚注" -->
<div class="Footer"><%=Footer%></div>
<!-- TemplateEndEditable -->

<%If Convert.ToString(PageLang) == "UYG"%>
	<script type="text/javascript" src="/common/IlgharIme.js"></script>
	<script type="text/javascript">SetupIme()</script>
<%EndIf%>
</body>
</html>
