?? 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 + -