Files
ningbo/动易的标签库/标签库/问答类/已解决问题列表.config
T
2026-08-31 16:22:00 +08:00

104 lines
3.9 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>问答类</LabelType>
<LabelIntro>已解决问题列表页</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<IsXsltSql>true</IsXsltSql>
<IsXsltCountSql>true</IsXsltCountSql>
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:param name="CategoryID"/>
<xsl:param name="Keyword"/>
<xsl:output method="xml" />
<xsl:template match="/">
<root>
<sql>
SELECT TOP @pagesize * FROM PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 1 AND PE_QA_Question.Title LIKE '%@Keyword%'
<xsl:if test="$CategoryID != 0">
AND (PE_QA_Question.CategoryId=@CategoryID or PE_QA_Category.ParentID=@CategoryID)
</xsl:if>
AND PE_QA_Question.QuestionID NOT IN(SELECT TOP @startrow PE_QA_Question.QuestionID FROM PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 1 AND PE_QA_Question.Title LIKE '%@Keyword%'
<xsl:if test="$CategoryID != 0">
AND (PE_QA_Question.CategoryId=@CategoryID or PE_QA_Category.ParentID=@CategoryID)
</xsl:if>
ORDER BY UpdateTime DESC)
ORDER BY UpdateTime DESC
</sql>
<countsql>
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 1 AND PE_QA_Question.Title LIKE '%@Keyword%'
<xsl:if test="$CategoryID != 0">
AND (PE_QA_Question.CategoryId=@CategoryID or PE_QA_Category.ParentID=@CategoryID)
</xsl:if>
</countsql>
</root>
</xsl:template>
</xsl:transform>]]></LabelSqlString>
<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="TitleLen"/>
<xsl:template match="/">
<div class="qu_list">
<ul>
<xsl:for-each select="NewDataSet/Table">
<li>
<span>
<xsl:value-of select="pe:FormatDate(UpdateTime,'yyyy-mm-dd')"/>
</span>
<span>
<xsl:choose>
<xsl:when test="IsAnonymity = 'false'">
<xsl:value-of select="UserName"/> </xsl:when>
<xsl:otherwise>匿名</xsl:otherwise>
</xsl:choose>
</span>
<b class="unsolved">
<xsl:value-of select="Point"/>
</b>
<em>
<a>
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/ShowQuestion.aspx?ID=<xsl:value-of select="QuestionID"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="Title"/>
</xsl:attribute>
<xsl:value-of select="pe:CutText(Title,$TitleLen,'...')"/>
</a>
</em> |
<a>
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ID=<xsl:value-of select="CategoryID"/>
</xsl:attribute>
[<xsl:value-of select="CategoryName"/>]
</a>
</li>
</xsl:for-each>
</ul>
</div>
</xsl:template>
</xsl:transform>]]></LabelTemplate>
<UsePage>True</UsePage>
<LabelSqlCount><![CDATA[请在上面的<countsql></countsql>标记之间写分页SQL查询语句
请在上面的<countsql></countsql>标记之间写分页SQL查询语句
select count(id) from database]]></LabelSqlCount>
<attributes>
<name>TitleLen</name>
<datatype>int</datatype>
<default>30</default>
<intro>标题长度</intro>
</attributes>
<attributes>
<name>CategoryID</name>
<datatype>supersql</datatype>
<default>0</default>
<intro>问题类型ID</intro>
</attributes>
<attributes>
<name>Keyword</name>
<datatype>supersql</datatype>
<default>
</default>
<intro>关键字</intro>
</attributes>
</root>