<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%Response.Expires = -1 Response.AddHeader "Pragma", "no-cache" Response.AddHeader "Cache-Control", "no-cache, must-revalidate"%> <% Function HtmlEncode(str) If Trim(Str)="" Or IsNull(str) Then Exit Function str=Replace(str,">",">") str=Replace(str,"<","<") str=Replace(str,Chr(32)," ") str=Replace(str,Chr(9)," ") str=Replace(str,Chr(34),""") str=Replace(str,Chr(39),"'") str=Replace(str,Chr(13),"") str=Replace(str,Chr(10) & Chr(10), "

") str=Replace(str,Chr(10),"
") HtmlEncode=str End Function if request.QueryString("myshow")="blank.gif" then response.Redirect("showimg.asp") sub addcomment() myshow=trim(request.Form("myshow")) username=HtmlEncode(trim(request.Form("username"))) content=HtmlEncode(request.Form("content")) if username<>"" and content<>"" and myshow<>"" then sql="insert into [comment] ([username],[update],[contents],myshow) values('"&username&"','"&now()&"','"&content&"','"&myshow& "')" response.Write(sql) conn.execute(sql) call DataDisConnect response.redirect("showcomment.asp?myshow="&myshow) response.end end if end sub call DataConnect if request.form("submit")<>"" then call addcomment call DataDisConnect %> 在线大头贴
简易评论
"/>
"/>
姓名:
评论内容: