Files
ningbo/动易的标签库/标签库/博客类/获取所有栏目博文数.config
T
2026-08-31 16:22:00 +08:00

63 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<root>
<LabelType>博客类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<Version officialVersion="" modifiedVersions="2529" compatibleVersion="" />
<attributes>
<name>blogId</name>
<datatype>sql.int</datatype>
<default>0</default>
<intro>博客ID</intro>
</attributes>
<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:param name="username" />
<xsl:variable name="IsBlogOwner" select="pe:LoginedUserName()=$username"/>
<xsl:output method="html" />
<xsl:template match="/">
<!--请按提示编辑,保持该模板结构的正确性-->
<root>
<sql>
<xsl:choose>
<xsl:when test="$IsBlogOwner='true'">
SELECT COUNT(UserCategoryID) FROM PE_BG_log WHERE BlogID=@blogId AND State>-1
</xsl:when>
<xsl:otherwise>
SELECT COUNT(UserCategoryID) FROM PE_BG_log WHERE BlogID=@blogId AND State>0
</xsl:otherwise>
</xsl:choose>
</sql>
<sqlpage>
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
</sqlpage>
<countsql>
<!--请在这里编写你的分页SQL语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
</countsql>
</root>
</xsl:template>
</xsl:transform>]]></LabelSqlString>
<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:param name="UserName" />
<xsl:param name="CategoryID" />
<xsl:output method="html" />
<xsl:template match="/NewDataSet/Table">
<xsl:value-of select="Column1"/>
</xsl:template>
</xsl:stylesheet>]]></LabelTemplate>
<attributes>
<name>username</name>
<datatype>string</datatype>
<default>
</default>
<intro>用户名</intro>
</attributes>
</root>