<%template _header%>
<script type="text/javascript">
var aspxrewrite = {config.Aspxrewrite};
</script>
<div id="foruminfo">
	<div id="nav"><a href="{config.forumurl}">{config.forumtitle}</a> &raquo; <a href="tags.aspx">标签</a> &raquo; <%if {page_err}==0 && {tagid}>0%>{tag.tagname}<%/if%></div>
</div>
<%if {page_err}==0%>
	<%if {tagid}>0%>
		<script type="text/javascript">
			function changeTab(obj)
			{
				if (obj.className == 'currenttab')
				{
					obj.className = '';
				}
				else
				{
					obj.className = 'currenttab';
				}
			}
		</script>
		<div class="searchtab">
			<a id="tab_forum" <%if {listtype}=="topic"%>class="currenttab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" style="cursor: pointer;" href="<%if {config.Aspxrewrite}==1%>topictag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"<%/if%>>主题</a>
			<%if {config.enablespace}==1%>
			<a id="tab_space" <%if {listtype}=="spacepost"%>class="currenttab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" style="cursor: pointer;"  href="<%if {config.Aspxrewrite}==1%>spacetag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"<%/if%>>空间</a>
			<%/if%>
			<%if {config.enablealbum}==1%>
			<a id="tab_album" <%if {listtype}=="photo"%>class="currenttab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" style="cursor: pointer;"      href="<%if {config.Aspxrewrite}==1%>phototag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"<%/if%>>相册</a>
			<%/if%>
			<%if {config.enablemall}==1%>
			<a id="tab_mall" <%if {listtype}=="mall"%>class="currenttab" <%else%> onmouseout="changeTab(this)" onmouseover="changeTab(this)" style="cursor: pointer;"      href="<%if {config.Aspxrewrite}==1%>malltag-{tagid}.aspx<%else%>tags.aspx?tagid={tagid}<%/if%>"<%/if%>>商城</a>
			<%/if%>
		</div>
		<%if {listtype}=="topic"%>		
			<%if {topiccount}==0%>
				<%template _msgbox%>
			<%else%>
				<DIV class="mainbox forumlist">
				<TABLE cellSpacing="0" cellPadding="0" summary="主题标签结果">
					<thead>
					<tr>
						<th>标题</th>
						<th>所在版块</th>
						<td>作者</td>
						<td class="nums">回复</td>
						<td class="nums">查看</td>
						<td>最后发表</td>
					</tr>
					</thead>
					<%loop (MyTopicInfo) topic topiclist%>
					<tbody>
						<tr>
							<td>
								<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
								<a href="{aspxrewriteurl}" target="_blank">{topic.title}</a></td>
							<td>
								<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({topic.fid},0)%>
								<a href="{aspxrewriteurl}">{topic.forumname}</a>
							</td>
							<td>
								<p>
								<%if {strtoint({topic.posterid})}==-1%>
									游客
								<%else%>
									<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.posterid})%>
									<a href="{aspxrewriteurl}">{topic.poster}</a>
								<%/if%></p>
								<em><%datetostr({topic.postdatetime},"yyyy.MM.dd HH:mm")%></em>
							</td>
							<td class="nums">{topic.replies}</td>
							<td class="nums">{topic.views}</td>
							<td>
									<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}
						<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { window.location='tags.aspx?t=topic&tagid={tagid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}" size="4" maxlength="9" class="colorblue2"/>页</kbd>
					</div>
				</div>
			<%/if%>
		<%else if {listtype}=="spacepost"%>
			<%if {spacepostcount}==0%>
				<%template _msgbox%>
			<%else%>
				<DIV class="mainbox">
				<TABLE cellSpacing="0" cellPadding="0" summary="日志标签结果">
					<thead>
						<tr>
						<th>标题</th>
						<th>作者</th>
						<td class="nums">回复</td>
						<td class="nums">查看</td>
						</tr>
					</thead>
					<%loop (SpacePostInfo) post spacepostlist%>
					<tbody>
						<tr>
							<td>
								<a href="{spaceurl}space/viewspacepost.aspx?postid={post.postid}" target="_blank">{post.title}</a></td>
							<td class="listitem">
								<p>
								<%if {strtoint({post.uid})}==-1%>
									游客
								<%else%>
									<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({post.uid})%>
									<a href="{aspxrewriteurl}">{post.author}</a>
								<%/if%></p>
								<em><%datetostr({post.postdatetime},"yyyy.MM.dd HH:mm")%></em>
							</td>
							<td class="nums">{post.commentcount}</td>
							<td class="nums">{post.views}</td>
						</tr>
					</tbody>
					<%/loop%>
				</table>			
				</div>
				<div class="pages_btns">
					<div class="pages">
						<em>{pageid}/{pagecount}页</em>{pagenumbers}
						<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { window.location='tags.aspx?t=spacepost&tagid={tagid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}" size="4" maxlength="9" class="colorblue2"/>页</kbd>
					</div>
				</div>
			<%/if%>
		<%else if {listtype}=="photo"%>
			<%if {photocount}==0%>
				<%template _msgbox%>
			<%else%>
				<DIV class="mainbox">
				<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}
						<kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { window.location='tags.aspx?t=photo&tagid={tagid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}" size="4" maxlength="9" class="colorblue2"/>页</kbd>
					</div>
				</div>
			<%/if%>
		<%else if {listtype}=="mall"%>
			<%if {goodscount}==0%>
				<%template _msgbox%>
			<%else%>
				<DIV class="mainbox">
				<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}" 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}
						<kbd>跳转<input name="gopage" type="text" id="Text1" onKeyDown="if(event.keyCode==13) { window.location='tags.aspx?t=mall&tagid={tagid}&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}" size="4" maxlength="9" class="colorblue2"/>页</kbd>
					</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>
		<div class="mainbox">
			<h3>论坛热门标签</h3>
			<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>
		</div>
		<%if {config.enablespace}==1%>
		<div class="mainbox">
			<h3>空间热门标签</h3>
			<ul id="spacehottags" class="taglist"><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="mainbox">
			<h3>图片热门标签</h3>
			<ul id="photohottags" class="taglist"><script type="text/javascript" src="cache/hottags_photo_cache_jsonp.txt" onerror="this.onerror=null;getajaxphotohottags();"></script></ul>
		</div>
		<%/if%>
		<%if {config.enablemall}==1%>
		<div class="mainbox">
			<h3>商城热门标签</h3>
			<ul id="mallhottags" class="taglist"><script type="text/javascript" src="cache/hottags_mall_cache_jsonp.txt" onerror="this.onerror=null;getajaxmallhottags();"></script></ul>
		</div>
		<%/if%>
	<%/if%>
<%else%>
	<%template _errmsgbox%>
<%/if%>
	</div>
	<%template _copyright%>
	<%template _footer%>