<!--#include file=pet_config.asp-->
<%	
	On Error Resume Next
	dim connpet,rspet,userpet
	dim connstrpet
	dim dbbankpet
	'更改数据库名字
	dbbankpet="data/petcenter.asp"
	Set connpet = Server.CreateObject("ADODB.Connection")
	connstrpet="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dbbankpet)
	'如果你的服务器采用较老版本Access驱动，请用下面连接方法
	'connstr1="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(dbbank)	
	connpet.Open connstrpet
	
    Sub showmessage(show_message, url_forward)
        %>
                <table  border="0" cellspacing="1" cellpadding="5" align="center" class=tableborder4>
          <tr>
            <td height=27 align="center" class=tbhead2><b><font class=HeadFont><%=stats%></font></b></td>
          </tr>
          <tr>
            <td class=tbbg1>	
    	
    	    <div align="center"><br>
    	        <%=show_message%><br><br>
            	<%if url_forward <> "" then%>
        	        <a href=<%=url_forward%>>如果您的浏览器没有自动跳转，请点击这里</a><br><br>
                	<meta http-equiv="refresh" content="5;url='<%=url_forward%>'">
            	<%end if%>
        	</div>
        
    	</td></tr></table>
<%
        Dvbbs.Footer    	
        response.end
    end Sub
    
    sub AlarmErrmsg()
%>
       <table  border="0" cellspacing="1" cellpadding="5" align="center" class=tableborder4>
          <tr>
            <td height=27 align="center" class=tbhead2><b><font class=HeadFont><%=stats%></font></b></td>
          </tr>
          <tr>
            <td class=tbbg1>	
    	
    	    <br>
			<div align="center">
    	    您没有进入宠物中心，请先<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'"></div>
    	</td></tr></table>
        <%    
        Dvbbs.Footer    	
        response.end
    end sub
	Sub UpdateUserInfo(UserWealth,UserCP,UserEP,UserPower,UserMoney,UserTicket) '道具中心刷钱Bug修正 2005-4-8 绿光光
	Dim cUserInfo
	cUserInfo = Session(Dvbbs.CacheName & "UserID")
	cUserInfo(2) = Now()
	cUserInfo(37)=cUserInfo(37)+Clng(UserMoney)
	cUserInfo(38)=cUserInfo(38)+Clng(UserTicket)
	cUserInfo(21)=cUserInfo(21)+Clng(UserWealth)
	cUserInfo(22)=cUserInfo(22)+Clng(UserEP)
	cUserInfo(23)=cUserInfo(23)+Clng(UserCP)
	cUserInfo(24)=cUserInfo(24)+Clng(UserPower)
	Session(Dvbbs.CacheName & "UserID") = cUserInfo
	End Sub
	sub Endcon()
		connpet.close
		set connpet=nothing
	end sub
%>