




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、數(shù)據(jù)庫位置:data/data.mdb 數(shù)據(jù)庫表:user id name pwd wenti daan conn.asp <% db="data/data.mdb" '數(shù)據(jù)庫存放目錄 on error resume next set conn=server.createobject("adodb.connection") conn.open "driver=microsoft access driver (*.mdb);dbq="&server.mappath(db) if err then err.clear
2、 set conn = Nothing response.write "數(shù)據(jù)庫連接出錯,請檢查conn.asp中的連接字符串。" response.end end if function CloseDB Conn.Close set Conn=Nothing End Function %> <% dim badword badword="'|and|select|update|chr|delete|%20from|;|insert|mid|master.|set|chr(37)|=" if request.QueryString<
3、;>"" then chk=split(badword,"|") for each query_name in request.querystring for i=0 to ubound(chk) if instr(lcase(request.querystring(query_name),chk(i)<>0 then response.write "<script language=javascript>alert('傳參錯誤!參數(shù) "&query_name&" 的值中
4、包含非法字符串!nn');location='"&request.ServerVariables (" _REFERER")&"'</Script>" response.end end if next next end if %> reg.asp <!-i nclude file="conn.asp"-> <% if request("action")="reg" then ject("adodb.r
5、ecordset") rs.open "select * from user where name='"&trim(request("name")&"'",conn,1,1 if rs.recordcount>0 then response.write "<Script language='JavaScript'>window.alert('您輸入的用戶名已存在,請返回重新輸入!');history.back(-1);</Scr
6、ipt>" response.End() end if sql="select * from user" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,3 rs.addnew rs("name")=trim(request.Form("name") rs("pwd")=trim(request.Form("pwd") rs("wenti")=trim(req
7、uest.Form("wenti") rs("daan")=trim(request.Form("daan") rs.update rs.close set rs=nothing response.write "<script language=javascript> alert('注冊成功,點(diǎn)擊確定立即登錄!');location.replace('login.asp');</script>" response.end end if %> <ht
8、ml> <head> <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> <table width="90%" border="1" align="center" cellpad
9、ding="10" cellspacing="0"> <tr> <td>用戶注冊 <form name="form1" method="post" action="?action=reg" onsubmit="return chkform(this)"> <table width="347" border="1" cellpadding="5" cellspacing=
10、"0"> <tr> <td width="142">用戶名</td> <td width="179"><input name="name" type="text" id="name"></td> </tr> <tr> <td>密碼</td> <td><input name="pwd" type="pass
11、word" id="pwd"></td> </tr> <tr> <td>密碼提示問題</td> <td><input name="wenti" type="text" id="wenti"></td> </tr> <tr> <td>密碼提示答案</td> <td><input name="daan" type="
12、;text" id="daan"></td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit" value="注冊"> <input type="reset" name="Submit" value="重置"> </td> </tr> </tabl
13、e> </form> </td> </tr> </table> </body> </html> top.asp <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <table width="90%" border="1" align="center" cellpadding="10" cellspaci
14、ng="0"> <tr> <td><a href="/""index.asp">首頁</a> <% if Session("name")="" then %> <a href="/""reg.asp">注冊</a> <a href="/""login.asp">登陸</a> <a href=&quo
15、t;/""pwd.asp">忘記密碼?</a> <% else %> 歡送您<%=Session("name")%>, <a href="/""loginout.asp">注銷登陸</a> <% end if %> <a href="/""jiami.asp">加密頁</a></td> </tr> </table> <br&
16、gt; login.asp <!-i nclude file="conn.asp"-> <html> <head> <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> <table width=&qu
17、ot;90%" border="1" align="center" cellpadding="10" cellspacing="0"> <tr> <td> 用戶登陸 <% if Session("name")="" then %> <form name="form1" method="post" action="loginok.asp?action=login"
18、; onsubmit="return chkform(this)"> <table border="1" cellspacing="0" cellpadding="5"> <tr> <td width="116">用戶名</td> <td width="116"><input name="name" type="text" id="name"&g
19、t;</td> </tr> <tr> <td>密碼</td> <td><input name="pwd" type="password" id="pwd"></td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit" value="登陸">
20、<input type="reset" name="Submit" value="重置"></td> </tr> </table> </form> <% else %> <table border="1" cellspacing="0" cellpadding="5"> <tr> <td width="303"><%=Session("
21、;name")%>,您已經(jīng)成功登陸</td> </tr> </table> <% end if %> </td> </tr> </table> </body> </html> loginok.asp <!-i nclude file="conn.asp"-> <% Session.TimeOut=30 if request("action")="login" then name=trim(req
22、uest.form("name") pwd=trim(request.form("pwd") if name="" or pwd="" then Response.Redirect ("login.asp") end if set rs=server.createobject("adodb.recordset") sql="select * from user where name='"&name&"'and pw
23、d='"&pwd&"'" rs.open sql,conn,1,1 if not rs.eof then session("name")=name response.redirect"edit.asp" else response.redirect"Error.asp" response.end end if end if %> loginout.asp <% session("name")="" response.wri
24、te "<script language=javascript> alert('退出登陸成功!');location.href('index.asp');</script>" response.end %> pwd.asp <!-i nclude file="conn.asp"-> <html> <head> <meta -equiv="Content-Type" content="text/html; charset=g
25、b2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> <table width="90%" border="1" align="center" cellpadding="10" cellspacing="0"> <tr> <td><p>找回密碼</p>
26、<form name="form1" method="post" action="pwd2.asp?action=pwd"> <table width="398" border="1" cellpadding="5" cellspacing="0"> <tr> <td width="130">請輸入用戶名</td> <td width="168">
27、;<input name="name" type="text" id="name"></td> <td width="62"><input type="submit" name="Submit" value="查詢"></td> </tr> </table> </form></td> </tr> </table> </b
28、ody> </html> pwd2.asp <!-i nclude file="conn.asp"-> <html> <head> <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> &l
29、t;table width="90%" border="1" align="center" cellpadding="10" cellspacing="0"> <tr> <td> 找回密碼 <% name=trim(request.form("name") set rs=server.createobject("adodb.recordset") sql="select * from user where na
30、me='"&name&"'" rs.open sql,conn,1,1 if not rs.eof then %> <form name="form1" method="post" action="pwd3.asp"> <table width="398" border="1" cellpadding="5" cellspacing="0"> <tr>
31、<td><%=rs("name")%></td> <td> </td> <td><input name="name" type="hidden" id="name" value="<%=rs("name")%>"></td> </tr> <tr> <td width="130">密碼提示問題</td>
32、<td width="168"><%=rs("wenti")%> </td> <td width="62"> </td> </tr> <tr> <td>密碼提示答案</td> <td><input name="daan" type="text" id="daan"></td> <td><input type=&quo
33、t;submit" name="Submit" value="查詢"></td> </tr> </table> </form> <% else %> <table width="413" border="1" cellpadding="5" cellspacing="0"> <tr> < td>你輸入的用戶名不存在,請<a href="/"
34、"javascript:history.back()">返回</a>重新輸入,或者<a href="/""reg.asp">注冊</a></td> </tr> </table> <%end if %> </td> </tr> </table> </body> </html> pwd3.asp <!-i nclude file="conn.asp"-> &l
35、t;html> <head> <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> <table width="90%" border="1" align="center" cel
36、lpadding="10" cellspacing="0"> <tr> <td> 找回密碼 <% name=trim(request.form("name") daan=trim(request.form("daan") set rs=server.createobject("adodb.recordset") sql="select * from user where name='"&name&"'
37、; and daan='"&daan&"'" rs.open sql,conn,1,1 if not rs.eof then %> <table width="398" border="1" cellpadding="5" cellspacing="0"> <tr> <td width="130"><%=rs("name")%>,您的密碼</td>
38、<td><%=rs("pwd")%> </td> </tr> </table> <% else %> <table width="413" border="1" cellpadding="5" cellspacing="0"> <tr> <td>你輸入的密碼提示答案不正確,請<a href="/""javascript:history.back()&qu
39、ot;>返回</a>重新輸入</td> </tr> </table> <%end if %> </td> </tr> </table> </body> </html> error.asp <!-i nclude file="conn.asp"-> <html> <head> <meta -equiv="Content-Type" content="text/html; chars
40、et=gb2312"> <title>無標(biāo)題文檔</title> </head> <body><!-i nclude file="top.asp"-> <table width="90%" border="1" align="center" cellpadding="10" cellspacing="0"> <tr> <td>登陸失敗,請檢查用戶名和密碼是否正確 &
41、lt;a href="/""login.asp">返回</a></td> </tr> </table> </body> </html> edit.asp <!-i nclude file="conn.asp"-> <% if request("action")="edit" then name=session("name") set rs=server.createobject(&
42、quot;adodb.recordset") sql="select * from user where name='"&name&"'" rs.open sql,conn,3,2 rs("pwd")=trim(request.Form("pwd") rs("daan")=trim(request.Form("daan") rs.update rs.close set rs=nothing response.write "&
43、lt;script language=javascript>alert('編輯成功!');location.href('edit.asp');</script>" end if %> <html> <head> <meta -equiv="Content-Type" content="text/html; charset=gb2312"> <title>無標(biāo)題文檔</title> </head> <body>
44、;<!-i nclude file="top.asp"-> <table width="90%" border="1" align="center" cellpadding="10" cellspacing="0"> <tr> <td><p>修改資料</p> <p> <% if Session("name")="" then %> 對不起你還沒有登陸,請<a href="/&quo
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年電氣工程與電氣設(shè)備測試試題及答案
- 2025年電子商務(wù)專業(yè)理論考試試卷及答案
- 2025年財(cái)務(wù)會計(jì)實(shí)務(wù)技能測評試題及答案
- 2025年電子商務(wù)法制與市場管理考試試題及答案
- 聯(lián)通業(yè)務(wù)稽核培訓(xùn)
- 2025《四川省自貢市初中學(xué)業(yè)水平考試》數(shù)學(xué)
- 廣西壯族自治區(qū)玉林市陸川縣2025屆八年級英語第二學(xué)期期末教學(xué)質(zhì)量檢測模擬試題含答案
- 辦公室行政管理試題
- 2025年天津出租車考試資料
- 對小王子的感悟讀后感(14篇)
- 2023年計(jì)算機(jī)圖形學(xué)試題級考試A卷
- GB/T 42104-2022游樂園安全安全管理體系
- 八年級下冊人教版英語單項(xiàng)選擇(50題)練習(xí)題含答案含答案
- 河北省大眾滑雪等級標(biāo)準(zhǔn)(試行)
- GB/T 3863-2008工業(yè)氧
- GB/T 31125-2014膠粘帶初粘性試驗(yàn)方法環(huán)形法
- 班主任班級管理(課堂)課件
- 學(xué)院輔導(dǎo)答疑情況記錄表
- 31個級地區(qū)國家重點(diǎn)監(jiān)控企業(yè)自行監(jiān)測信息公開平臺及污染源監(jiān)督性監(jiān)測信息公開網(wǎng)址
- 2022年江西省投資集團(tuán)有限公司校園招聘筆試模擬試題及答案解析
- 發(fā)證機(jī)關(guān)所在地區(qū)代碼表
評論
0/150
提交評論