<%inherits "Discuz.Space.Pages.spaceindex"%>
<%template _spaceheader%>
<%if {page_err}==0%>
<!--message start-->
<div id="foruminfo">
<%if {announcementcount}>0%>
	<div id="userinfo">
		<marquee style="float:left;width:70%;" direction="left" scrollamount="2" scrolldelay="1" onmouseover="this.stop();" onmouseout="this.start();">
		<%loop announcement announcementlist%>
			<a href="{forumurl}announcement.aspx#{announcement[id]}">{announcement[title]}</a><cite><%datetostr({announcement[starttime]},"MM.dd")%></cite>
		<%/loop%>
		</marquee>
	</div>
<%/if%>
	<div id="headsearch">
		<div id="search">
			<%template _quicksearch%>
		</div>
	</div>
</div>
<!--message end-->
<div id="ntforumbody">
<div id="ntspaceleft">
	<div class="modulebox" style="margin-top:0;">
		<div class="forumtitle">
			<h2>推荐日志</h2>
		</div>
		<div class="nttable" style="border-bottom:none;">
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
				<%loop (SpaceShortPostInfo) __spacepostrecommend spacepostlist%> 
				 <%if {__spacepostrecommend.author}!="" %>
				  <tr>
					<td class="topiccontent" width="70%">· <a href="{spaceurl}space/viewspacepost.aspx?postid={__spacepostrecommend.postid}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__spacepostrecommend.title}),70,"...")%></a> </td>
					<td width="20%"><a href="{spaceurl}space/?uid={__spacepostrecommend.uid}">{__spacepostrecommend.author}</a></td>
					<td width="10%"><%datetostr({__spacepostrecommend.postdatetime},"yyyy-MM-dd")%></td>
				  </tr>
				 <%/if%> 
				<%/loop%>
			</table>
		</div>
	</div>		
	<div class="spacearticle">
		<div class="commentsarticle">
			<div class="modulebox">
				<div class="forumtitle">
					<h2>最多评论文章</h2>
				</div>
				<div class="nttable">
					<table width="98%" border="0" cellspacing="0" cellpadding="0">
						<%loop __spacepostbycomment topspacepostcommentcount%> 
						  <%if {__spacepostbycomment[commentcount]}!=""%>
						<tr>
							<td class="topiccontent">· <a href="{spaceurl}space/viewspacepost.aspx?postid={__spacepostbycomment[postid]}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__spacepostbycomment[title]}),40,"...")%></a>
							<cite>( {__spacepostbycomment[commentcount]} )</cite>
							</td>
					   </tr>
						  <%/if%>
					   <%/loop%>
					</table>
				</div>
			</div>
		</div>
		<div class="browserarticle">
			<div class="modulebox">
				<div class="forumtitle">
					<h2>最多浏览文章</h2>
				</div>
				<div class="nttable">
					<table width="98%" border="0" cellspacing="0" cellpadding="0">
						<%loop __spacepostbyviews topspacepostviews%> 
						  <%if {__spacepostbyviews[commentcount]}!=""%>
						<tr>
							<td class="topiccontent">· <a href="{spaceurl}space/viewspacepost.aspx?postid={__spacepostbyviews[postid]}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__spacepostbyviews[title]}),40,"...")%></a>
							<cite>( {__spacepostbyviews[views]} )</cite>
							</td>
					   </tr>
						  <%/if%>
					<%/loop%>
					</table>
				</div>
			</div>
		</div>
	</div>
	<div class="modulebox">
		<div class="forumtitle">
			<h2>推荐空间</h2>
		</div>
		<div class="hotblog">
			<ul>
			<%loop (SpaceConfigInfoExt) __spaceconfig spaceconfigs%> 					
			<%if {__spaceconfig.spacepic}!="" %>			
			<li>
				<a href="{spaceurl}space/?uid={__spaceconfig.userid}"><img src="{__spaceconfig.spacepic}" alt="blogphoto" width="52" height="52" onerror="this.onerror=null;this.src='avatars/common/0.gif';"/></a>
				<h3><a href="{spaceurl}space/?uid={__spaceconfig.userid}"><%getsubstring({__spaceconfig.spacetitle},35,"...")%></a></h3>
				<p><a href="{spaceurl}space/viewspacepost.aspx?postid={__spaceconfig.postid}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__spaceconfig.posttitle}),35,"...")%></a></p>
				<p>日志: <em>{__spaceconfig.postcount}</em>   <%if {config.enablealbum}==1%>相册: <em>{__spaceconfig.albumcount}</em><%/if%></p>
			</li>
			<%/if%>
			<%/loop%>							
			</ul>
		</div>
	</div>
	<div class="modulebox">
		<div class="forumtitle">
			<h2>最多评论空间</h2>
		</div>
		<div class="hotblog">
			<ul>
			<%loop __topcommentcountspaceinfo topspacelistbycommentcount%> 						
			<%if {__topcommentcountspaceinfo[userid]}!="" %>
			<li>
				<a href="{spaceurl}space/?uid={__topcommentcountspaceinfo[userid]}"><img src="{__topcommentcountspaceinfo[avatar]}" alt="blogPhoto" width="52" height="52" onerror="this.onerror=null;this.src='avatars/common/0.gif';"/></a>
				<h3><a href="{spaceurl}space/?uid={__topcommentcountspaceinfo[userid]}" ><%getsubstring(Discuz.Common.Utils.HtmlEncode({__topcommentcountspaceinfo[spacetitle]}),35,"...")%></a></h3>
				<p><a href="{spaceurl}space/viewspacepost.aspx?postid={__topcommentcountspaceinfo[postid]}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__topcommentcountspaceinfo[posttitle]}),35,"...")%></a></p>
				<p>日志:<em>{__topcommentcountspaceinfo[postcount]}</em>   最后更新:<em><%datetostr({__topcommentcountspaceinfo[updatedatetime]},"yyyy-MM-dd")%></em></p>
			</li>
			<%/if%>					
			<%/loop%>							
			</ul>
		</div>
	</div>
	<div class="modulebox">
		<div class="forumtitle">
			<h2>最多访问空间</h2>
		</div>
		<div class="hotblog" style="border-bottom:none;">
			<ul>
			<%loop __topvisitedtimesspaceinfo topspacelistbyvisitedtimes%> 						
			<%if {__topvisitedtimesspaceinfo[userid]}!="" %>					
			<li>
				<a href="{spaceurl}space/?uid={__topvisitedtimesspaceinfo[userid]}"><img src="{__topvisitedtimesspaceinfo[avatar]}" alt="blogPhoto" width="52" height="52" onerror="this.onerror=null;this.src='avatars/common/0.gif';"/></a>
				<h3><a href="{spaceurl}space/?uid={__topvisitedtimesspaceinfo[userid]}" ><%getsubstring(Discuz.Common.Utils.HtmlEncode({__topvisitedtimesspaceinfo[spacetitle]}),35,"...")%></a></h3>
				<p><a href="{spaceurl}space/viewspacepost.aspx?postid={__topvisitedtimesspaceinfo[postid]}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__topvisitedtimesspaceinfo[posttitle]}),35,"...")%></a></p>
				<p>日志:<em>{__topvisitedtimesspaceinfo[postcount]}</em>   最后更新:<em><%datetostr({__topvisitedtimesspaceinfo[updatedatetime]},"yyyy-MM-dd")%></em></p>
			</li>
			<%/if%>			
			<%/loop%>							
			</ul>
		</div>
	</div>
</div>
<div id="ntspaceright">
	<%if {rotatepicdata}!=null && {rotatepicdata}!=""%>		
	<%template _rotatepic%>
	<div class="sidebox sideboxbg">
	<%else%>
	<div class="sidebox sideboxbg" style="margin-top:0px;">
	<%/if%>             
		<h4>最新空间评论</h4>
		<ul class="newslist">
			<%loop comment topspacecomments%>
				<li><a href="{spaceurl}space/viewspacepost.aspx?postid={comment[postid]}">
				<%getsubstring(Discuz.Common.Utils.HtmlEncode({comment[content]}),30,"...")%></a> [{comment[author]}]</li>	
			<%/loop%>
	   </ul>
	</div>
	<%if {config.enabletag}==1%>
		<script type="text/javascript" src="cache/tag/closedtags.txt"></script>
		<script type="text/javascript" src="cache/tag/colorfultags.txt"></script>
		<script type="text/javascript" src="javascript/ajax.js"></script>
		<script type="text/javascript" src="javascript/template_tags.js"></script>
		<div class="sidebox sideboxbg">
		<h4>热门标签</h4>
		<ul id="spacehottags">
			<script type="text/javascript" src="cache/hottags_space_cache_jsonp.txt" onerror="this.onerror=null;getajaxspacehottags();"></script>
		</ul>
	</div>
	<%/if%>
	<%if {config.enablealbum}==1%>
	<div class="sidebox sideboxbg">
		<h4>推荐相册</h4>
		<ul class="newslist">
			<%loop (AlbumInfo) album recommendalbumlist%>
				<li><a href="{albumurl}showalbum.aspx?albumid={album.albumid}">{album.title}</a> ({album.imgcount}) [<a href="showalbumlist.aspx?uid={album.userid}">{album.username}</a>]</li>	
			<%/loop%>
		</ul>
	</div>
	<%/if%>			
	<div class="sidebox sideboxbg">
		<h4>最近更新的空间</h4>
		<ul class="newslist">
			<%loop __space recentupdatespaceList%> 						
				<li><a href="{spaceurl}space/?uid={__space[userid]}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__space[spacetitle]}),30,"...")%></a></li>
			<%/loop%>
		</ul>
	</div>
	<div class="sidebox newstopicbg">
		<h2>新帖</h2>
		<ul class="newslist">
		<%loop __newtopicinfo newtopiclist%> 
			<li>
			<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({__newtopicinfo[tid]},0)%>
			<a href="{aspxrewriteurl}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__newtopicinfo[title]}),30,"...")%></a></li>
		<%/loop%>
		</ul>
		<h2>热帖</h2>
		<ul class="newslist">
		<%loop __hottopicinfo hottopiclist%> 
			<li>
			<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({__hottopicinfo[tid]},0)%>
			<a href="{aspxrewriteurl}"><%getsubstring(Discuz.Common.Utils.HtmlEncode({__hottopicinfo[title]}),30,"...")%></a></li>
		<%/loop%>
		</ul>
	</div>
</div>
</div>
<%else%>
	<%template _photoerrmsgbox%>
<%/if%>
<%template _copyright%>
<%template _footer%>