first commit
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>一级类别列表</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示项数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>false</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="TopNum" />
|
||||
<xsl:param name="ParentId" />
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<root>
|
||||
<sql>
|
||||
SELECT TOP @TopNum PE_QA_Category.CategoryName,PE_QA_Category.CategoryID
|
||||
FROM PE_QA_Question right join PE_QA_Category on PE_QA_Category.CategoryID = PE_QA_Question.CategoryID WHERE
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ParentId>0">
|
||||
PE_QA_Category.ParentID=@ParentId AND PE_QA_Category.ParentID <> PE_QA_Category.CategoryID
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
PE_QA_Category.ParentID=PE_QA_Category.CategoryID
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
GROUP BY PE_QA_Category.CategoryID,PE_QA_Category.CategoryName
|
||||
</sql>
|
||||
<countsql>
|
||||
</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:param name="ShowType" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:if test="count(/NewDataSet/Table) != 0">
|
||||
<div class="classified">
|
||||
<ul>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ShowType > 0 and $ShowType <= 5">
|
||||
{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?Id=<xsl:value-of select="CategoryID"/>&ShowType=<xsl:value-of select="$ShowType"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?Id=<xsl:value-of select="CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="CategoryName"/>({PE.Label id="显示类型下问题数" CategoryID="<xsl:value-of select="CategoryID"/>" Keyword="<xsl:value-of select="$Keyword"/>" ShowType="<xsl:value-of select="$ShowType"/>"/})
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<br class="clearbox" />
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>ParentId</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>一级分类ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>关键字</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>公告区</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @TopNum * FROM PE_QA_Question WHERE Status = 2 ORDER BY Hits, UpdateTime</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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="TopNum"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<h2>公告区</h2>
|
||||
<div class="box4">
|
||||
<span class="more">
|
||||
</span>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<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:variable name="loginedusername" select="pe:LoginedUserName()"/>
|
||||
<xsl:variable name="enableGuestComment" select="pe:EnableGuestComment()"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$enableGuestComment = 'True' or $loginedusername != ''">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ifCommentContent(obj)
|
||||
{
|
||||
if(document.activeElement.id == obj.id && obj.value == '请在此输入您对答案的评论......')
|
||||
{
|
||||
obj.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function addReplyComment()
|
||||
{
|
||||
if(document.getElementById("CommentContent").value == '')
|
||||
{
|
||||
alert("请输入评论内容");
|
||||
document.getElementById("CommentContent").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = ['replyId=@RequestInt_id', 'commentContent=' + document.getElementById("CommentContent").value];
|
||||
x.post('addReplyComment', '{PE.SiteConfig.applicationpath/}ajax.aspx', function(s) {
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
switch (status) {
|
||||
case "ok":
|
||||
alert("发表评论成功!");
|
||||
window.location.reload();
|
||||
break;
|
||||
case "err":
|
||||
alert("发表评论失败!");
|
||||
break;
|
||||
case "disableGuestComment":
|
||||
alert("不允许游客评论!");
|
||||
break;
|
||||
case "noBestAnswer":
|
||||
alert("不是最佳答案不允许评论!");
|
||||
break;
|
||||
case "check":
|
||||
alert("发表评论成功,请等待管理员审核!");
|
||||
window.location.reload();
|
||||
break;
|
||||
default:
|
||||
alert("发表评论失败!");
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class="AnswerComments">
|
||||
<dl>
|
||||
<dt>发表评论:</dt>
|
||||
<dd>
|
||||
<textarea name="CommentContent" rows="2" cols="20" id="CommentContent" class="input_particular" style="height:130px;width:420px;" onfocus='ifCommentContent(this)'></textarea>
|
||||
<span>评论字数200字之内</span>
|
||||
<p>
|
||||
<input name="" class="inputbutton2" type="button" onClick="addReplyComment()" value="提交评论" /></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="ask_box">
|
||||
温馨提示:游客不能发表评论
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>回答数</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>QuestionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT COUNT(ReplyID) AS 'Count' FROM PE_QA_Reply WHERE QuestionID = @QuestionID AND Status = 2]]></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="QuestionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
回答数:<xsl:value-of select="Count"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,230 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>处理问题标签</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<attributes>
|
||||
<name>QuestionID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Point</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>积分</intro>
|
||||
</attributes>
|
||||
<LabelTemplate>
|
||||
<![CDATA[<script language="javascript">
|
||||
function xmlencode(s)
|
||||
{
|
||||
s=escape(s);
|
||||
return s;
|
||||
}
|
||||
function SubmitPoint()
|
||||
{
|
||||
if(jQuery("#selPoint").val() == "0" || jQuery("#selPoint").val() == null)
|
||||
{
|
||||
alert("您的积分不足,不能增加悬赏积分!");
|
||||
return;
|
||||
}
|
||||
raisePoint();
|
||||
}
|
||||
|
||||
function SubmitExtraDetail()
|
||||
{
|
||||
if(jQuery("#txtExtraDetail").attr("value") == "")
|
||||
{
|
||||
alert("补充问题不能为空,请输入补充内容!");
|
||||
return;
|
||||
}
|
||||
doExtraDetail();
|
||||
}
|
||||
|
||||
function SubmitNoAnswer()
|
||||
{
|
||||
doNoAnswer();
|
||||
}
|
||||
|
||||
function raisePoint()
|
||||
{
|
||||
var point=xmlencode(jQuery("#selPoint").val());
|
||||
var Xml= "<?xml version='1.0' encoding='utf-8'?><root><type>QARaisePoint</type><questionId><xsl:value-of select="$QuestionID"/></questionId><point>"+point+"</point></root>";
|
||||
|
||||
jQuery.post('{PE.SiteConfig.applicationpath/}ajax.aspx',Xml, function(s) {
|
||||
if(jQuery("err", s).text()=="false")
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=1&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
else
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=0&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doExtraDetail()
|
||||
{
|
||||
var detail = xmlencode(jQuery("#txtExtraDetail").attr("value"));
|
||||
var Xml = "<?xml version='1.0' encoding='utf-8'?><root><type>QADoExtraDetail</type><questionId><xsl:value-of select="$QuestionID"/></questionId><extraDetail>"+detail+"</extraDetail></root>";
|
||||
|
||||
jQuery.post('{PE.SiteConfig.applicationpath/}ajax.aspx',Xml, function(s) {
|
||||
if(jQuery("err", s).text()=="false")
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=1&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
else
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=0&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doNoAnswer()
|
||||
{
|
||||
var Xml= "<?xml version='1.0' encoding='utf-8'?><root><type>QADoNoAnswer</type><questionId><xsl:value-of select="$QuestionID"/></questionId></root>";
|
||||
|
||||
jQuery.post('{PE.SiteConfig.applicationpath/}ajax.aspx',Xml, function(s) {
|
||||
if(jQuery("err", s).text()=="false")
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=1&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
else
|
||||
{
|
||||
window.open("ShowMessage.aspx?type=0&messageType=2&Id=<xsl:value-of select="$QuestionID"/>", "_self");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function GetPointList()
|
||||
{
|
||||
jQuery.post('{PE.SiteConfig.applicationpath/}ajax.aspx', "<?xml version='1.0' encoding='utf-8'?><root><type>QAGetPointList</type></root>", function(s) {
|
||||
var CPoint= jQuery("QAGetPointList", s).text();
|
||||
if (CPoint != "false")
|
||||
{
|
||||
var str = CPoint;
|
||||
var array = str.split(':');
|
||||
var arr1 = array[0].split('|');
|
||||
var arr2 = array[1].split('|');
|
||||
jQuery("#selPoint").clearAll();
|
||||
for(var i=0; i<arr1.length-1; i++)
|
||||
{
|
||||
jQuery("#selPoint").addOption(arr1[i], arr2[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function GetExtraDetail()
|
||||
{
|
||||
jQuery.post('{PE.SiteConfig.applicationpath/}ajax.aspx', "<?xml version='1.0' encoding='utf-8'?><root><type>QAGetExtraDetail</type><questionId><xsl:value-of select="$QuestionID"/></questionId></root>", function(s) {
|
||||
var detail = jQuery("QAGetExtraDetail", s).text();
|
||||
if (detail != "error")
|
||||
{
|
||||
jQuery("#txtExtraDetail").attr("value", detail);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery.fn.addOption = function(text,value)
|
||||
{
|
||||
jQuery(this).get(0).options.add(new Option(text,value));
|
||||
}
|
||||
|
||||
jQuery.fn.clearAll = function()
|
||||
{
|
||||
jQuery(this).get(0).options.length = 0;
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
GetPointList();
|
||||
GetExtraDetail();
|
||||
});
|
||||
|
||||
function closePanel(panel)
|
||||
{
|
||||
if(panel == "addscore")
|
||||
{
|
||||
jQuery("#addscoreLink").css("display","block");
|
||||
jQuery("#addscorePanel").css("display","none");
|
||||
}
|
||||
else if(panel == "noanswer")
|
||||
{
|
||||
jQuery("#noanswerLink").css("display","block");
|
||||
jQuery("#noanswerPanel").css("display","none");
|
||||
}
|
||||
else if(panel == "extradetail")
|
||||
{
|
||||
jQuery("#extradetailLink").css("display", "block");
|
||||
jQuery("#extradetailPanel").css("display", "none");
|
||||
}
|
||||
}
|
||||
|
||||
function openPanel(panel)
|
||||
{
|
||||
if(panel == "addscore")
|
||||
{
|
||||
jQuery("#addscoreLink").css("display","none");
|
||||
jQuery("#addscorePanel").css("display","block");
|
||||
}
|
||||
else if(panel == "noanswer")
|
||||
{
|
||||
jQuery("#noanswerLink").css("display","none");
|
||||
jQuery("#noanswerPanel").css("display","block");
|
||||
}
|
||||
else if(panel == "extradetail")
|
||||
{
|
||||
jQuery("#extradetailLink").css("display", "none");
|
||||
jQuery("#extradetailPanel").css("display", "block");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="Deal-problem">
|
||||
<dl id="methodList">
|
||||
<dt class="tit-name">处理提问</dt>
|
||||
<dt id="extradetailLink" class="problem-tit"><a href="#" onclick="openPanel('extradetail');return false;">补充问题</a><span class="gray">补充提问细节,以得到更准确的答案;</span></dt>
|
||||
<dd id="extradetailPanel" name="dealPanel" style="display:none;">
|
||||
|
||||
<ul>
|
||||
<li><h5><strong onclick="closePanel('extradetail')">补充问题</strong><span class="gray">补充提问细节,以得到更准确的答案</span></h5></li>
|
||||
<li class="textbox"><textarea id="txtExtraDetail" name="txtExtraDetail" style="width:90%;font-size:12px;" rows="6" autocomplete="off"> </textarea></li>
|
||||
<li class="textbut"><input type="submit" value="确 认" onclick="SubmitExtraDetail()"/> <input type="button" value="取 消" onclick="closePanel('extradetail')" /></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="addscoreLink" class="problem-tit"><a href="#" onclick="openPanel('addscore');return false;">提高悬赏</a><span class="gray">提高悬赏,以提高问题的关注度;</span></dt>
|
||||
<dd id="addscorePanel" name="dealPanel" style="display:none;">
|
||||
<ul>
|
||||
<li><h5><strong onclick="closePanel('addscore')">提高悬赏</strong><span class="gray">提高悬赏,以提高问题的关注度</span></h5></li>
|
||||
<li class="textbox"> 追加悬赏<select id="selPoint" name="selPoint" ><option value="-1">请选择</option></select>分 </li>
|
||||
<li class="textbut"><input type="submit" value="确 认" onclick="SubmitPoint()"/> <input type="button" value="取 消" onclick="closePanel('addscore')"/> </li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
|
||||
<dt id="noanswerLink" class="problem-tit"><a href="#" onclick="openPanel('noanswer');return false;">无满意答案</a><span class="gray">没有满意的回答 ,可以直接结束提问,关闭问题;</span></dt>
|
||||
<dd id="noanswerPanel" name="dealPanel" style="display:none;">
|
||||
|
||||
<ul style="border:none;">
|
||||
<li><h5><strong onclick="closePanel('noanswer')">无满意答案</strong><span class="gray">没有满意的回答,可以直接结束提问,关闭问题</span></h5></li>
|
||||
<li class="textbox">如果没有满意的答案,请点击下方“确认”按钮结束提问。<br />出于保护回答者利益的考虑,直接结束提问,提问的<strong>悬赏分将无法返还</strong>,请您理解。</li>
|
||||
<li class="textbut"><input type="submit" value="确 认" onclick="SubmitNoAnswer()"/> <input type="button" value="取 消" onclick="closePanel('noanswer')"/></li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>UserName</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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 * FROM PE_QA_HonorType</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="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
{PE.Label id="头衔系列表" honorTypeID="<xsl:value-of select="HonorTypeID"/>" honorTypeName="<xsl:value-of select="TypeName"/>" /}
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>honorTypeID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>头衔类型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>honorTypeName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>头衔名称</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Honor WHERE [Type] = @honorTypeID</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="honorTypeID" />
|
||||
<xsl:param name="honorTypeName" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<center>
|
||||
<table width="70%" border="0" cellpadding="0" cellspacing="0" class="helpbox" >
|
||||
<tr>
|
||||
<td colspan="4" class="heading">头衔系列:<xsl:value-of select="$honorTypeName" /></td>
|
||||
</tr>
|
||||
<tr class="tit">
|
||||
<td width="25%">等级</td>
|
||||
<td width="25%">开始分数</td>
|
||||
<td width="25%">结束分数</td>
|
||||
<td width="25%">头衔</td>
|
||||
</tr>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()mod 2=0">
|
||||
<tr class="bg2">
|
||||
<td><xsl:value-of select="Grade"/></td>
|
||||
<td><xsl:value-of select="MinPoint"/></td>
|
||||
<td><xsl:value-of select="MaxPoint"/></td>
|
||||
<td><xsl:value-of select="Honor"/></td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<tr>
|
||||
<td><xsl:value-of select="Grade"/></td>
|
||||
<td><xsl:value-of select="MinPoint"/></td>
|
||||
<td><xsl:value-of select="MaxPoint"/></td>
|
||||
<td><xsl:value-of select="Honor"/></td>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</center>
|
||||
<br/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>已解决问题</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>25</default>
|
||||
<intro>显示项数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>5</default>
|
||||
<intro>显示行数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP 25 * FROM PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 1 ORDER BY CreateTime DESC</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="/">
|
||||
<ul>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<li>
|
||||
<span>
|
||||
<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>
|
||||
</span>
|
||||
<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:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</li>
|
||||
<xsl:if test="(position() mod 5 = 0) and (position() != last())">
|
||||
<xsl:text disable-output-escaping="yes"></ul><ul></xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>30</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>待解决问题</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>25</default>
|
||||
<intro>显示项数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>5</default>
|
||||
<intro>显示行数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP 25 * FROM PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 ORDER BY CreateTime DESC</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="/">
|
||||
<ul>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<li>
|
||||
<span>
|
||||
<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>
|
||||
</span>
|
||||
<span class="answernumber">
|
||||
{PE.Label id="回答数" QuestionID="<xsl:value-of select="QuestionID"/>"/}
|
||||
</span>
|
||||
<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:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</li>
|
||||
<xsl:if test="(position() mod 5 = 0) and (position() != last())">
|
||||
<xsl:text disable-output-escaping="yes"></ul><ul></xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>30</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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>
|
||||
<a>
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/> </xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
{PE.Label id="回答数" QuestionID="<xsl:value-of select="QuestionID"/>"/}
|
||||
</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查询语句
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 AND Title LIKE '%@Keyword%']]></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>
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<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:variable name="loginedusername" select="pe:LoginedUserName()"/>
|
||||
<xsl:variable name="isAnswer" select="pe:IsAnswer()"/>
|
||||
<xsl:variable name="isAnswerOne" select="pe:IsAnswerOne()"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$isAnswerOne != 'True' or CO = 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$isAnswer = 'True' or $loginedusername != ''">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function ifReplyContent(obj)
|
||||
{
|
||||
if(document.activeElement.id == obj.id && obj.value == '请在此输入您的回答......')
|
||||
{
|
||||
obj.value = "";
|
||||
}
|
||||
}
|
||||
|
||||
function addAnswer()
|
||||
{
|
||||
var RCon = document.getElementById("replyContent");
|
||||
if(RCon.value == '' || RCon.value == '请在此输入您的回答......')
|
||||
{
|
||||
alert("请输入回答内容");
|
||||
RCon.focus();
|
||||
return false;
|
||||
}
|
||||
var m_IsAnonymity;
|
||||
if(document.getElementById("guest"))
|
||||
{
|
||||
m_IsAnonymity = document.getElementById("guest").checked;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_IsAnonymity = false;
|
||||
}
|
||||
var rContent = escape(RCon.value);
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = ['questionID=@RequestInt_id', 'replyContent=' + rContent, 'isAnonymity=' + m_IsAnonymity];
|
||||
x.post('addAnswer', '{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.open('ShowMessage.aspx?MessageType=0&type=1&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
case "err":
|
||||
window.open('ShowMessage.aspx?MessageType=0&type=0&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
case "check":
|
||||
window.open('ShowMessage.aspx?MessageType=0&type=2&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
case "NoAnonymity":
|
||||
window.open('ShowMessage.aspx?MessageType=0&type=3&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
default:
|
||||
window.open('ShowMessage.aspx?MessageType=0&type=4&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div class="ask_title">
|
||||
<h5>我来回答</h5>
|
||||
<div class="response">
|
||||
<div class="face"> </div>
|
||||
<dl>
|
||||
<dd>
|
||||
<textarea name="replyContent" rows="10" class="inputtext2" onfocus='ifReplyContent(this)' tabindex="4" id="replyContent">请在此输入您的回答......</textarea>
|
||||
</dd>
|
||||
<dd>
|
||||
<input name="" class="inputbutton2" type="button" value="确认提交" onClick="addAnswer()" />
|
||||
<xsl:if test="$isAnswer = 'True'">
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;&nbsp;&nbsp;</xsl:text>
|
||||
<input name="Published" type="checkbox" id="guest" value="匿名发言" />匿名发言
|
||||
</xsl:if>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;&nbsp;</xsl:text>
|
||||
<span>(回答问题可以获得相应的积分)</span>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="ask_box">
|
||||
温馨提示:匿名用户不能回答问题
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<div class="ask_box">
|
||||
温馨提示:每个问题用户只能回答一次
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>userName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT COUNT(QuestionId) AS CO FROM PE_QA_Reply WHERE QuestionID = @questionID AND UserName = '@userName']]></LabelSqlString>
|
||||
</root>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<LabelTemplate><![CDATA[<div id="top_all">
|
||||
<div id="head">
|
||||
<div id="top_t">
|
||||
<div id="top_link">
|
||||
<ul>
|
||||
<li><a href="{PE.SiteConfig.ApplicationPath/}QA/index.aspx" target="_blank">动易问答</a></li>
|
||||
<li><img src="{PE.SiteConfig.SkinPath/}images/en_icon.gif" alt="English" /></li>
|
||||
<li><img src="{PE.SiteConfig.SkinPath/}images/cn_icon.gif" alt="Chinese" /></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="top_banner">
|
||||
<div id="logo"><img alt="logo" src="{PE.SiteConfig.SkinPath/}images/logo.gif" width="179" height="45" border="0" /></div>
|
||||
</div>
|
||||
<div id="menu">
|
||||
{PE.Label id="首页导航(问答)" currentId="{PE.Label id="得到父栏目ID" nodeId="-2" /}" /}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
function searchAnswer()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=2";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=2&Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self');
|
||||
}
|
||||
|
||||
function askQuestion()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/Question.aspx";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/Question.aspx?Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self');
|
||||
}
|
||||
|
||||
function answerQuestion()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=1";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=1&Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self'); }
|
||||
function lostFocus()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
if(keyword.value == "")
|
||||
{
|
||||
keyword.value = "请输入您所需要的关键字";
|
||||
}
|
||||
}
|
||||
|
||||
function setFocus()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
keyword.value = "";
|
||||
}
|
||||
|
||||
LoadCheck();
|
||||
var userName = "";
|
||||
|
||||
function LoadCheck()
|
||||
{
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = [];
|
||||
x.async = false;
|
||||
x.post('logincheck', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == 'ok') {
|
||||
userName = xml.getElementsByTagName("username")[0].firstChild.data;
|
||||
ChangeState(true);
|
||||
}
|
||||
else {
|
||||
ChangeState(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ChangeState(flag)
|
||||
{
|
||||
var logindiv = document.getElementById("logindiv");
|
||||
var logoutdiv = document.getElementById("logoutdiv");
|
||||
if(flag == true)
|
||||
{
|
||||
logindiv.style.display = "none";
|
||||
logoutdiv.style.display = "";
|
||||
document.getElementById("spanUserName").innerHTML = userName + ",欢迎您!";
|
||||
}
|
||||
else
|
||||
{
|
||||
logindiv.style.display="";
|
||||
logoutdiv.style.display="none";
|
||||
}
|
||||
}
|
||||
|
||||
function Logout()
|
||||
{
|
||||
var x = new AjaxRequest('XML','');
|
||||
x.post('userlogout', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx',
|
||||
function(s)
|
||||
{
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == "ok")
|
||||
{
|
||||
if (xml.getElementsByTagName("API_Enable")[0].firstChild.data == "1")
|
||||
{
|
||||
var LogOutString = xml.getElementsByTagName("LogOutString")[0].firstChild.data;
|
||||
Loginin(LogOutString);
|
||||
}
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{PE.Label id="热点问答" outputQty="10" splitChar="、" titleLength="10" /}]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT CategoryID FROM PE_QA_Question WHERE QuestionID = @questionID</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="type" />
|
||||
<xsl:param name="questionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>答案修改</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div id="spanMsg" class="Submitted-successfully">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<p>修改答案失败!</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 1">
|
||||
<p>修改答案成功!</p> <br />
|
||||
<p>您可以通过以下链接查看您的回答情况。</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>参数错误</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<a><xsl:attribute name="href">javascript:history.back();</xsl:attribute>返回</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a><xsl:attribute name="href">ShowQuestion.aspx?Id=<xsl:value-of select="$questionID"/></xsl:attribute>查看该问题</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="MyReply.aspx">查看我的回答</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a><xsl:attribute name="href">QuestionList.aspx?Id=<xsl:value-of select="CategoryID"/>&ShowType=1</xsl:attribute>查看问题相关分类</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Index.aspx">问答首页</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Question WHERE QuestionID = @questionID AND Status != 0</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="questionID"/>
|
||||
<xsl:variable name="loginedusername" select="pe:LoginedUserName()"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<div class="ask_title">
|
||||
<xsl:if test="Status = 1">
|
||||
{PE.Label id="最佳答案" questionID="<xsl:value-of select="QuestionID"/>" /}
|
||||
</xsl:if>
|
||||
<xsl:if test="Status = 2 and $loginedusername != ''">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:IsAnswerSelf() = 'True'">
|
||||
{PE.Label id="我来回答" questionID="<xsl:value-of select="QuestionID"/>" userName="<xsl:value-of select="$loginedusername"/>" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="UserName = $loginedusername">
|
||||
<div class="ask_box">
|
||||
温馨提示:提问人不能回答自己的问题
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="我来回答" questionID="<xsl:value-of select="QuestionID"/>" userName="<xsl:value-of select="$loginedusername"/>" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</div>
|
||||
<br class="spacing" />
|
||||
{PE.Label id="问题回复列表" questionID="<xsl:value-of select="QuestionID"/>" qUserName="<xsl:value-of select="UserName"/>" qStatus="<xsl:value-of select="Status"/>" qPoint="<xsl:value-of select="Point"/>" /}
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</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="type" />
|
||||
<xsl:param name="questionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>答案提交</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div id="spanMsg" class="Submitted-successfully">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<p>答案提交失败,请您重新提交!</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 1">
|
||||
<p>非常感谢您帮助提问者解决难题</p> <br />
|
||||
<p>您可以通过以下链接查看您的回答情况。</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 2">
|
||||
<p>答案提交成功,请等待管理员审核。</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 3">
|
||||
<p>提交答案不能使用匿名</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 4">
|
||||
<p>答案提交失败,请您重新提交!</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>参数错误</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<a><xsl:attribute name="href">javascript:history.back();</xsl:attribute>返回</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a><xsl:attribute name="href">ShowQuestion.aspx?Id=<xsl:value-of select="$questionID"/></xsl:attribute>查看该问题</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="MyReply.aspx">查看我的回答</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a><xsl:attribute name="href">QuestionList.aspx?Id=<xsl:value-of select="CategoryID"/>&ShowType=1</xsl:attribute>查看问题相关分类</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Index.aspx">问答首页</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT CategoryID FROM PE_QA_Question WHERE QuestionID = @questionID</LabelSqlString>
|
||||
</root>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示处理问题结果页</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型:1显示成功,0显示失败</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>QuestionID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</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="type" />
|
||||
<xsl:param name="QuestionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>处理问题</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div id="spanMsg" class="Submitted-successfully">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 1">
|
||||
<p>问题处理成功!</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>问题处理失败!</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div style="text-align:center;">.
|
||||
<a href="MyQuestion.aspx">我的问题</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Index.aspx">问答首页</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Question.aspx">继续提问</a>
|
||||
<xsl:if test="$QuestionID > 0">
|
||||
<a>
|
||||
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/ShowQuestion.aspx?Id=<xsl:value-of select="$QuestionID"/>
|
||||
</xsl:attribute>
|
||||
查看问题
|
||||
</a>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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"><select id="honorTypelist" onchange="updateHonorType(this.options[this.selectedIndex].value)"></xsl:text>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:text disable-output-escaping="yes"><option value="</xsl:text>
|
||||
<xsl:value-of select="HonorTypeID" />
|
||||
<xsl:text disable-output-escaping="yes">"</xsl:text>
|
||||
<xsl:if test="$honorType >0 and $honorType=HonorTypeID">selected</xsl:if>
|
||||
<xsl:text disable-output-escaping="yes">></xsl:text>
|
||||
<xsl:value-of select="pe:CutText(TypeName,10,'')"/>
|
||||
<xsl:text disable-output-escaping="yes"></option></xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text disable-output-escaping="yes"></select></xsl:text>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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 TOP 1 TypeName FROM PE_QA_HonorType WHERE HonorTypeID IN(@honorType)</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="honorType" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$honorType > 0">
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
系列:<xsl:value-of select="TypeName"/>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="显示头衔系列样式一" honorType ="<xsl:value-of select="pe:HonorID()" />" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>honorType</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>头衔类型</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示提问结果页</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型1:显示成功页,0:显示失败页</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="type" />
|
||||
<xsl:param name="QuestionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>问题提交</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div id="spanMsg" class="Submitted-successfully">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 1">
|
||||
<p>您的问题已经提交成功!</p> <br />
|
||||
|
||||
处理提问的方式包括:<br />
|
||||
• 问题补充:对提问进行补充,以得到更准确的答案;<br />
|
||||
• 提高悬赏:提高悬赏分,以提高问题的关注度;<br />
|
||||
• 无满意回答:没有满意的回答,可以直接结束提问,关闭问题。<br />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>问题提交失败,请您重新提交!</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div style="text-align:center;">.
|
||||
<a href="MyQuestion.aspx">我的问题</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Index.aspx">问答首页</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Question.aspx">继续提问</a>
|
||||
<xsl:if test="$type = 1">
|
||||
<a>
|
||||
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/ShowQuestion.aspx?Id=<xsl:value-of select="$QuestionID"/>
|
||||
</xsl:attribute>
|
||||
查看问题
|
||||
</a>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>QuestionID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型1:显示成功页,0:显示失败页</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>messageType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>消息类型,提问消息:1,回复消息:0,处理问题:2,设置最佳答案:3,修改答案:4</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="type" />
|
||||
<xsl:param name="questionID" />
|
||||
<xsl:param name="messageType" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$messageType = 1">
|
||||
{PE.Label id="显示提问结果页" type="<xsl:value-of select="$type" />" QuestionID="<xsl:value-of select="$questionID" />" /}
|
||||
</xsl:when>
|
||||
<xsl:when test="$messageType = 2">
|
||||
{PE.Label id="显示处理问题结果页" type="<xsl:value-of select="$type"/>" QuestionID="<xsl:value-of select="$questionID"/>"/}
|
||||
</xsl:when>
|
||||
<xsl:when test="$messageType = 3">
|
||||
{PE.Label id="显示设置最佳答案结果页" type="<xsl:value-of select="$type"/>" QuestionID="<xsl:value-of select="$questionID"/>"/}
|
||||
</xsl:when>
|
||||
<xsl:when test="$messageType = 4">
|
||||
{PE.Label id="显示修改答案结果页" type="<xsl:value-of select="$type"/>" QuestionID="<xsl:value-of select="$questionID"/>"/}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="显示回复结果页" type="<xsl:value-of select="$type" />" questionID="<xsl:value-of select="$questionID" />" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示用户名</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<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" />
|
||||
<xsl:template match="/">
|
||||
"<xsl:value-of select="pe:LoginedUserName()"/>,欢迎您!"
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示用户头像</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>UserFace</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户头像url</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="UserFace" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$UserFace=''">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
{PE.SiteConfig.ApplicationPath/}User/Images/default.gif
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src"><xsl:if test="pe:IsStartWithhttp(UserFace)='true'"><xsl:value-of select="pe:InstallDir()"/></xsl:if><xsl:if test="pe:IsStartWithhttp($UserFace)='false'"><xsl:value-of select="pe:UpLoadDir()"/></xsl:if>
|
||||
<xsl:value-of select="pe:ConvertRelativePath($UserFace)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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><![CDATA[SELECT TOP 1 * FROM PE_QA_Honor WHERE MinPoint <= (@qAPoint) AND MAXPoint >= (@qAPoint) AND Type = (@honorType)]]></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:param name="honorType" />
|
||||
<xsl:param name="qAPoint" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$honorType > 0">
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<xsl:value-of select="Honor"/> [<xsl:value-of select="Grade"/>]
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:HonorID() > 0">
|
||||
{PE.Label id="显示用户级别" qAPoint="<xsl:value-of select="$qAPoint" />" honorType="<xsl:value-of select="pe:HonorID()" />" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
{PE.Label id="显示用户级别" qAPoint="<xsl:value-of select="$qAPoint" />" honorType="1" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>qAPoint</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问答积分</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>honorType</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>级别类型</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示类型下问题数</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问答类型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>关键字</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>true</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<!--要使用上一步定义的自定义参数,要作为XSLT参数使用,务必要在这里声明。如:<xsl:param name="myPara" />.引用该参数:$myPara -->
|
||||
<xsl:param name="ShowType" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="xml" />
|
||||
<xsl:template match="/">
|
||||
<!--请按提示编辑,保持该模板结构的正确性-->
|
||||
<root>
|
||||
<sql>
|
||||
SELECT count(QuestionID) AS 'SUM' FROM PE_QA_Question where CategoryID in (select CategoryID from PE_QA_Category where CategoryID=@CategoryID OR ParentID= @CategoryID)
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ShowType = 1"> AND Status = 2</xsl:when>
|
||||
<xsl:when test="$ShowType = 2"> AND Status = 1</xsl:when>
|
||||
<xsl:when test="$ShowType = 3"> AND Status = 2</xsl:when>
|
||||
<xsl:when test="$ShowType = 4"> AND Status = 2 AND NOT EXISTS(SELECT * FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID) </xsl:when>
|
||||
<xsl:when test="$ShowType = 5"> AND Status = 1 AND IsElite = 1</xsl:when>
|
||||
<xsl:otherwise>AND Status > 0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''"> AND Title LIKE '%@Keyword%'</xsl:if>
|
||||
</sql>
|
||||
<sqlpage>
|
||||
<!--请在这里编写你的SQL分页查询语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</sqlpage>
|
||||
<countsql>
|
||||
<!--请在这里编写你的分页SQL语句,只有下面启用了分页SQL的XSLT编程支持这里才有效-->
|
||||
</countsql>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelSqlString>
|
||||
<LabelTemplate><![CDATA[<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pe="labelproc" exclude-result-prefixes="pe">
|
||||
<xsl:param name="CategoryID" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:value-of select="SUM"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<Version officialVersion="" modifiedVersions="3602" compatibleVersion="" />
|
||||
</root>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT CategoryID FROM PE_QA_Question WHERE QuestionID = @questionID</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="type" />
|
||||
<xsl:param name="questionID" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>设置最佳答案</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div id="spanMsg" class="Submitted-successfully">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<p>设置最佳答案失败!</p>
|
||||
</xsl:when>
|
||||
<xsl:when test="$type = 1">
|
||||
<p>非常感谢您解决难题!</p> <br />
|
||||
<p>您可以通过以下链接查看您的回答情况。</p>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<p>参数错误</p>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
<div style="text-align:center;">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type = 0">
|
||||
<a><xsl:attribute name="href">javascript:history.back();</xsl:attribute>返回</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a><xsl:attribute name="href">ShowQuestion.aspx?Id=<xsl:value-of select="$questionID"/></xsl:attribute>查看该问题</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="MyReply.aspx">查看我的回答</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a><xsl:attribute name="href">QuestionList.aspx?Id=<xsl:value-of select="CategoryID"/>&ShowType=1</xsl:attribute>查看问题相关分类</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a href="Index.aspx">问答首页</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Question WHERE QuestionID = @questionID</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="questionID"/>
|
||||
<xsl:variable name="loginedusername" select="pe:LoginedUserName()"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<div class="quiz">
|
||||
<xsl:choose>
|
||||
<xsl:when test="Status != 0">
|
||||
{PE.DataSource datasource="用户信息数据源标签" id="UserInfo" userName="<xsl:value-of select="UserName"/>" /}
|
||||
|
||||
<div class="quiz_title">
|
||||
<h2>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:if test="Status = 1">Solution2</xsl:if>
|
||||
<xsl:if test="Status = 2">Solution1</xsl:if>
|
||||
<xsl:if test="Status = 3">Solution3</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Title"/>
|
||||
</h2>
|
||||
<p>悬赏: <b>
|
||||
<xsl:value-of select="Point"/>
|
||||
</b> 积分 <span>提问于:<xsl:value-of select="pe:FormatDate(CreateTime,'yyyy-mm-dd hh:ff:ss')"/>
|
||||
<xsl:if test="pe:IsShowIP() = 'True'">
|
||||
IP:<xsl:value-of select="IP"/>
|
||||
</xsl:if>
|
||||
点击数:<script language="JavaScript" type="text/JavaScript" src="{pe:InstallDir()}QA/GetHits.aspx?id=@RequestInt_id">
|
||||
</script>
|
||||
</span> </p>
|
||||
</div>
|
||||
<div class="quiz_detail">
|
||||
<p>
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(Content)"/>
|
||||
</p>
|
||||
<span class="quiz_Asker">提问者:
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'true' or UserName = ''">
|
||||
匿名<xsl:text disable-output-escaping="yes">&nbsp;&nbsp;</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="UserName"/> -
|
||||
{PE.Label id="显示用户级别" qAPoint="{PE.Field id="UserInfo" fieldname="UserExp" /}" honorType="{PE.Field id="UserInfo" fieldname="HonorType" /}" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</span>
|
||||
<xsl:if test="ExtraDetail != ''">
|
||||
问题补充:<br />
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(ExtraDetail)"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="UserName = pe:LoginedUserName() and Status = 2">
|
||||
{PE.Label id="处理问题标签" UserName="<xsl:value-of select="UserName"/>" QuestionID="<xsl:value-of select="QuestionID"/>" Point="<xsl:value-of select="Point"/>"/}
|
||||
</xsl:if>
|
||||
<xsl:if test="Status = 2 and $loginedusername != ''">
|
||||
<xsl:choose>
|
||||
<xsl:when test="pe:IsAnswerSelf() = 'True'">
|
||||
{PE.Label id="显示问题的我来回答" questionID="<xsl:value-of select="QuestionID"/>" userName="<xsl:value-of select="$loginedusername"/>" /}
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="UserName != $loginedusername">
|
||||
{PE.Label id="显示问题的我来回答" questionID="<xsl:value-of select="QuestionID"/>" userName="<xsl:value-of select="$loginedusername"/>" /}
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<br class="clearbox" />
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
温馨提示:此问题处于待审核状态,请等待审核通过后查看!
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<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:variable name="isAnswer" select="pe:IsAnswer()"/>
|
||||
<xsl:variable name="isAnswerOne" select="pe:IsAnswerOne()"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:if test="$isAnswerOne != 'True' or CO = 0">
|
||||
<xsl:if test="$isAnswer = 'True' or pe:LoginedUserName() != ''">
|
||||
<div class="quiz_bottom1" style="color:#ff6600;font-weight: bold;cursor:pointer;" onclick="statFunc();"> 我来回答 </div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
function statFunc() {
|
||||
var response = document.getElementById("replyContent");
|
||||
response.value = "";
|
||||
response.focus();
|
||||
}
|
||||
</script>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>userName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT COUNT(QuestionId) AS CO FROM PE_QA_Reply WHERE QuestionID = @questionID AND UserName = '@userName']]></LabelSqlString>
|
||||
</root>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>显示问题类别</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题类别ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT B.CategoryID AS Level1ID, B.CategoryName AS Level1Name,A.CategoryID AS Level2ID,A.CategoryName AS Level2Name FROM PE_QA_Category A,PE_QA_Category B WHERE A.CategoryID = @CategoryID AND B.CategoryID = A.ParentID</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:template match="/NewDataSet/Table">
|
||||
-
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ID=<xsl:value-of select="Level1ID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Level1Name"/>
|
||||
</a>
|
||||
<xsl:if test="Level1ID != Level2ID">
|
||||
>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ID=<xsl:value-of select="Level2ID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Level2Name"/>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>最佳回答者</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>QuestionID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题标题</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Reply WHERE QuestionID = @QuestionID AND IsBest = 1 AND Status = 2</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:template match="/NewDataSet/Table">
|
||||
最佳回答者:
|
||||
- <xsl:value-of select="pe:FormatDate(ReplyTime,'yyyy-mm-dd')"/> -
|
||||
<a>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Reply WHERE QuestionID = @questionID AND IsBest = 1 AND Status = 2</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="questionID"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(/NewDataSet/Table) = 0">
|
||||
<div class="ask_box">
|
||||
没有最佳答案
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
{PE.DataSource datasource="用户信息数据源标签" id="UserInfo" userName="<xsl:value-of select="UserName"/>" /}
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
|
||||
<h3>最佳答案</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
|
||||
<div class="quiz">
|
||||
|
||||
<div class="quiz_detail">
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(Content)"/>
|
||||
|
||||
<div class="Name">回答者:
|
||||
<xsl:value-of select="UserName"/> -
|
||||
{PE.Label id="显示用户级别" qAPoint="{PE.Field id="UserInfo" fieldname="UserExp" /}" honorType="{PE.Field id="UserInfo" fieldname="HonorType" /}" /}
|
||||
<xsl:value-of select="pe:FormatDate(ReplyTime,'mm-dd hh:ff')"/>
|
||||
<p/>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.ApplicationPath/}QA/CommentList.aspx?ID=<xsl:value-of select="ReplyID"/>
|
||||
</xsl:attribute>
|
||||
我来评论>>
|
||||
</a>
|
||||
</div>
|
||||
<div class="quiz_bestanswer">
|
||||
<p>提问者对于答案的评价:</p>
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(ReplyComment)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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><![CDATA[SELECT TOP 1 PE_Users.UserName, UserFace, UserExp FROM (SELECT SUM(Point) AS 'Point', UserName FROM PE_QA_PointLog WHERE DATEDIFF(week,LogTime,getdate())=0 AND Type=4 GROUP BY UserName) NEWTABLE, PE_Users WHERE NEWTABLE.UserName=PE_Users.UserName ORDER BY Point DESC]]></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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="TitleLen" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
{PE.DataSource datasource="用户信息数据源标签" id="UserInfo8" userName="<xsl:value-of select="UserName"/>" /}
|
||||
<div class="title6">
|
||||
<h2> 本周解答之王 </h2>
|
||||
{PE.Label id="显示用户头像" UserFace="<xsl:value-of select="UserFace"/>"/}
|
||||
<dl>
|
||||
<dd> <strong>
|
||||
<a>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</a>
|
||||
</strong>
|
||||
<span id="winner">
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
</span>
|
||||
</dd>
|
||||
<dd>积分: <xsl:value-of select="UserExp"/> </dd>
|
||||
<dd>
|
||||
{PE.Label id="显示用户级别" qAPoint="{PE.Field id="UserInfo8" fieldname="UserExp" /}" honorType="{PE.Field id="UserInfo8" fieldname="HonorType" /}" /}
|
||||
</dd>
|
||||
</dl>
|
||||
精选回答:
|
||||
{PE.Label id="精选回答" TitleLen="<xsl:value-of select="$TitleLen"/>" UserName="<xsl:value-of select="UserName"/>"/}
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]>
|
||||
</LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>26</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>outputQty</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>8</default>
|
||||
<intro>显示个数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>splitChar</name>
|
||||
<datatype>string</datatype>
|
||||
<default>、</default>
|
||||
<intro>分隔符号</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @outputQty Title,QuestionID FROM PE_QA_Question WHERE Status != 0 ORDER BY Hits DESC</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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="titleLength" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:param name="splitChar"/>
|
||||
<xsl:variable name="countnum" select="count(/NewDataSet/Table)"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<div class="hotword">
|
||||
<span class="hotword_l"> </span>
|
||||
<span class="hotword_r"> </span>
|
||||
<strong> 热点问答:</strong>
|
||||
<xsl:for-each select="Table">
|
||||
<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,$titleLength,'')" /> </a>
|
||||
|
||||
<xsl:if test="position()<$countnum">
|
||||
<xsl:value-of select="$splitChar"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
... </div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>titleLength</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>16</default>
|
||||
<intro>项目标题长度,一个汉字占两个字节</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>userName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>admin</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT * FROM PE_Users WHERE UserName = '@userName']]></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:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<root>
|
||||
<UserID>
|
||||
<xsl:value-of select="/NewDataSet/Table/UserID"/>
|
||||
</UserID>
|
||||
<GroupID>
|
||||
<xsl:value-of select="/NewDataSet/Table/GroupID"/>
|
||||
</GroupID>
|
||||
<CompanyID>
|
||||
<xsl:value-of select="/NewDataSet/Table/CompanyID"/>
|
||||
</CompanyID>
|
||||
<ClientID>
|
||||
<xsl:value-of select="/NewDataSet/Table/ClientID"/>
|
||||
</ClientID>
|
||||
<UserType>
|
||||
<xsl:value-of select="/NewDataSet/Table/UserType"/>
|
||||
</UserType>
|
||||
<UserName>
|
||||
<xsl:value-of select="/NewDataSet/Table/UserName"/>
|
||||
</UserName>
|
||||
<TrueName>
|
||||
<xsl:value-of select="/NewDataSet/Table/TrueName"/>
|
||||
</TrueName>
|
||||
<UserExp>
|
||||
<xsl:value-of select="/NewDataSet/Table/UserExp"/>
|
||||
</UserExp>
|
||||
<HonorType>
|
||||
<xsl:value-of select="/NewDataSet/Table/HonorType"/>
|
||||
</HonorType>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>用户积分排行</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>5</default>
|
||||
<intro>显示行数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @TopNum * FROM PE_Users ORDER BY UserExp DESC</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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="TopNum"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<div class="title5">
|
||||
<h2> 用户积分排行 </h2>
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<b>
|
||||
<xsl:value-of select="position()"/>
|
||||
</b>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<a>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</a>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<em>
|
||||
<xsl:value-of select="UserExp"/>
|
||||
</em>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<span class="more">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="pe:InstallDir()"/>QA/QAPointList.aspx</xsl:attribute>
|
||||
更多>>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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 TOP 100 UserName,UserExp,HonorType FROM PE_Users ORDER BY UserExp DESC</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:template match="/">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="Points-Details">
|
||||
<tr>
|
||||
<td colspan="5" class="tit">用户问答积分排行TOP100</td>
|
||||
</tr>
|
||||
<tr class="tit2">
|
||||
<td style="align:center;">次序</td>
|
||||
<td style="align:center;">用户名</td>
|
||||
<td style="align:center;">积分数</td>
|
||||
</tr>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<xsl:choose>
|
||||
<xsl:when test="(position() mod 2)=0">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:value-of select="position()"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="UserExp"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<tr class="bg2">
|
||||
<td>
|
||||
<xsl:value-of select="position()"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="UserExp"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
|
||||
</table>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<UsePage>
|
||||
</UsePage>
|
||||
<LabelSqlCount><![CDATA[请在上面的<countsql></countsql>标记之间写分页SQL查询语句
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 AND Title LIKE '%@Keyword%']]></LabelSqlCount>
|
||||
</root>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>相似问题列表</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>问题关键字</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT TOP @pagesize * FROM PE_QA_Question WHERE Title LIKE '%@Keyword%' AND Status = 1]]></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:param name="ContentLen"/>
|
||||
<xsl:param name="Keyword"/>
|
||||
<xsl:template match="/">
|
||||
<h2 class="Search-question-tit">
|
||||
与您的提问<span>“<xsl:value-of select="$Keyword"/>”</span>相关的已解决问题列表如下:
|
||||
<em>(请查看它们是否能够解答您的疑问)</em>
|
||||
</h2>
|
||||
<dd>
|
||||
<div class="qu_list2">
|
||||
<ul>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(/NewDataSet/Table)=0">
|
||||
<li>
|
||||
没有相关问题内容!
|
||||
</li>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<li>
|
||||
<h3>
|
||||
<a>
|
||||
<xsl:attribute name="href">{PE.SiteConfig.applicationpath/}QA/ShowQuestion.aspx?ID=<xsl:value-of select="QuestionID"/></xsl:attribute>
|
||||
<xsl:value-of select="pe:CutText(Title,$TitleLen,'...')"/>
|
||||
</a>
|
||||
</h3>
|
||||
<span>
|
||||
<xsl:value-of select="pe:CutText(Content,$ContentLen,'...')"/>
|
||||
</span>
|
||||
<em>
|
||||
<a>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</a>
|
||||
{PE.Label id="最佳回答者" QuestionID="<xsl:value-of select="QuestionID"/>"/}
|
||||
{PE.Label id="显示问题类别" QuestionID="<xsl:value-of select="QuestionID"/>"/}
|
||||
</em>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>30</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ContentLen</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>300</default>
|
||||
<intro>内容长度</intro>
|
||||
</attributes>
|
||||
<UsePage>True</UsePage>
|
||||
<LabelSqlCount><![CDATA[select count(*) from PE_QA_Question WHERE Title LIKE '%@Keyword%' AND Status = 1]]></LabelSqlCount>
|
||||
</root>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<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" />
|
||||
<xsl:template match="/">
|
||||
<center>
|
||||
<table width="70%" border="0" cellpadding="0" cellspacing="0" class="helpbox" >
|
||||
<tr class="tit">
|
||||
<td>获得积分数</td>
|
||||
<td>说明</td>
|
||||
</tr>
|
||||
<tr class="bg2">
|
||||
<td>+<xsl:value-of select="pe:RecommendQuestionPoint()"/>分</td>
|
||||
<td>问题被推荐提问者所得积分</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>+<xsl:value-of select="pe:RecommendAnswerPoint()"/>分</td>
|
||||
<td>问题被选为精彩推荐最佳回答者所得的积分</td>
|
||||
</tr>
|
||||
<tr class="bg2">
|
||||
<td>+<xsl:value-of select="pe:AnswerPoint()"/>分</td>
|
||||
<td>用户回答一个问题所得的积分</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>+<xsl:value-of select="pe:AcceptPoint()"/>分</td>
|
||||
<td>最佳答案额外奖励的积分</td>
|
||||
</tr>
|
||||
<tr class="bg2">
|
||||
<td>+<xsl:value-of select="pe:CommentPoint()"/>分</td>
|
||||
<td>用户对最佳答案发表评论所得的积分</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-<xsl:value-of select="pe:BeDeleteQuestionPoint()"/>分</td>
|
||||
<td>问题审核通过后被管理员删除扣除的积分</td>
|
||||
</tr>
|
||||
<tr class="bg2">
|
||||
<td>-<xsl:value-of select="pe:BeDeleteAnswerPoint()"/>分</td>
|
||||
<td>回答审核通过后被管理员删除扣除的积分</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-<xsl:value-of select="pe:BeDeleteCommentPoint()"/>分</td>
|
||||
<td>评论审核通过后被管理员删除扣除的积分</td>
|
||||
</tr>
|
||||
<tr class="bg2">
|
||||
<td>-<xsl:value-of select="pe:AnonymityQuestionPoint()"/>分</td>
|
||||
<td>用户匿名提问所需积分</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>replyId</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>答案ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Comment WHERE ReplyID = @replyId AND Status = 2</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="questionID"/>
|
||||
<xsl:template match="/">
|
||||
<div class="best_answerTit" >
|
||||
<h4>
|
||||
<span> (共 <xsl:value-of select="count(/NewDataSet/Table)"/> 个评论) </span>评论 </h4>
|
||||
</div>
|
||||
<div class="answer_box">
|
||||
<div class="quiz">
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
{PE.DataSource datasource="用户信息数据源标签" id="UserInfo" userName="<xsl:value-of select="UserName"/>" /}
|
||||
<div class="quiz_detail">
|
||||
<p>
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(Content)"/>
|
||||
</p>
|
||||
<div class="Name"> 评论者:<xsl:choose><xsl:when test="UserName = '匿名' or UserName = '游客'">游客</xsl:when><xsl:otherwise><xsl:value-of select="UserName"/></xsl:otherwise></xsl:choose>
|
||||
<xsl:if test="UserName != '' and UserName != '游客'"> -{PE.Label id="显示用户级别" qAPoint="{PE.Field id="UserInfo" fieldname="UserExp" /}" honorType="{PE.Field id="UserInfo" fieldname="HonorType" /}" /} </xsl:if>
|
||||
<xsl:value-of select="pe:FormatDate(ReplyTime,'mm-dd hh:ff')"/> </div>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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 TOP @ShowNum * FROM PE_QA_Question WHERE IsElite = 1 ORDER BY UpdateTime DESC</LabelSqlString>
|
||||
<attributes>
|
||||
<name>ShowNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>8</default>
|
||||
<intro>显示项数</intro>
|
||||
</attributes>
|
||||
<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="/">
|
||||
<h2 class="recommend">
|
||||
<span >
|
||||
<a>
|
||||
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=5</xsl:attribute>更多>>
|
||||
</a>
|
||||
</span>
|
||||
精彩推荐
|
||||
</h2>
|
||||
<div class="box2">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
{PE.SiteConfig.SkinPath/}QA/images/ask_recom.jpg
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="border">0</xsl:attribute>
|
||||
</xsl:element>
|
||||
<ul>
|
||||
<xsl:for-each select="NewDataSet/Table">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.ApplicationPath/}QA/ShowQuestion.aspx?ID=<xsl:value-of select="QuestionID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="pe:CutText(Title,$TitleLen,'...')"/>
|
||||
</a>
|
||||
</li>
|
||||
<xsl:if test="(position() mod 4 = 0) and (position() != last())">
|
||||
<xsl:text disable-output-escaping="yes"></ul><ul></xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<br class="clearbox"/>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>20</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,110 @@
|
||||
<?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 IsElite = 1
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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 IsElite = 1
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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 IsElite = 1
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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:param name="Keyword"/>
|
||||
<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>
|
||||
<a>
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</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查询语句
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 AND Title LIKE '%@Keyword%']]></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>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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>
|
||||
</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT Top 5 * FROM PE_QA_Question WHERE QuestionID in (SELECT QuestionID FROM PE_QA_Reply WHERE UserName=@UserName AND IsBest=1) ORDER BY UpdateTime DESC</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="/NewDataSet">
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<b>
|
||||
<xsl:value-of select="position()"/>
|
||||
</b>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<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>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>30</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答列表选项</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题类型ID</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="CategoryID" />
|
||||
<xsl:param name="ShowType" />
|
||||
<xsl:param name="Keyword" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<a>
|
||||
<xsl:if test="$ShowType!=2 and $ShowType!=3 and $ShowType!=4 and $ShowType!=5">
|
||||
<xsl:attribute name="class">title-on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$CategoryID<=0">{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=1</xsl:when>
|
||||
<xsl:otherwise>{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=1&Id=<xsl:value-of select="$CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">待解决问题</xsl:attribute>
|
||||
<span class="online">待解决问题 </span>
|
||||
</a>
|
||||
<a>
|
||||
<xsl:if test="$ShowType=2">
|
||||
<xsl:attribute name="class">title-on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$CategoryID<=0">{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=2</xsl:when>
|
||||
<xsl:otherwise>{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=2&Id=<xsl:value-of select="$CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">已解决问题</xsl:attribute>
|
||||
<span class="over">已解决问题 </span>
|
||||
</a>
|
||||
<a>
|
||||
<xsl:if test="$ShowType=3">
|
||||
<xsl:attribute name="class">title-on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$CategoryID<=0">{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=3</xsl:when>
|
||||
<xsl:otherwise>{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=3&Id=<xsl:value-of select="$CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">高分问题</xsl:attribute>
|
||||
<span class="high">高分问题 </span>
|
||||
</a>
|
||||
<a>
|
||||
<xsl:if test="$ShowType=4">
|
||||
<xsl:attribute name="class">title-on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$CategoryID<=0">{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=4</xsl:when>
|
||||
<xsl:otherwise>{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=4&Id=<xsl:value-of select="$CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">零回答问题</xsl:attribute>
|
||||
<span class="zero">零回答问题 </span>
|
||||
</a>
|
||||
<a>
|
||||
<xsl:if test="$ShowType=5">
|
||||
<xsl:attribute name="class">title-on</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$CategoryID<=0">{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=5</xsl:when>
|
||||
<xsl:otherwise>{PE.SiteConfig.applicationpath/}QA/QuestionList.aspx?ShowType=5&Id=<xsl:value-of select="$CategoryID"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$Keyword!=''">&Keyword=<xsl:value-of select="pe:UrlEncode($Keyword)"/></xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">精彩推荐</xsl:attribute>
|
||||
<span class="Comments">精彩推荐 </span>
|
||||
</a>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>ShowType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示列表类型</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Keyword</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>关键字</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答列表页标题</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>ShowType</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示列表类型</intro>
|
||||
</attributes>
|
||||
<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:param name="ShowType" />
|
||||
<xsl:output method="html" />
|
||||
<xsl:template match="/">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ShowType=2">已解决问题列表</xsl:when>
|
||||
<xsl:when test="$ShowType=3">高分问题列表</xsl:when>
|
||||
<xsl:when test="$ShowType=4">零回答问题列表</xsl:when>
|
||||
<xsl:when test="$ShowType=5">精彩推荐问题列表</xsl:when>
|
||||
<xsl:otherwise>待解决问题列表</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答子类列表</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>ParentID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>父类ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Category WHERE ParentID=@ParentID</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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="ParentID"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">../QuestionList.aspx?ID=<xsl:value-of select="CategoryID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="CategoryName"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<LabelTemplate><![CDATA[<div class="b_ad">
|
||||
<div id="bottom_all">
|
||||
<div id="foot">
|
||||
<div id="menu_link">
|
||||
<a href="mailto:{PE.SiteConfig.WebmasterEmail /}">联系我们</a> | <a href="{PE.SiteConfig.ApplicationPath/}category_7/index.aspx">网站留言</a> | <a href="{PE.SiteConfig.ApplicationPath /}category_6/index.aspx">友情链接</a> | <a href="{PE.SiteConfig.ApplicationPath /}Category_8/index.aspx">版权声明</a> | <a href="{PE.SiteConfig.ApplicationPath /}{PE.SiteConfig.ManageDir /}/Index.aspx" target="_blank">管理登录</a></div>
|
||||
<div id="copyright">
|
||||
{PE.SiteConfig.CopyRight /}</div>
|
||||
</div>
|
||||
</div>
|
||||
]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>categoryID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>类型ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>linkOpenType</name>
|
||||
<datatype>string</datatype>
|
||||
<default>2</default>
|
||||
<intro>内容链接的打开方式{栏目节点配置取代:1,新窗口:2,原窗口:0}</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>splitChar</name>
|
||||
<datatype>string</datatype>
|
||||
<default>></default>
|
||||
<intro>类型之间拆分修饰符{>>:>>,-:-,>:>}</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Category WHERE CategoryID = @categoryID</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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="categoryID" />
|
||||
<xsl:param name="linkOpenType" />
|
||||
<xsl:param name="splitChar"/>
|
||||
<xsl:param name="depth"/>
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
<xsl:if test="ParentID != CategoryID">
|
||||
{PE.Label id="问答当前位置导航" categoryID="<xsl:value-of select="ParentID"/>" linkOpenType="<xsl:value-of select="$linkOpenType"/>" depth="<xsl:value-of select="$depth + 1"/>" /}
|
||||
</xsl:if>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ID=<xsl:value-of select="CategoryID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="target">
|
||||
<xsl:if test="$linkOpenType = 1">_blank</xsl:if>
|
||||
<xsl:if test="$linkOpenType = 2">_self</xsl:if>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="CategoryName"/>
|
||||
</a>
|
||||
<xsl:if test="$splitChar != '' and $depth != 0">
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text><xsl:value-of select="$splitChar" />
|
||||
|
||||
</xsl:if>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>depth</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>递归深度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<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"/>
|
||||
<xsl:template match="/">
|
||||
{PE.Label id="问答用户信息" UserName="<xsl:value-of select="pe:LoginedUserName()"/>"/}
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT @pagesize</LabelSqlString>
|
||||
</root>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答用户信息</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>UserName</name>
|
||||
<datatype>string</datatype>
|
||||
<default>admin</default>
|
||||
<intro>用户名</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT TOP 1 * FROM PE_Users WHERE UserName='@UserName']]></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:output method="html" />
|
||||
<xsl:template match="/NewDataSet/Table">
|
||||
{PE.DataSource datasource="用户信息数据源标签" id="UserInfo" userName="<xsl:value-of select="UserName"/>" /}
|
||||
<div class="author user_info">
|
||||
<xsl:choose>
|
||||
<xsl:when test="UserFace=''">
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src">
|
||||
{PE.SiteConfig.ApplicationPath/}User/Images/default.gif
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="img">
|
||||
<xsl:attribute name="src"><xsl:if test="pe:IsStartWithhttp(UserFace)='true'"><xsl:value-of select="pe:InstallDir()"/></xsl:if><xsl:if test="pe:IsStartWithhttp(UserFace)='false'"><xsl:value-of select="pe:UpLoadDir()"/></xsl:if><xsl:value-of select="pe:ConvertRelativePath(UserFace)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="alt">
|
||||
<xsl:value-of select="UserName"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<dl>
|
||||
<dd>
|
||||
<xsl:value-of select="UserName"/>
|
||||
</dd>
|
||||
<dd> 积分:<xsl:value-of select="UserExp"/></dd>
|
||||
<dd> {PE.Label id="显示用户级别" qAPoint="{PE.Field id="UserInfo" fieldname="UserExp" /}" honorType="{PE.Field id="UserInfo" fieldname="HonorType" /}" /}</dd>
|
||||
<dd>{PE.Label id="显示头衔系列" userName="<xsl:value-of select="UserName"/>" honorType="<xsl:value-of select="HonorType"/>"/}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答登录</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<LabelTemplate><![CDATA[<div id="BOX_overlay" style="display:none;" class="OverLay">
|
||||
</div>
|
||||
<div id="MainLogin" style="display:none;" class="mainlogin">
|
||||
<h2><a href="javascript:CloseDiv();"><span></span></a>登录</h2>
|
||||
<dl>
|
||||
<div> <b>问答注册用户请直接登录</b> </div>
|
||||
<div class="logininput">
|
||||
<div class="item">
|
||||
<label for="userName">用户名:</label>
|
||||
<input type="text" name="TxtUserName" id="TxtUserName">
|
||||
</div>
|
||||
<div class="item">
|
||||
<label for="password">密 码:</label>
|
||||
<input type="password" name="TxtPassword" id="TxtPassword">
|
||||
</div>
|
||||
<div id="checkcode" class="item" style="display:none;">
|
||||
<label for="ValdisplayDate">验证码:</label>
|
||||
<input name="TxtValdisplayDateCode" type="text" maxlength="6" value="no" id="TxtValdisplayDateCode" onfocus="this.select();" style="width: 50px;" />
|
||||
<img id="VcodeLogOn" title="看不清楚,换一个" onclick="RefreshValdisplayDateCodeImage(this);" src="{PE.SiteConfig.ApplicationPath /}Controls/ValidateCodeImage.aspx" align="absmiddle" style="border-width: 0px; cursor: hand;" />
|
||||
</div>
|
||||
<div class="item">
|
||||
<label for="Cookie">Cookie:</label>
|
||||
<select name="DropExpiration" id="DropExpiration">
|
||||
<option value="None">不保存</option>
|
||||
<option value="Day">保存一天</option>
|
||||
<option value="Month">保存一月</option>
|
||||
<option value="Year">保存一年</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<input type="submit" value=" 登录 " onClick="Login()">
|
||||
|
||||
<a href="{PE.SiteConfig.ApplicationPath /}User/GetPassword.aspx" linkOpenType="_top">忘记密码?</a>
|
||||
</div>
|
||||
<div style="padding-top:10px;">
|
||||
<hr size="0" style="border-top:1px solid #AAAAAA">
|
||||
<div>没有问答账号?</div>
|
||||
<div>
|
||||
<input type="button" value="立即注册问答帐号" class="regButton" onClick="regUser();" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
.OverLay{
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background-color: #000;
|
||||
filter: alpha(opacity=70);
|
||||
-moz-opacity: 0.7;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
LoadInit();
|
||||
CheckEnableValidCode();
|
||||
function LoadInit()
|
||||
{
|
||||
document.getElementById("TxtUserName").value = "";
|
||||
}
|
||||
function CheckEnableValidCode(){
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = [];
|
||||
x.post('EnableValidCode', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == "yes") {
|
||||
document.getElementById("checkcode").style.display = '';
|
||||
document.getElementById("TxtValdisplayDateCode").value = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function RefreshValdisplayDateCodeImage(ValdisplayDateCodeImageControl){
|
||||
ValdisplayDateCodeImageControl.src = ValdisplayDateCodeImageControl.src + '?code=' + RandomNum(10);
|
||||
}
|
||||
|
||||
function RandomNum(n){
|
||||
var rnd = '';
|
||||
for (var i = 0; i < n; i++)
|
||||
rnd += Math.floor(Math.random() * 10);
|
||||
return rnd;
|
||||
}
|
||||
|
||||
function regUser()
|
||||
{
|
||||
url="{PE.SiteConfig.ApplicationPath /}User/Register.aspx";
|
||||
window.open(url,"_blank");
|
||||
}
|
||||
|
||||
function CloseDiv()
|
||||
{
|
||||
BOX_remove('MainLogin');
|
||||
CheckEnableValidCode();
|
||||
RefreshValdisplayDateCodeImage(document.getElementById("VcodeLogOn"));
|
||||
document.getElementById("TxtUserName").value = "";
|
||||
document.getElementById("TxtPassword").value = "";
|
||||
document.getElementById("DropExpiration").selectedIndex = 0;
|
||||
}
|
||||
|
||||
function DefaultButton(event, linkOpenType){
|
||||
if (event.keyCode == 13 && !(event.srcElement && (event.srcElement.tagName.toLowerCase() == "textarea"))) {
|
||||
var defaultButton = $(linkOpenType);
|
||||
if (defaultButton && typeof(defaultButton.click) != "undefined") {
|
||||
defaultButton.click();
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation)
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var isLogin = false;
|
||||
|
||||
function Loginin(LoginString){
|
||||
document.getElementById("MainLogin").innerHTML = document.getElementById("MainLogin").innerHTML + LoginString;
|
||||
}
|
||||
function CheckIsLogin(){
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = [];
|
||||
x.async = false;
|
||||
x.post('logincheck', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == 'ok') {
|
||||
isLogin = true;
|
||||
}
|
||||
else {
|
||||
BOX_show('MainLogin');
|
||||
isLogin = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CheckEnableValidCode(){
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = [];
|
||||
x.post('EnableValidCode', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == "yes") {
|
||||
document.getElementById("checkcode").style.display = '';
|
||||
document.getElementById("TxtValdisplayDateCode").value = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
var isPost = false;
|
||||
function Login(){
|
||||
if (document.getElementById("TxtUserName").value == '') {
|
||||
alert("请填写用户名!");
|
||||
document.getElementById("TxtUserName").focus();
|
||||
return;
|
||||
}
|
||||
if (document.getElementById("TxtPassword").value == '') {
|
||||
alert("请填写密码!");
|
||||
document.getElementById("TxtPassword").focus();
|
||||
return;
|
||||
}
|
||||
if (document.getElementById("TxtValdisplayDateCode").value == '') {
|
||||
alert("请填写验证码!");
|
||||
document.getElementById("TxtValdisplayDateCode").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = ['username=' + document.getElementById("TxtUserName").value, 'password=' + document.getElementById("TxtPassword").value, 'checkcode=' + document.getElementById("TxtValdisplayDateCode").value, 'expiration=' + document.getElementById("DropExpiration").value];
|
||||
x.post('userlogin', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
switch (status) {
|
||||
case "ok":
|
||||
if (xml.getElementsByTagName("API_Enable")[0].firstChild.data == "1") {
|
||||
var LoginString = xml.getElementsByTagName("LoginString")[0].firstChild.data;
|
||||
Loginin(LoginString);
|
||||
}
|
||||
if(isPost == true)
|
||||
{
|
||||
doPost();
|
||||
isPost = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOX_remove('MainLogin');
|
||||
LoadCheck();
|
||||
}
|
||||
break;
|
||||
case "err":
|
||||
var errorMessage = xml.getElementsByTagName("body")[0].firstChild.data;
|
||||
alert(errorMessage);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
//显示
|
||||
function BOX_show(e)
|
||||
{
|
||||
if(document.getElementById(e)==null){return;}
|
||||
BOX_layout(e);
|
||||
window.onresize = function(){BOX_layout(e);} //改变窗体重新调整位置
|
||||
window.onscroll = function(){BOX_layout(e);} //滚动窗体重新调整位置
|
||||
}
|
||||
|
||||
//移除
|
||||
function BOX_remove(e)
|
||||
{
|
||||
document.getElementById('BOX_overlay').style.display="none";
|
||||
document.getElementById(e).style.display="none";
|
||||
|
||||
window.onscroll = null;
|
||||
window.onresize = null;
|
||||
}
|
||||
|
||||
//调整布局
|
||||
function BOX_layout(e)
|
||||
{
|
||||
var a = document.getElementById(e);
|
||||
|
||||
//判断是否新建遮掩层
|
||||
if (document.getElementById('BOX_overlay')==null)
|
||||
{
|
||||
var overlay = document.createElement("div");
|
||||
overlay.setAttribute('id','BOX_overlay');
|
||||
a.parentNode.appendChild(overlay);
|
||||
}
|
||||
|
||||
//取客户端左上坐标,宽,高
|
||||
var scrollLeft = (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
|
||||
var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
|
||||
var clientWidth = document.documentElement.clientWidth;
|
||||
var clientHeight = document.documentElement.clientHeight;
|
||||
|
||||
var bo = document.getElementById('BOX_overlay');
|
||||
bo.style.left = scrollLeft+'px';
|
||||
bo.style.top = scrollTop+'px';
|
||||
bo.style.width = clientWidth+'px';
|
||||
bo.style.height = clientHeight+'px';
|
||||
bo.style.display="";
|
||||
//Popup窗口定位
|
||||
a.style.position = 'absolute';
|
||||
a.style.zIndex=101;
|
||||
a.style.display="";
|
||||
a.style.left = "40%";
|
||||
a.style.top = "25%";
|
||||
|
||||
//document.getElementById('setting').style.display="block";
|
||||
}
|
||||
</script>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答类型描述</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问答类型ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT Description FROM PE_QA_Category WHERE CategoryID=@CategoryID</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:template match="/NewDataSet/Table">
|
||||
<xsl:value-of select="Description"/>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT COUNT(*) FROM PE_QA_Question WHERE 1=1 @Query</LabelSqlString>
|
||||
<attributes>
|
||||
<name>Query</name>
|
||||
<datatype>sql.string</datatype>
|
||||
<default>默认值</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>可以统计问题类别下的问题总数,整个系统的已解决问题总数、待解决的问题总数</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>True</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>1、已解决问题2、待解决问题3、某个类别下的问题</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>Selecte a=1</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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="type"/>
|
||||
<xsl:param name="CategoryID"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:if test="$type>=1">
|
||||
AND Status=$type
|
||||
</xsl:if>
|
||||
<xsl:if test="$CategoryID>=1">
|
||||
AND CategoryID=$CategoryID
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>CategoryId</name>
|
||||
<datatype>int</datatype>
|
||||
<default>1</default>
|
||||
<intro>类别ID</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答问题列表</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>int</datatype>
|
||||
<default>25</default>
|
||||
<intro>取前25条记录</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>Query</name>
|
||||
<datatype>sql.string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>查询条件</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @TopNum * FROM PE_QA_Question WHERE 1=1 @Query</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:template match="/NewDataSet">
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<a><xsl:attribute name="href">
|
||||
{PE.SiteConfig.applicationpath/}QA/Question.aspx?Id=<xsl:value-of select="QuestionID"/></xsl:attribute>
|
||||
<xsl:attribute name="Title"><xsl:value-of select="Title"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Title"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>待解决的问题</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TitleLength</name>
|
||||
<datatype>int</datatype>
|
||||
<default>30</default>
|
||||
<intro>标题字符数</intro>
|
||||
</attributes>
|
||||
<UsePage>True</UsePage>
|
||||
<attributes>
|
||||
<name>Status</name>
|
||||
<datatype>int</datatype>
|
||||
<default>2</default>
|
||||
<intro>问题的状态</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @pagesize Q.*,C.* FROM PE_QA_Question Q INNER JOIN PE_QA_Category C ON Q.CategoryID = C.CategoryID WHERE Q.Status=@Status
|
||||
AND Q.QuestionID NOT IN (SELECT TOP @startrow Q.QuestonID FROM PE_QA_Question Q INNER JOIN PE_QA_Category C ON Q.CategoryID = C.CategoryID WHERE Q.Status=@Status @Query) @Query</LabelSqlString>
|
||||
<LabelSqlCount>SELECT COUNT(*) FROM PE_QA_Question Q INNER JOIN PE_QA_Category C ON Q.CategoryID = C.CategoryID WHERE Q.Status=@Status @Query</LabelSqlCount>
|
||||
<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:template match="/NewDataSet">
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<span>
|
||||
<xsl:value-of select="Point"/>
|
||||
</span>
|
||||
<span>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.applicationpath/}QA/Question.aspx?Id=<xsl:value-of select="QuestionID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="Title">
|
||||
<xsl:value-of select="Title"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="Title"/>
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
[
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.applicationpath/}QA/Category.aspx?Id=<xsl:value-of select="CategoryID"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="CategoryName"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="CategoryName"/>
|
||||
</a>]
|
||||
</span>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>Query</name>
|
||||
<datatype>sql.string</datatype>
|
||||
<default>默认值</default>
|
||||
<intro>参数说明</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问答问题通用列表</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>Status</name>
|
||||
<datatype>int</datatype>
|
||||
<default>2</default>
|
||||
<intro>问题的状态</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>CategoryID</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题所属的分类</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>UserName</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>提问人</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT a=1</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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="UserName"/>
|
||||
<xsl:param name="Status"/>
|
||||
<xsl:param name="CategoryID"/>
|
||||
<xsl:param name="TableName"/>
|
||||
<xsl:template match="/">
|
||||
<xsl:if test="$Status>0">
|
||||
AND
|
||||
<xsl:if test="$TableName!=''">
|
||||
<xsl:value-of select="$TableName"/>.
|
||||
</xsl:if>
|
||||
Status=<xsl:value-of select="$Status" />
|
||||
</xsl:if>
|
||||
<xsl:if test="$CategoryID>0">
|
||||
AND
|
||||
<xsl:if test="$TableName!=''">
|
||||
<xsl:value-of select="$TableName"/>.
|
||||
</xsl:if>
|
||||
CategoryID IN (SELECT CategoryID FROM PE_QA_Category WHERE ParentID=<xsl:value-of select="$CategoryID " />)
|
||||
</xsl:if>
|
||||
<xsl:if test="$UserName!=''">
|
||||
AND
|
||||
<xsl:if test="$TableName!=''">
|
||||
<xsl:value-of select="$TableName"/>.
|
||||
</xsl:if>
|
||||
UserName=<xsl:value-of select="$UserName " />
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TableName</name>
|
||||
<datatype>string</datatype>
|
||||
<default>
|
||||
</default>
|
||||
<intro>查询表的别名</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<LabelTemplate>
|
||||
<![CDATA[<script type="text/javascript" language="JavaScript">
|
||||
function searchAnswer()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=2";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=2&Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self');
|
||||
}
|
||||
|
||||
function askQuestion()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/Question.aspx";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/Question.aspx?Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self');
|
||||
}
|
||||
|
||||
function answerQuestion()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
var url;
|
||||
if(keyword.value == "请输入您所需要的关键字" || keyword.value == "")
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=1";
|
||||
}
|
||||
else
|
||||
{
|
||||
url = "{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=1&Keyword=" + escape(keyword.value);
|
||||
}
|
||||
|
||||
window.open(url,'_self'); }
|
||||
function lostFocus()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
if(keyword.value == "")
|
||||
{
|
||||
keyword.value = "请输入您所需要的关键字";
|
||||
}
|
||||
}
|
||||
|
||||
function setFocus()
|
||||
{
|
||||
var keyword = document.getElementById("txtKeyword");
|
||||
keyword.value = "";
|
||||
}
|
||||
|
||||
LoadCheck();
|
||||
var userName = "";
|
||||
|
||||
function LoadCheck()
|
||||
{
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = [];
|
||||
x.async = false;
|
||||
x.post('logincheck', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx', function(s){
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == 'ok') {
|
||||
userName = xml.getElementsByTagName("username")[0].firstChild.data;
|
||||
ChangeState(true);
|
||||
}
|
||||
else {
|
||||
ChangeState(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ChangeState(flag)
|
||||
{
|
||||
var logindiv = document.getElementById("logindiv");
|
||||
var logoutdiv = document.getElementById("logoutdiv");
|
||||
if(flag == true)
|
||||
{
|
||||
logindiv.style.display = "none";
|
||||
logoutdiv.style.display = "";
|
||||
document.getElementById("spanUserName").innerHTML = userName + ",欢迎您!";
|
||||
}
|
||||
else
|
||||
{
|
||||
logindiv.style.display="";
|
||||
logoutdiv.style.display="none";
|
||||
}
|
||||
}
|
||||
|
||||
function Logout()
|
||||
{
|
||||
var x = new AjaxRequest('XML','');
|
||||
x.post('userlogout', '{PE.SiteConfig.ajaxsitepath/}ajax.aspx',
|
||||
function(s)
|
||||
{
|
||||
var xml = x.createXmlDom(s);
|
||||
var status = xml.getElementsByTagName("status")[0].firstChild.data;
|
||||
if (status == "ok")
|
||||
{
|
||||
if (xml.getElementsByTagName("API_Enable")[0].firstChild.data == "1")
|
||||
{
|
||||
var LogOutString = xml.getElementsByTagName("LogOutString")[0].firstChild.data;
|
||||
Loginin(LogOutString);
|
||||
}
|
||||
LoadCheck();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<div id="header">
|
||||
<div id="logindiv" class="uplink" style="display: block;">
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}QA/Index.aspx"> 首页</a> |
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}User/Register.aspx">注册</a> |
|
||||
<a href="javascript:CheckIsLogin();"> 登录</a>
|
||||
</div>
|
||||
<div id="logoutdiv" class="uplink" style="display: none;">
|
||||
<span id="spanUserName">{PE.Label id="显示用户名" /}</span>
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}QA/Index.aspx"> 首页</a> |
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}QA/MyQuestion.aspx"> 我的问答</a> |
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}User/"> 用户中心</a> |
|
||||
<a href="javascript:Logout();"> 退出</a>
|
||||
</div>
|
||||
|
||||
<div class="searchbox">
|
||||
<input class="inputtext" id="txtKeyword" name="txtKeyword" onfocus="setFocus()" onblur="lostFocus()" value="请输入您所需要的关键字" type="text" />
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}QA/Help.aspx" target="_blank">帮助</a>
|
||||
<input class="inputbutton" type="button" onclick="searchAnswer()" value="搜索答案" />
|
||||
<input class="inputbutton" type="button" onclick="askQuestion()" value="我要提问" />
|
||||
<input class="inputbutton" type="button" onclick="answerQuestion()" value="我要回答" />
|
||||
</div>
|
||||
<a href="{PE.SiteConfig.ApplicationPath/}QA/Index.aspx"><div class="logo" title="动易问答"></div></a>
|
||||
</div>
|
||||
{PE.Label id="热点问答" titleLength="10" outputQty="10" splitChar="、" /}]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<LabelTemplate><![CDATA[<a href="{PE.SiteConfig.ApplicationPath/}QA/Index.aspx">问答</a>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>splitChar</name>
|
||||
<datatype>string</datatype>
|
||||
<default>></default>
|
||||
<intro>类型之间拆分修饰符{>>:>>,-:-,>:>}</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>showType</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示类型</intro>
|
||||
</attributes>
|
||||
<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" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="questionID" />
|
||||
<xsl:param name="showType" />
|
||||
<xsl:param name="splitChar"/>
|
||||
<xsl:template match="/">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx
|
||||
<xsl:if test="$showType > 0">
|
||||
?ShowType=<xsl:value-of select="$showType" />
|
||||
</xsl:if>
|
||||
</xsl:attribute>
|
||||
问题分类
|
||||
</a>
|
||||
<xsl:if test="$questionID > 0">
|
||||
<xsl:value-of select="$splitChar" />
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>15</default>
|
||||
<intro>分类显示行数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ShowNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>3</default>
|
||||
<intro>二级分类显示列数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @TopNum CategoryID, CategoryName FROM PE_QA_Category WHERE CategoryID = ParentID ORDER BY OrderId ASC</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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="TopNum"/>
|
||||
<xsl:param name="ShowNum"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<h2>问题分类</h2>
|
||||
<div class="box1">
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<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>
|
||||
<br/>
|
||||
{PE.Label id="问题子分类" ShowNum="<xsl:value-of select='$ShowNum'/>" ParentID="<xsl:value-of select='CategoryID'/>" splitChar="|"/}
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT Q.*,U.UserExp,U.HonorType FROM PE_QA_Reply Q INNER JOIN PE_USERS U ON Q.USERNAME=U.USERNAME WHERE QuestionID = @questionID AND IsBest = 0 AND Q.Status = 2</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="questionID"/>
|
||||
<xsl:param name="qUserName"/>
|
||||
<xsl:param name="qStatus"/>
|
||||
<xsl:param name="qPoint"/>
|
||||
<xsl:template match="/">
|
||||
<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h4>
|
||||
<span> (共 <xsl:value-of select="count(/NewDataSet/Table)"/> 个回答) </span>网友回答 </h4>
|
||||
</div>
|
||||
<div class="answer_box">
|
||||
<div class="quiz">
|
||||
<xsl:for-each select="/NewDataSet/Table">
|
||||
<div class="quiz_detail">
|
||||
<xsl:if test="pe:IsEditReply() = 'True' and $qStatus =2 and UserName = pe:LoginedUserName()">
|
||||
<p id="pEditReply{position()}"><a href="#" onClick="Show('3','{position()}');return false;">修改答案内容</a></p>
|
||||
<div id="divEditReply{position()}" style="display:none;">
|
||||
<textarea name="EditReply{position()}" rows="2" class="inputtext2" tabindex="2" id="EditReply{position()}"><xsl:value-of select="Content"/></textarea><br/>
|
||||
<input name="" class="inputbutton2" type="button" value="确定" onClick="EditReply('{ReplyID}','{position()}')" />
|
||||
<input name="" class="inputbutton2" type="button" value="取消" onClick="Show('4','{position()}');" />
|
||||
</div>
|
||||
</xsl:if>
|
||||
<p id="pContent{position()}">
|
||||
<xsl:value-of disable-output-escaping="yes" select="pe:HtmlEncode(Content)"/>
|
||||
</p>
|
||||
<div class="Name">回答者:
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'true' or UserName = ''">
|
||||
匿名<xsl:text disable-output-escaping="yes">&nbsp;&nbsp;</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="UserName"/> -
|
||||
{PE.Label id="显示用户级别" qAPoint="<xsl:value-of select="UserExp"/>" honorType="<xsl:value-of select="HonorType"/>" /}
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:value-of select="pe:FormatDate(ReplyTime,'mm-dd hh:ff')"/> </div>
|
||||
<xsl:if test="($qStatus = 2) and ($qUserName = pe:LoginedUserName())">
|
||||
<p id="pIsBest{position()}">
|
||||
<input name="" class="inputbutton3" type="button" value="设为最佳答案" onClick="Show('2','{position()}');"/>
|
||||
</p>
|
||||
<div id="comDiv{position()}" style="display:none;">
|
||||
感谢语或评论:
|
||||
<textarea name="comContent{position()}" rows="2" onkeyup="CheckLength(this,255)" onchange="CheckLength(this,255)" class="inputtext3" onfocus='ifComValue(this)' tabindex="2" id="comContent{position()}">说声谢谢,感谢回答者无私帮助</textarea>
|
||||
<p>
|
||||
<input name="" class="inputbutton2" type="button" value="确定" onClick="SetIsBest('{ReplyID}','{position()}')" />
|
||||
<input name="" class="inputbutton2" type="button" value="取消" onClick="Show('1','{position()}');" />
|
||||
</p>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function Show(num,position)
|
||||
{
|
||||
if(num == 1)
|
||||
{
|
||||
document.getElementById("pIsBest" + position).style.display = '';
|
||||
document.getElementById("comDiv" + position).style.display = 'none';
|
||||
}
|
||||
else if(num == 2)
|
||||
{
|
||||
document.getElementById("pIsBest" + position).style.display = 'none';
|
||||
document.getElementById("comDiv" + position).style.display = '';
|
||||
}
|
||||
else if(num == 3)
|
||||
{
|
||||
document.getElementById("divEditReply" + position).style.display = '';
|
||||
document.getElementById("pEditReply" + position).style.display = 'none';
|
||||
document.getElementById("pContent" + position).style.display = 'none';
|
||||
<xsl:if test="($qStatus = 2) and ($qUserName = pe:LoginedUserName())">
|
||||
document.getElementById("pIsBest" + position).style.display = 'none';
|
||||
document.getElementById("comDiv" + position).style.display = 'none';
|
||||
</xsl:if>
|
||||
}
|
||||
else if(num == 4)
|
||||
{
|
||||
document.getElementById("divEditReply" + position).style.display = 'none';
|
||||
document.getElementById("pContent" + position).style.display = '';
|
||||
document.getElementById("pEditReply" + position).style.display = '';
|
||||
<xsl:if test="($qStatus = 2) and ($qUserName = pe:LoginedUserName())">
|
||||
Show('1',position);
|
||||
</xsl:if>
|
||||
}
|
||||
}
|
||||
<xsl:if test="pe:IsEditReply() = 'True'">
|
||||
function EditReply(m_replyID,position)
|
||||
{
|
||||
replyComment = document.getElementById("EditReply" + position);
|
||||
if(replyComment.value == '')
|
||||
{
|
||||
alert("请填写答案内容!");
|
||||
replyComment.focus();
|
||||
return false;
|
||||
}
|
||||
var rComment = escape(replyComment.value);
|
||||
var x = new AjaxRequest('XML','status');
|
||||
x.para = ['replyID=' + m_replyID, 'comContent=' + rComment];
|
||||
x.post('editReply','{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.open('ShowMessage.aspx?MessageType=4&type=1&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
case "err":
|
||||
window.open('ShowMessage.aspx?MessageType=4&type=0&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
default:
|
||||
window.open('ShowMessage.aspx?MessageType=4&type=0&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
</xsl:if>
|
||||
<xsl:if test="($qStatus = 2) and ($qUserName = pe:LoginedUserName())">
|
||||
function ifComValue(obj)
|
||||
{
|
||||
if(document.activeElement.id == obj.id && obj.value == '说声谢谢,感谢回答者无私帮助')
|
||||
{
|
||||
obj.value = "";
|
||||
}
|
||||
}
|
||||
function CheckLength(obj,maxLength)
|
||||
{
|
||||
if(obj.value.length > maxLength)
|
||||
{
|
||||
obj.value=obj.value.substring(0,maxLength-1);
|
||||
alert("字符长度不能超过"+maxLength+"个字符");
|
||||
}
|
||||
}
|
||||
function SetIsBest(m_replyID,position)
|
||||
{
|
||||
var replyComment = document.getElementById("comContent" + position);
|
||||
if(replyComment.value == '说声谢谢,感谢回答者无私帮助')
|
||||
{
|
||||
replyComment.value = '';
|
||||
}
|
||||
var x = new AjaxRequest('XML', 'status');
|
||||
x.para = ['replyID=' + m_replyID, 'comContent=' + replyComment.value];
|
||||
x.post('setIsBest', '{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.open('ShowMessage.aspx?MessageType=3&type=1&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
case "err":
|
||||
window.open('ShowMessage.aspx?MessageType=3&type=0&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
default:
|
||||
window.open('ShowMessage.aspx?MessageType=3&type=0&Id=@RequestInt_id','_self');
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
</xsl:if>
|
||||
</script>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:transform>]]>
|
||||
</LabelTemplate>
|
||||
<attributes>
|
||||
<name>qUserName</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>admin</default>
|
||||
<intro>提问者用户名</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>qStatus</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题状态</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>qPoint</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>0</default>
|
||||
<intro>问题悬赏分</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问题子分类</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>ShowNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>3</default>
|
||||
<intro>二级分类显示列数</intro>
|
||||
</attributes>
|
||||
<attributes>
|
||||
<name>ParentID</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>0</default>
|
||||
<intro>一级分类ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString><![CDATA[SELECT TOP @ShowNum * FROM PE_QA_Category WHERE CategoryID <> ParentID AND ParentID = @ParentID ORDER BY OrderID]]></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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="ParentID"/>
|
||||
<xsl:param name="splitChar"/>
|
||||
<xsl:template match="/NewDataSet">
|
||||
<span class="assort">
|
||||
<xsl:for-each select="Table">
|
||||
<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>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:value-of select="$splitChar" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</span>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>splitChar</name>
|
||||
<datatype>sql.string</datatype>
|
||||
<default>|</default>
|
||||
<intro>分隔符</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问题悬赏排行</LabelIntro>
|
||||
<OutType>sin</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>TopNum</name>
|
||||
<datatype>sql.int</datatype>
|
||||
<default>5</default>
|
||||
<intro>显示行数</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT TOP @TopNum * FROM PE_QA_Question WHERE Status = 2 ORDER BY Point DESC, UpdateTime DESC</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="xml" version="1.0" encoding="UTF-8" indent="no"/>
|
||||
<xsl:param name="TopNum"/>
|
||||
<xsl:param name="TitleLen" />
|
||||
<xsl:template match="/NewDataSet">
|
||||
<div class="title4">
|
||||
<h2> 问题悬赏排行 </h2>
|
||||
<ul>
|
||||
<xsl:for-each select="Table">
|
||||
<li>
|
||||
<b>
|
||||
<xsl:value-of select="position()"/>
|
||||
</b>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<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>
|
||||
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
||||
<xsl:value-of select="Point"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<span class="more">
|
||||
<a>
|
||||
<xsl:attribute name="href">{PE.SiteConfig.ApplicationPath/}QA/QuestionList.aspx?ShowType=3</xsl:attribute>
|
||||
更多>>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
<attributes>
|
||||
<name>TitleLen</name>
|
||||
<datatype>int</datatype>
|
||||
<default>20</default>
|
||||
<intro>标题长度</intro>
|
||||
</attributes>
|
||||
</root>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>问题提交信息页</LabelIntro>
|
||||
<OutType>txt</OutType>
|
||||
<LabelDataType>static</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>type</name>
|
||||
<datatype>int</datatype>
|
||||
<default>0</default>
|
||||
<intro>显示信息类型</intro>
|
||||
</attributes>
|
||||
<LabelTemplate><![CDATA[<div class="ask_title">
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
<div class="rr-2-1">
|
||||
</div>
|
||||
<div class="rr-3-1">
|
||||
</div>
|
||||
<div class="best_answerTit" >
|
||||
<h3>问题提交</h3>
|
||||
</div>
|
||||
<div class="best_answer">
|
||||
<div class="quiz">
|
||||
<div class="Submitted-successfully">
|
||||
<p>您的问题已经提交成功!</p> <br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="rr-3">
|
||||
</div>
|
||||
<div class="rr-2">
|
||||
</div>
|
||||
<div class="rr-1">
|
||||
</div>
|
||||
</div>
|
||||
</div>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0"?>
|
||||
<root>
|
||||
<LabelType>问答类</LabelType>
|
||||
<LabelIntro>
|
||||
</LabelIntro>
|
||||
<OutType>
|
||||
</OutType>
|
||||
<LabelDataType>sql_sysquery</LabelDataType>
|
||||
<EnabelAjax>False</EnabelAjax>
|
||||
<attributes>
|
||||
<name>questionID</name>
|
||||
<datatype>supersql</datatype>
|
||||
<default>1</default>
|
||||
<intro>问题ID</intro>
|
||||
</attributes>
|
||||
<IsXsltSql>false</IsXsltSql>
|
||||
<IsXsltCountSql>false</IsXsltCountSql>
|
||||
<LabelSqlString>SELECT * FROM PE_QA_Question WHERE QuestionID = @questionID</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="xml" />
|
||||
<xsl:param name="questionID"/>
|
||||
<xsl:template match="/">
|
||||
<root>
|
||||
<QuestionID>
|
||||
<xsl:value-of select="/NewDataSet/Table/QuestionID"/>
|
||||
</QuestionID>
|
||||
<Title>
|
||||
<xsl:value-of select="/NewDataSet/Table/Title"/>
|
||||
</Title>
|
||||
<CategoryID>
|
||||
<xsl:value-of select="/NewDataSet/Table/CategoryID"/>
|
||||
</CategoryID>
|
||||
<UserName>
|
||||
<xsl:value-of select="/NewDataSet/Table/UserName"/>
|
||||
</UserName>
|
||||
<Point>
|
||||
<xsl:value-of select="/NewDataSet/Table/Point"/>
|
||||
</Point>
|
||||
<Content>
|
||||
<xsl:value-of select="/NewDataSet/Table/Content"/>
|
||||
</Content>
|
||||
<IsAnonymity>
|
||||
<xsl:value-of select="/NewDataSet/Table/IsAnonymity"/>
|
||||
</IsAnonymity>
|
||||
<IP>
|
||||
<xsl:value-of select="/NewDataSet/Table/IP"/>
|
||||
</IP>
|
||||
<Status>
|
||||
<xsl:value-of select="/NewDataSet/Table/Status"/>
|
||||
</Status>
|
||||
<Hits>
|
||||
<xsl:value-of select="/NewDataSet/Table/Hits"/>
|
||||
</Hits>
|
||||
<IsElite>
|
||||
<xsl:value-of select="/NewDataSet/Table/IsElite"/>
|
||||
</IsElite>
|
||||
<CreateTime>
|
||||
<xsl:value-of select="/NewDataSet/Table/CreateTime"/>
|
||||
</CreateTime>
|
||||
<UpdateTime>
|
||||
<xsl:value-of select="/NewDataSet/Table/UpdateTime"/>
|
||||
</UpdateTime>
|
||||
</root>
|
||||
</xsl:template>
|
||||
</xsl:transform>]]></LabelTemplate>
|
||||
</root>
|
||||
@@ -0,0 +1,111 @@
|
||||
<?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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
AND NOT EXISTS(SELECT PE_QA_Reply.QuestionID FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID)
|
||||
<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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
AND NOT EXISTS(SELECT PE_QA_Reply.QuestionID FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID)
|
||||
<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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
AND NOT EXISTS(SELECT * FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID)
|
||||
<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>
|
||||
<a>
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/> </xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</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查询语句
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2 AND NOT EXISTS(SELECT * FROM PE_QA_Reply WHERE PE_QA_Reply.QuestionID = PE_QA_Question.QuestionID)]]></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>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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 = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<xsl:if test="$CategoryID != 0">
|
||||
AND (PE_QA_Question.CategoryId=@CategoryID or PE_QA_Category.ParentID=@CategoryID)
|
||||
</xsl:if>
|
||||
ORDER BY Point DESC)
|
||||
ORDER BY Point DESC
|
||||
</sql>
|
||||
<countsql>
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2
|
||||
<xsl:if test="$Keyword != ''"> AND PE_QA_Question.Title LIKE '%@Keyword%'</xsl:if>
|
||||
<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>
|
||||
<a>
|
||||
<xsl:choose>
|
||||
<xsl:when test="IsAnonymity = 'false'">
|
||||
<xsl:value-of select="UserName"/> </xsl:when>
|
||||
<xsl:otherwise>匿名</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</a>
|
||||
</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查询语句
|
||||
select count(*) from PE_QA_Question, PE_QA_Category WHERE PE_QA_Question.CategoryID = PE_QA_Category.CategoryID AND Status = 2]]></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>
|
||||
Reference in New Issue
Block a user