<%template _header%>
<script type="text/javascript">
var aspxrewrite = {config.Aspxrewrite};
</script>
<div class="wrap cl pageinfo">
	<div id="nav">
	<%if {usergroupinfo.allowsearch}>0%>
		<%template _quicksearch%>
	<%/if%>
	<a href="{config.forumurl}" class="title">{config.forumtitle}</a> &raquo; <a href="tags.aspx">标签</a><%if {page_err}==0 && {tagid}>0%> &raquo; {tag.tagname}<%/if%>
	</div>
</div>
<%if {page_err}==0%>
<div class="wrap cl">
<div class="main thread" style="padding:10px;">
<%if {tagid}>0%>
	<script type="text/javascript">
		function changeTab(obj)
		{
			if (obj.className == 'current')
			{
				obj.className = '';
			}
			else
			{
				obj.className = 'currentt';
			}
		}
	</script>
	<div class="cl">
		<ul class="f_tab">
			<li id="tab_forum" <%if {listtype}=="topic"%>class="cur_tab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" <%/if%>><a href="<%if {config.Aspxrewrite}==1%>topictag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"><span>主题</span></a></li>
			<%if {config.enablespace}==1%>
			<li id="tab_space" <%if {listtype}=="spacepost"%>class="cur_tab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" <%/if%>><a href="<%if {config.Aspxrewrite}==1%>spacetag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"><span>空间</span></a></li>
			<%/if%>
			<%if {config.enablealbum}==1%>
			<li id="tab_album" <%if {listtype}=="photo"%>class="cur_tab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" <%/if%>><a href="<%if {config.Aspxrewrite}==1%>phototag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"><span>相册</span></a></li>
			<%/if%>
			<%if {config.enablemall}==1%>
			<li id="tab_mall" <%if {listtype}=="mall"%>class="cur_tab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" <%/if%>><a href="<%if {config.Aspxrewrite}==1%>malltag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"><span>商城</span></a></li>
			<%/if%>
		</ul>
	</div>
	<%if {listtype}=="topic"%>		
		<%if {topiccount}==0%>
		<%template _usercpmsgbox%>
		<%else%>
		<div class="threadlist">
		<table cellSpacing="0" cellPadding="0" summary="主题标签">
		<thead>
		<tr>
			<th style="padding:4px 0;">标题</th>
			<th>所在版块</th>
			<td class="by">作者</td>
			<td class="num">回复 / 查看</td>
			<td class="by"><cite>最后发表</cite></td>
		</tr>
		</thead>
		<%loop (TopicInfo) topic topiclist%>
		<tbody>
		<tr>
			<th class="subject">
				<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
				<a href="{aspxrewriteurl}" target="_blank">{topic.title}</a>
			</th>
			<td>
				<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({topic.fid},0)%>
				<a href="{aspxrewriteurl}">{topic.forumname}</a>
			</td>
			<td class="by">
				<cite>
				<%if {strtoint({topic.posterid})}==-1%>
					游客
				<%else%>
					<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.posterid})%>
					<a href="{aspxrewriteurl}">{topic.poster}</a>
				<%/if%></cite>
				<em><%datetostr({topic.postdatetime},"yyyy.MM.dd HH:mm")%></em>
			</td>
			<td class="num"><a href="#" class="xg2">{topic.replies}</a><em>{topic.views}</em></td>
			<td class="by">
				<cite>by
				<%if {topic.lastposterid}==-1%>
					游客
				<%else%>
					<a href="{UserInfoAspxRewrite(topic.lastposterid)}" target="_blank">{topic.lastposter}</a>
				<%/if%>
				</cite>
				<em><a href="showtopic.aspx?topicid={topic.tid}&page=end" target="_blank"><%datetostr({topic.lastpost},"yyyy.MM.dd HH:mm")%></a></em>
			</td>
		</tr>
		</tbody>
		<%/loop%>
		</table>			
		</div>
		<div class="pages_btns">
			<div class="pages">
				<em>{pageid}/{pagecount}页</em>{pagenumbers}
			</div>
		</div>
		<%/if%>
	<%else if {listtype}=="spacepost"%>
		<%if {spacepostcount}==0%>
		<%template _msgbox%>
		<%else%>
		<div class="threadlist taglist">
		<table cellSpacing="0" cellPadding="0" summary="日志标签结果">
		<thead>
		<tr>
			<th style="padding:4px 0; text-align:center;">标题</th>
			<td class="by">作者</td>
			<td class="num">回复 / 查看</td>
		</tr>
		</thead>
		<%loop (SpacePostInfo) post spacepostlist%>
		<tbody>
		<tr>
			<th class="subject">
				<a href="{spaceurl}space/viewspacepost.aspx?postid={post.postid}" target="_blank">{post.title}</a>
			</th>
			<td class="by">
				<cite>
				<%if {strtoint({post.uid})}==-1%>
					游客
				<%else%>
					<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({post.uid})%>
					<a href="{aspxrewriteurl}">{post.author}</a>
				<%/if%></cite>
				<em><%datetostr({post.postdatetime},"yyyy.MM.dd HH:mm")%></em>
			</td>
			<td class="num"><a href="#" class="xg2">{post.commentcount}</a><em>{post.views}</em> </td>
		</tr>
		</tbody>
		<%/loop%>
		</table>
		</div>
		<div class="pages_btns">
			<div class="pages">
				<em>{pageid}/{pagecount}页</em>{pagenumbers}
			</div>
		</div>
		<%/if%>
	<%else if {listtype}=="photo"%>
		<%if {photocount}==0%>
			<%template _msgbox%>
		<%else%>
			<div class="albumbox">
			<table cellSpacing="0" cellPadding="0" summary="相册标签结果">
			<%set (int) {photoindex} = 1%>
			<%loop (PhotoInfo) photo photolist%>
			<%if {photoindex}==1%>
			<tr>
			<%/if%>
			<td style="width:25%; text-align:center;">
				<div>
					<a href="{albumurl}showphoto.aspx?photoid={photo.photoid}"><img src="{photo.filename}" alt="{photo.title}" title="{photo.title}" /></a>
				</div>
				<p>
					<script language="javascript" type="text/javascript">
						ShowFormatBytesStr({photo.filesize});
					</script>
				</p>
				<p><a href="{albumurl}showphoto.aspx?photoid={photo.photoid}">{photo.title}</a></p>
			</td>													
			 <%if {photoindex}==4%>
			</tr>
				<%set {photoindex}=1%>
			 <%else%>
				<%set {photoindex}={photoindex}+1%>
			 <%/if%>
			<%/loop%>
			</table>
			</div>
			<div class="pages_btns">
				<div class="pages">
					<em>{pageid}/{pagecount}页</em>{pagenumbers}
				</div>
			</div>
		<%/if%>
		<%else if {listtype}=="mall"%>
			<%if {goodscount}==0%>
				<%template _msgbox%>
			<%else%>
				<div class="mallbox">
				<table cellSpacing="0" cellPadding="0" summary="商品标签结果">
					<thead>
					<tr>
						<th>&nbsp;</th>
						<th>商品名称/卖家</th>
						<th>价格</th>
						<th>运费</th>
						<th>所在地</th>
						<th>截至日期</th>
					</tr>
					</thead>
					<%loop (Goodsinfo) goodsinfo goodslist%>
					<tbody>
					<tr>
					<%set {aspxrewriteurl} = this.ShowGoodsAspxRewrite({goodsinfo.goodsid})%>
						<td class="shoppicture">
							 <a href="{aspxrewriteurl}" target="_blank">
						<%if {goodsinfo.goodspic}==""%>
							<img width="80" src="{imagedir}/NoPhoto.jpg" onerror="this.onerror=null;this.src='{goodsinfo.goodspic}';"  title="{goodsinfo.title}">
						<%else%>
							<img width="80" src="upload/{goodsinfo.goodspic}" onerror="this.onerror=null;this.src='{goodsinfo.goodspic}';"  title="{goodsinfo.title}">
						<%/if%>		
							</a>
						</td>		        
						<th>
							<h3><a href="{aspxrewriteurl}" target="_blank">{goodsinfo.htmltitle}</a></h3>
							<p>卖家:
							<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({goodsinfo.selleruid})%>
								<a href="{aspxrewriteurl}" target="_blank">{goodsinfo.seller}</a></p>
							<p><a class="submitbutton" href="usercppostpm.aspx?msgtoid={goodsinfo.selleruid}" onclick="floatwin('open_postpm', this.href, 600, 410, '600,0');doane(event);" target="_blank">给我留言</a> <a class="selectall" href="favorites.aspx?goodsid={goodsinfo.goodsid}">收藏</a></p>
						</th>
						<td><p class="price">{goodsinfo.price}</p></td>
						<td>{goodsinfo.ordinaryfee}</td>
						<td>{goodsinfo.locus}</td>
						<td>{goodsinfo.expiration}</td>
					</tr>
					</tbody>
					<%/loop%>
				</table>			
				</div>
				<div class="pages_btns">
					<div class="pages">
						<em>{pageid}/{pagecount}页</em>{pagenumbers}
					</div>
				</div>
			<%/if%>
		<%/if%>
	<%else%>
		<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="{jsdir}/template_showtopic.js"></script>	
		<script type="text/javascript" src="{jsdir}/template_tags.js"></script>	
		<script type="text/javascript" src="{jsdir}/ajax.js"></script>
		<h3>论坛热门标签</h3>
		<hr class="solidline"/>
		<ul id="forumhottags" class="taglist">
		<%loop (TagInfo) tag taglist%>
				<li><a 
			<%if {config.aspxrewrite}==1%>
				href="topictag-{tag.tagid}.aspx" 
			<%else%>
				href="tags.aspx?t=topic&tagid={tag.tagid}" 
			<%/if%>
			<%if {tag.color}!=""%>	
				style="color: #{tag.color};"
			<%/if%>
				title="{tag.fcount}">{tag.tagname}</a></li>
		<%/loop%>
		</ul>
		<%if {config.enablespace}==1%>
		<h3>空间热门标签</h3>
		<hr class="solidline"/>
		<ul id="spacehottags" class="taglist"><script type="text/javascript" src="cache/hottags_space_cache_jsonp.txt" onerror="this.onerror=null;getajaxspacehottags();"></script></ul>
		<%/if%>
		<%if {config.enablealbum}==1%>
		<h3>图片热门标签</h3>
		<hr class="solidline"/>
		<ul id="photohottags" class="taglist"><script type="text/javascript" src="cache/hottags_photo_cache_jsonp.txt" onerror="this.onerror=null;getajaxphotohottags();"></script></ul>
		<%/if%>
		<%if {config.enablemall}==1%>
		<h3>商城热门标签</h3>
		<hr class="solidline"/>
		<ul id="mallhottags" class="taglist"><script type="text/javascript" src="cache/hottags_mall_cache_jsonp.txt" onerror="this.onerror=null;getajaxmallhottags();"></script></ul>
		<%/if%>
	<%/if%>
</div>
<%else%>
	<%template _errmsgbox%>
<%/if%>
</div>
<%template _copyright%>
<%template _footer%>