?? savedata.asp
字號(hào):
<!--#include file="dbpath/dbpath.asp"-->
<!--#include file="function/char.inc"-->
<%
sub getInput()
sSubject=request.form("dSubject")
sMemo=request.form("dMemo")
sGq=request.form("dgq")
sName=request.form("dname")
sEmail=request.form("demail")
sPhone=request.form("dphone")
sAddress=request.form("daddress")
sCode=request.form("dcode")
stypeid=request.form("lbid")
sgs=request.form("dgs")
end sub
dim rs
dim sSubject
dim sMemo
dim sGq
dim sName
dim sEmail
dim sPhone
dim sAddress
dim sCode
dim stypeid
dim sgs
dim errorMsg
dim foundError
getInput()
saveData()
if foundError=false then
response.redirect "Message.asp"
else
call showerrors()
end if
set rs=nothing
conn.close
set conn=nothing
sub saveData()
dim InsertCursor
Set InsertCursor = Server.CreateObject("ADODB.Recordset")
InsertCursor.Open "select * from gq",conn,1,3
InsertCursor.addnew
InsertCursor("name") =htmlencode(sName)
InsertCursor("email") =htmlencode(sEmail)
InsertCursor("phone") =htmlencode(sPhone)
InsertCursor("address") =htmlencode(sAddress)
InsertCursor("code") =htmlencode(sCode)
InsertCursor("subject") =htmlencode(sSubject)
InsertCursor("memo") =htmlencode(sMemo)
InsertCursor("gs") =htmlencode(sgs)
InsertCursor("gq") =sGq
InsertCursor("lbid") =stypeid
InsertCursor("date") =cstr(date())
InsertCursor("time") =cstr(time())
InsertCursor.Update
InsertCursor.close
' conn.close
' set InsertCursor=nothing
if err>0 then
err.clear
foundError=true
ErrorMsg="<li>數(shù) 據(jù) 庫 操 作 失 敗 !</li>"
else
foundError=false
end if
end sub
sub showErrors()
%>
<html>
<head>
<title>發(fā)現(xiàn)錯(cuò)誤_娛樂A視網(wǎng)—企業(yè)黃頁</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css"><!-- td { font-size: 12px; line-height: 17px }
body { font-size: 12px; line-height: 17px }
a:link { text-decoration: none; color: blue }
a:visited { text-decoration: none; color: #993333 }
a:active { text-decoration: none }
a:hover { text-decoration: underline; color: red }
-->
</style>
<script language="JavaScript">
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
oncontextmenu='return false';
}
}
if (document.layers) {
if (e.which == 3) {
oncontextmenu='return false';
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
document.oncontextmenu = new Function("return false;")
</script>
</head>
<body>
<p align="center"><font color="#0080FF"><%=ErrorMsg%></font></p>
</body>
</html>
<%end sub%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -