119 lines
5.3 KiB
XML
119 lines
5.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<root>
|
|
<LabelType>博客类</LabelType>
|
|
<LabelIntro>
|
|
</LabelIntro>
|
|
<OutType>sin</OutType>
|
|
<LabelDataType>sql_sysquery</LabelDataType>
|
|
<EnabelAjax>True</EnabelAjax>
|
|
<Version officialVersion="" modifiedVersions="2527" compatibleVersion="" />
|
|
<UsePage>True</UsePage>
|
|
<IsXsltSql>true</IsXsltSql>
|
|
<IsXsltCountSql>false</IsXsltCountSql>
|
|
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
|
<!--要使用上一步定义的自定义参数,要作为XSLT参数使用,务必要在这里声明。如:<xsl:param name="myPara" />.引用该参数:$myPara -->
|
|
<xsl:output method="xml" />
|
|
<xsl:template match="/">
|
|
<!--请按提示编辑,保持该模板结构的正确性-->
|
|
<root>
|
|
<xsl:variable name="filter">
|
|
PE_BG_COMMENT.LogID = @logId AND PE_BG_COMMENT.Status = 1
|
|
</xsl:variable>
|
|
<sql>
|
|
EXEC [dbo].[PR_Common_PagingLarge] 'PE_BG_log INNER JOIN PE_BG_COMMENT ON PE_BG_log.LogID =PE_BG_COMMENT.LogID LEFT JOIN PE_BG_Blog ON PE_BG_Blog.UserName = PE_BG_COMMENT.UserName','PE_BG_Comment.CommentID','PE_BG_log.BlogID,PE_BG_Blog.BlogID AS VisitorBlogID ,PE_BG_Blog.BlogName,PE_BG_Blog.Face,PE_BG_log.Title,PE_BG_COMMENT.* ',@pagesize,@startrow,'<xsl:value-of select="$filter"/>','','PE_BG_Comment.CommentID DESC'
|
|
|
|
</sql>
|
|
<sqlpage>
|
|
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
|
</sqlpage>
|
|
<countsql>
|
|
<!--请在这里编写你的分页SQL语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
|
</countsql>
|
|
</root>
|
|
</xsl:template>
|
|
</xsl:transform>]]></LabelSqlString>
|
|
<LabelSqlCount>SELECT COUNT(*) FROM PE_BG_log L INNER JOIN PE_BG_COMMENT C ON L.LogID =C.LogID WHERE C.LogID = @logId AND C.Status = 1</LabelSqlCount>
|
|
<LabelSqlPage>
|
|
</LabelSqlPage>
|
|
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
|
<xsl:output method="html" />
|
|
<xsl:param name="blogId" />
|
|
<xsl:param name="username" />
|
|
<xsl:template match="/NewDataSet">
|
|
<xsl:choose>
|
|
<xsl:when test="count(/NewDataSet/Table) = 0">
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:for-each select="/NewDataSet/Table">
|
|
<li>
|
|
<xsl:choose>
|
|
<xsl:when test="VisitorBlogID != ''">
|
|
<a href="{pe:InstallDir()}Blog/UserIndex.aspx?id={VisitorBlogID}" title="{BlogName}" class="pic">
|
|
<xsl:choose>
|
|
<xsl:when test="Face!= ''">
|
|
<img src="{pe:ConvertToAbsolutePath(Face)}" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<img src="{pe:SkinDir()}Blog/images/nopic.png" alt="个人图片" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</a>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<span class="pic">
|
|
<img src="{pe:SkinDir()}Blog/images/nopic.png" alt="个人图片" />
|
|
</span>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
<strong>
|
|
<xsl:value-of select="Nickname"/>
|
|
</strong>
|
|
<span class="dateTime">
|
|
<xsl:value-of select="pe:FormatDate(CreateTime,'yyyy-mm-dd hh:ff:ss')" />
|
|
<xsl:choose>
|
|
<xsl:when test="string($username)=pe:LoginedUserName()">
|
|
[<a href="javascript:DelComment({CommentID},{BlogID});" onclick="return confirm('确定要删除此评论吗?');">删除</a>]
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</span>
|
|
<p >
|
|
<div id="wrap" class="commentwrap" >
|
|
<xsl:value-of select="Content"/>
|
|
</div>
|
|
</p>
|
|
</li>
|
|
</xsl:for-each>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
</xsl:stylesheet>]]></LabelTemplate>
|
|
<attributes>
|
|
<name>outputQty</name>
|
|
<datatype>supersql</datatype>
|
|
<default>10</default>
|
|
<intro>显示数量</intro>
|
|
</attributes>
|
|
<attributes>
|
|
<name>currentPage</name>
|
|
<datatype>supersql</datatype>
|
|
<default>1</default>
|
|
<intro> 当前页数</intro>
|
|
</attributes>
|
|
<attributes>
|
|
<name>logId</name>
|
|
<datatype>supersql</datatype>
|
|
<default>0</default>
|
|
<intro>博文ID</intro>
|
|
</attributes>
|
|
<attributes>
|
|
<name>username</name>
|
|
<datatype>string</datatype>
|
|
<default>
|
|
</default>
|
|
<intro>博客用户名</intro>
|
|
</attributes>
|
|
</root> |