<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[给PJ博客加评论回复的简单方法-II]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[Web开发]]></category>
<pubDate>Wed, 13 Feb 2008 06:09:52 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	二、根目录中的blogcomm.asp文件<br/>修改后的源码：<br/>&lt;!--#include file=&quot;commond.asp&quot; --&gt;<br/>&lt;!--#include file=&quot;header.asp&quot; --&gt;<br/>&lt;!--#include file=&quot;class/cls_logAction.asp&quot; --&gt;<br/>&lt;div id=&quot;Tbody&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div style=&quot;text-align:center;&quot;&gt;&lt;br/&gt;<br/>&lt;%<br/>&#039;=====================================<br/>&#039;&nbsp;&nbsp;评论处理页面<br/>&#039;&nbsp;&nbsp;&nbsp;&nbsp;更新时间: 2006-1-12<br/>&#039;=====================================<br/>IF not ChkPost() Then<br/> response.write (&quot;非法操作!!&quot;)<br/>elseif Request.Form(&quot;action&quot;)=&quot;post&quot; Then<br/> &#039;评论发表代码<br/>Dim PostBComm<br/>PostBComm=postcomm<br/>%&gt;<br/>&nbsp;&nbsp; &lt;div style=&quot;text-align:center;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgContent&quot; style=&quot;width:300px&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgHead&quot;&gt;&lt;%=PostBComm(0)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgBody&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;&lt;%=PostBComm(2)%&gt;&quot;&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;MessageText&quot;&gt;&lt;%=PostBComm(1)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&lt;%<br/>elseif Request.QueryString(&quot;action&quot;)=&quot;del&quot; then<br/>Dim DelBComm<br/>DelBComm=delcomm<br/>%&gt;<br/>&nbsp;&nbsp; &lt;div style=&quot;text-align:center;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgContent&quot; style=&quot;width:300px&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgHead&quot;&gt;&lt;%=DelBComm(0)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgBody&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;&lt;%=DelBComm(2)%&gt;&quot;&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;MessageText&quot;&gt;&lt;%=DelBComm(1)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;%<br/>elseif Request(&quot;action&quot;)=&quot;Reply&quot; then<br/>PostBComm=replyMsg<br/>%&gt;<br/>&nbsp;&nbsp; &lt;div style=&quot;text-align:center;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgContent&quot; style=&quot;width:300px&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgHead&quot;&gt;&lt;%=PostBComm(0)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;MsgBody&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;&lt;%=PostBComm(2)%&gt;&quot;&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;MessageText&quot;&gt;&lt;%=PostBComm(1)%&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br/>&nbsp;&nbsp;&lt;/div&gt;<br/>&lt;%<br/>else<br/> response.write (&quot;非法操作!!&quot;)<br/>end if<br/><br/>&#039;============================ 删除评论函数 =================================================<br/>function delcomm<br/> dim post_commID,blog_Comm,blog_CommAuthor,logid<br/> dim ReInfo<br/>&nbsp;&nbsp;ReInfo=Array(&quot;错误信息&quot;,&quot;&quot;,&quot;MessageIcon&quot;)<br/>&nbsp;&nbsp;post_commID=clng(CheckStr(request.QueryString(&quot;commID&quot;)))<br/>&nbsp;&nbsp;set blog_Comm=Conn.ExeCute(&quot;select top 1 comm_ID,blog_ID,comm_Author from blog_Comment where comm_ID=&quot;&amp;post_commID)<br/>&nbsp;&nbsp;if blog_Comm.eof or blog_Comm.bof then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;不存在此评论,或该评论已经被删除!&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp; delcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;blog_CommAuthor=blog_Comm(&quot;comm_Author&quot;)<br/>&nbsp;&nbsp;if stat_Admin=true or (stat_CommentDel=true and memName=blog_CommAuthor) then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;评论删除成功&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;评论已经被删除成功!&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;default.asp?id=&quot;&amp;blog_Comm(&quot;blog_ID&quot;)&amp;&quot;&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;MessageIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp; logid=Conn.ExeCute(&quot;select blog_ID from blog_Comment where comm_ID=&quot;&amp;post_commID)(0)<br/>&nbsp;&nbsp;&nbsp;&nbsp; Conn.ExeCute(&quot;update blog_Content set log_CommNums=log_CommNums-1 where log_ID=&quot;&amp;blog_Comm(&quot;blog_ID&quot;))<br/>&nbsp;&nbsp;&nbsp;&nbsp; Conn.ExeCute(&quot;Delete * FROM blog_Comment Where comm_ID=&quot;&amp;post_commID)<br/>&nbsp;&nbsp;&nbsp;&nbsp; Conn.ExeCute(&quot;update blog_Info set blog_CommNums=blog_CommNums-1&quot;)<br/>&nbsp;&nbsp;&nbsp;&nbsp; PostArticle logid<br/>&nbsp;&nbsp;&nbsp;&nbsp; getInfo(2)<br/>&nbsp;&nbsp;&nbsp;&nbsp; NewComment(2)<br/>&nbsp;&nbsp;&nbsp;&nbsp;delcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;Session(CookieName&amp;&quot;_LastDo&quot;)=&quot;DelComment&quot;<br/>&nbsp;&nbsp;else<br/>&nbsp;&nbsp; ReInfo(0)=&quot;错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;你没有权限删除评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp; delcomm=ReInfo<br/>&nbsp;&nbsp;end if<br/>end function<br/><br/>&#039;====================== 评论发表函数 ===========================================================<br/>function postcomm<br/> dim username,post_logID,post_From,post_FromURL,post_disImg,post_DisSM,post_DisURL,post_DisKEY,post_DisUBB,post_Message,validate<br/> dim password<br/> dim ReInfo,LastMSG,FlowControl<br/>&nbsp;&nbsp;ReInfo=Array(&quot;错误信息&quot;,&quot;&quot;,&quot;MessageIcon&quot;)<br/>&nbsp;&nbsp;username=trim(CheckStr(request.form(&quot;username&quot;)))<br/>&nbsp;&nbsp;password=trim(CheckStr(request.form(&quot;password&quot;)))<br/>&nbsp;&nbsp;post_logID=clng(CheckStr(request.form(&quot;logID&quot;)))<br/>&nbsp;&nbsp;validate=trim(request.form(&quot;validate&quot;))<br/>&nbsp;&nbsp;post_Message=CheckStr(request.form(&quot;Message&quot;))<br/>&nbsp;&nbsp;FlowControl=false<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;IF (memName=empty or blog_validate=true) and cstr(lcase(Session(&quot;GetCode&quot;)))&lt;&gt;cstr(lcase(validate)) or IsEmpty(Session(&quot;GetCode&quot;)) then<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;验证码有误，请返回重新输入&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;请返回重新输入&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;Session(&quot;GetCode&quot;) = empty<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;set LastMSG=conn.execute(&quot;select top 1 comm_Content from blog_Comment order by comm_ID desc&quot;)<br/>&nbsp;&nbsp;if LastMSG.eof then <br/>&nbsp;&nbsp;&nbsp;&nbsp; FlowControl=false<br/>&nbsp;&nbsp; else<br/>&nbsp;&nbsp;&nbsp;&nbsp;if trim(LastMSG(&quot;comm_Content&quot;)) = trim(post_Message) then FlowControl=true<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;if stat_Admin = false then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;高级过滤规则<br/>&nbsp;&nbsp;&nbsp;&nbsp;if regFilterSpam(post_Message,&quot;reg.xml&quot;) then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;评论中包含被屏蔽的字符&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function <br/>&nbsp;&nbsp;&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;基本过滤规则<br/>&nbsp;&nbsp;&nbsp;&nbsp;if filterSpam(post_Message,&quot;spam.xml&quot;) then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;评论中包含被屏蔽的字符&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function <br/>&nbsp;&nbsp;&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;if FlowControl then <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;禁止恶意灌水！&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function <br/>&nbsp;&nbsp;end if <br/><br/>&nbsp;&nbsp;if DateDiff(&quot;s&quot;,Request.Cookies(CookieName)(&quot;memLastPost&quot;),Now())&lt;blog_commTimerout then <br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;发言太快,请 &quot;&amp;blog_commTimerout&amp;&quot; 秒后再发表评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function&nbsp;&nbsp;<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;if len(username)&lt;1 then<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(1)=&quot;&lt;b&gt;请输入你的昵称.&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;请返回重新输入&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit function&nbsp;&nbsp;<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;if IsValidUserName(username)=false then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;非法用户名！&lt;br/&gt;请尝试使用其他用户名！&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/> end if<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;dim checkMem<br/>&nbsp;&nbsp;if memName=empty then<br/>&nbsp;&nbsp;&nbsp;&nbsp;if len(password)&gt;0 then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dim loginUser<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loginUser=login(Request.Form(&quot;username&quot;),Request.Form(&quot;password&quot;))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not request.Cookies(CookieName)(&quot;memName&quot;)=username then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;登录失败，请检查用户名和密码&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set checkMem=Conn.ExeCute(&quot;select top 1 mem_id from blog_Member where mem_Name=&#039;&quot;&amp;username&amp;&quot;&#039;&quot;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not checkMem.eof then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;该用户已经存在，无法发表评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;end if <br/>&nbsp;&nbsp;if not stat_CommentAdd then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;你没有权限发表评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;end if&nbsp;&nbsp;<br/>&nbsp;&nbsp;if Conn.ExeCute(&quot;select log_DisComment from blog_Content where log_ID=&quot;&amp;post_logID)(0) then <br/>&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;该日志不允许发表任何评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;WarningIcon&quot;<br/>&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;end if <br/>&nbsp;&nbsp;post_DisSM=request.form(&quot;log_DisSM&quot;)<br/>&nbsp;&nbsp;post_DisURL=request.form(&quot;log_DisURL&quot;)<br/>&nbsp;&nbsp;post_DisKEY=request.form(&quot;log_DisKey&quot;)<br/><br/>&nbsp;&nbsp;if len(post_Message)&lt;1 then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;不允许发表空评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;end if<br/>&nbsp;&nbsp;if len(post_Message)&gt;blog_commLength then<br/>&nbsp;&nbsp; ReInfo(0)=&quot;评论发表错误信息&quot;<br/>&nbsp;&nbsp; ReInfo(1)=&quot;评论超过最大字数限制&lt;br/&gt;&lt;a href=&quot;&quot;javascript:history.go(-1);&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp; postcomm=ReInfo<br/>&nbsp;&nbsp; exit function<br/>&nbsp;&nbsp;end if&nbsp;&nbsp; <br/>&nbsp;&nbsp;&#039;UBB 特别属性<br/>&nbsp;&nbsp;post_disImg=1<br/>&nbsp;&nbsp;post_DisUBB=0<br/>&nbsp;&nbsp;if post_DisSM=1 then post_DisSM=1 else post_DisSM=0<br/>&nbsp;&nbsp;if post_DisURL=1 then post_DisURL=0 else post_DisURL=1<br/>&nbsp;&nbsp;if post_DisKEY=1 then post_DisKEY=0 else post_DisKEY=1<br/> &#039;插入数据<br/> Dim AddComm<br/> AddComm=array(array(&quot;blog_ID&quot;,post_logID),array(&quot;comm_Content&quot;,post_Message),array(&quot;comm_Author&quot;,username),array(&quot;comm_DisSM&quot;,post_DisSM),array(&quot;comm_DisUBB&quot;,post_DisUBB),array(&quot;comm_DisIMG&quot;,post_disImg),array(&quot;comm_AutoURL&quot;,post_DisURL),Array(&quot;comm_PostIP&quot;,getIP),Array(&quot;comm_AutoKEY&quot;,post_DisKEY))<br/> DBQuest &quot;blog_Comment&quot;,AddComm,&quot;insert&quot;<br/> &#039;Conn.ExeCute(&quot;Insert INTO blog_Comment(blog_ID,comm_Content,comm_Author,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_PostIP,comm_AutoKEY) VALUES (&quot;&amp;post_logID&amp;&quot;,&#039;&quot;&amp;post_Message&amp;&quot;&#039;,&#039;&quot;&amp;username&amp;&quot;&#039;,&quot;&amp;post_DisSM&amp;&quot;,&quot;&amp;post_DisUBB&amp;&quot;,&quot;&amp;post_disImg&amp;&quot;,&quot;&amp;post_DisURL&amp;&quot;,&#039;&quot;&amp;getIP()&amp;&quot;&#039;,&quot;&amp;post_DisKEY&amp;&quot;)&quot;)<br/> Conn.ExeCute(&quot;update blog_Content set log_CommNums=log_CommNums+1 where log_ID=&quot;&amp;post_logID)<br/> Conn.ExeCute(&quot;update blog_Info set blog_CommNums=blog_CommNums+1&quot;)<br/> Response.Cookies(CookieName)(&quot;memLastpost&quot;)=Now()<br/> getInfo(2)<br/> NewComment(2)<br/> if memName&lt;&gt;empty then<br/>&nbsp;&nbsp;&nbsp;&nbsp;conn.execute(&quot;update blog_Member set mem_PostComms=mem_PostComms+1 where mem_Name=&#039;&quot;&amp;memName&amp;&quot;&#039;&quot;)<br/> end if<br/> SQLQueryNums=SQLQueryNums+3<br/> ReInfo(0)=&quot;评论发表成功&quot;<br/> ReInfo(1)=&quot;&lt;b&gt;你成功地对该日志发表了评论&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;default.asp?id=&quot;&amp;post_logID&amp;&quot;&quot;&quot;&gt;单击返回该日志&lt;/a&gt;&quot;<br/> ReInfo(2)=&quot;MessageIcon&quot;<br/> Session(&quot;GetCode&quot;) = empty<br/> Session(CookieName&amp;&quot;_LastDo&quot;)=&quot;AddComment&quot;<br/> postcomm=ReInfo<br/> PostArticle post_logID<br/>end function<br/>function replyMsg<br/>&nbsp;&nbsp;dim post_Message,MsgID,ReInfo,post_logID<br/>&nbsp;&nbsp;ReInfo=Array(&quot;错误信息&quot;,&quot;&quot;,&quot;MessageIcon&quot;)<br/>&nbsp;&nbsp;MsgID = CheckStr(Request.form(&quot;commID&quot;))<br/>&nbsp;&nbsp;post_Message=CheckStr(request.form(&quot;Message&quot;))<br/>&nbsp;&nbsp;post_logID=CheckStr(request.form(&quot;logID&quot;))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not (memName&lt;&gt;empty and stat_Admin) then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论回复错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;你没有权限回复留言&lt;a href=&quot;&quot;javascript:history.go(-1)&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If MsgID=Empty then <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论回复错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;非法操作&lt;a href=&quot;&quot;javascript:history.go(-1)&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If IsInteger(MsgID)=0 then <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论回复错误信息&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;非法操作&lt;a href=&quot;&quot;javascript:history.go(-1)&quot;&quot;&gt;单击返回&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;ErrorIcon&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conn.ExeCute(&quot;update blog_Comment set Comm_reply=&#039;&quot;&amp;post_Message&amp;&quot;&#039;,Comm_replytime=&#039;&quot;&amp;now&amp;&quot;&#039; where comm_ID=&quot; &amp; MsgID)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(0)=&quot;评论回复成功&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(1)=&quot;&lt;b&gt;你成功地对该评论进行了回复&lt;/b&gt;&lt;br/&gt;&lt;a href=&quot;&quot;article.asp?id=&quot;&amp;post_logID&amp;&quot;&quot;&quot;&gt;单击返回该日志&lt;/a&gt;&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReInfo(2)=&quot;MessageIcon&quot;<br/>replyMsg=ReInfo<br/>end function<br/>%&gt;<br/>&nbsp;&nbsp;&lt;br/&gt;&lt;/div&gt; <br/> &lt;/div&gt;<br/>&lt;!--#include file=&quot;footer.asp&quot; --&gt;<br/>Tags - <a href="http://www.zhanghaijun.com/tags/pj%25E5%258D%259A%25E5%25AE%25A2/" rel="tag">pj博客</a> , <a href="http://www.zhanghaijun.com/tags/%25E8%25AF%2584%25E8%25AE%25BA/" rel="tag">评论</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] 给PJ博客加评论回复的简单方法-II]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>