first commit
This commit is contained in:
@@ -0,0 +1,315 @@
|
||||
<?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="2922" compatibleVersion="" />
|
||||
<attributes>
|
||||
<name>ouputQty</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出数量</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:output method="xml" />
|
||||
<xsl:param name="isElite"/>
|
||||
<xsl:param name="categoryId"/>
|
||||
<xsl:param name="listOrderType"/>
|
||||
<xsl:template match="/">
|
||||
<!--请按提示编辑,保持该模板结构的正确性-->
|
||||
<xsl:variable name="filter">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$categoryId!=0">
|
||||
L.State=1 AND L.ClassState=2 AND L.CategoryID=@categoryId
|
||||
<xsl:choose>
|
||||
<xsl:when test="$isElite='true'">
|
||||
AND L.EliteLevel>0
|
||||
</xsl:when>
|
||||
<xsl:otherwise></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
L.State=1 AND (L.ClassState=2 OR L.IndexState=2)
|
||||
<xsl:choose>
|
||||
<xsl:when test="$isElite='true'">
|
||||
AND L.EliteLevel>0
|
||||
</xsl:when>
|
||||
<xsl:otherwise></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="order"><xsl:choose>
|
||||
<xsl:when test="$listOrderType!=''">
|
||||
<!--推荐等级降序-->
|
||||
<xsl:if test="$listOrderType=1">L.EliteLevel DESC,L.LogID DESC</xsl:if>
|
||||
<!--推荐等级升序-->
|
||||
<xsl:if test="$listOrderType=2">L.EliteLevel ASC,L.LogID DESC</xsl:if>
|
||||
<!--博文ID降序-->
|
||||
<xsl:if test="$listOrderType=3">L.LogID DESC</xsl:if>
|
||||
<!--博文ID升序-->
|
||||
<xsl:if test="$listOrderType=4">L.LogID ASC</xsl:if>
|
||||
<!--更新时间降序-->
|
||||
<xsl:if test="$listOrderType=5">L.UpdateTime DESC,L.LogID DESC</xsl:if>
|
||||
<!--更新时间升序-->
|
||||
<xsl:if test="$listOrderType=6">L.UpdateTime ASC,L.LogID DESC</xsl:if>
|
||||
<!--点击数降序-->
|
||||
<xsl:if test="$listOrderType=7">L.Hits DESC,L.LogID DESC</xsl:if>
|
||||
<!--点击数升序-->
|
||||
<xsl:if test="$listOrderType=8">L.Hits ASC,L.LogID DESC</xsl:if>
|
||||
<!--月点击数降序-->
|
||||
<xsl:if test="$listOrderType=9">L.MonthHits DESC,L.LogID DESC</xsl:if>
|
||||
<!--月点击数升序-->
|
||||
<xsl:if test="$listOrderType=10">L.MonthHits ASC,L.LogID DESC</xsl:if>
|
||||
<!--周点击数降序-->
|
||||
<xsl:if test="$listOrderType=11">L.WeekHits DESC,L.LogID DESC</xsl:if>
|
||||
<!--周点击数升序-->
|
||||
<xsl:if test="$listOrderType=12">L.WeekHits ASC,L.LogID DESC</xsl:if>
|
||||
<!--日点击数降序-->
|
||||
<xsl:if test="$listOrderType=13">L.DayHits DESC,L.LogID DESC</xsl:if>
|
||||
<!--日点击数升序-->
|
||||
<xsl:if test="$listOrderType=14">L.DayHits ASC,L.LogID DESC</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>L.LogID DESC</xsl:otherwise></xsl:choose></xsl:variable>
|
||||
<root>
|
||||
<sql>EXEC [dbo].[PR_Common_PagingLarge] 'PE_BG_Log L INNER JOIN PE_BG_Blog B ON L.BlogID=B.BlogID','L.LogID','L.*,B.Nickname',@pagesize,@startrow ,'<xsl:value-of select="$filter"/>','','<xsl:value-of select="$order"/>'</sql>
|
||||
<sqlpage>
|
||||
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</sqlpage>
|
||||
<countsql>SELECT COUNT(LogID) FROM PE_BG_log L INNER JOIN PE_BG_Blog B ON L.BlogID=B.BlogID WHERE <xsl:value-of select="$filter"/></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="ouputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="linkOpenType" />
|
||||
<xsl:param name="isShowNum" />
|
||||
<xsl:param name="titleStyle"/>
|
||||
<xsl:param name="displayInputer"/>
|
||||
<xsl:param name="inputerStyle"/>
|
||||
<xsl:param name="partitionNums"/>
|
||||
<xsl:param name="categoryId"/>
|
||||
<xsl:param name="numStyle"/>
|
||||
<xsl:param name="displayHits"/>
|
||||
<xsl:param name="hitsSytle"/>
|
||||
<xsl:param name="hitsType"/>
|
||||
<xsl:param name="displayTime"/>
|
||||
<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>
|
||||
<xsl:if test="position() mod $partitionNums=0">
|
||||
<xsl:attribute name="class">separator</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="$isShowNum='true'">
|
||||
<em>
|
||||
<xsl:if test="$numStyle!=''">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$numStyle"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="position()"/>
|
||||
</em>
|
||||
</xsl:if>
|
||||
<a>
|
||||
<xsl:if test="$titleStyle!=''">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$titleStyle" />
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:value-of select="$linkOpenType" />
|
||||
</xsl:attribute>
|
||||
<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"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="Title"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
|
||||
</a>
|
||||
<span class="date">
|
||||
<xsl:if test="$displayTime='true'">
|
||||
<xsl:value-of select="pe:FormatDate(UpdateTime,'yyyy-mm-dd') "/>
|
||||
</xsl:if>
|
||||
</span>
|
||||
<xsl:if test="$displayInputer='true'">
|
||||
<span>
|
||||
<xsl:if test="$inputerStyle!=''">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$inputerStyle" />
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<a>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:value-of select="$linkOpenType" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>blog/UserIndex.aspx?Id=<xsl:value-of select="BlogID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="Title"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Nickname"/>
|
||||
</a>
|
||||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayHits='true'">
|
||||
<span>
|
||||
<xsl:if test="$hitsSytle!=''">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="$hitsSytle"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<!--总点击数-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$hitsType!=0">
|
||||
<xsl:if test="$hitsType=7">
|
||||
<xsl:value-of select="Hits"/>
|
||||
</xsl:if>
|
||||
<!--月点击数-->
|
||||
<xsl:if test="$hitsType=9">
|
||||
<xsl:value-of select="MonthHits"/>
|
||||
</xsl:if>
|
||||
<!--周点击数-->
|
||||
<xsl:if test="$hitsType=11">
|
||||
<xsl:value-of select="WeekHits"/>
|
||||
</xsl:if>
|
||||
<!--日点击数-->
|
||||
<xsl:if test="$hitsType=13">
|
||||
<xsl:value-of select="DayHits"/>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="Hits"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</span>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>displayTime</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示时间</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>标题截取长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>string</datatype>
|
||||
<default>_blank</default>
|
||||
<intro>链接打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>排序类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayInputer</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示作者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayHits</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否点击数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>标题样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputerStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>作者样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>isShowNum</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示数字</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>categoryId</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>分类ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>isElite</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否推荐</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>partitionNums</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>每多少行分隔</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>numStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>数字样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hitsSytle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>点击数样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hitsType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>点击数类型</intro>
|
||||
</attributes>
|
||||
<UsePage>True</UsePage>
|
||||
<LabelSqlCount>
|
||||
SELECT count(LogID) FROM PE_BG_log WHERE State=1 AND (ClassState=2 OR IndexState=2)
|
||||
</LabelSqlCount>
|
||||
<LabelSqlPage>
|
||||
</LabelSqlPage>
|
||||
</root>
|
||||
Reference in New Issue
Block a user