大哥!帮帮我,急急急急急急急急急````````

tmk2008 tmk2008 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc/Config.asp"-->
<!--#include file="ArticleChar.inc"-->

<%'检查用户输入的内容中是否含有非法字符
function checktxt(txt)
chrtxt="33|34|35|36|37|38|39|40|41|42|43|44|47|58|59|60|61|62|63|91|92|93|94|96|123|124|125|126|128"
chrtext=split(chrtxt,"|")
for c=0 to ubound(chrtext)
txt=replace(txt,chr(chrtext(c)),"")
next
checktxt=txt
end function
if request("send")="ok" then

username=trim(request.form("username"))
usermail=trim(request.form("usermail"))

if username="" or request.form("Content")="" then
response.write "<script language='javascript'>"
response.write "alert('填写资料不完整,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if checktxt(request.form("username"))<>request.form("username") then
response.write "<script language='javascript'>"
response.write "alert('您输入的用户名中含有非法字符,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if mailyes=0 then '邮箱为必填时检查邮箱是否合法

if checktxt(request.form("usermail"))<>request.form("usermail") then
response.write "<script language='javascript'>"
response.write "alert('您输入的邮箱中含有非法字符,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

if Instr(usermail,".")<=0 or Instr(usermail,"@")<=0 or len(usermail)<10 or len(usermail)>50 then
response.write "<script language='javascript'>"
response.write "alert('您输入的电子邮件地址格式不正确,请检查后重新输入!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

end if

if len(request.form("Content"))>500 then
response.write "<script language='javascript'>"
response.write "alert('留言内容太长了,请不要超过500个字符!');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
end if

set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from Feedback where online='1' order by Postdate desc"
rs.open sql,conn,1,3

rs.Addnew
rs("username")=trim(request.form("username"))
rs("sex")=trim(request.form("sex"))
rs("qq")=trim(request.form("qq"))
rs("phone")=Request("phone")
rs("Units")=Request("Units")
rs("usermail")=Request("usermail")
rs("Title")=trim(request.form("Title"))
rs("IP")=Request.serverVariables("REMOTE_ADDR")
rs("content")=htmlencode2(request.form("content"))
view=cstr(view)
if view<>"0" then view="1"
rs("online")=view
rs("IP")=Request.serverVariables("REMOTE_ADDR")
rs.Update
rs.close
set rs=nothing
response.write "<script language='javascript'>"
if view="0" then
response.write "alert('留言提交成功,留言须经管理员审核才能发布。');"
else
response.write "alert('留言提交成功,单击“确定”返回留言列表!');"
end if
response.write "location.href='FeedBack.asp';"
response.write "</script>"
response.end
end if
%>


错误类型:
ADODB.Recordset (0x800A0CB3)
当前记录集不支持更新。这可能是提供程序的限制,也可能是选定锁定类型的限制。
...全文
评论 10
收藏 已收藏
分享
返回顶部
tmk2008
ASP 28,401 成员 356,940 内容