<!--#include file="YD_pet_config.asp"-->
<!--#include file="YD_plus/inc/YD_ClsMain.asp"-->
<%
dim connpet,connstrpet,dbbankpet,Pet_NowString
dim rspet,userpet
'定义宠物数据库类别，1为SQL数据库，0为Access数据库
Const petData = 0
If petData = 0 Then
	'第一次使用请更改数据库的名字
	dbbankpet="Data/mybbspet.mdb"
	Pet_NowString = "Now()"
	connstrpet="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbbankpet)
	'如果你的服务器采用较老版本Access驱动，请用下面连接方法
	'connstrpet="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(dbbankpet)
elseif petData = 1 Then
	Dim petSqlData,petSqlPass,petSqlUser,petSqlLocal
	petSqlData = "YD_plus_data"			'数据库名(petSqlData)
	petSqlPass = "YD_plus_data"			'用户密码(petSqlPass)
	petSqlUser = "YD_plus_data"			'用户名(petSqlUser)
	petSqlLocal = "(local)"				'连接名(petSqlLocal)
	Pet_NowString = "GetDate()"
	connstrpet = "Provider = Sqloledb; User ID = " & petSqlUser & "; Password = " & petSqlPass & "; Initial Catalog = " & petSqlData & "; Data Source = " & petSqlLocal & ";"
End If

On Error Resume Next
Set connpet = Server.CreateObject("ADODB.Connection")
connpet.Open connstrpet
If Err Then
	err.Clear
	connpet.close
	Set connpet = Nothing
	Response.Write "宠物数据库连接出错，请检查连接字串。"
	Response.End
End If
    
sub AlarmErrmsg()
%>
<table class=tableborder1 cellspacing=1 cellpadding=3 align=center>
  <tr>
    <th height=27 align="center"><%=dvbbs.stats%></th>
  </tr>
  <tr>
    <td class=TableBody1 align=center>
	<br>
	您没有进入<%=Dvbbs.Forum_Info(0)%>宠物中心，请先<a href=login.asp><font color=red>登录</font></a>或<a href=reg.asp><font color=red>注册</font></a>新用户。
	<br><br>
	<a href=login.asp>如果您的浏览器没有自动跳转，请点击这里</a><br><br>
	<meta http-equiv="refresh" content="3;url='login.asp'">
    </td>
  </tr>
</table>
<%    
Dvbbs.Footer    	
response.end
end sub

sub Endcon()
connpet.close
set connpet=nothing
end sub
%>