'Determine whether the speech is from the outside
Function chkpost ()
Dim server_v1, server_v2
Chkpost = false
Server_v1 = CSTR (request. servervariables ("http_referer "))
Server_v2 = CSTR (request. servervariables ("SERVER_NAME "))
If mid (server_v1, 8, Len (server_v2) <> server_v2 then
Chkpost = false
Else
Chkpost = true
End if
End Function
'Filter htmlCode
Function htmlencode (fstring)
If not isnull (fstring) then
Fstring = Replace (fstring, ">", "& gt ;")
Fstring = Replace (fstring, "<", "& lt ;")
Fstring = Replace (fstring, CHR (32), "& nbsp ;")
Fstring = Replace (fstring, CHR (9), "& nbsp ;")
Fstring = Replace (fstring, CHR (34), "& quot ;")
Fstring = Replace (fstring, CHR (39 ),"'")
Fstring = Replace (fstring, CHR (13 ),"")
Fstring = Replace (fstring, CHR (10) & CHR (10), "</P> <p> ")
Fstring = Replace (fstring, CHR (10), "<br> ")
Fstring = chkbadwords (fstring)
Htmlencode = fstring
End if
End Function
'Filter form characters
Function htmlcode (fstring)
If not isnull (fstring) then
Fstring = Replace (fstring, CHR (13 ),"")
Fstring = Replace (fstring, CHR (10) & CHR (10), "</P> <p> ")
Fstring = Replace (fstring, CHR (10), "<br> ")
Htmlcode = fstring
End if
End Function
'Back to previous page
<Input type = button name = "back" value = "back" onclick = "location. href = '<% = request. servervariables (" http_referer ") %>'">
<A href = "<% = request. servervariables (" http_referer ") %>"> <back to previous page </a>
'time used before and after the script calculation
<%
startime = timer ()
endtime = timer ()
response. write formatnumber (endtime-startime) *, 3) %> millisecond