const.asp
<!--#include file="../../inc/dataconfig.asp" -->
<%
'0用xxx.jiaonan.net形式
'------------------------------------------------------
to_url="0"
'------------------------------------------------------
Dim SqlNow,Conn,My_Url,online_sj,connbbs
If IsSqlDataBase = 0 Then
SqlNow = now()
Else
SqlNow = Now()
End If
ConnectionDatabase
Sub ConnectionDatabase
Dim ConnStr
If IsSqlDataBase = 1 Then
ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
Else
Db=getdbpath(db)
'免费用户第一次使用请修改本处数据库地址并相应修改data目录中数据库名称
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
End If
On Error Resume Next
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End If
End Sub
dbbbs=getdbpath(dbbbs)
ConnStrbbs = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbbbs)
Set connbbs = Server.CreateObject("ADODB.Connection")
connbbs.open ConnStrbbs
If Err Then
err.Clear
Set Connbbs = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End if
dbblog=getdbpath(dbblog)
ConnStrblog = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbblog)
Set connblog = Server.CreateObject("ADODB.Connection")
connblog.open ConnStrblog
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"
Response.End
End if
function getdbpath(db)
dim i,num,path
path=Request.ServerVariables("SCRIPT_NAME")
i=0
getdbpath=db
num=instr(path,"/")
do while num>0
num=instr(path,"/")
path=right(path,len(path)-num)
if i>1 then getdbpath="../"&getdbpath
i=i+1
loop
end function
%>
<%
SERVER_url=Request.ServerVariables("SERVER_NAME")
Function saferequest(value)
Dim ParaValue
ParaValue = Trim(Request(value))
If IsNumeric(ParaValue) = True Then
saferequest = ParaValue
Exit Function
ElseIf InStr(LCase(ParaValue), "select ") > 0 Or InStr(LCase(ParaValue), "insert ") > 0 Or InStr(LCase(ParaValue), "delete from") > 0 Or InStr(LCase(ParaValue), "count(") > 0 Or InStr(LCase(ParaValue), "drop table") > 0 Or InStr(LCase(ParaValue), "update ") > 0 Or InStr(LCase(ParaValue), "truncate ") > 0 Or InStr(LCase(ParaValue), "asc(") > 0 Or InStr(LCase(ParaValue), "mid(") > 0 Or InStr(LCase(ParaValue), "char(") > 0 Or InStr(LCase(ParaValue), "xp_cmdshell") > 0 Or InStr(LCase(ParaValue), "exec master") > 0 Or InStr(LCase(ParaValue), "net localgroup administrators") > 0 Or InStr(LCase(ParaValue), " and ") > 0 Or InStr(LCase(ParaValue), "net user") > 0 Or InStr(LCase(ParaValue), " or ") > 0 Or InStr(LCase(ParaValue), "'") > 0 Or InStr(LCase(ParaValue), "''") > 0 Then
Response.Redirect "/note.asp?errid=0"
Else
saferequest = ParaValue
End If
End Function
Function closenothing()
conn.close
set conn=nothing
End Function
Function renzheng()
Select case rz
case 3
Response.Write " <img src=/image/yingyezhizhao.gif width=34 height=20 border=0 align=bottom alt=企业实名认证卖家>"
case 2
Response.Write " <img src=/image/shenfenzheng.gif width=34 height=20 border=0 align=bottom alt=个人实名认证卖家>"
case 1
Response.Write " <img src=/image/shenfenzheng.gif width=34 height=20 border=0 align=bottom alt=个人实名认证买家>"
End Select
End Function
'星级设置
xing1="9"
xing2="50"
xing3="100"
xing4="200"
xing5="500"
xing6="900"
xing7="1800"
xing8="3000"
xing11="49"
xing21="99"
xing31="199"
xing41="499"
xing51="899"
xing6="900"
xing71="1799"
%>
dataconfig.asp
<!--#include file="myfunction.asp" -->
<%
'定义数据库类别,1为SQL数据库,0为Access数据库
Dim IsSqlDataBase
IsSqlDataBase = 0
'=============================================================
'=============================================================
'=============================================================
'ACCESS数据库地址
Dim Db,Dbbbs,Dbblog
Db="data/#iShop.asp"
Dbbbs="bbs/DataBase/bbsxp6.mdb"
Dbblog="blog/database/sjzmssql.mdb"
%>
设完后
技术信息(用于支持人员)
错误类型:
Microsoft JET Database Engine (0x80040E37)
Microsoft Jet 数据库引擎找不到输入表或查询 'public_note'。 确定它是否存在,以及它的名称的拼写是否正确。
/blog/index.asp, 第 370 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; POTU(1.1))
网页:
GET /blog/index.asp