?? add.asp
字號:
<%Response.Buffer = True%>
<!--#include file="inc/dbconn.asp"-->
<%
name=request("name")
email=request("email")
homepage=request("homepage")
oicq=request("oicq")
pic=request("pic")
subject=request("subject")
main=request("main")
sex=request("sex")
fromto=request("fromto")
icq=request("icq")
Function Deal(exp1)
dim exp2
exp2=Replace(exp1,"<","<")
exp2=Replace(exp2,">",">")
exp2=Replace(exp2,"'","''")
exp2=Replace(exp2,Chr(13),"<br>")
Deal=exp2
End Function
if icq="" then
icq="還沒有呢"
else
icq=request("icq")
end if
if fromto="" then
fromto="來自于天堂"
else
fromto=request("fromto")
end if
if sex="" then
sex="nosex"
else
sex=Request("sex")
sex=Deal(sex)
end if
if email="" then
email="不告訴你"
else
email=Request("email")
email=Deal(email)
end if
if homepage="" then
homepage="還沒做呢"
else
homepage=Request("homepage")
homepage=Deal(homepage)
end if
if oicq="" then
oicq="寫信問我"
else
oicq=request("oicq")
end if
if main="" then
main=""
else
main=Request("main")
main=Deal(main)
end if
%>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from 留言本 where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("姓名")=name
rs("電子郵件")=email
rs("個人主頁")=homepage
rs("type")=Request("HTTP_USER_AGENT")
rs("ip")=Request("REMOTE_ADDR")
rs("fromto")=fromto
rs("sex")=sex
rs("icq")=icq
rs("oicq")=oicq
rs("表情")=pic
rs("留言主題")=subject
rs("留言內容")=main
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "index.asp"%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -