看了半天不知道哪错!大家给看看,谢谢! <!--#include file="articleconn.asp"-->
<% function changechr(str) changechr=replace(replace(replace(replace(str,"<","<"),">",">"),chr(13),"<br>")," "," ") changechr=replace(replace(replace(replace(changechr,"[sayyes]","<img src="),"","<b>"),"[red]","<font color=CC0000>"),"[big]","<font size=7>") changechr=replace(replace(replace(replace(changechr,"[/sayyes]","></img>"),"","</b>"),"[/red]","</font>"),"[/big]","</font>") end function
if request.form("reviewname")="" then response.write"请填写您的大名!!<a href=""javascript:history.go(-1)"">返回重输</a>" response.end end if if request.form("review")="" then response.write"评论内容不能为空,请重输入<a href=""javascript:history.go(-1)"">返回重输</a>" response.end end if if len(request.form("review"))>800 then response.write"评论内容不能太多,请重输入<a href=""javascript:history.go(-1)"">返回重输</a>" response.end end if reviewname=changechr(request.form("reviewname")) reviewemail=changechr(request.form("reviewemail")) review=changechr(request.form("review")) face=Request.Form("face") reviewurl=Request.Form("reviewurl") articleid=request("id") reviewtitle=request("reviewtitle") IP=Request("REMOTE_ADDR")
set rs=server.createobject("adodb.recordset") rs.open "select * from article where title='" & articleid & "'",conn,3,3
rs("reviewcount")=rs("reviewcount")+1
rs("review")like rs("review")&"<br><img src=images/mood"&face&".gif><font color=red> 评论者:</font><a href=""mailt"&reviewemail&""">"&reviewname&_ "<a><font> </font><font face=""Wingdings""></font><font color=red>个人网页:</font><a href="""&reviewurl&""">"_ &reviewurl&"</a><table bgcolor=""#F7F7F7"" cellspacing=""0"" cellpadding=""5"" border=""0"" width=""100%"" align=""center""><tr><td width=""100%"" style=""font-size:9pt""><strong><font color=green>"&reviewtitle&"</font></strong><br>"&_ review&"<br><br><font style=""font-size:8pt"">--发表日期:"&date()&"<br>[来自: "&ip&"]</font><br></td></tr></table> " rs.update rs.close if err then response.Write err.description else response.write"成功发表评论!" end if set rs=nothing conn.close set conn=nothing
response.redirect "review.asp?title="&request("id") %> 其中review在数据库中为ntext类型
[此贴子已经被作者于2005-9-9 14:29:08编辑过]