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

📄 conn.asp

📁 图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统图书管理系统
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" CODEPAGE="936" %> 
<% 	option explicit
	'response.buffer = true
	dim startime
	dim conn
	dim connstr
	startime=timer()
%>

<%      const db = "data/#ttlink#.asp" '修改此处为你的数据库连接路径
	Sub ConnectionDatabase
	Dim ConnStr
	If IsSqlDataBase = 1 Then
		'sql数据库连接参数:数据库名、用户密码、用户名、连接名(本地用local,外地用IP)
    connstr = "Provider=SQLOLEDB.1;Password='';Persist Security Info=True;User ID='';Initial Catalog='';Data Source=''"
	Else
		ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
		'如果你的服务器采用较老版本Access驱动,请用下面连接方法
		'connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(db)		
	End If
	On Error Resume Next
	Set conn = Server.CreateObject("ADODB.Connection")
	conn.open ConnStr
	If Err Then
		err.Clear
		conn.close
		set conn=nothing
		Response.Write "数据库连接出错"
		Response.End
	End If
	End Sub	
	
	ConnectionDatabase

dim hx,hxcache
set hx=new cls_cutelink

Dim SqlNowString,strTrue,strFalse
If IsSqlDataBase = 1 Then
	SqlNowString = "GetDate()"
	strTrue = 1
	strFalse = 0	
Else
	SqlNowString = "Now()"
	strTrue = True
	strFalse = False	
End If
%>
<%dim ttsql,ttrs,WebName,ChannelName,WebUrl,WebAlt,WebLogo,webemail,emailkg,servemail,servesmtp,servekey,mailuserdomain,LineLogo,LineNum,inpc,MaxLine,MaxPageSize,CacheTime,HitsTime,FilterWord,Isanti,IPanti,IsVerify,IsDomainLimit,FilterDomain,IsDeBug,IsSqlDataBase,hxCacheName,skin,Repalce
set ttrs=server.createobject("adodb.recordset")
ttsql="select * from [tt_config]"
ttrs.open ttsql,conn,1,1
'---常规参数,请修改为您的信息!
WebName = Trim(ttrs("WebName"))	'您的网站名称
ChannelName = Trim(ttrs("ChannelName"))	'频道名称,一般不用修改
WebUrl = Trim(ttrs("WebUrl"))	'您的网站地址
WebAlt = Trim(ttrs("WebAlt"))	'您的网站说明
WebLogo = Trim(ttrs("WebLogo"))	'请将您网站的logo放在images目录下,大小88x31
webemail = Trim(ttrs("webemail"))	'您的电子邮箱地址
emailkg= ttrs("emailkg")  '是否使用邮件功能,1为使用,0这不使用
servemail= Trim(ttrs("servemail"))  '系统邮件服务器发信帐号
servesmtp= Trim(ttrs("servesmtp"))  '发信邮件服务器SMTP地址
servekey= Trim(ttrs("servekey"))  '发信邮件服务器登录密码
mailuserdomain= Trim(ttrs("mailuserdomain")) '域名(若用“name@domain.com”这样的用户名登录时,请指明domain.com


'---自定义参数,请视具体情况修改!
LineLogo = ttrs("LineLogo")	'显示图片链接的行数
LineNum = ttrs("LineNum")	'每一行显示网站的个数
inpc = ttrs("inpc")	'平均每天点入多少次以上的网站才显示链接
MaxLine = ttrs("MaxLine")	'最多显示多少行,0为不限制,如果设置必须大于LineLogo参数
MaxPageSize = ttrs("MaxPageSize")	'分页时每页显示的记录数
CacheTime = ttrs("CacheTime")	'缓存刷新时间,默认为30分钟
HitsTime = ttrs("HitsTime")	'同一IP隔多少时间后点击才继续计数,单位小时,默认为12小时
FilterWord = ttrs("FilterWord")	'定义要过滤的网站名称,用|隔开
Isanti = ttrs("Isanti")	'是否限定点入来源只能在其登记的网站域名上,1为限定,0为不限定。
IPanti = ttrs("IPanti")	'是否检测使用代理服务器点击,1为检测,0为不检测。
IsVerify = ttrs("IsVerify")	        '是否需要审核才能显示 1为需要 0为不需要。
IsDomainLimit = ttrs("IsDomainLimit")	'同一域名是否只能注册一次 1为限制 0为不限制
FilterDomain = ttrs("FilterDomain")	'定义要屏蔽的域名,用|隔开,空为不限制
hxCacheName = ttrs("hxCacheName")	'缓存名称,如果一个空间内放置了多个此系统,请更改此名称
session("hxCacheName")=hxCacheName '设置缓存名给主站登录时与友情链接管理登录整合
if request("skin")<>"" then
Response.cookies(hxCacheName&"_skin")=request("skin")
end if
if Request.cookies(hxCacheName&"_skin")="" then
	skin=ttrs("skin")
else
	skin=Request.cookies(hxCacheName&"_skin")
end if


'---系统参数,一般情况下不用修改!
IsDeBug = ttrs("IsDeBug")	'定义运行模式,数据库操作出错时,1为输出错误信息,方便调试,0为不输出。
IsSqlDataBase = ttrs("IsSqlDataBase")	'定义数据库类别,1为SQL数据库,0为Access数据库

	ttrs.close
	set ttrs=nothing
%>
<!--#INCLUDE file="class.asp" -->

⌨️ 快捷键说明

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