Files
2026-08-31 16:22:00 +08:00

67 lines
2.4 KiB
XML

<?xml version="1.0"?>
<root>
<LabelType>问答类</LabelType>
<LabelIntro>
</LabelIntro>
<OutType>sin</OutType>
<LabelDataType>sql_sysquery</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<attributes>
<name>userName</name>
<datatype>sql.string</datatype>
<default>Admin</default>
<intro>用户名</intro>
</attributes>
<attributes>
<name>honorType</name>
<datatype>sql.int</datatype>
<default>0</default>
<intro>头衔系列</intro>
</attributes>
<IsXsltSql>false</IsXsltSql>
<IsXsltCountSql>false</IsXsltCountSql>
<LabelSqlString>SELECT HonorTypeID,TypeName FROM PE_QA_HonorType WHERE Enable=1 ORDER BY OrderID ASC</LabelSqlString>
<LabelTemplate>
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
<xsl:param name="userName" />
<xsl:param name="honorType" />
<xsl:output method="html" />
<xsl:template match="/">
<script language="javascript" type="text/javascript">
function updateHonorType(honorType)
{
var x = new AjaxRequest('XML', 'status');
x.para = ['honorTypeId=' + honorType];
x.post('updateHonorType', '{PE.SiteConfig.applicationpath/}ajax.aspx', function(s) {
var xml = x.createXmlDom(s);
var status = xml.getElementsByTagName("status")[0].firstChild.data;
switch (status) {
case "ok":
window.location.reload();
break;
case "err":
alert("设置头衔系列失败!");
break;
default:
alert("设置头衔系列失败!");
break;
}
});
}
</script>
系列:<xsl:text disable-output-escaping="yes">&lt;select id="honorTypelist" onchange="updateHonorType(this.options[this.selectedIndex].value)"&gt;</xsl:text>
<xsl:for-each select="/NewDataSet/Table">
<xsl:text disable-output-escaping="yes">&lt;option value=&quot;</xsl:text>
<xsl:value-of select="HonorTypeID" />
<xsl:text disable-output-escaping="yes">&quot;</xsl:text>
<xsl:if test="$honorType &gt;0 and $honorType=HonorTypeID">selected</xsl:if>
<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
<xsl:value-of select="pe:CutText(TypeName,10,'')"/>
<xsl:text disable-output-escaping="yes">&lt;/option&gt;</xsl:text>
</xsl:for-each>
<xsl:text disable-output-escaping="yes">&lt;/select&gt;</xsl:text>
</xsl:template>
</xsl:stylesheet>]]></LabelTemplate>
</root>