📄 hfly_write.asp
字号:
<%@ TRANSACTION =Requires_New%>
<%response.Expires=0%>
<!--#include file="function.asp"-->
<%
siteid=request("siteid")
id=request("id")
if siteid="" or id="" then
call disp_error("数据传送出错,请返回重试!","")
end if
dim err_info,sql
err_info=""
xm=trim(Request.Form("xm"))
if xm="" then
err_info=err_info&"●留言人不能为空!<br>"
end if
if len(xm)>10 then
err_info=err_info&"●留言人太长,请勿超过10个汉字!<br>"
end if
bt=trim(Request.Form("bt"))
if bt="" then
err_info=err_info&"●标题不能为空!<br>"
end if
if len(bt)>25 then
err_info=err_info&"●标题太长,请勿超过6个汉字!<br>"
end if
dzyj=trim(Request.Form("dzyj"))
if dzyj="" then
err_info=err_info&"●电子邮件不能为空!<br>"
end if
if len(dzyj)>25 then
err_info=err_info&"●电子邮件太长,请勿超过25个字符!<br>"
end if
lr=trim(Request.Form("lr"))
if len(lr)>400 then
err_info=err_info&"●留言内容太长,请勿超过200个汉字!<br>"
end if
if err_info<>"" then
call disp_error1(err_info,"")
end if
'on error resume next
%>
<!--#include file="conn.asp"-->
<%
Dim ip
ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If IsNull(ip) or ""=ip Then
ip=Request.ServerVariables("REMOTE_ADDR")
End If
sql="insert into user_letter_table(siteid,hfid,xm,bt,dzyj,oicq,bq,lr,sj,rq,ip) values(" & siteid & "," & id & ",'" & charfilter(xm) & "','" & charfilter(bt) & "','" & dzyj & "','" & Request.Form("oicq") & "'," & Request.Form("bq") & ",'" & charfilter(lr) & "','" & time & "','" & date & "','" & ip & "')"
Conn.Execute(sql)
'check_mts()
if err.number<>0 then
'rs.Close
conn.close
Response.Write("<br><p align=center><font size=+1>")
Response.Write( "发表留言出错了!系统5秒后自动<a href='javascript:window.close();'>关闭</a>窗口!</font></p>" & err.description)
Response.End
else
objectcontext.setcomplete
'rs.Close
conn.close
end if
Response.Write("<script language='javascript'>")
response.write("location.href='hfly.asp?siteid="&siteid&"&id="&id&"';")
Response.Write("</script>")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -