first commit

This commit is contained in:
2026-08-31 16:22:00 +08:00
commit e969a1e559
2665 changed files with 128795 additions and 0 deletions
@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<LabelType>网上信访</LabelType>
<LabelIntro>信访信件评论标签</LabelIntro>
<OutType>txt</OutType>
<LabelDataType>static</LabelDataType>
<EnabelAjax>False</EnabelAjax>
<Version officialVersion="" modifiedVersions="3502" compatibleVersion="" />
<attributes>
<name>letterId</name>
<datatype>int</datatype>
<default>1</default>
<intro>信件id</intro>
</attributes>
<LabelTemplate>
<![CDATA[
<div class="onlinepl_comments_B" id="lettercommentcontent">
<dl>
<dt>我要评论:
<a target="_blank" href="{PE.SiteConfig.ApplicationPath/}Government/Letter/LetterCommentList.aspx?LetterId=<xsl:value-of select="$letterId"/>">
更多评论
</a>
</dt>
<dd class="bd">
<ul>
<li><span>用户:</span><input type="text" id="CommentName" maxlength="20" style="width:120px;"/></li>
<li><span>评论:</span><textarea id="CommentContent" style="width:280px; height:80px;" Style=" width: 80px;" ValidationGroup="one"></textarea>
<font color="#ff0000">*</font></li>
<li><span>验证:</span><input name="TxtValidateCode1" type="text" maxlength="6" value="" id="TxtValidateCode1" class="inputtext" size="10" onfocus="this.select();Refresh();" Style="ime-mode: disabled; width: 80px;" ValidationGroup="one"/>
<img id="VcodeComplaints" title="看不清楚,换一个" onclick="refreshValidateCodeImage(this);" src="{PE.SiteConfig.ApplicationPath /}Controls/ValidateCodeImage2.aspx" align="absmiddle" style="border-width:0px;cursor:pointer;" />
</li>
</ul>
</dd>
<dd class="return">
<input type="button" value="提交" onclick="addCommentData()" class="bt"/>
<span id="viewprogress" style="display:none;">正在提交数据...</span>
</dd>
</dl>
</div>
<script type="text/javascript">
jQuery(document).ready(function() {
var Xml = "<?xml version='1.0' encoding='utf-8'?><root><type>isclosecomment</type></root>";
jQuery.post('{PE.SiteConfig.AjaxSitepath/}Ajax.aspx?HandlerName=GovAjaxHandler', Xml, function(s) {
switch (jQuery("result", s).text()) {
case "1":
break;
case "0":
default:
jQuery("#lettercommentcontent").html("")
break;
}
});
});
function Refresh() {
jQuery("#VcodeComplaints").click();
}
function refreshValidateCodeImage(obj) {
obj.src = obj.src + '?code=' + randomNum(10);
}
function randomNum(n) {
var rnd = '';
for (var i = 0; i < n; i++)
rnd += Math.floor(Math.random() * 10);
}
function addCommentData() {
var CommentName = xmlencode(jQuery("#CommentName")[0].value);
var CommentContent = xmlencode(jQuery("#CommentContent")[0].value);
if (CommentContent == "") {
alert("请填写评论内容!");
return;
}
var CheckNum = xmlencode(jQuery("#TxtValidateCode1")[0].value);
if (CheckNum == "") {
alert("请填写验证码!");
return;
}
if(jQuery("#CommentContent")[0].value.length>225)
{
alert("评论内容不能超过225个字符。");
return;
}
var jQlable = jQuery("#viewprogress");
var jQbutton = jQuery("input[type='button'][onclick='addCommentData()']");
jQlable.css("display", "block");
jQbutton.attr("disabled", "true");
var Xml = "<?xml version='1.0' encoding='utf-8'?><root><type>addcomment</type><LetterId><xsl:value-of select="$letterId"/></LetterId><CommentContent>" + CommentContent + "</CommentContent><CommentName>" + CommentName + "</CommentName><CheckNum>" + CheckNum + "</CheckNum></root>";
jQuery.post('{PE.SiteConfig.AjaxSitepath/}Ajax.aspx?HandlerName=GovAjaxHandler', Xml, function(s) {
switch (jQuery("result", s).text()) {
case "0":
alert("评论提交成功!");
jQlable.css("display", "none");
window.top.location.href = "{PE.SiteConfig.ApplicationPath/}Government/Letter/LetterCommentList.aspx?LetterId=<xsl:value-of select="$letterId"/>";
jQbutton.attr("disabled", "");
break;
case "1":
alert("评论提交失败!");
jQlable.css("display", "none");
jQbutton.attr("disabled", "");
break;
case "2":
alert("验证码不正确,请重新填写!");
jQlable.css("display", "none");
jQbutton.attr("disabled", "");
break;
case "3":
alert("对不起,您要评论的信件已经不存在了!");
window.top.location.href = "{PE.SiteConfig.ApplicationPath/}Government/Letter/Index.aspx";
break;
case "4":
alert("评论内容不能为空!");
jQlable.css("display", "none");
jQbutton.attr("disabled", "");
break;
case "5":
alert("请填写验证码!");
jQlable.css("display", "none");
jQbutton.attr("disabled", "");
break;
case "6":
alert("评论功能已经关闭!");
window.top.location.href = "{PE.SiteConfig.ApplicationPath/}Government/Letter/Index.aspx";
break;
default:
alert("系统发生未知的错误!");
jQlable.css("display", "none");
jQbutton.attr("disabled", "");
break;
}
});
}
function xmlencode(s) {
s = escape(s);
return s;
}
</script>
]]></LabelTemplate>
</root>