first commit

This commit is contained in:
2026-08-31 16:22:00 +08:00
commit e969a1e559
2665 changed files with 128795 additions and 0 deletions
@@ -0,0 +1,356 @@
<?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="2911" compatibleVersion="" />
<attributes>
<name>titleLength</name>
<datatype>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:param name="isIndex"/>
<xsl:param name="isCategory"/>
<xsl:template match="/">
<!--请按提示编辑,保持该模板结构的正确性-->
<root>
<xsl:variable name="filter">
<xsl:choose>
<xsl:when test="$categoryId!=0">
State=1 AND TitlePicUrl &lt;&gt;'''' AND CategoryID=@categoryId
<xsl:if test="$isElite='true'">
AND EliteLevel>0
</xsl:if>
</xsl:when>
<xsl:otherwise>
State=1 AND TitlePicUrl &lt;&gt;''''
<xsl:if test="$isElite='true'">
AND EliteLevel>0
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="order">
<xsl:choose>
<xsl:when test="$listOrderType!=''">
<!--推荐等级降序-->
<xsl:if test="$listOrderType=1">EliteLevel DESC,LogID DESC</xsl:if>
<!--推荐等级升序-->
<xsl:if test="$listOrderType=2">EliteLevel ASC,LogID DESC</xsl:if>
<!--博文ID降序-->
<xsl:if test="$listOrderType=3">LogID DESC</xsl:if>
<!--博文ID升序-->
<xsl:if test="$listOrderType=4">LogID ASC</xsl:if>
<!--更新时间降序-->
<xsl:if test="$listOrderType=5">UpdateTime DESC,LogID DESC</xsl:if>
<!--更新时间升序-->
<xsl:if test="$listOrderType=6">UpdateTime ASC,LogID DESC</xsl:if>
<!--点击数降序-->
<xsl:if test="$listOrderType=7">Hits DESC,LogID DESC</xsl:if>
<!--点击数升序-->
<xsl:if test="$listOrderType=8">Hits ASC,LogID DESC</xsl:if>
<!--月点击数降序-->
<xsl:if test="$listOrderType=9">MonthHits DESC,LogID DESC</xsl:if>
<!--月点击数升序-->
<xsl:if test="$listOrderType=10">MonthHits ASC,LogID DESC</xsl:if>
<!--周点击数降序-->
<xsl:if test="$listOrderType=11">WeekHits DESC,LogID DESC</xsl:if>
<!--周点击数升序-->
<xsl:if test="$listOrderType=12">WeekHits ASC,LogID DESC</xsl:if>
<!--日点击数降序-->
<xsl:if test="$listOrderType=13">DayHits DESC,LogID DESC</xsl:if>
<!--日点击数升序-->
<xsl:if test="$listOrderType=14">DayHits ASC,LogID DESC</xsl:if>
</xsl:when>
<xsl:otherwise>LogID DESC</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<sql>
EXEC [dbo].[PR_Common_PagingLarge] 'PE_BG_Log','LogID','*',@pagesize,@startrow ,'<xsl:value-of select="$filter"/>','','<xsl:value-of select="$order"/>'
</sql>
<sqlpage>
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
</sqlpage>
<countsql>
<xsl:choose>
<xsl:when test="$isElite='true'">
<xsl:choose>
<xsl:when test="$categoryId!=0">
SELECT count(LogID) FROM PE_BG_log WHERE State=1 AND TitlePicUrl &lt;&gt;'' AND EliteLevel>0 AND CategoryID=<xsl:value-of select="$categoryId"/>
</xsl:when>
<xsl:otherwise>
SELECT count(LogID) FROM PE_BG_log WHERE State=1 AND TitlePicUrl &lt;&gt;'' AND EliteLevel>0
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$categoryId!=0">
SELECT count(LogID) FROM PE_BG_log WHERE State=1 AND TitlePicUrl &lt;&gt;'' AND CategoryID=<xsl:value-of select="$categoryId"/>
</xsl:when>
<xsl:otherwise>
SELECT count(LogID) FROM PE_BG_log WHERE State=1 AND TitlePicUrl &lt;&gt;''
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</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="titleLength" />
<xsl:param name="contentLength" />
<xsl:param name="linkOpenType" />
<xsl:param name="listOrderType" />
<xsl:param name="ouputQty" />
<xsl:param name="imageLinkStyle" />
<xsl:param name="displayTitle" />
<xsl:param name="displayContent"/>
<xsl:param name="isLinkTitle"/>
<xsl:param name="isList"/>
<xsl:output method="html" />
<xsl:template match="/NewDataSet/Table">
<xsl:choose>
<xsl:when test="$isList='true'">
<li>
<a>
<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"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:if test="$imageLinkStyle!=''">
<xsl:attribute name="class">pic</xsl:attribute>
</xsl:if>
<img>
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="TitlePicUrl!= ''"><xsl:value-of select="pe:ConvertToAbsolutePath(TitlePicUrl)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="pe:SkinDir()"/>Blog/images/nopic.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Title"/>
</xsl:attribute>
</img>
</a>
<xsl:if test="$displayTitle='true'">
<strong>
<xsl:choose>
<xsl:when test="$isLinkTitle='true'">
<a>
<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"/>&amp;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>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</xsl:otherwise>
</xsl:choose>
</strong>
</xsl:if>
<xsl:if test="$displayContent='true'">
<p>
<xsl:value-of select=" pe:CutText(pe:RemoveHtml(Content),$contentLength,'...')"/>
<a class="readDetail">
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
[全文]</a>
</p>
</xsl:if>
</li>
</xsl:when>
<xsl:otherwise>
<a>
<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"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:if test="$imageLinkStyle!=''">
<xsl:attribute name="class">pic</xsl:attribute>
</xsl:if>
<img>
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="TitlePicUrl!= ''"><xsl:value-of select="pe:ConvertToAbsolutePath(TitlePicUrl)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="pe:SkinDir()"/>Blog/images/nopic.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="Title"/>
</xsl:attribute>
</img>
</a>
<xsl:if test="$displayTitle='true'">
<h4>
<xsl:choose>
<xsl:when test="$isLinkTitle='true'">
<a>
<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"/>&amp;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>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'...')"/>
</xsl:otherwise>
</xsl:choose>
</h4>
</xsl:if>
<xsl:if test="$displayContent='true'">
<p>
<xsl:value-of select=" pe:CutText(pe:RemoveHtml(Content),$contentLength,'...')"/>
<a class="readDetail">
<xsl:attribute name="href">
<xsl:value-of select="pe:InstallDir()"/>blog/Item.aspx?Id=<xsl:value-of select="BlogID"/>&amp;LogId=<xsl:value-of select="LogID"/>
</xsl:attribute>
<xsl:attribute name="target">
<xsl:value-of select="$linkOpenType" />
</xsl:attribute>
[全文]
</a>
</p>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>]]></LabelTemplate>
<attributes>
<name>contentLength</name>
<datatype>int</datatype>
<default>50</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>ouputQty</name>
<datatype>sql.int</datatype>
<default>10</default>
<intro>输出数量</intro>
</attributes>
<attributes>
<name>imageLinkStyle</name>
<datatype>string</datatype>
<default>pic</default>
<intro>图片链接样式</intro>
</attributes>
<attributes>
<name>displayTitle</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否显示标题</intro>
</attributes>
<attributes>
<name>displayContent</name>
<datatype>bool</datatype>
<default>true</default>
<intro>是否显示内容</intro>
</attributes>
<attributes>
<name>isList</name>
<datatype>bool</datatype>
<default>false</default>
<intro>是否列表形式</intro>
</attributes>
<attributes>
<name>isLinkTitle</name>
<datatype>bool</datatype>
<default>false</default>
<intro>开启标题链接</intro>
</attributes>
<attributes>
<name>categoryId</name>
<datatype>sql.int</datatype>
<default>
</default>
<intro>分类ID</intro>
</attributes>
<attributes>
<name>imageWidth</name>
<datatype>int</datatype>
<default>
</default>
<intro>图片宽度</intro>
</attributes>
<attributes>
<name>imageHeight</name>
<datatype>int</datatype>
<default>
</default>
<intro>图片高度</intro>
</attributes>
<UsePage>True</UsePage>
<LabelSqlCount><![CDATA[请在上面的<countsql></countsql>标记之间写分页SQL查询语句
select count(id) from database]]></LabelSqlCount>
<LabelSqlPage>
</LabelSqlPage>
</root>