<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
<xsl:template  match="/">
<xsl:variable name="myscript"><![CDATA[
<script language="javascript" src="Dv_plus/mf1.js"></script>
]]>
</xsl:variable>
<!--判断是否是IE，生成相应的style和class-->
<xsl:variable name="postclass">
<xsl:choose>
<xsl:when test="post/agent/@browser='Microsoft Internet Explorer'">postie</xsl:when>
<xsl:otherwise>post</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="bodystyle">
<xsl:choose>
<xsl:when test="post/agent/@browser='Microsoft Internet Explorer'">height:80px;width:97%;padding-right:0px; overflow-x: hidden;</xsl:when>
<xsl:otherwise>min-height:50px;</xsl:otherwise>
</xsl:choose>font-size:<xsl:value-of select="post/setting/@fontsize" />pt;line-height:<xsl:value-of select="post/setting/@lineheight" />;text-indent:<xsl:value-of select="post/setting/@indent" />px;</xsl:variable>
<!--end -->
<xsl:variable name="mofaface"><xsl:if test="contains(post/postinfo/@expression,'|')"><xsl:value-of select="substring-before(post/postinfo/@expression,'|')" /></xsl:if></xsl:variable>
<div id="MagicFace" style="position:absolute;z-index : 99;visibility:hidden; "></div>
<xsl:value-of select="$myscript" disable-output-escaping="yes" />
<div class="main" style="margin-top:4px;height:20px;line-height:20px;margin-bottom:4px;">
<div style="float:left;"> [您是本留言的第 <b><xsl:value-of select="post/postinfo/@hits"/></b> 个阅读者] <xsl:choose>
<xsl:when test="post/postinfo/@skin !=1"> [<a href="?BoardID={post/postinfo/@boardid}&amp;replyID={post/postinfo/@replyid}&amp;id={post/postinfo/@topicid}&amp;skin=1" title="树形显示留言" >树状</a>] </xsl:when>
<xsl:otherwise>[<a href="?BoardID={post/postinfo/@boardid}&amp;replyID={post/postinfo/@replyid}&amp;id={post/postinfo/@topicid}&amp;skin=0" title="平板显示留言">直观</a>] 
</xsl:otherwise></xsl:choose> [<a href="TopicOther.asp?t=5&amp;BoardID={post/postinfo/@boardid}&amp;id={post/postinfo/@topicid}" target="_blank" title="以文本形式浏览本页或打印本贴内容">简洁</a>]
 [<a href="query.asp?stype=8&amp;keyword={post/postinfo/@title}&amp;isWeb=2" target="_blank" title="在互联网搜索更多此类留言">更多</a>]
<xsl:if test="post/userinfo/@userid !=0 "> [<a href="favlist.asp?action=add&amp;BoardID={post/postinfo/@boardid}&amp;id={post/postinfo/@topicid}" title="将本贴加入贴吧收藏夹">收藏</a>] 
<xsl:if test="post/setting/@cansendmail =1 "> [<a href="TopicOther.asp?t=7&amp;BoardID={post/postinfo/@boardid}&amp;id={post/postinfo/@topicid}" title="推荐本贴给QQ好友">推荐</a>] 
</xsl:if> [<a href="admin_postings.asp?action=修复&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="修复贴子的回复数、更新时间。">更新</a>] 
</xsl:if></div>
<div style="float:right;"><a href="post.asp?action=new&amp;boardid={post/postinfo/@boardid}">发表新留言</a> | <a href="post.asp?action=vote&amp;boardid={post/postinfo/@boardid}">发起投票</a> | <a href="infolist.asp?t=smallpaper&amp;boardid={post/postinfo/@boardid}">发布消息</a> | <a href="set.asp?boardid={post/postinfo/@boardid}" title="进入吧主管理中心,管理贴子和本吧设置"><font color="#FF0000">吧主管理</font></a> | 
<xsl:choose>
<xsl:when test="post/postinfo/@postuserid =0"><a href="post.asp?action=re&amp;boardid={post/postinfo/@boardid}&amp;id={post/postinfo/@topicid}&amp;star={post/postinfo/@star}&amp;page={post/postinfo/@page}&amp;guest=true">回复留言</a>
</xsl:when>
<xsl:otherwise><a href="post.asp?action=re&amp;boardid={post/postinfo/@boardid}&amp;id={post/postinfo/@topicid}&amp;star={post/postinfo/@star}&amp;page={post/postinfo/@page}">回复留言</a>
</xsl:otherwise>
</xsl:choose></div>
</div>
<div class="main" style="margin-top:4px;line-height:20px;margin-bottom:4px;">
<div style="float:left;">为方便您下次浏览，请收藏本页到：</div>
<div style="float:right;"><script language="javascript" src="Dv_plus/wz.js"></script></div>
</div>
<xsl:if test="/post/postinfo/@isvote=1"><xsl:call-template name="showvote" /></xsl:if>
<div class="th">
<div align="center" style="height:24px;text-indent:10px;font-size:13px">标题：<xsl:choose>
<xsl:when test="post/postinfo/@topicmode=0"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 1"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes" /></xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 2"><font color="red"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes"/></font></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 3"><font color="blue"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes"/></font></xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 4"><font color="green"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes"/></font></xsl:when>
<xsl:otherwise><xsl:value-of select="post/postinfo/@title"/></xsl:otherwise>
</xsl:choose></xsl:otherwise>

</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</div>
</div><xsl:for-each select="post/row">
<a name="{@announceid}" >
</a>
<xsl:variable name="userid" select="@postuserid"/>
<div class="postlary{2 - (position() mod 2)}">
<div class="{$postclass}"><div>
<div style="float:left;">
<xsl:if test="/post/setting/@isboke=1"><a href="favlist.asp?action=boke&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}" title="收录该贴到我的博客" target="_blank"><img src="{/post/setting/@picurl}bokefav.gif"  border="0" align="middle" /></a> </xsl:if>
<xsl:choose>
<xsl:when test="/post/postinfo/@skin !=1">
<xsl:choose>
<xsl:when test="/post/postinfo/@star =1">
<xsl:choose>
<xsl:when test="position()=1">楼主</xsl:when>
<xsl:otherwise>第 <font color="red"><xsl:value-of select="position()"/></font> 楼</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>第 <font color="red"><xsl:value-of select="position() + (/post/postinfo/@star -1) * /post/setting/@pagesize"/></font> 楼</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise><xsl:value-of select="' '"/></xsl:otherwise>
</xsl:choose>( 作者:
<xsl:value-of select="@username" />
<xsl:variable name="userface" select="/post/userlist/user[@userid=$userid]/@userface"/>
<xsl:choose>
<xsl:when test="contains($userface,'|')">
<xsl:if test="substring-before($userface,'|') != '0'">
<xsl:text>  </xsl:text><a href="javascript:DispMagicEmot({substring-before($userface,'|')},350,500)">魔法头像</a> 
</xsl:if>
</xsl:when>
</xsl:choose><xsl:if test="/post/userlist/user[@userid=$userid]/@userclass !=0"><xsl:text> | </xsl:text>
 等级：<xsl:value-of select="/post/userlist/user[@userid=$userid]/@userclass"/></xsl:if> | <xsl:if test="/post/setting/@usertitle=1"><xsl:if test="/post/userlist/user[@userid=$userid]/@usertitle != ''"> 头衔：<xsl:value-of select="/post/userlist/user[@userid=$userid]/@usertitle"/> </xsl:if></xsl:if>
) [留言时间:<xsl:value-of select="@dateandtime" />]
<br />
<div >
<xsl:if test="/post/userinfo/@userid  !=0"><div class="menu_popup" id="Menu_{position()}">
<div class="menuitems">
<a href="TopicOther.asp?t=6&amp;BoardID={/post/postinfo/@boardid}&amp;id={/post/postinfo/@topicid}&amp;ReplyID={@announceid}" title="向管理员举报该贴">举报</a>
<xsl:if test="position() != 1 or  /post/postinfo/@star !=1">
<xsl:choose>
<xsl:when test="/post/userinfo/@userid= $userid and not (/post/userinfo/@boardmaster=1)">
<xsl:if test="/post/userinfo/@candelmypost=1">
<br /><a href="admin_postings.asp?action=dele_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">删除</a>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="/post/userinfo/@boardmaster=1">
<br /><a href="admin_postings.asp?action=dele_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">删除</a>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="/post/userinfo/@boardmaster =1 ">
<br /><a href="admin_postings.asp?action=copy_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">复制</a>
<xsl:choose>
<xsl:when test="@isbest= 0 "><br /><a href="admin_postings.asp?action=isbest_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">加精</a></xsl:when>
<xsl:otherwise><br /><a href="admin_postings.asp?action=nobest_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">解精</a></xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="@locktopic !=2"><xsl:choose>
<xsl:when test="@locktopic =3">
<br/><a href="AccessTopic.asp?action=unlock&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}">解固</a>
</xsl:when>
<xsl:otherwise><br/><a href="admin_postings.asp?action=islockpage_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">屏蔽</a></xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<br/><a href="admin_postings.asp?action=nolockpage_a&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;userid={@postuserid}">解封</a>
</xsl:otherwise>
</xsl:choose>
<br /><a href="admin_postings.asp?action=RewardMoney&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}" title="好评或差评，可奖励或扣除该贴用户相关分值">评价</a>
</xsl:if>
<xsl:if test="/post/setting/@usetools =1 ">
<br /><a title="对本贴使用魔法" href="javascript:openScript('plus_Tools_InfoSetting.asp?action=0&amp;BoardID={/post/postinfo/@boardid}&amp;TopicID={/post/postinfo/@topicid}&amp;ReplyID={@announceid}',500,400)">魔法</a>
</xsl:if>
</div>
</div></xsl:if>
<xsl:if test="(/post/postinfo/@locktopic != 1 and /post/userinfo/@canreply =1)or (/post/userinfo/@boardmaster =1 ) ">
<xsl:choose>
<xsl:when test="@postuserid=0">
<a href="post.asp?action=re&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;reply=true&amp;guest=true">引用</a><xsl:text> | </xsl:text><a href="post.asp?action=re&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;guest=true">回复</a><xsl:text> | </xsl:text></xsl:when>
<xsl:otherwise>
 <a href="post.asp?action=re&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}&amp;reply=true">引用</a><xsl:text> | </xsl:text><a href="post.asp?action=re&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}">回复</a><xsl:text> | </xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="/post/userinfo/@userid  !=0">
<xsl:choose>
<xsl:when test="/post/userinfo/@userid= $userid and not (/post/userinfo/@boardmaster=1)">
<xsl:if test="/post/userinfo/@caneditmypost=1"> <a href="post.asp?action=edit&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}">编辑</a><xsl:text> | </xsl:text></xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="/post/userinfo/@boardmaster=1"> <a href="post.asp?action=edit&amp;BoardID={/post/postinfo/@boardid}&amp;replyID={@announceid}&amp;ID={/post/postinfo/@topicid}&amp;star={/post/postinfo/@star}">编辑</a><xsl:text> | </xsl:text></xsl:if>
</xsl:otherwise>
</xsl:choose><img src="{/post/setting/@picurl}topicmanage.gif" alt="" style="margin:0px;cursor: pointer;height=11" onmouseover="showmenu(event,'','Menu_{position()}');" /><xsl:text> | </xsl:text></xsl:if>
<xsl:if test="(not (/post/userinfo/@cananony=1) or @signflag !=2 or /post/userinfo/@truemaster=1 or /post/userinfo/@userid = @postuserid) and @postuserid!=0">
<xsl:if test="/post/setting/@isboke=1"><a href="boke.asp?UserID={@postuserid}" title="访问{@username}的个人博客" target="_blank">博客</a><xsl:text> | </xsl:text></xsl:if>
<xsl:if test="/post/userlist/user[@userid=$userid]/@oicq !=''"><a href="http://wpa.qq.com/msgrd?V=1&amp;Uin={/post/userlist/user[@userid=$userid]/@oicq}&amp;Site=By Dvbbs&amp;Menu=yes" title="点击发送QQ消息给{@username}" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{/post/userlist/user[@userid=$userid]/@oicq}:4" border="0" width="16" height="12" align="middle"/></a>QQ<xsl:text> | </xsl:text></xsl:if>
<xsl:if test="/post/userinfo/@userid  !=0"><a href="messanger.asp?action=new&amp;touser={@username}" target="_blank">短信</a><xsl:text> | </xsl:text><a href="friendlist.asp?action=addF&amp;myFriend={@username}" target="_blank">朋友</a><xsl:text> | </xsl:text><a href="dispuser.asp?id={@postuserid}" target="_blank">资料</a><xsl:text> | </xsl:text><a href="query.asp?stype=1&amp;nSearch=3&amp;keyword={@username}&amp;BoardID={/post/postinfo/@boardid}&amp;SearchDate=ALL" target="_blank">历史</a><xsl:text> | </xsl:text></xsl:if>
<xsl:if test="/post/userlist/user[@userid=$userid]/@useremail !=''"><a href="mailto:{/post/userlist/user[@userid=$userid]/@useremail}">邮箱</a><xsl:text> | </xsl:text></xsl:if>
<xsl:if test="/post/userlist/user[@userid=$userid]/@homepage !=''"><a href="{/post/userlist/user[@userid=$userid]/@homepage}" target="_blank">主页</a><xsl:text> | </xsl:text></xsl:if>
</xsl:if><script type="text/javascript" language="javascript">document.write (astro('<xsl:value-of select="/post/userlist/user[@userid=$userid]/@userbirthday"/>'));</script>
<xsl:choose><xsl:when test="@postuserid = 0">声明:本留言作者为匿名用户,如有违法现象请举报!贴吧管理人员在接到举报后应立即删除!</xsl:when></xsl:choose> 
<xsl:choose><xsl:when test="/post/userinfo/@canlookip = 1"><a href="TopicOther.asp?t=1&amp;boardid={/post/postinfo/@boardid}&amp;userid={$userid}&amp;ip={@ip}&amp;action=lookip" target="_blank"><img border="0" src="Skins/Default/ip.gif" style="margin:4px;" alt="{@ip}" /></a>
</xsl:when></xsl:choose>
</div><hr />
<xsl:variable name="checkinfo"><xsl:call-template name="checkuser">
<xsl:with-param name="userid" select="$userid"/>
</xsl:call-template></xsl:variable>
<xsl:if test="$checkinfo !=''"><div class="lockuser"><xsl:value-of select="$checkinfo" /></div></xsl:if>
<xsl:if test="$checkinfo ='' or /post/userinfo/@boardmaster =1">
<div style="height:22px;line-height:22px;"><div style="float:left;"><img src="{/post/setting/@picurl}topicface/{@expression}" alt="发贴心情" /></div><b><xsl:value-of select="@topic" disable-output-escaping="yes"/></b></div>
<div style="{$bodystyle}margin-top:10px;word-wrap : break-word ;word-break : break-all ;" onload="this.style.overflowX='auto';">
<xsl:if test="@parentid = 0"><xsl:if test="$mofaface !='' and $mofaface !='0'"><div style="float:right;width:60px;"><a href="javascript:DispMagicEmot({$mofaface},350,500)">重放<img src="dv_plus/tools/magicface/gif/{$mofaface}.gif" border="0" alt=""/></a></div>
<script type="text/javascript" language="javascript">
LoadMagicEmot(<xsl:value-of select="$mofaface" />,<xsl:value-of select="/post/postinfo/@topicid"/>);
</script></xsl:if></xsl:if><xsl:choose>
<xsl:when test="@parentid =0 and /post/postinfo/@getmoneytype=3"><xsl:call-template name="checkgetmoney" /></xsl:when>
<xsl:otherwise><xsl:value-of select="@body" disable-output-escaping="yes"/></xsl:otherwise>
</xsl:choose>
</div>
<xsl:if test="/post/userlist/user[@userid=$userid]/@usersign !='' and @signflag =1">
<div style="width:85%;overflow-x: hidden;">
<img src="{/post/setting/@picurl}sigline.gif" /><br /><xsl:value-of select="/post/userlist/user[@userid=$userid]/@usersign" disable-output-escaping="yes"/>
</div>
</xsl:if>
</xsl:if>
<xsl:if test="$checkinfo !='' and not (/post/userinfo/@boardmaster =1)">
</xsl:if>
<xsl:variable name="postinfo"><xsl:call-template name="checkpostinfo" /></xsl:variable>
<xsl:if test="$postinfo !=''"><div class="info">
<xsl:value-of select="$postinfo" disable-output-escaping="yes"/>
</div></xsl:if></div></div></div></div>

<div class="postbottom{2 - (position() mod 2)}" >
<div style="float:left;left:16px;">
<!--  匿名帖的修改，当signflag=2则显示为匿名用户，只有管理人员可见真实用户名-->
<xsl:choose>
<xsl:when test="/post/userinfo/@cananony=1 and @signflag=2 and not (/post/userinfo/@truemaster=1) and /post/userinfo/@userid != @postuserid">本贴为匿名用户发表(<xsl:value-of select="substring-before(@ip,'.')" /><xsl:value-of select="substring-before(substring-after(@ip,'.'),'.')" />)
</xsl:when><xsl:when test="@postuserid = 0"><div style="float:left;left:16px;"><xsl:value-of select="@ubblist" disable-output-escaping="yes"/></div>
<div style="float:right;"><a href="#top"><img src="{/post/setting/@picurl}p_up.gif" alt="回到顶部" style="margin:4px;border:0px;"/></a></div>
</xsl:when>
<xsl:otherwise> 作者等级:<img style="margin:3px 0px 0px 0px;" src="{/post/setting/@picurl}star/{/post/userlist/user[@userid=$userid]/@titlepic}"/>
<xsl:if test="/post/userlist/user[@userid=$userid]/@userpower != 0"> 威望:<font color="red"><b><xsl:value-of select="/post/userlist/user[@userid=$userid]/@userpower"/></b></font> | </xsl:if>
 留言:<xsl:value-of select="/post/userlist/user[@userid=$userid]/@userpost"/>条 | 
 超元:<xsl:value-of select="/post/userlist/user[@userid=$userid]/@userep"/> | 
<xsl:variable name="groupname" select="/post/userlist/user[@userid=$userid]/@usergroup"/>
<xsl:if test="/post/setting/@menpai=1"> 部落:<xsl:choose><xsl:when test="$groupname =''">尚未加入 | </xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="/post/group/groupname[@groupname=$groupname]"><xsl:value-of select="$groupname"/><font color="#FF00FF"><xsl:value-of select="/post/userlist/user[@userid=$userid]/@menpai_job"/></font> | </xsl:when>
<xsl:otherwise>尚未加入 | </xsl:otherwise></xsl:choose></xsl:otherwise>
</xsl:choose></xsl:if>
 注册:<xsl:value-of select="/post/userlist/user[@userid=$userid]/@joindate"/> | 
<xsl:choose><xsl:when test="/post/userlist/user[@userid=$userid]/@userhidden='1'">
<xsl:choose><xsl:when test="/post/userlist/user[@userid=$userid]/@usersex!='1'">性别:美女[离线] </xsl:when> 
<xsl:otherwise>性别:帅哥[离线] </xsl:otherwise></xsl:choose></xsl:when> 
<xsl:otherwise><xsl:choose><xsl:when test="/post/userlist/user[@userid=$userid]/@usersex!='1'">性别:美女[在线] </xsl:when> 
<xsl:otherwise>性别:帅哥[在线] </xsl:otherwise></xsl:choose></xsl:otherwise>
</xsl:choose>
<xsl:if test="/post/userinfo/@cananony=1 and @signflag=2"><font color="ff0000">（已匿名）</font></xsl:if>
</xsl:otherwise></xsl:choose></div>
</div>
</xsl:for-each>
<div class="postlary2"  style="height:28px;line-height:28px;border-top:0px; " >      发表留言请遵守：《计算机信息网络国际联网安全保护管理办法》、《互联网信息服务管理办法》、《互联网电子公告服务管理规定》、《维护互联网安全的决定》 等相关法律规定,本贴吧系统有记录用户IP功能（不论是否匿名），必要时将用户IP呈送给公安机关备查！</div>
<xsl:if test="/post/userinfo/@boardmaster=1"><div class="mainbar0" style="width:98%;height:36px;line-height:36px;">
<div style="height:36px;float:right;">
<b>高级管理</b>:
<xsl:if test="/post/postinfo/@getmoneytype =1">
 <a href="BuyPost.asp?Action=Close&amp;BoardID={post/postinfo/@boardid}&amp;PostTable={post/postinfo/@posttable}&amp;ID={post/postinfo/@topicid}&amp;ReplyID={post/postinfo/@replyid}" title="结帖管理">结帖</a> | 
</xsl:if>
<xsl:choose>
<xsl:when test="post/postinfo/@locktopic = 1"> <a href="admin_postings.asp?action=解锁&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="将本主题解开锁定">解锁</a></xsl:when>
<xsl:otherwise> | <a href="admin_postings.asp?action=锁定&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="锁定本主题">锁定</a></xsl:otherwise>
</xsl:choose>
| <a href="admin_postings.asp?action=提升&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="将本主题提升到留言列表最前面">提升</a>
| <a href="admin_postings.asp?action=沉底&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="将本主题放到留言列表较靠后位置">沉底</a>
| <a href="admin_postings.asp?action=跟贴管理&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="批量删除本主题的跟贴">回复管理</a>
| <a href="admin_postings.asp?action=删除主题&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="注意：本操作将删除本主题所有贴子，不能恢复">删除</a>
| <a href="admin_postings.asp?action=移动&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}&amp;replyID={post/postinfo/@replyid}" title="移动主题">移动</a> 
| <a href="admin_postings.asp?action=设置固顶&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="将本主题设置固顶">设为置顶</a> 
| <a href="announcements.asp?BoardID={post/postinfo/@boardid}&amp;action=AddAnn">信息发布</a> | <a href="admin_postings.asp?action=专题管理&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="专题管理">专题管理</a> 
</div>
<div style="height:36px;float:left;">
<b>吧主管理</b>:
<xsl:if test="/post/postinfo/@getmoneytype =1"> <a href="BuyPost.asp?Action=Close&amp;BoardID={post/postinfo/@boardid}&amp;PostTable={post/postinfo/@posttable}&amp;ID={post/postinfo/@topicid}&amp;ReplyID={post/postinfo/@replyid}" title="结帖管理">结帖</a> | </xsl:if>
<xsl:if test="post/userinfo/@canlockmypost =1"><xsl:choose>
<xsl:when test="post/postinfo/@locktopic = 1"> <a href="admin_postings.asp?action=解锁&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="将本主题解开锁定">解锁</a></xsl:when>
<xsl:otherwise> <a href="admin_postings.asp?action=锁定&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="锁定本主题">锁定</a></xsl:otherwise>
</xsl:choose></xsl:if>
<xsl:if test="post/userinfo/@candelmypost =1"> | <a href="admin_postings.asp?action=跟贴管理&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="批量删除本主题的跟贴">回复管理</a>
 | <a href="admin_postings.asp?action=删除主题&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}" title="注意：本操作将删除本主题所有贴子，不能恢复">删除</a>
</xsl:if>
<xsl:if test="post/userinfo/@canmovemypost =1">
 | <a href="admin_postings.asp?action=移动&amp;BoardID={post/postinfo/@boardid}&amp;ID={post/postinfo/@topicid}&amp;replyID={post/postinfo/@replyid}" title="移动主题">转移</a> 
</xsl:if>
</div>
</div>
</xsl:if>
<div class="main" style="width:98%;margin-bottom : 10px;"><div style="float:center;">
<script language="javascript" src="Dv_plus/wz2.js"></script></div></div>
<div class="mainbar0" style="width:98%;height:26px;text-align : left;">
<div style="height:26px;float:right;">
<xsl:choose>
<xsl:when test="/post/postinfo/@skin='0'">
<xsl:call-template name="PageList">
<xsl:with-param name="Page" select="/post/postinfo/@star"/>
<xsl:with-param name="m" select="10"/>
<xsl:with-param name="MaxRows" select="/post/setting/@pagesize"/>
<xsl:with-param name="CountNum" select="/post/postinfo/@child+1"/>
<xsl:with-param name="PageStr">dispbbs.asp?boardid=<xsl:value-of select="/post/postinfo/@boardid"/>&amp;replyid=<xsl:value-of select="/post/postinfo/@replyid"/>&amp;id=<xsl:value-of select="/post/postinfo/@topicid"/>&amp;page=<xsl:value-of select="/post/postinfo/@page"/>&amp;skin=<xsl:value-of select="/post/postinfo/@skin"/></xsl:with-param>
<xsl:with-param name="v" select="1"/>
<xsl:with-param name="pv">Star</xsl:with-param>
<xsl:with-param name="target"></xsl:with-param>
<xsl:with-param name="Forum_AllTopNum" select="0"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise><span id="showpagelist">
</span>
</xsl:otherwise>
</xsl:choose>

<span id="showclose"> </span>
</div>
</div>
<xsl:if test="/post/postinfo/@skin='1'">
<iframe style="border:0px;width:0px;height:0px;" src="loadtree.asp?boardid={post/postinfo/@boardid}&amp;star=1&amp;replyid={post/postinfo/@replyid}&amp;id={post/postinfo/@topicid}&amp;openid={post/row/@announceid}" name="hiddenframe"></iframe>
<div id="postlist" style="margin-top : 10px; margin-bottom : 10px; ">

</div><!--  代码验证,上面必须空1行的，否则出错-->
</xsl:if>
<xsl:if test="post/userinfo/@canreply =1 ">
<xsl:call-template name="fastre" />
</xsl:if>
<xsl:variable name="postuserid" select="post/postinfo/@postuserid"/>
<xsl:choose>
<xsl:when test="post/userinfo/@boardmaster =1"><xsl:call-template name="managemenu" /></xsl:when>
<xsl:otherwise>
<xsl:if test="post/userinfo/@userid = $postuserid ">
<xsl:call-template name="managemenume" />
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template name="managemenu">
</xsl:template>

<xsl:template name="checkpostinfo">
<xsl:if test="@isbest='1'"> &lt;img src="<xsl:value-of select="/post/setting/@picurl" />jing.gif" border="0" title="本贴被加为精华" align="absmiddle"/&gt; </xsl:if>
<xsl:if test="@isagree != ''and contains(@isagree,'|')">
<xsl:if test="substring-after(@isagree,'|') &gt; 0">  &lt;img src="<xsl:value-of select="/post/setting/@picurl" />agree.gif" border="0" alt="好评，获得<xsl:value-of select="substring-after(@isagree,'|')" />个超元奖励" / &gt; </xsl:if>
<xsl:if test="substring-before(@isagree,'|') &gt; 0">  &lt;img src="<xsl:value-of select="/post/setting/@picurl" />DisAgree.gif" border="0" alt="差评，扣除<xsl:value-of select="substring-before(@isagree,'|')" />个超元"/&gt; </xsl:if>
</xsl:if>
<xsl:if test="@isupload='2' or @isupload='3'"> &lt;a href="wap.asp?Action=readme" target="_blank" &gt;&lt;img src="<xsl:value-of select="/post/setting/@picurl" />wap00.gif" border="0" alt="Wap-手机发帖"/&gt;&lt;/a&gt; </xsl:if>
<xsl:if test="/post/postinfo/@usetools!='' or /post/postinfo/@getmoneytype!='0'">
 &lt;img src="<xsl:value-of select="/post/setting/@picurl" />mini_query.gif" border="0" alt="查看使用魔法详细信息" onclick="openScript('ViewInfo.asp?t=2&amp;action=View&amp;PostTable=<xsl:value-of select="/post/postinfo/@posttable" />&amp;BoardId=<xsl:value-of select="/post/postinfo/@boardid" />&amp;ID=<xsl:value-of select="/post/postinfo/@topicid" />&amp;ReplyID=<xsl:value-of select="@announceid" />',600,450)" class="imgonclick" /&gt; 
<xsl:choose>
<xsl:when test="@parentid = 0"><xsl:call-template name="TopicSendMoneyStr">
<xsl:with-param name="i"><xsl:value-of select="/post/postinfo/@getmoneytype"/></xsl:with-param>
</xsl:call-template></xsl:when>
<xsl:otherwise><xsl:call-template name="SendMoneyStr">
<xsl:with-param name="i"><xsl:value-of select="/post/postinfo/@getmoneytype"/></xsl:with-param>
</xsl:call-template></xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="TopicSendMoneyStr">
<xsl:param name="i"/>
<xsl:if test="$i='1'"> 赠送超元帖，要送出 &lt;font color="red"&gt;<xsl:value-of select="@getmoney"/>&lt;/font&gt; 个超元 </xsl:if>
<xsl:if test="$i='5'"> 赠送超元帖，要送出 &lt;font color="red"&gt;<xsl:value-of select="@getmoney"/>&lt;/font&gt; 个超元[已结帖] </xsl:if>
<xsl:if test="$i='2'"> 获赠超元帖，共获得 &lt;font color="red"&gt;<xsl:value-of select="/post/postinfo/@getmoney"/>&lt;/font&gt; 个超元</xsl:if>
<xsl:if test="$i='3'"> 查看本贴需支付 &lt;font color="red"&gt;<xsl:value-of select="/post/postinfo/@getmoney"/>&lt;/font&gt; 个超元</xsl:if>
</xsl:template>
<xsl:template name="SendMoneyStr">
<xsl:param name="i"/>
<xsl:if test="($i='1' or $i='5') and /post/postinfo/@postuserid != @postuserid "> 获得 &lt;font color="red"&gt;<xsl:value-of select="@getmoney"/>&lt;/font&gt;个超元 </xsl:if>
<xsl:if test="/post/postinfo/@postuserid = /post/userinfo/@userid and @postuserid!=/post/userinfo/@userid and $i!='5' and $i='1'">&lt;a href="BuyPost.asp?Action=Send&amp;PostTable=<xsl:value-of select="/post/postinfo/@posttable" />&amp;BoardId=<xsl:value-of select="/post/postinfo/@boardid" />&amp;ID=<xsl:value-of select="/post/postinfo/@topicid" />&amp;ReplyID=<xsl:value-of select="@announceid" />&amp;UserName=<xsl:value-of select="@username" />" title="赠送超元给会员<xsl:value-of select="@username" />" target="_blank"&gt;赠送超元&lt;/a&gt;</xsl:if>
<xsl:if test="$i='2'">赠送楼主 &lt;font color="red"&gt;<xsl:value-of select="@getmoney"/>&lt;/font&gt;个超元</xsl:if>
</xsl:template>
<xsl:template name="checkuser">
<xsl:param name="userid"/>
<xsl:choose>
<xsl:when test="@isbest= 1 "><xsl:if test="not ( /post/userinfo/@canreadbest = 1)">您无权查看精华贴子</xsl:if></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@locktopic=2">内容被屏蔽</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="/post/userlist/user[@userid=$userid]/@lockuser=1">用户已被锁定</xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="/post/userlist/user[@userid=$userid]/@lockuser=2">用户已经被屏蔽</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@locktopic=3">内容被固封</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="fastre">
<xsl:variable name="myscript">
<![CDATA[
<script language="Javascript" type="text/javascript">
var Dvbbs_bIsIE5=document.all;
var Dvbbs_Mode = 3;
if (Dvbbs_bIsIE5)
{var IframeID=frames["Dvbbs_Composition"];}
else
{
var IframeID=document.getElementById("Dvbbs_Composition").contentWindow;
}
function Gopreview()
{
document.preview.theBody.value=IframeID.document.body.innerHTML; 
var popupWin = window.open('', 'preview_page', 'scrollbars=yes,width=750,height=450');
document.preview.submit()
}
Dvbbs_InitDocument('Body','gb2312');
</script>
]]>
</xsl:variable>
<xsl:variable name="facpath" select="post/postface/@path"/>
<xsl:variable name="empath" select="post/emot/@path"/>
<script  language = "Javascript" src="images/post/reply.js" type="text/javascript"></script>
<form id="Dvform" name="Dvform" action="savepost.asp?action=sre&amp;method=fastreply&amp;BoardID={post/postinfo/@boardid}" onkeydown="ctlent();" onsubmit="Dvbbs_CopyData('Body');" method="post">
<input type="hidden" id="Body" name="Body" value="{post/userinfo/@postdata}" />
<input type="hidden" id="followup" name="followup" value="{post/row/@announceid}" />
<input type="hidden" id="RootID" name="RootID" value="{post/postinfo/@topicid}" />
<input type="hidden" id="star" name="star" value="{post/postinfo/@star}" />
<input type="hidden" id="TotalUseTable" name="TotalUseTable" value="{post/postinfo/@posttable}" />
<input type="hidden" id="UserName" name="UserName" value="{post/userinfo/@username}" />
<div class="th" style="margin-top : 2px;"><div style="float:left;"><xsl:text disable-output-escaping="yes" >&amp;nbsp;&amp;nbsp;</xsl:text>评论：</div><xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 1"></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></div>
<div class="postlary2">
<div class="postuserinfo" ><div style="height:30px;line-height:30px;"><b>表情</b></div>
<div style="height:150px;padding:15px;text-indent:0px;overflow:none;width:185px">
<xsl:for-each select="post/postface/face">
<xsl:choose>
<xsl:when test="position()=1"><input type="radio" value="{.}" name="Expression" checked="checked" /></xsl:when>
<xsl:otherwise><input type="radio" value="{.}" name="Expression" /></xsl:otherwise>
</xsl:choose> <img src="{$facpath}{.}" alt="" />
</xsl:for-each>
 </div><xsl:choose>
<xsl:when test="/post/userinfo/@userid=0">
<input type="hidden" value="0" name="signflag" />
</xsl:when>
<xsl:otherwise>签名<input type="radio" value="0" name="signflag" />不加<input type="radio" checked="checked" value="1" name="signflag" />加<xsl:if test="/post/userinfo/@cananony=1"><input type="radio" value="2" name="signflag" />匿名</xsl:if>
</xsl:otherwise>
</xsl:choose>
<div align="center" style="height:28px;text-indent:10px">容量：<input class="Dvbbs_Reply" disabled="disabled" maxLength="6" size="6" value="{post/setting/@maxpostlen}" name="total" />字节</div>
</div>
<div class="postie" style="padding:0px;height:200px; ">
<div style="width:100%;"></div>
<iframe class="Dvbbs_Reply" id="Dvbbs_Composition" marginheight="5" marginwidth="5" width="99%" height="200" onblur="CheckCount('Body','total');" ></iframe>
</div>
</div>
<div class="postlary2"  style="height:28px;line-height:28px;border-top:0px; " >
 <xsl:if test="post/setting/@piccheck =1 "><b>验证码：</b>
 <img src="DV_getcode.asp" alt= "验证码,看不清楚?请点击刷新验证码" style="height : 20px;margin-top:10px;cursor : pointer;" onclick="this.src='DV_getcode.asp'"/>
 <input type="text" name="codestr" style="margin-top:6px;" size="8" /></xsl:if> <input type="button" value="预览留言" name="Button" style="margin:3px;" onclick="Gopreview()" /> 
  <input style="margin:3px;" type="reset" name="Clear" value="清除回复内容" onclick="ClearReset()"/>   <input type="Submit" value=" 回复留言 " name="Submit" style="margin:3px;"/>

</div>
</form>
<form name="preview" action="preview.asp?boardid={post/postinfo/@boardid}" method="post" target="preview_page">
<input type="hidden" name="Dvtitle" value="" /><input type="hidden" name="theBody" value="" /></form>
<xsl:value-of select="$myscript" disable-output-escaping="yes" />

</xsl:template>
<xsl:template name="managemenume">
</xsl:template>
<xsl:template name="PageList">
<xsl:param name="Page"/><!--当前页码-->
<xsl:param name="m"/><!--一次最多显示几个页码-->
<xsl:param name="MaxRows"/><!--每页记录数-->
<xsl:param name="CountNum"/><!--总记录数-->
<xsl:param name="PageStr"/><!--链接参数-->
<xsl:param name="v"/><!--显示类型-->
<xsl:param name="pv"/><!--页码参数-->
<xsl:param name="target"/><!--链接目标框架-->
<xsl:param name="Forum_AllTopNum"/>
<xsl:variable name="pagecount"><xsl:choose>
<xsl:when test="$CountNum mod $MaxRows=0">
<xsl:value-of select="$CountNum  div $MaxRows"/>
</xsl:when>
<xsl:otherwise><xsl:value-of select="floor($CountNum  div $MaxRows)+1"/>
</xsl:otherwise></xsl:choose>
</xsl:variable>
<xsl:if test="$v='1'">
<table class="tableborder5" cellpadding="0" cellspacing="1" style="width:100%">
<form action="{$PageStr}" method="post" name="PageForm" target="{$target}">
<tr align="center">
<td class="tabletitle1" title="总数" style="width:120 ">留言贴数:<xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><xsl:value-of select="$Forum_AllTopNum + $CountNum"/><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
<td class="tablebody1" title="本页贴数" width="100">本页贴数:<xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text>
<xsl:choose>
<xsl:when test="$Page='1'">
<xsl:choose>
<xsl:when test="$CountNum &lt; $MaxRows">
<xsl:value-of select="$Forum_AllTopNum + $CountNum"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$Forum_AllTopNum + $MaxRows"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$pagecount = $Page">
<xsl:value-of select="$CountNum - ($MaxRows*($Page - 1))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$MaxRows"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text>
</td>
<td class="tabletitle1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text>当前第<xsl:value-of select="$Page"/>页/共<xsl:value-of select="$pagecount"/>页<xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
<xsl:if test="$Page='1'">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><img src="images/pagelist/First.gif" border="0" alt=""/><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$Page!='1'">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><a href="{$PageStr}&amp;{$pv}=1" target="{$target}"><img src="images/pagelist/First.gif" border="0" alt="首页"/></a><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$Page &gt; $m + 1">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><a href="{$PageStr}&amp;{$pv}={$Page - $m}" target="{$target}"><img src="images/pagelist/Previous.gif" border="0" alt="上{$m}页"/></a><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:variable name="i"><xsl:choose><xsl:when test="$Page &lt; floor($m div 2) + 1 ">1</xsl:when><xsl:otherwise><xsl:value-of select="$Page - floor($m div 2)"/></xsl:otherwise></xsl:choose></xsl:variable>
<xsl:variable name="Endpage"><xsl:choose><xsl:when test="$i + $m -1 &lt; $pagecount "><xsl:value-of select="$i + $m -1 "/></xsl:when><xsl:otherwise><xsl:value-of select="$pagecount"/></xsl:otherwise></xsl:choose></xsl:variable>
<xsl:call-template name="showonepage">
<xsl:with-param name="i" select="$i"/>
<xsl:with-param name="endpage" select="$Endpage"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="PageStr" select="$PageStr"/>
<xsl:with-param name="pv" select="$pv"/>
<xsl:with-param name="Page" select="$Page"/>
</xsl:call-template>
<xsl:if test="$pagecount &gt; $m + $Page">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><a href="{$PageStr}&amp;{$pv}={$m + $Page}"  target="{$target}"><img src="images/pagelist/Next.gif" border="0" alt="下{$m}页"/></a><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$Page != $pagecount">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><a href="{$PageStr}&amp;{$pv}={$pagecount}" target="{$target}"><img src="images/pagelist/Last.gif" border="0" alt="尾页"/></a><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$Page = $pagecount">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><img src="images/pagelist/Last.gif" border="0" alt=""/><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<td class="tablebody1">快速到第<input type="text" name="{$pv}" size="1" value="{$Page}" class="PageInput"/>页 <input type="submit" value=" 执行 " name="submit" class="PageInput"/></td>
</tr>
</form>
</table>
</xsl:if>
</xsl:template>
<xsl:template name="showonepage">
<xsl:param name="i"/>
<xsl:param name="endpage"/>
<xsl:param name="target"/>
<xsl:param name="PageStr"/>
<xsl:param name="pv"/>
<xsl:param name="Page"/>
<xsl:if test="$Page != $i">
<td class="tablebody1"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><a href="{$PageStr}&amp;{$pv}={$i}" target="{$target}"><xsl:value-of select="$i"/></a><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$Page = $i">
<td class="tablebody2"><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text><font class="normalTextSmall"><u><b><xsl:value-of select="$i"/></b></u></font><xsl:text disable-output-escaping="yes" >&amp;nbsp;</xsl:text></td>
</xsl:if>
<xsl:if test="$endpage &gt; $i">
<xsl:call-template name="showonepage">
<xsl:with-param name="i" select="$i+1"/>
<xsl:with-param name="endpage" select="$endpage"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="PageStr" select="$PageStr"/>
<xsl:with-param name="pv" select="$pv"/>
<xsl:with-param name="Page" select="$Page"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="showvote">
<!-- 取得总票数-->
<xsl:variable name="sumvote" select="sum(post/voteinfo/voteitem/@num)" />
<form action="topicother.asp?t=4&amp;boardid={post/postinfo/@boardid}&amp;voteid={post/voteinfo/@voteid}&amp;id={post/postinfo/@topicid}" method="post">
<div class="th">
<div style="height:24px;float:left;text-indent:10px;">投票：<xsl:choose>
<xsl:when test="post/postinfo/@topicmode=0"><xsl:value-of select="post/postinfo/@title"/></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 1"><xsl:value-of select="post/postinfo/@title" disable-output-escaping="yes" /></xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 2"><font color="red"><xsl:value-of select="post/postinfo/@title"/></font></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 3"><font color="blue"><xsl:value-of select="post/postinfo/@title"/></font></xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="post/postinfo/@topicmode = 4"><font color="green"><xsl:value-of select="post/postinfo/@title"/></font></xsl:when>
<xsl:otherwise><xsl:value-of select="post/postinfo/@title"/></xsl:otherwise>
</xsl:choose></xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<xsl:for-each select="post/voteinfo/voteitem">
<div class="mainbar3" style="height:28px;line-height:28px;text-align :left;text-indent:12px;">
<div style="float:left;width : 40%;"> <div style="float:left;text-indent:24px;"><xsl:value-of select="concat(position(),'.')" /></div>
<div style="float:left;margin :4px 0px 0px 0px; text-indent:0px;">
<xsl:choose>
<xsl:when test="../@votetype =0"><input type="radio" name="postvote" value="{position()-1}" /></xsl:when>
<xsl:otherwise><input type="checkbox" name="postvote_{position()-1}" value="{position()-1}" /></xsl:otherwise>
</xsl:choose>
</div>
<div style="float:left;text-indent:6px;"><xsl:value-of select="." disable-output-escaping="yes"/></div>
</div>
<div class="vote" style="width : 55%;text-indent:2px;">
<xsl:choose>
<xsl:when test="$sumvote=0">
<div style="float:left;width :40px;padding:10px 2px;"><img src="{/post/setting/@picurl}bar/bar{((position()-1) mod 10) + 1}.gif" width="0" height="8" alt=""/></div>
<div style="float:left;"><b><xsl:value-of select="@num" /> 票：</b>0%</div>
</xsl:when>
<xsl:otherwise><div style="float:left;width : {floor((@num div $sumvote ) * 80)}%;padding:10px 2px;"><img src="{/post/setting/@picurl}bar/bar{((position()-1) mod 10) + 1}.gif" width="100%" height="8" alt=""/></div>
<div style="float:left;"><b><xsl:value-of select="@num" /> 票：</b><xsl:value-of select="floor((@num div $sumvote ) * 1000) div 10" />%</div></xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:for-each>
<div class="mainbar2" style="height:32px;line-height:32px;text-align : left;text-indent:24px;">
<div style="float:left;"> 
<xsl:choose>
<xsl:when test="post/userinfo/@userid=0">您还未登录，不能参与投票</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/voteinfo/@istimeout=1">投票已过期</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/postinfo/@locktopic = 1">相关主题已经锁定，不能投票</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="post/voteinfo/@alreadyvote=1">您已经投过票了，看结果吧！</xsl:when>
<xsl:otherwise><input type="submit" name="Submit" value="投 票" style="margin : 5px;"/></xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</div>
<div style="float:left;">  [总票数 <b><xsl:value-of select="$sumvote" /> 票</b> 参与投票 <b><xsl:value-of select="post/voteinfo/@voters" /></b> 人 截止时间：<xsl:value-of select="post/voteinfo/@timeout" /> | <a href="javascript:openScript('viewinfo.asp?t=1&amp;boardid={post/postinfo/@boardid}&amp;id={post/voteinfo/@voteid}',300,500)">查看投票用户</a>]</div>
</div>
<div class="mainbar3" style="height:28px;line-height:28px;text-align : left;text-indent:24px;">
本投票限制，您需要达到所设定的数值才能投票：留言 <b><xsl:value-of select="post/voteinfo/@uarticle" /></b> 超元 <b><xsl:value-of select="post/voteinfo/@uep" /></b> 魅力 <b><xsl:value-of select="post/voteinfo/@ucp" /></b>  金钱 <b><xsl:value-of select="post/voteinfo/@uwealth" /></b> 威望 <b><xsl:value-of select="post/voteinfo/@upower" /></b>
</div>
</form>
<br />
</xsl:template>
<!--购买贴是否显示的判断-->
<xsl:template name="checkgetmoney">
<fieldset style="border : 1px dotted #ccc;">
<xsl:choose>
<xsl:when test="/post/postinfo/@postuserid=/post/userinfo/@userid"><legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，这是您发布的贴子。</legend>
<xsl:value-of select="@body" disable-output-escaping="yes"/>
</xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="/post/userinfo/@boardmaster =1"><legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，由于您是工作人员，你可以看到内容。</legend>
<xsl:value-of select="@body" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise><xsl:choose>
<xsl:when test="/post/postinfo/postbuyinfo/postbuyusers = /post/userinfo/@username"><legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，您已经购买。</legend>
<xsl:value-of select="@body" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="/post/userinfo/@vipgroupuser=1 and /post/postinfo/postbuyinfo/@notvipbuy=1"><legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，由于您是vip用户，并且因为设置了vip用户可免购买查看，您可以直接查看。</legend>
<xsl:value-of select="@body" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="(/post/postinfo/postbuyinfo/@buyuser =',,' or contains(/post/postinfo/postbuyinfo/@buyuser,concat(',',/post/userinfo/@username,','))) and /post/userinfo/@userid !=0 "><legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，您需要购买方可看到内容。</legend>
<input type="button" value="我要查看内容，决定购买" onclick="location.href='BuyPost.asp?action=buy&amp;boardid={/post/postinfo/@boardid}&amp;id={/post/postinfo/@topicid}&amp;ReplyID={@announceid}&amp;PostTable={/post/postinfo/@posttable}'"/></xsl:when>
<xsl:otherwise>
<legend style="text-indent:0px;">以下内容需要支付 <b><font color="red"><xsl:value-of select="/post/postinfo/@getmoney" /></font></b> 个超元方可查看，您需要购买方可看到内容。</legend>
<xsl:choose>
<xsl:when test="/post/userinfo/@userid !=0">楼主设置了您不可以购买。</xsl:when>
<xsl:otherwise>您还未登录，不能购买。</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</fieldset>
</xsl:template>
</xsl:stylesheet>