<!--#include file="setup.asp"-->
<!--#include file="pet_config.asp"-->
<!--#include file="pet_conn.asp"-->
<%
top
if Request.Cookies("username")=empty then error("<li>您还未<a href=login.asp>登录</a>论坛")

	dim allpetpeople,money,mypetname,mypet,levelpic,mypetlevel,username
	Dim rs,sql_pet

	set rs_pet=conn.execute("select money from [user] where username='"&Request.Cookies("username")&"'")
    money=rs_pet("money")
    rs_pet.close

	set rs_pet=server.createobject("adodb.recordset")
	sql_pet="SELECT username,mypet,mypetlevel,mypetname FROM mypetdata ORDER BY mypetexp DESC"
	rs_pet.Open sql_pet,conn_pet,1,1
	if rs_pet.eof then
		error("你在论坛还没有宠物啊，<a href=petshop.asp>抢先去买一个吧~</a>")

		else

        username = rs_pet("username")
        mypet = rs_pet("mypet")
        mypetlevel = rs_pet("mypetlevel")
        mypetname = rs_pet("mypetname")
        
        levelpic = int(mypetlevel/10)
        if levelpic>10 then levelpic=11 end if
    end if
		rs_pet.close

	set rs_pet=server.createobject("adodb.recordset")
sql_pet="SELECT COUNT(mypetexp) FROM mypetdata"

rs_pet.open sql_pet,conn_pet,1,3
    allpetpeople = rs_pet(0)

	rs_pet.close
	set rs_pet=nothing
	
   
%>

<table width=<%=dkuan%> cellspacing=1 cellpadding=4 class=a2 align=center><tr class=a3><td height=25>&nbsp;<img src=images/Forum_nav.gif>&nbsp; <%ClubTree%> → <a href=petcenter.asp>宠物中心</a></td></tr></table>
<div align=center>
            <table width="<%=dkuan%>"  border="0" align="center" cellpadding="4" cellspacing="4"align=center>
              <tr> 
                <td width="18%"><!-- #include file=petnav.asp --></td>
                <td width="82%" align=center> 
                <IMG src='images/pet/petlogo.jpg'>
<table width="100%"><tr><td align=center>
<table width='95%' height=95% border='0' cellspacing='1' cellpadding='1' class=a2 align=center>
<tr><td height=20 class=a1>明星宠物</td></tr>
<tr><td class=a3 align=center><IMG src='images/pet/<%=mypetname%>/<%=mypetname%><%=levelpic%>.gif'></td></tr>
<tr><td height=20 class=a3>宠物名称：<%=mypet%></td></tr>
<tr><td height=20 class=a3>宠物等级：<%=mypetlevel%></td></tr>
<tr><td height=20 class=a3>宠物主人：<a href="Profile.asp?username=<%=username%>" target='_blank'><%=username%></a></td></tr>
</table>

</td><td width=70%>
<table width='100%' height=95% border='0' cellspacing='1' cellpadding='1' class=a2 align=center>
<tr><td height=20 class=a1>  论坛宠物信息：本论坛共有 <%=allpetpeople%> 只宠物宝宝</td></tr>
<tr><td class=a3 height=165>
<span id=pet_v>正在加载信息...</span>
<script src=new.asp?id=pet_v&forumid=25&TopicCount=10&showtime=1></script>
</td></tr>
</table>
 <table height=150><tr><td height=100%></td></tr></table>
</td></tr></table>

</td>
</tr>
 </table>
 <%
htmlend
%>
 </td></tr></table>
</div>
