first commit
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelImage>../../Admin/Images/LabelIco/PE_Author.gif</LabelImage>
|
||||
<LabelIntro>公告列表</LabelIntro>
|
||||
<LabelTemplate><![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">
|
||||
<xsl:output method="html" />
|
||||
<xsl:param name="displayDateTime" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="displayAuthor" />
|
||||
<xsl:param name="contentLength" />
|
||||
<xsl:param name="contentType" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<ul>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:GetNodeInfo(NodeID, 'ItemOpenType') = 0">_self</xsl:when>
|
||||
<xsl:otherwise>_blank</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<li class="announce_title">
|
||||
<xsl:value-of select="pe:CutText(pe:RemoveHtml(Title),$titleLength,'…')" />
|
||||
</li>
|
||||
<xsl:if test="$contentLength != 0">
|
||||
<li class="announce_text">
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:CutText(pe:RemoveHtml(Content),$contentLength,'…')" />
|
||||
</li>
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayAuthor = 'true'">
|
||||
<li class="announce_author">
|
||||
<xsl:value-of select="Author"/>
|
||||
</li>
|
||||
</xsl:if>
|
||||
<xsl:if test="$displayDateTime != ''">
|
||||
<li class="announce_author">
|
||||
[<xsl:value-of select="pe:FormatDate(UpdateTime, $displayDateTime)" />]
|
||||
</li>
|
||||
</xsl:if>
|
||||
</a>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>10</default>
|
||||
<intro>列表数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>40</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>contentLength</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>是否显示内容,为0时则不显示内容</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayAuthor</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否显示发布者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayDateTime</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>是否显示日期,为空则不显示</intro>
|
||||
</attributes>
|
||||
<LabelSqlString>
|
||||
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:param name="outputQty"/>
|
||||
<xsl:param name="outputType"/>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
<xsl:template match="/">
|
||||
<root>
|
||||
<sql>
|
||||
SELECT TOP <xsl:value-of select="$outputQty"/> *
|
||||
FROM PE_U_Announce UT
|
||||
INNER JOIN PE_CommonModel CM ON ( UT.ID = CM.GeneralID )
|
||||
WHERE CM.Status = 99
|
||||
AND UT.IsSelected = 1
|
||||
AND ( DATEADD(d, UT.OutTime, UT.DateAndTime) >= GETDATE() OR UT.OutTime = 0 )
|
||||
<xsl:choose>
|
||||
<xsl:when test="$outputType = 1">
|
||||
AND UT.ShowType IN ('弹出','全部')
|
||||
</xsl:when>
|
||||
<xsl:when test="$outputType = 2">
|
||||
AND UT.ShowType IN ('滚动','全部')
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
ORDER BY UT.DateAndTime DESC
|
||||
</sql>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelSqlString>
|
||||
<OutType>sin</OutType>
|
||||
<CacheTime>12</CacheTime>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<Version officialVersion="" modifiedVersions="3001" compatibleVersion="" />
|
||||
<attributes>
|
||||
<name>outputType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>输出类型:1为弹出;2为滚动;0为全部</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,543 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>内容信息列表复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>usePage</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否分页显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>contentLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目内容长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>author</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定作者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayPropertyPrefix</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表前缀修饰符</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayDateTime</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>显示日期格式如:mm-dd,为空则不显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNewSign</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目视为最新,为空则不启用此功能</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayTitlePrefix</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>displayTips</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示作者,更新日期,点击数等浮动提示信息</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayAuthor</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示作者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayEditor</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示编辑</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayInputer</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示内容的录入者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNodeName</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示所属栏目名称</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayHotSign</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示热门内容图标</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayCommentLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示评论链接</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>pageSizeByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>输出的项目数量由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle" />
|
||||
<xsl:param name="usePage" />
|
||||
<xsl:param name="outputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="contentLength" />
|
||||
<xsl:param name="nodes" />
|
||||
<xsl:param name="includeChildNodes" />
|
||||
<xsl:param name="models" />
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials" />
|
||||
<xsl:param name="items" />
|
||||
<xsl:param name="listOrderType" />
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays" />
|
||||
<xsl:param name="betDate" />
|
||||
<xsl:param name="editor" />
|
||||
<xsl:param name="author" />
|
||||
<xsl:param name="inputer" />
|
||||
<xsl:param name="copyFrom" />
|
||||
<xsl:param name="hits" />
|
||||
<xsl:param name="dayHits" />
|
||||
<xsl:param name="weekHits" />
|
||||
<xsl:param name="monthHits" />
|
||||
<xsl:param name="eliteLevel" />
|
||||
<xsl:param name="priorityLevel" />
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink" />
|
||||
<xsl:param name="displayDateTime" />
|
||||
<xsl:param name="displayPropertyPrefix" />
|
||||
<xsl:param name="displayNewSign" />
|
||||
<xsl:param name="displayTitlePrefix" />
|
||||
<xsl:param name="displayHits" />
|
||||
<xsl:param name="displayTips" />
|
||||
<xsl:param name="displayAuthor" />
|
||||
<xsl:param name="displayEditor" />
|
||||
<xsl:param name="displayInputer" />
|
||||
<xsl:param name="displayNodeName" />
|
||||
<xsl:param name="displayCommentLink"/>
|
||||
<xsl:param name="displayHotSign" />
|
||||
<xsl:param name="listOrderByNodeSet" />
|
||||
<xsl:param name="pageSizeByNodeSet" />
|
||||
<xsl:param name="optionalCond" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:variable name="singleApos">'</xsl:variable>
|
||||
<xsl:variable name="doubleApos">''</xsl:variable>
|
||||
<!--约束条件模板,如需维护此模板,请注意各项数据有效性-->
|
||||
<xsl:template name="_constraint">
|
||||
<xsl:param name="_doubleApos"/>
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<!--单引号处理-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true' and $_doubleApos='true'">
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''''
|
||||
</xsl:if>
|
||||
<xsl:if test="$copyFrom != ''">
|
||||
AND UT.CopyFrom = ''<xsl:value-of select="$copyFrom"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$author != ''">
|
||||
AND UT.Author = ''<xsl:value-of select="pe:ReplaceText($author,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = ''<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = ''<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= ''<xsl:value-of select="substring-before($betDate,'|')" />'') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= ''<xsl:value-of select="substring-after($betDate,'|')" />'')
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$copyFrom != ''">
|
||||
AND UT.CopyFrom = '<xsl:value-of select="$copyFrom"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$author != ''">
|
||||
AND UT.Author = '<xsl:value-of select="pe:ReplaceText($author,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$optionalCond != ''">
|
||||
<xsl:value-of select="$optionalCond"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" displayCommentLink="<xsl:value-of select="$displayCommentLink"/>" contentLength="<xsl:value-of select="$contentLength"/>" displayAuthor="<xsl:value-of select="$displayAuthor"/>" displayEditor="<xsl:value-of select="$displayEditor"/>" displayPropertyPrefix="<xsl:value-of select="$displayPropertyPrefix"/>" displayDateTime="<xsl:value-of select="$displayDateTime"/>" displayTitlePrefix="<xsl:value-of select="$displayTitlePrefix"/>" displayHits="<xsl:value-of select="$displayHits"/>" displayTips="<xsl:value-of select="$displayTips"/>" displayInputer="<xsl:value-of select="$displayInputer"/>" displayNodeName="<xsl:value-of select="$displayNodeName"/>" displayHotSign="<xsl:value-of select="$displayHotSign"/>" displayNewSign="<xsl:value-of select="$displayNewSign"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式前缀节,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
内容信息列表_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--约束条件节,如需维护,请修改此变量节-->
|
||||
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--分页大小判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_pageSize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pageSizeByNodeSet = 'true'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NewDataSet/Table/ItemPageSize > 0">
|
||||
<xsl:value-of select="NewDataSet/Table/ItemPageSize"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="usePage" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<Version officialVersion="" modifiedVersions="3001" compatibleVersion="" />
|
||||
<attributes>
|
||||
<name>copyFrom</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>项目来源</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,466 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>内容带图片的信息列表复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>usePage</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否分页显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>contentLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目内容长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>author</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定作者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleClass</name>
|
||||
<datatype>string</datatype>
|
||||
<default>pe_u_thumb_title</default>
|
||||
<intro>标题简介区择器名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageClass</name>
|
||||
<datatype>string</datatype>
|
||||
<default>pe_u_thumb</default>
|
||||
<intro>图片区块选择器名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageWidth</name>
|
||||
<datatype>int</datatype>
|
||||
<default>160</default>
|
||||
<intro>图片宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageHeight</name>
|
||||
<datatype>int</datatype>
|
||||
<default>120</default>
|
||||
<intro>图片高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>pageSizeByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>输出的项目数量由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle" />
|
||||
<xsl:param name="usePage" />
|
||||
<xsl:param name="outputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="contentLength" />
|
||||
<xsl:param name="nodes" />
|
||||
<xsl:param name="includeChildNodes" />
|
||||
<xsl:param name="models" />
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials" />
|
||||
<xsl:param name="items" />
|
||||
<xsl:param name="listOrderType" />
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays" />
|
||||
<xsl:param name="betDate" />
|
||||
<xsl:param name="editor" />
|
||||
<xsl:param name="author" />
|
||||
<xsl:param name="inputer" />
|
||||
<xsl:param name="hits" />
|
||||
<xsl:param name="dayHits" />
|
||||
<xsl:param name="weekHits" />
|
||||
<xsl:param name="monthHits" />
|
||||
<xsl:param name="eliteLevel" />
|
||||
<xsl:param name="priorityLevel" />
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink" />
|
||||
<xsl:param name="titleClass" />
|
||||
<xsl:param name="imageClass" />
|
||||
<xsl:param name="imageHeight" />
|
||||
<xsl:param name="imageWidth" />
|
||||
<xsl:param name="listOrderByNodeSet" />
|
||||
<xsl:param name="pageSizeByNodeSet" />
|
||||
<xsl:param name="optionalCond" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:variable name="singleApos">'</xsl:variable>
|
||||
<xsl:variable name="doubleApos">''</xsl:variable>
|
||||
<!--约束条件模板,如需维护此模板,请注意各项数据有效性-->
|
||||
<xsl:template name="_constraint">
|
||||
<xsl:param name="_doubleApos"/>
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<!--单引号处理-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true' and $_doubleApos='true'">
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = ''<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = ''<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= ''<xsl:value-of select="substring-before($betDate,'|')" />'') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= ''<xsl:value-of select="substring-after($betDate,'|')" />'')
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$optionalCond != ''">
|
||||
<xsl:value-of select="$optionalCond"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" contentLength="<xsl:value-of select="$contentLength"/>" titleClass="<xsl:value-of select="$titleClass"/>" imageClass="<xsl:value-of select="$imageClass"/>" imageHeight="<xsl:value-of select="$imageHeight"/>" imageWidth="<xsl:value-of select="$imageWidth"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式前缀节,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
内容带图片的信息列表_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--分页大小判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_pageSize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pageSizeByNodeSet = 'true'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NewDataSet/Table/ItemPageSize > 0">
|
||||
<xsl:value-of select="NewDataSet/Table/ItemPageSize"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="usePage" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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="3504" compatibleVersion="" />
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_USERHITHISTORY WHERE GENERALID=@GeneralID</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:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<table width="100%"><tr>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<td>
|
||||
<span>
|
||||
<xsl:attribute name="title">访问时间:<xsl:value-of select='pe:FormatDate(LastHitTime,"yyyy-mm-dd hh:ff")'/>
|
||||
点击次数:<xsl:value-of select="Hits"/></xsl:attribute>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</span>
|
||||
</td>
|
||||
<xsl:if test="position() mod 8 = 0">
|
||||
<tr></tr>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</tr></table>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>GeneralID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>通用信息ID</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,428 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>友情链接列表复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>usePage</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否分页显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>11</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>pageSizeByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>输出的项目数量由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle" />
|
||||
<xsl:param name="usePage" />
|
||||
<xsl:param name="outputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="nodes" />
|
||||
<xsl:param name="includeChildNodes" />
|
||||
<xsl:param name="models" />
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials" />
|
||||
<xsl:param name="items" />
|
||||
<xsl:param name="linkType" />
|
||||
<xsl:param name="listOrderType" />
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays" />
|
||||
<xsl:param name="betDate" />
|
||||
<xsl:param name="editor" />
|
||||
<xsl:param name="inputer" />
|
||||
<xsl:param name="hits" />
|
||||
<xsl:param name="dayHits" />
|
||||
<xsl:param name="weekHits" />
|
||||
<xsl:param name="monthHits" />
|
||||
<xsl:param name="eliteLevel" />
|
||||
<xsl:param name="priorityLevel" />
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink" />
|
||||
<xsl:param name="listOrderByNodeSet" />
|
||||
<xsl:param name="pageSizeByNodeSet" />
|
||||
<xsl:param name="optionalCond" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:variable name="singleApos">'</xsl:variable>
|
||||
<xsl:variable name="doubleApos">''</xsl:variable>
|
||||
<!--约束条件模板,如需维护此模板,请注意各项数据有效性-->
|
||||
<xsl:template name="_constraint">
|
||||
<xsl:param name="_doubleApos"/>
|
||||
<xsl:if test="$linkType != ''">
|
||||
AND UT.FriendSiteLinkType = <xsl:value-of select="$linkType" />
|
||||
</xsl:if>
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<!--单引号处理-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true' and $_doubleApos='true'">
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND UT.LogoUrl != ''''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = ''<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = ''<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= ''<xsl:value-of select="substring-before($betDate,'|')" />'') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= ''<xsl:value-of select="substring-after($betDate,'|')" />'')
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND UT.LogoUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$optionalCond != ''">
|
||||
<xsl:value-of select="$optionalCond"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式节点,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
友情链接列表_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--分页大小判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_pageSize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pageSizeByNodeSet = 'true'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NewDataSet/Table/ItemPageSize > 0">
|
||||
<xsl:value-of select="NewDataSet/Table/ItemPageSize"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="usePage" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
</root>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,501 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>通用信息列表复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>usePage</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否分页显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayPropertyPrefix</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表前缀修饰符</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayDateTime</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>显示日期格式如:mm-dd,为空则不显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNewSign</name>
|
||||
<datatype>int</datatype>
|
||||
<default/>
|
||||
<intro>近多少天的项目视为最新,为空则不启用此功能</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayTitlePrefix</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>displayTips</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示作者,更新日期,点击数等浮动提示信息</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayEditor</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示编辑</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayInputer</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示内容的录入者</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayNodeName</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示所属栏目名称</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayHotSign</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示热门内容图标</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>displayCommentLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否显示评论链接</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>pageSizeByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>输出的项目数量由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default/>
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle"/>
|
||||
<xsl:param name="usePage"/>
|
||||
<xsl:param name="outputQty"/>
|
||||
<xsl:param name="titleLength"/>
|
||||
<xsl:param name="nodes"/>
|
||||
<xsl:param name="includeChildNodes"/>
|
||||
<xsl:param name="models"/>
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials"/>
|
||||
<xsl:param name="items"/>
|
||||
<xsl:param name="listOrderType"/>
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays"/>
|
||||
<xsl:param name="betDate"/>
|
||||
<xsl:param name="editor"/>
|
||||
<xsl:param name="inputer"/>
|
||||
<xsl:param name="hits"/>
|
||||
<xsl:param name="dayHits"/>
|
||||
<xsl:param name="weekHits"/>
|
||||
<xsl:param name="monthHits"/>
|
||||
<xsl:param name="eliteLevel"/>
|
||||
<xsl:param name="priorityLevel"/>
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink"/>
|
||||
<xsl:param name="displayDateTime"/>
|
||||
<xsl:param name="displayPropertyPrefix"/>
|
||||
<xsl:param name="displayNewSign"/>
|
||||
<xsl:param name="displayTitlePrefix"/>
|
||||
<xsl:param name="displayHits"/>
|
||||
<xsl:param name="displayTips"/>
|
||||
<xsl:param name="displayEditor" />
|
||||
<xsl:param name="displayInputer"/>
|
||||
<xsl:param name="displayNodeName"/>
|
||||
<xsl:param name="displayCommentLink"/>
|
||||
<xsl:param name="displayHotSign"/>
|
||||
<xsl:param name="listOrderByNodeSet"/>
|
||||
<xsl:param name="pageSizeByNodeSet"/>
|
||||
<xsl:param name="optionalCond"/>
|
||||
<xsl:param name="optionalExtend"/>
|
||||
<xsl:variable name="singleApos">'</xsl:variable>
|
||||
<xsl:variable name="doubleApos">''</xsl:variable>
|
||||
<!--约束条件模板,如需维护此模板,请注意各项数据有效性-->
|
||||
<xsl:template name="_constraint">
|
||||
<xsl:param name="_doubleApos"/>
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<!--单引号处理-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true' and $_doubleApos='true'">
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = ''<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = ''<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= ''<xsl:value-of select="substring-before($betDate,'|')" />'') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= ''<xsl:value-of select="substring-after($betDate,'|')" />'')
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$optionalCond != ''">
|
||||
<xsl:value-of select="$optionalCond"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" nodes="<xsl:value-of select="$nodes"/>" displayCommentLink="<xsl:value-of select="$displayCommentLink"/>" displayEditor="<xsl:value-of select="$displayEditor"/>" displayPropertyPrefix="<xsl:value-of select="$displayPropertyPrefix"/>" displayDateTime="<xsl:value-of select="$displayDateTime"/>" displayTitlePrefix="<xsl:value-of select="$displayTitlePrefix"/>" displayHits="<xsl:value-of select="$displayHits"/>" displayTips="<xsl:value-of select="$displayTips"/>" displayInputer="<xsl:value-of select="$displayInputer"/>" displayNodeName="<xsl:value-of select="$displayNodeName"/>" displayHotSign="<xsl:value-of select="$displayHotSign"/>" displayNewSign="<xsl:value-of select="$displayNewSign"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式前缀节,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
通用信息列表_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--分页大小判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_pageSize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pageSizeByNodeSet = 'true'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NewDataSet/Table/ItemPageSize > 0">
|
||||
<xsl:value-of select="NewDataSet/Table/ItemPageSize"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="usePage" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,355 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>通用信息焦点图复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>focusWidth</name>
|
||||
<datatype>int</datatype>
|
||||
<default>428</default>
|
||||
<intro>焦点图宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>focusHeight</name>
|
||||
<datatype>int</datatype>
|
||||
<default>280</default>
|
||||
<intro>焦点图高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle" />
|
||||
<xsl:param name="outputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="nodes" />
|
||||
<xsl:param name="includeChildNodes" />
|
||||
<xsl:param name="models" />
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials" />
|
||||
<xsl:param name="items" />
|
||||
<xsl:param name="listOrderType" />
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays" />
|
||||
<xsl:param name="betDate" />
|
||||
<xsl:param name="editor" />
|
||||
<xsl:param name="inputer" />
|
||||
<xsl:param name="hits" />
|
||||
<xsl:param name="dayHits" />
|
||||
<xsl:param name="weekHits" />
|
||||
<xsl:param name="monthHits" />
|
||||
<xsl:param name="eliteLevel" />
|
||||
<xsl:param name="priorityLevel" />
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink" />
|
||||
<xsl:param name="focusWidth" />
|
||||
<xsl:param name="focusHeight" />
|
||||
<xsl:param name="listOrderByNodeSet" />
|
||||
<xsl:param name="optionalCond" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<!--约束条件节,如需维护此节,请注意各项数据有效性-->
|
||||
<xsl:variable name="_constraint">
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="$inputer"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="$editor"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" focusWidth="<xsl:value-of select="$focusWidth"/>" focusHeight="<xsl:value-of select="$focusHeight"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式前缀节,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
通用信息焦点图_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$outputQty"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:value-of select="$_constraint"/> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$outputQty"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:value-of select="$_constraint"/> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>SuperSlide专用</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>@queryCond</LabelSqlString>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>50</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>width</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>428</default>
|
||||
<intro>焦点图宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>height</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>280</default>
|
||||
<intro>焦点图高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>queryCond</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>SELECT TOP 5 * FROM PE_CommonModel WHERE DefaultPicUrl != ''</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
<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="height"/>
|
||||
<xsl:param name="width"/>
|
||||
<xsl:param name="titleLength"/>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
<xsl:template match="NewDataSet">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(Table) > 1">
|
||||
<div class="hd">
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<xsl:value-of select="position()"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bd">
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<a href="{pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)}">
|
||||
|
||||
<img src="{pe:PathFind(DefaultPicUrl)}" />
|
||||
<xsl:value-of select="pe:CutText(Title,$titleLength,'…')"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="missing_data">还没有任何内容!</span>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<Version officialVersion="" modifiedVersions="3505" compatibleVersion="" />
|
||||
</root>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>样式类</LabelType>
|
||||
<LabelIntro />
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>@queryCond</LabelSqlString>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>50</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>width</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>620</default>
|
||||
<intro>焦点图宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>height</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>340</default>
|
||||
<intro>焦点图高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>queryCond</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>SELECT TOP 5 * FROM PE_CommonModel WHERE DefaultPicUrl != ''</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--名称:通用信息焦点图通用样式;版本:1.0;日期:2010-5-18-->
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:param name="height"/>
|
||||
<xsl:param name="width"/>
|
||||
<xsl:param name="titleLength"/>
|
||||
<xsl:output method="html"/>
|
||||
<xsl:template match="/">
|
||||
<div class="yx-rotaion">
|
||||
<ul class="rotaion_list">
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<li>
|
||||
<a href="{pe:GetInfoPath(NodeID,GeneralID,InputTime,PinyinTitle,HtmlPageName)}" target="_blank">
|
||||
<img alt="{pe:CutText(Title,$titleLength,'…')}" title="{pe:CutText(Title,$titleLength,'…')}" src="{pe:PathFind(DefaultPicUrl)}" height="{$height}" width="{$width}"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<Version officialVersion="" modifiedVersions="3504" compatibleVersion="" />
|
||||
</root>
|
||||
@@ -0,0 +1,452 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>列表类</LabelType>
|
||||
<LabelIntro>通用带图片的信息列表复杂算法主标签,此标签仅用来调用,无需修改!</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT NodeID,arrChildID,ItemListOrderType,ItemPageSize FROM PE_Nodes WHERE NodeID IN (@nodes)</LabelSqlString>
|
||||
<attributes>
|
||||
<name>bindStyle</name>
|
||||
<datatype>string</datatype>
|
||||
<default>普通式</default>
|
||||
<intro>项目呈现样式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>usePage</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否分页显示</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>int</datatype>
|
||||
<default>10</default>
|
||||
<intro>输出的项目数量</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>50</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>nodes</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>栏目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>includeChildNodes</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否包含子栏目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>models</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>模型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>bindModel</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>通过模型ID与指定的模型表联合</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>specials</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>专题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>items</name>
|
||||
<datatype>string</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>项目列表排序方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>项目列表打开方式</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inDays</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>近多少天的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>betDate</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>介于时间段之间的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>editor</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定编辑者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>inputer</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>为指定录入者的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>hits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>dayHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>日点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>weekHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>周点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>monthHits</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>月点击数大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>eliteLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>推荐级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>priorityLevel</name>
|
||||
<datatype>int</datatype>
|
||||
<default />
|
||||
<intro>优先级大于等于指定值的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>picExist</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>true</default>
|
||||
<intro>是否查询带图片的项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>disableVirtualLink</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>是否禁止输出虚连接项目</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>titleClass</name>
|
||||
<datatype>string</datatype>
|
||||
<default>pe_u_thumb_title</default>
|
||||
<intro>标题简介区择器名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageClass</name>
|
||||
<datatype>string</datatype>
|
||||
<default>pe_u_thumb</default>
|
||||
<intro>图片区块选择器名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageWidth</name>
|
||||
<datatype>int</datatype>
|
||||
<default>160</default>
|
||||
<intro>图片宽度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>imageHeight</name>
|
||||
<datatype>int</datatype>
|
||||
<default>120</default>
|
||||
<intro>图片高度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>listOrderByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>项目列表排序方式由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>pageSizeByNodeSet</name>
|
||||
<datatype>bool</datatype>
|
||||
<default>false</default>
|
||||
<intro>输出的项目数量由节点配置取代</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalCond</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展查询约束条件</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>optionalExtend</name>
|
||||
<datatype>string</datatype>
|
||||
<default />
|
||||
<intro>可选扩展参数</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="bindStyle" />
|
||||
<xsl:param name="usePage" />
|
||||
<xsl:param name="outputQty" />
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:param name="nodes" />
|
||||
<xsl:param name="includeChildNodes" />
|
||||
<xsl:param name="models" />
|
||||
<xsl:param name="bindModel"/>
|
||||
<xsl:param name="specials" />
|
||||
<xsl:param name="items" />
|
||||
<xsl:param name="listOrderType" />
|
||||
<xsl:param name="linkOpenType"/>
|
||||
<xsl:param name="inDays" />
|
||||
<xsl:param name="betDate" />
|
||||
<xsl:param name="editor" />
|
||||
<xsl:param name="inputer" />
|
||||
<xsl:param name="hits" />
|
||||
<xsl:param name="dayHits" />
|
||||
<xsl:param name="weekHits" />
|
||||
<xsl:param name="monthHits" />
|
||||
<xsl:param name="eliteLevel" />
|
||||
<xsl:param name="priorityLevel" />
|
||||
<xsl:param name="picExist"/>
|
||||
<xsl:param name="disableVirtualLink" />
|
||||
<xsl:param name="titleClass" />
|
||||
<xsl:param name="imageClass" />
|
||||
<xsl:param name="imageHeight" />
|
||||
<xsl:param name="imageWidth" />
|
||||
<xsl:param name="listOrderByNodeSet" />
|
||||
<xsl:param name="pageSizeByNodeSet" />
|
||||
<xsl:param name="optionalCond" />
|
||||
<xsl:param name="optionalExtend" />
|
||||
<xsl:variable name="singleApos">'</xsl:variable>
|
||||
<xsl:variable name="doubleApos">''</xsl:variable>
|
||||
<!--约束条件模板,如需维护此模板,请注意各项数据有效性-->
|
||||
<xsl:template name="_constraint">
|
||||
<xsl:param name="_doubleApos"/>
|
||||
<xsl:if test="$disableVirtualLink = 'true'">
|
||||
AND CM.LinkType = 0
|
||||
</xsl:if>
|
||||
<xsl:if test="$specials != 0">
|
||||
AND SI.SpecialID IN (<xsl:value-of select="$specials"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$models != 0">
|
||||
AND CM.ModelID IN (<xsl:value-of select="$models"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$items != 0">
|
||||
AND CM.GeneralID IN (<xsl:value-of select="$items"/>)
|
||||
</xsl:if>
|
||||
<xsl:if test="$eliteLevel != ''">
|
||||
AND CM.EliteLevel >= <xsl:value-of select="$eliteLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$priorityLevel != ''">
|
||||
AND CM.Priority >= <xsl:value-of select="$priorityLevel"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$hits != ''">
|
||||
AND CM.Hits >= <xsl:value-of select="$hits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$dayHits != ''">
|
||||
AND CM.DayHits >= <xsl:value-of select="$dayHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$weekHits != ''">
|
||||
AND CM.WeekHits >= <xsl:value-of select="$weekHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$monthHits != ''">
|
||||
AND CM.MonthHits >= <xsl:value-of select="$monthHits"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="$inDays != ''">
|
||||
AND DATEDIFF(d,CM.UpdateTime,GETDATE()) <= <xsl:value-of select="$inDays"/>
|
||||
</xsl:if>
|
||||
<!--单引号处理-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true' and $_doubleApos='true'">
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = ''<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = ''<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>''
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= ''<xsl:value-of select="substring-before($betDate,'|')" />'') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= ''<xsl:value-of select="substring-after($betDate,'|')" />'')
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$picExist = 'true'">
|
||||
AND CM.DefaultPicUrl != ''
|
||||
</xsl:if>
|
||||
<xsl:if test="$inputer != ''">
|
||||
AND CM.Inputer = '<xsl:value-of select="pe:ReplaceText($inputer,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$editor != ''">
|
||||
AND CM.Editor = '<xsl:value-of select="pe:ReplaceText($editor,$singleApos,$doubleApos)"/>'
|
||||
</xsl:if>
|
||||
<xsl:if test="$betDate != '' and $betDate != '|'">
|
||||
AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) >= '<xsl:value-of select="substring-before($betDate,'|')" />') AND (CONVERT(varchar(10) , CM.UpdateTime, 120 ) <= '<xsl:value-of select="substring-after($betDate,'|')" />')
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$optionalCond != ''">
|
||||
<xsl:value-of select="$optionalCond"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<!--参数传递节,如需增加参数传递,请修改此变量节-->
|
||||
<xsl:variable name="_params">
|
||||
titleLength="<xsl:value-of select="$titleLength"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" titleClass="<xsl:value-of select="$titleClass"/>" imageClass="<xsl:value-of select="$imageClass"/>" imageHeight="<xsl:value-of select="$imageHeight"/>" imageWidth="<xsl:value-of select="$imageWidth"/>" optionalExtend="<xsl:value-of select="$optionalExtend"/>"
|
||||
</xsl:variable>
|
||||
<!--绑定样式前缀节,如需维护,请修改此变量节-->
|
||||
<xsl:variable name="_bindStyle">
|
||||
通用带图片的信息列表_<xsl:value-of select="$bindStyle"/>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序方式判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderType">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($nodes,',') = 'true'">
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$listOrderByNodeSet = 'true'">
|
||||
<xsl:value-of select="/NewDataSet/Table/ItemListOrderType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$listOrderType"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--内容列表排序、此变量节请勿修改-->
|
||||
<xsl:variable name="_listOrderValue">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$_listOrderType = 1">CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 2">CM.GeneralID ASC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 3">CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 4">CM.UpdateTime ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 5">CM.Hits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 6">CM.Hits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 7">CM.CommentAudited DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 8">CM.CommentAudited ASC,,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 9">CM.DayHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 10">CM.DayHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 11">CM.WeekHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 12">CM.WeekHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 13">CM.MonthHits DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 14">CM.MonthHits ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 15">CM.EliteLevel DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 16">CM.EliteLevel ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 17">CM.Priority DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 18">CM.Priority ASC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 19">CM.Hits DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 20">CM.EliteLevel DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 21">CM.Priority DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:when test="$_listOrderType = 22">CM.CommentAudited DESC,CM.UpdateTime DESC,CM.GeneralID DESC</xsl:when>
|
||||
<xsl:otherwise>CM.UpdateTime DESC,CM.GeneralID DESC</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--分页大小判断、此变量节请勿修改-->
|
||||
<xsl:variable name="_pageSize">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$pageSizeByNodeSet = 'true'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NewDataSet/Table/ItemPageSize > 0">
|
||||
<xsl:value-of select="NewDataSet/Table/ItemPageSize"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$outputQty"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得节点列,此变量节请勿修改-->
|
||||
<xsl:variable name="_nodes">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$includeChildNodes = 'false'">
|
||||
<xsl:value-of select="$nodes"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:value-of select="arrChildID"/>,
|
||||
</xsl:for-each>0
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!--取得模型绑定串节,此变量节请勿修改-->
|
||||
<xsl:variable name="_bindModel">
|
||||
<xsl:if test="$specials != 0">
|
||||
INNER JOIN PE_SpecialInfos SI ON (CM.ItemID = SI.GeneralID)
|
||||
</xsl:if>
|
||||
<xsl:if test="$bindModel != 0">
|
||||
<xsl:value-of select="pe:GetSqlSnippet($bindModel)"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
<!--查询语句组合节,此节请勿修改-->
|
||||
<xsl:choose>
|
||||
<xsl:when test="Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 AND CM.NodeID IN (<xsl:value-of select="$_nodes"/>) <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="usePage" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nodes = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$usePage = 'true'">
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="EXEC [dbo].[PR_Common_PagingLarge] 'PE_CommonModel CM <xsl:value-of select="$_bindModel"/>', 'CM.GeneralID', '*', @pagesize, @startrow, 'CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'true'"/>
|
||||
</xsl:call-template>', '', '<xsl:value-of select="$_listOrderValue"/>' ;" queryCount="SELECT COUNT (CM.ItemID) FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template>" page="true" pagesize="<xsl:value-of select="$_pageSize"/>" urlpage="true" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="<xsl:value-of select="$_bindStyle"/>" <xsl:value-of select="$_params"/> queryCond="SELECT TOP <xsl:value-of select="$_pageSize"/> * FROM PE_CommonModel CM <xsl:value-of select="$_bindModel"/> WHERE CM.Status = 99 <xsl:call-template name="_constraint">
|
||||
<xsl:with-param name="_doubleApos" select="'false'"/>
|
||||
</xsl:call-template> ORDER BY <xsl:value-of select="$_listOrderValue"/>" page="false" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<font style="color:red">指定了不存在的栏目ID或栏目数组!</font>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]>
|
||||
</LabelTemplate>
|
||||
</root>
|
||||
Reference in New Issue
Block a user