<!--#include file="../conn.asp" -->
<%
''*******************************************************************************
''************函数功能：去掉函数参数中的HTML标记*********************************
''*******************************************************************************
Function stripHTML(strtext)
dim arysplit,i,j, strOutput

arysplit=split(strtext,"<")
if len(arysplit(0))>0 then j=1 else j=0
for i=j to ubound(arysplit)
  if instr(arysplit(i),">") then
   arysplit(i)=mid(arysplit(i),instr(arysplit(i),">")+1)
  else
   arysplit(i)="<" & arysplit(i)
  end if
next

strOutput = join(arysplit, "")
strOutput = mid(strOutput, 2-j)
strOutput = replace(strOutput,">",">")
strOutput = replace(strOutput,"<","<")

stripHTML = strOutput
End Function
''*******************************************************************************
''**应用方法：StripHTML("string")，其中，string为要去掉HTML标记的字符串**********
''*******************************************************************************
%>

<%
ooo=Trim(Request.Form("tel"))
ooo=stripHTML(ooo)
id=Trim(Request.Form("id"))
userid=Trim(Request.Form("userid"))
if userid="" then
%>
<script language='Javascript'>alert("你操作失误，请重试！");history.back();</script>
<% end if
yz=request.form("yz")
yz1=Session("bookSafeCode")
if yz="" then
Response.Write("<script language=JavaScript>alert('错误的验证码！');history.back();</script>")
else
if  int(yz1)=int(yz) then
name=Trim(Request.Form("name"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from replay"
rs.open sql,conn,1,3
rs.addnew
rs("content")=ooo
rs("playID")=id
rs("rename")=name
rs("userid")=userid
rs.update
rs.close
conn.close
set conn=nothing

Response.Write("<script language=JavaScript>alert('提交评论成功!\n按确定返回!!');</script>")
Response.Write("<meta http-equiv=refresh content=0;URL=replay.asp?id="&id&"&userid="&userid&">")
else
Response.Write("<script language=JavaScript>alert('错误的验证码！');history.back();</script>")
end if
end if
%>



