<%template _header%>
<script type="text/javascript">
var aspxrewrite = {config.Aspxrewrite};
</script>
<div id="nav">
	<div class="wrap s_clear">
	<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 s_clear" id="wrap">
	<div class="main">
<%if {tagid}>0%>
	<script type="text/javascript">
		function changeTab(obj)
		{
			if (obj.className == 'current')
			{
				obj.className = '';
			}
			else
			{
				obj.className = 'currentt';
			}
		}
	</script>
	<div class="cm_header itemtitle s_clear">
	<ul>
		<li id="tab_forum" <%if {listtype}=="topic"%>class="current" <%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="current" <%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="current" <%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="current" <%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 taglist">
		<table cellSpacing="0" cellPadding="0" summary="主题标签">
		<thead>
		<tr>
			<th style="padding:4px 0; text-align:center;">标题</th>
			<th>所在版块</th>
			<td class="author">作者</td>
			<td class="nums">回复 / 查看</td>
			<td class="lastpost"><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="author">
				<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="nums">{topic.replies} / {topic.views}</td>
			<td class="lastpost">
				<em><a href="showtopic.aspx?topicid={topic.tid}&page=end" target="_blank"><%datetostr({topic.lastpost},"yyyy.MM.dd HH:mm")%></a></em>
				<cite>by
				<%if {topic.lastposterid}==-1%>
					游客
				<%else%>
					<a href="{UserInfoAspxRewrite(topic.lastposterid)}" target="_blank">{topic.lastposter}</a>
				<%/if%>
				</cite>
			</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="author">作者</td>
			<td class="nums">回复 / 查看</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="author">
				<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="nums"><em>{post.commentcount}</em> / {post.views}</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="templates/{templatepath}/images/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="javascript/template_showtopic.js"></script>	
		<script type="text/javascript" src="javascript/template_tags.js"></script>	
		<script type="text/javascript" src="javascript/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%>