<%inherits "Discuz.Album.Pages.showphoto"%>
<%template _albumheader%>
<div id="nav">
	<div class="wrap s_clear">
		<%template _albumnavigation%>
		<a href="{config.albumurl}" class="title">{config.albumname}首页</a> &raquo;
		<%if {photo}!=null%>
		<a href="showalbumlist.aspx?cate={albumcategory.albumcateid}">{albumcategory.title}</a>  &raquo; <strong>{album.title}</strong></a>
		<%/if%>
	</div>
</div>
<%if page_err==0%>
	<%if ispost%>
		<%template _photomsgbox%>
	<%else%>
	<script type="text/javascript" src="javascript/ajax.js"></script>
	<script type="text/javascript" src="javascript/post.js"></script>
	<script type="text/javascript">
		var templatepath = '{templatepath}';
	</script>
	<script type="text/javascript" src="javascript/template_showphoto.js"></script>
<div class="wrap" style="overflow:visible;">
	<%if {!needpassword}%>
	<div class="modulebox">
		<h2>
		<cite>
<!--		<%if {config.silverlight}==1%>
		<a id="silverlightalbum" target="_blank" title="Silverlight相册展示" href="silverlight/album/index.html?albumid={album.albumid}">Silverlight酷炫体验</a>&nbsp;
		<%/if%>-->
		<a title="幻灯片播放" href="javascript:void(0);" onclick="pptPhoto();">幻灯展示</a>&nbsp;<a href="showalbum.aspx?albumid={album.albumid}">+ 更多</a></cite>
		{photo.title}</h2>
		<div class="scrollphoto">
		<ul>
			<li id="scrollleft" style='cursor: pointer;"' onclick="scrollHiddenDiv($('photonav'), -90);"><img src='templates/{templatepath}/album/images/scrollarrowleft.jpg' alt='向左移动' />
			</li>
			<li style="width: 810px;"><div style='position:relative;'><div class='photonavbar' id="photonav" style='overflow: hidden;width:810px;'>加载导航图，请稍候...</div></div>
			</li>
			<li id="scrollright" style='cursor: pointer;"' onclick="scrollHiddenDiv($('photonav'), 90);"><img src="templates/{templatepath}/album/images/scrollarrowright.jpg" alt="向右移动" />
			</li>
		</ul>
		</div>
		<script type="text/javascript">shownavbar({photo.albumid}, {photo.photoid});</script>
		<div class="photoshowBox">
			<div class="boxbody">
				<div class="Photo" style="margin: 10px 20px;">
					<div class="photo_info">
						<%if {config.enablespace}==1%>
						<a href="{spaceurl}space/?uid={photo.userid}" target="_blank">{photo.username}的空间</a>
						<%/if%>
						<a href="{albumurl}showalbumlist.aspx?uid={photo.userid}" target="_blank">{photo.username}的相册</a>
						大小:
						<script type="text/javascript">
							ShowFormatBytesStr({photo.filesize});
						</script>
						上传时间: {photo.postdate}
						浏览量: {photo.views}
						评论数: {comments.count}
					</div>
					<div class="photo_pic" style="width:685px">
						<a id="nextImgOnPhoto" href="{albumurl}showphoto.aspx?photoid={photo.photoid}&go=next" alt="点击图片查看下一张" title="点击图片查看下一张">
						<img border="0" name="bannerPhotoADrotator" style="FILTER: revealTrans(duration=2,transition=20); max-height: 550px;max-width:685px;" onload="resizePhoto(this);" alt="{photo.title}" id="bannerPhotoADrotator" title="{photo.title}" src="{photo.filename}" />
						</a>
					</div>
					<div id="stopPhotobutton" style="display: none;">
						<input type="button" name="stop" value="停止播放" onClick="stopPhoto();" />
					</div>
				</div>
				<div class="page_box">
					<div class="page_left"><a id="prevImg" href="{albumurl}showphoto.aspx?photoid={photo.photoid}&go=prev">上一张</a>第 <span id="photoIndex"><em>1</em>/1</span> 张<a id="nextImg" href="showphoto.aspx?photoid={photo.photoid}&go=next">下一张</a></div>
				<%if {userid}!=-1%>
					<div class="page_right">
					<script type="text/javascript">
						enableinfo = '<img src="templates/{templatepath}/album/images/buttonreport.gif" alt="举报此图片" />';
						show_report_button("<img src=templates/{templatepath}/album/images/reportfinish.gif alt=已经举报此图片 />");
						enableinfo = '<span class="commenreport">举报<span>';
					</script>
					</div>
				<%/if%>
				</div>
				<div class="photo_des">{photo.description}</div>
				<%if {editable} || {comments.count}>0%>
				<p class="commentstitle"><a name="comments"></a>
					<%if {editable}%>
						<form id="commentform" name="commentform" method="post" action=""><input name="delcommentid" type="hidden" /></form>
						<script type="text/javascript">
						function del_comment(cid)
						{
							if (confirm('确定要删除吗?'))
							{
								var form = $("commentform");
								form.delcommentid.value = cid;
								form.submit();
							}
							return false;
						}
						</script>
					<%/if%>
					<%if {photo.comments}>0%>
					评论 ({photo.comments})
					<%/if%>
				</p>
				<%/if%>
				<%set (int) {rowindex}=1%>
				<%loop (PhotoCommentInfo) comment comments%>
				<div class="<%if {rowindex}%2==0%>reviewbox2<%else%>reviewbox<%/if%>">
					<div class="reviewboxleft">{rowindex}.</div>
					<p>{comment.content}</p>
					<div class="reviewwriterbox">
						<div class="ReviewManager"><%if {comment.userid}!=-1%>
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({comment.userid})%>
						<a href="{forumurl}{aspxrewriteurl}">{comment.username}</a>
						<%else%>{comment.username}<%/if%>      {comment.postdatetime}</div>
						<em>
							<%if {userid}!=-1%>
								<script type="text/javascript">
									show_report_button('<span class=reportfinish>已举报</span>');
								</script>
							<%/if%>
						<%if {editable}%>
							<a id="e{comment.commentid}" title="删除此评论" onclick="del_comment({comment.commentid});" href="###" class="commenddelete">删除</a></em>
						<%/if%>
						</em>
					</div>
				</div>
				<%set {rowindex}={rowindex}+1%>
				<%/loop%>
				<%if {commentable}%>
				<script type="text/javascript">
				function validate(form)
				{
					if (form.message.value == "")
					{
						alert("请输入评论内容");
						return false;
					}
					if(form.message.value.length > 2000) {
						alert("评论最多2000字");
						return false;
					}
				}
				</script>							
				<form method="post" id="postform" onsubmit="return validate(this);">
					<h3><a name="reply"></a>发表评论</h3>
					<p>
						<textarea id="message" tabindex="1" name="message" style="width: 400px;" onKeyDown="ctlent(event,false);" rows="8" class="colorblue"></textarea><br />
					</p>
					<p>						
						<input tabindex="2" id="postsubmit" name="post_comment" class="lightbutton" value="提交" type="submit">[完成后可按 Ctrl+Enter 发布]
						<input tabindex="3" id="sendnotice" name="sendnotice" type="checkbox" <%if {album.Userid}=={userid}%>disabled<%/if%>>发送评论通知
					</p>								
				</form>
			<%else%>
			<div class="error_info">
				此图片禁止评论 或 登录用户才可评论
			</div>
			<%/if%>
		</div>
		<div class="boxright">
			<h3>一周热图总排行</h3>
			<ul>
				<%loop (PhotoInfo) weekhotphoto weekhotphotolist%>
					<%if {weekhotphoto.title}!="" %>
					<li><a href="{albumurl}showphoto.aspx?photoid={weekhotphoto.photoid}">{weekhotphoto.title}</a> (<a href="{albumurl}showalbumlist.aspx?uid={weekhotphoto.userid}">{weekhotphoto.username}</a>)</li>
					<%/if%>
				<%/loop%>
			</ul>
			<h3 style="background:transparent ; padding-left: 0;">标签</h3>
			<ul id="tagcontainer">正在加载...</ul>
			<script type="text/javascript">showTags({photoid});</script>
		</div>
		</div>
		<%else%>
		<div class="modulebox">
			<div class="forumtitle">
				<h2>此相册已被设置密码</h2>
			</div>
			<div class="forumpassword">
				<form id="enteralbum" name="enteralbum" method="post" action="">
						<label for="password">请输入密码:</label><input name="albumpassword" type="password" id="albumpassword" size="20" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" />
						<p><input type="submit"  value="确定" class="lightbutton"/></p>
				</form>
			</div>
		</div>
		<%/if%>
	</div>
	<%/if%>
<%else%>
	<%template _photoerrmsgbox%>
<%/if%>
</div>
<%template _copyright%>
<%template _footer%>
