savedata.asp
来自「娱乐A视网企业黄页程序 1.首页 index.asp 2.管理页 login」· ASP 代码 · 共 122 行
ASP
122 行
<!--#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>数 据 库 操 作 失 败 !</li>"
else
foundError=false
end if
end sub
sub showErrors()
%>
<html>
<head>
<title>发现错误_娱乐A视网—企业黄页</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%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?