⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connshop.asp

📁 本实例为一个完整的网上购物商城的完整例子程序,里面有所以的源代码.希望对大家学习有用.
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<%
dim connstr
dim db, startime
startime=timer()
db="database/shopv2.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
'如果你的服务器采用较老版本Access驱动,请用下面连接方法'
connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db)
conn.Open connstr
%>
<%
' 检查非法性
dim qs, errc
qs=request.servervariables("query_string")
dim nothis(16)
nothis(0)="net user"
nothis(1)="xp_cmdshell"
nothis(2)="/add"
nothis(3)="exec%20master.dbo.xp_cmdshell"
nothis(4)="net localgroup administrators"
nothis(5)="select"
nothis(6)="count"
nothis(7)="asc"
nothis(8)="char"
nothis(9)="mid"
nothis(10)=":"
nothis(11)=""""
nothis(12)="insert"
nothis(13)="delete"
nothis(14)="drop"
nothis(15)="truncate"
nothis(16)="from"
errc=false
for i= 0 to ubound(nothis)
if instr(qs, nothis(i))<>0 then
        errc=true
end if
next
if errc then
        response.write "<script language=""javascript"">"
response.write "parent.alert('很抱歉!你的操作不被允许,请查看您是不是输错了?!确定后将直接转向首页..');"
response.write "self.location.href='index.asp';"
response.write "</script>"
response.end
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -