first commit
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<?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="2540" compatibleVersion="" />
|
||||
<attributes>
|
||||
<name>blogId</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>博客ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>true</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="type" />
|
||||
<xsl:param name="username" />
|
||||
<xsl:param name="userCategoryID" />
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<!--请按提示编辑,保持该模板结构的正确性-->
|
||||
<root>
|
||||
<xsl:variable name="filterState">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type=0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:LoginedUserName()=$username">State>-1</xsl:when>
|
||||
<xsl:otherwise>State>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$type=1">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:LoginedUserName()=$username">State=-1</xsl:when>
|
||||
<xsl:otherwise>State>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:if test="$type=2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:LoginedUserName()=$username">State=-2</xsl:when>
|
||||
<xsl:otherwise>State>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="filterCategory">
|
||||
<xsl:if test="$userCategoryID>0">
|
||||
AND UserCategoryID=<xsl:value-of select="$userCategoryID" />
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<sql> EXEC [dbo].[PR_Common_PagingLarge] 'PE_BG_log','LogID','*',@pagesize,@startrow,'<xsl:value-of select="$filterState"/><xsl:value-of select="$filterCategory"/> AND BlogID = @blogId','','LogId DESC'</sql>
|
||||
<sqlpage>
|
||||
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</sqlpage>
|
||||
<countsql>select count(LogID) from PE_BG_log WHERE BlogId=@blogId AND <xsl:value-of select="$filterState"/><xsl:value-of select="$filterCategory"/></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="type" />
|
||||
<xsl:param name="blogId" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(NewDataSet/Table)=0">
|
||||
<li>暂时没有任何信息!</li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>Blog/Item.aspx?Id=<xsl:value-of select="$blogId"/>&LogId=<xsl:value-of select="LogID"/>&type=<xsl:value-of select="$type"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="Title"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Title"/>
|
||||
<xsl:if test="State=0">
|
||||
(待审核)
|
||||
</xsl:if>
|
||||
</a> <span class="dateTime">
|
||||
<xsl:value-of select="pe:FormatDate(UpdateTime,'yyyy-mm-dd')"/>
|
||||
</span>
|
||||
<span class="sysMenu">{PE.Label id="博客博文管理操作" blogId="<xsl:value-of select="$blogId"/>" type="<xsl:value-of select="$type"/>" logID="<xsl:value-of select="LogID"/>" userName="<xsl:value-of select="$username" />" /}</span>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
<UsePage>True</UsePage>
|
||||
<LabelSqlCount>select count(LogID) from PE_BG_log WHERE BlogId=@blogId</LabelSqlCount>
|
||||
<LabelSqlPage>
|
||||
</LabelSqlPage>
|
||||
<attributes>
|
||||
<name>username</name>
|
||||
<datatype>sql.string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>userCategoryID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>分类ID</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
Reference in New Issue
Block a user