📄 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 len(dzyj)>25 then
err_info=err_info&"●电子邮件太长,请勿超过25个字符!<br>"
end if
lr=trim(Request.Form("lr"))
if lr="" then
err_info=err_info&"●留言内容不能为空!<br>"
end if
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"-->
<%
Set rs = Server.CreateObject ("Adodb.RECORDSET")
rs.open "user_letter_table",conn,3,2
if err.number<>0 then
rs.Close
conn.close
response.write("<script language='javascript'>")
response.write("alert('出现错误,请关闭窗口重试!');")
response.write("window.close();")
response.write("</script>")
end if
rs.AddNew
rs("siteid")=siteid
rs("hfid")=id
rs("xm")=xm
rs("bt")=bt
rs("dzyj")=dzyj
if trim(Request.form("oicq"))<>"" then
rs("oicq")=trim(Request.Form("oicq"))
end if
rs("bq")=Request.Form("bq")
if lr<>"" then
rs("lr")=lr
end if
rs("sj")=time()
rs("rq")=date()
rs.Update
check_mts()
if err.number<>0 then
rs.Close
conn.close
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 + -