<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/plus_check.asp"-->
<!--#include file="YD_pet_conn.asp"-->

<%
dim menu,savem,rsbank,rssql,chentitle,chenbackasp,stats,errmsg,founderr,action
chentitle="宠物装备店"
Dv_plus.name="petcenter"
'Dv_plus.checklogin()
Dvbbs.LoadTemplates("")
Dvbbs.Stats="宠物装备商店"
Dvbbs.Nav()
Dvbbs.Head_var 0,"","宠物中心","YD_petcenter.asp"

if DvBBS.UserId = 0 then
	AlarmErrmsg
else
	'宠物插件状态
	if DEF_PET_close>1 then
		'暂时关掉开始
		if not dvbbs.master then
			call showmessage("调试中,请以后再来~","index.asp")
		end if
		'暂时关掉结束
	end if
	dim money,smoney,saveday,allmoney,time1,time2,daikuang,dkdu,daiday,sucmsg
	dim Form_userphoto,Form_FaceUrl,Form_FaceWidth,Form_FaceHeight
	Dim Rs,SQL,item1,item2,item3,item4,item5
	set rs=Dvbbs.execute("select userWealth from [Dv_User] where UserID="&DvBBS.UserId)
	money=rs("userWealth")
	rs.close
	sql = "SELECT * FROM mypetdata WHERE username='"&DvBBS.MemberName&"' "
	rs.open sql,connpet,1,3

	if rs.eof then
		call showmessage("你还没有宠物啊，快攒钱去买吧~","YD_petshop.asp")
	else
		item1=0
		item2=0
		item3=0
		item4=0
		item5=0

		if rs("item1")<>0 then item1=1 end if
		if rs("item2")<>0 then item2=1 end if
		if rs("item3")<>0 then item3=1 end if
		if rs("item4")<>0 then item4=1 end if
		if rs("item5")<>0 then item5=1 end if

		dim tmoney,sword,tmp,necklace,head,body,foot,rndNum
		if request("action") = "" then
			action = "showroom"
		else
			action = lcase(request("action"))
		end if

		'注册用户物品
		Dim Rs2,SQL2,hpitem,spitem,expitem,liveitem,weopitem,amoritem
		sql2 = "SELECT * FROM useritem WHERE username='"&Dvbbs.MemberName&"' "
		set rs2=connpet.ExeCute(sql2)
		hpitem=rs2("hpitem")
		spitem=rs2("spitem")
		expitem=rs2("expitem")
		liveitem=rs2("liveitem")	
		weopitem=rs2("weopitem")
		amoritem=rs2("amoritem")

		select case action
			case "buysword"
				if item1<>0 then
					call showmessage("你的身上装备了同类型物品<br><br>请卸下身上的物品后重新购买","YD_petweaponshop.asp")
				else
					sword = cint(request("sword"))
					if sword>7 then sword=7
					tmoney=clng(DEF_PET_perswordmoney*sword*(1+sword/10))
					tmp=sword-rs("item1")

					if (money<tmoney) then
						call showmessage("你没有那么多钱购买这些物品","YD_petweaponshop.asp")
					elseif (tmp<1) then
						call showmessage("你现有的装备等级高于你购买的装备，不用再买了","YD_petweaponshop.asp")
					else
						Dvbbs.execute("UPDATE [DV_user] SET userWealth=userWealth-" & tmoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-tmoney,0,0,0,0,0)
						connpet.ExeCute("UPDATE mypetdata SET item1="&sword&" WHERE username='"&DvBBS.MemberName&"'")
						randomize
						rndNum=clng((sword)*3)
						connpet.ExeCute("UPDATE mypetdata SET item1Num="&rndNum&" WHERE username='"&DvBBS.MemberName&"'")
						call showmessage("购买成功，你的攻击力增加 "&rndNum&" 点！","YD_petweaponshop.asp")
					end if
				end if
			case "buynecklace"
				if item2<>0 then
					call showmessage("你的身上装备了同类型物品<br><br>请卸下身上的物品后重新购买","YD_petweaponshop.asp")
				else
					necklace = cint(request("necklace"))
					if necklace>7 then necklace=7
					tmoney=clng(DEF_PET_pernecklacemoney*necklace*(1+necklace/10))
					tmp=necklace-rs("item2")

					if (money<tmoney) then
						call showmessage("你没有那么多钱购买这些物品","YD_petweaponshop.asp")
					elseif(tmp<1) then
						call showmessage("你现有的装备等级高于你购买的装备，不用再买了","YD_petweaponshop.asp")
					else
						Dvbbs.execute("UPDATE [DV_user] SET userWealth=userWealth-" & tmoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-tmoney,0,0,0,0,0)
						connpet.ExeCute("UPDATE mypetdata SET item2="&necklace&" WHERE username='"&DvBBS.MemberName&"'")
						randomize
						rndNum=clng((necklace)*3)
						connpet.ExeCute("UPDATE mypetdata SET item2Num="&rndNum&" WHERE username='"&DvBBS.MemberName&"'")
						call showmessage("购买成功，你的攻击力增加 "&rndNum&" 点！","YD_petweaponshop.asp")
					end if
				end if
			case "buyhead"
				if item3<>0 then
					call showmessage("你的身上装备了同类型物品<br><br>请卸下身上的物品后重新购买","YD_petweaponshop.asp")
				else
					head = cint(request("head"))
					if head>7 then head=7
					tmoney=clng(DEF_PET_perheadmoney*head*(1+head/10))
					tmp=head-rs("item3")

					if (money<tmoney) then
						call showmessage("你没有那么多钱购买这些物品","YD_petweaponshop.asp")
					elseif(tmp<1) then
						call showmessage("你现有的装备等级高于你购买的装备，不用再买了","YD_petweaponshop.asp")
					else
						Dvbbs.execute("UPDATE [DV_user] SET userWealth=userWealth-" & tmoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-tmoney,0,0,0,0,0)
						connpet.ExeCute("UPDATE mypetdata SET item3="& head &" WHERE username='"&DvBBS.MemberName&"'")
						randomize
						rndNum=clng((head)*3)
						connpet.ExeCute("UPDATE mypetdata SET item3Num="&rndNum&" WHERE username='"&DvBBS.MemberName&"'")
						call showmessage("购买成功，你的防御力增加 "& rndNum &" 点！","YD_petweaponshop.asp")
					end if
				end if
			case "buybody"
				if item4<>0 then
					call showmessage("你的身上装备了同类型物品<br><br>请卸下身上的物品后重新购买","YD_petweaponshop.asp")
				else
					body = cint(request("body"))
					if body>7 then body=7
					tmoney=clng(DEF_PET_perbodyemoney*body*(1+body/10))
					tmp=body-rs("item4")

					if (money<tmoney) then
						call showmessage("你没有那么多钱购买这些物品","YD_petweaponshop.asp")
					elseif(tmp<1) then
						call showmessage("你现有的装备等级高于你购买的装备，不用再买了","YD_petweaponshop.asp")
					else
						Dvbbs.execute("UPDATE [DV_user] SET userWealth=userWealth-" & tmoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-tmoney,0,0,0,0,0)
						connpet.ExeCute("UPDATE mypetdata SET item4="&body&" WHERE username='"&DvBBS.MemberName&"'")
						randomize
						rndNum=clng((body)*3)
						connpet.ExeCute("UPDATE mypetdata SET item4Num="&rndNum&" WHERE username='"&DvBBS.MemberName&"'")
						call showmessage("购买成功，你的防御力增加 "&rndNum&" 点！","YD_petweaponshop.asp")
					end if
				end if
			case "buyfoot"
				if item5<>0 then
					call showmessage("你的身上装备了同类型物品<br><br>请卸下身上的物品后重新购买","YD_petweaponshop.asp")
				else
					foot = cint(request("foot"))
					if foot>7 then foot=7
					tmoney=clng(DEF_PET_perfootmoney*foot*(1+foot/10))
					tmp=foot-rs("item5")

					if (money<tmoney) then
						call showmessage("你没有那么多钱购买这些物品","YD_petweaponshop.asp")
					elseif(tmp<1) then
						call showmessage("你现有的装备等级高于你购买的装备，不用再买了","YD_petweaponshop.asp")
					else
						Dvbbs.execute("UPDATE [DV_user] SET userWealth=userWealth-" & tmoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-tmoney,0,0,0,0,0)
						connpet.ExeCute("UPDATE mypetdata SET item5="&foot&" WHERE username='"&DvBBS.MemberName&"'")
						randomize
						rndNum=clng((foot)*3)
						connpet.ExeCute("UPDATE mypetdata SET item5Num="&rndNum&" WHERE username='"&DvBBS.MemberName&"'")
						call showmessage("购买成功，你的防御力增加 "&rndNum&" 点！","YD_petweaponshop.asp")
					end if
				end if

			'upnum物品等级；uppoint升级点数；uptype升级物品；temp临时变量
			case "upwna"
				dim uprnd,uptype,upnum,uppoint,upword
				uptype=cint(request("type"))
				upnum=cint(request("num"))
				
				if upnum=0 then
					call showmessage("0级装备无法升级!请购买高级装备！","YD_petweaponshop.asp?action=showupdate")
				end if

				if money<DEF_UpWeopMoney then
					call showmessage("你的钱不够!","YD_petweaponshop.asp?action=showupdate")
				elseif (uptype<=2 and rs2("weopitem")<upnum) or (uptype>2 and rs2("amoritem")<upnum) then
					'response.write uptype &" "&rs2("weopitem")&" "&rs2("amoritem")&" "& upnum
					call showmessage("你的升级材料不够!","YD_petweaponshop.asp?action=showupdate")
				else
					'升级成功率计算
					randomize
					uprnd=rnd*100+1
					dim temp
					if uprnd<=cint((80-upnum*5)/2) then			
						uppoint = 2	
						upword = "运气真好 恭喜你 加强值提高 <font color=red>2</font> 点！"
					elseif uprnd<=(80-upnum*5) then
						uppoint = 1
						upword = "运气不错 恭喜你 加强值提高 <font color=red>1</font> 点！"
					elseif uprnd <= cint((80-upnum*5)+20) then
						uppoint = 0
						upword = "运气不好 加强值没有得到提高！"
					else
						uppoint = -1
						upword = "运气不会这么差吧！加强值降低 1 点！<br><br><font color=red>请注意：等级越高的物品进行升级，越容易失败！</font>"
					end if

					'升级点数限制			
					temp=0			
					select case uptype
						case 1
							if rs("item1Num") = rs("item1")*3+9 then
								uppoint = 0
								temp=1
								upword = "你的物品强度已经是最高了，无法在升级了！"
								upnum=0
							else
								if rs("item1Num")+uppoint >= rs("item1")*3+9 then
									uppoint = rs("item1")*3+9-rs("item1Num")
									upword = "升级成功，你的物品强度已经是最高了！"
								end if
							end if
						case 2
							if rs("item2Num") = rs("item2")*3+9 then
								uppoint =0
								temp=1
								upword = "你的物品强度已经是最高了，无法在升级了！"
								upnum=0
							else
								if rs("item2Num")+uppoint >= rs("item2")*3+9 then
									uppoint = rs("item2")*3+9-rs("item2Num")
									upword = "升级成功，你的物品强度已经是最高了！"
								end if
							end if			
						case 3
							if rs("item3Num") = rs("item3")*3+9 then
								uppoint = 0
								temp=1
								upword = "你的物品强度已经是最高了，无法在升级了！"
								upnum=0
							else
								if rs("item3Num")+uppoint >= rs("item3")*3+9 then
									uppoint = rs("item3")*3+9-rs("item3Num")
									upword = "升级成功，你的物品强度已经是最高了！"
								end if
							end if			
						case 4
							if rs("item4Num") = rs("item4")*3+9 then
								uppoint = 0
								temp=1
								upword = "你的物品强度已经是最高了，无法在升级了！"
								upnum=0
							else
								if rs("item4Num")+uppoint >= rs("item4")*3+9 then
									uppoint = rs("item4")*3+9-rs("item4Num")
									upword = "升级成功，你的物品强度已经是最高了！"
								end if
							end if			
						case 5
							if rs("item5Num") = rs("item5")*3+9 then
								uppoint = 0
								temp=1
								upword = "你的物品强度已经是最高了，无法再升级了！"
								upnum=0
							else
								if rs("item5Num")+uppoint >= rs("item5")*3+9 then
									uppoint = rs("item5")*3+9-rs("item5Num")
									upword = "升级成功，你的物品强度已经是最高了！"
								end if
							end if			
					end select
					'写入数据库
					SQL = "UPDATE mypetdata SET item"&uptype&"Num = item"&uptype&"Num + "&uppoint&" WHERE username='"&DvBBS.MemberName&"'"
					connpet.ExeCute(SQL)

					'删除所用的升级物品及资金
						if uptype<=2 then
							connpet.ExeCute("UPDATE useritem SET weopitem = weopitem - "&upnum&" WHERE username='"&DvBBS.MemberName&"'")
						else
							connpet.ExeCute("UPDATE useritem SET amoritem = amoritem - "&upnum&" WHERE username='"&DvBBS.MemberName&"'")
						end if
						Dvbbs.execute("update [DV_user] set userWealth=userWealth-" & DEF_UpWeopMoney & " WHERE username='"&DvBBS.MemberName&"'")
						Call UpdateUserInfo(-DEF_UpWeopMoney,0,0,0,0,0)		
					end if
						call showmessage(upword,"YD_petweaponshop.asp?action=showupdate")
		end select		
	end if
	rs2.close
	rs.close	
	call main()		'调用主页面
End If
Set Dv_plus=Nothing
Dvbbs.Footer

sub main()
%>
<table class=tableborder1 cellspacing=1 cellpadding=3 align=center>
  <tr>
    <th height=27 align=center><%=Dvbbs.Stats%></th>
  </tr>
  <tr>
    <td class=TableBody1>
      <table width="100%" cellspacing="0" cellpadding="0">
	<tr>
	  <td width="28%" rowspan="2">
	    <table width="79%" align="center" cellpadding="3" cellspacing="3">
	      <tr>
		<td width="100%" align="center">我的资料</td>
	      </tr>
	      <tr>
		<td align="center">
		<%
		'用户头像调用开始
		If IsNumeric(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userwidth").text) And IsNumeric(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userheight").text) And Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userheight").text<>"" And Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userwidth").text<>"" Then
			If Clng(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userheight").text)=Clng(Dvbbs.Forum_Setting(39)) And Clng(Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userwidth").text)=Clng(Dvbbs.Forum_Setting(38)) Then
				response.write "<img src="&Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userface").text&">"
			Else
				response.write "<img src="&Dvbbs.UserSession.documentElement.selectSingleNode("userinfo/@userface").text&" width=100 height=100>"
			End If
		Else
			response.write "<img src=images/logo_2.gif>"
		End If
		'用户头像调用结束
		%>
		</td>
	      </tr>
	      <tr>
		<td align="center"><nobr>现金货币: <%=money%></nobr></td>
	      </tr>
	    </table>
	    <br>
	    <table width="90%" align="center" cellpadding="3" cellspacing="3">
	      <tr>
		<td align="center">
		<!-- #include file=YD_petnav.asp -->
		</td>
	      </tr>
	    </table>
	    <br>
	    <table width="79%" align="center" cellpadding="3" cellspacing="3">
	      <tr>
		<td width="100%" align="center"><img src="YD_plus/YD_pet/PET/27.gif"></td>
	      </tr>
	    </table>
	  </td>
	  <td>
	    <table class=tableborder1 style="width:100%" cellspacing=1 cellpadding=3 align=center>
	      <tr>
		<td width="16%" class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=showroom">武器柜台</a></td>
		<td width="16%" class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=shownecklace">项链柜台</a></td>
		<td width="16%" class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=showhead">头盔柜台</a></td>
		<td width="16%" class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=showbody">盔甲柜台</a></td>
		<td width="16%" class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=showfoot">鞋子柜台</a></td>
		<td class=TableBody2 align="center"><a href="YD_petweaponshop.asp?action=showupdate">升级柜台</a></td>
	      </tr>
	    </table>
	  </td>
	</tr>
	<tr>
	  <td width="72%"> 
<%
	if action<>"showupdate" then
		call shop()		'调用装备买卖页面
	else
		call shengji()		'调用装备升级页面
	end if
%>
	  </td>
	</tr>
      </table>
    </td>
  </tr>
</table>
<%
end sub

'===============装备买卖页面=============
sub shop()
		dim atkdef,MPO,shopname
		select case action
			case "showroom"
				shopname="武器"
				sql = "SELECT * FROM petitemshop WHERE itemclass='sword' and itemNum <> 0 and itemNum<8"
				atkdef="攻击力"
				mpo=DEF_PET_perswordmoney
			case "shownecklace"
				shopname="项链"
				sql = "SELECT * FROM petitemshop WHERE itemclass='necklace' and itemNum <> 0 and itemNum<8"
				atkdef="攻击力"
				mpo=DEF_PET_pernecklacemoney
			case "showhead"
				shopname="头盔"
				sql = "SELECT * FROM petitemshop WHERE itemclass='head' and itemNum <> 0 and itemNum<8"
				atkdef="防御力"
				mpo=DEF_PET_perheadmoney
			case "showbody"
				shopname="盔甲"
				sql = "SELECT * FROM petitemshop WHERE itemclass='body' and itemNum <> 0 and itemNum<8"
				atkdef="防御力"
				mpo=DEF_PET_perbodyemoney
			case "showfoot"
				shopname="鞋子"
				sql = "SELECT * FROM petitemshop WHERE itemclass='foot' and itemNum <> 0 and itemNum<8"
				atkdef="防御力"
				mpo=DEF_PET_perfootmoney
		end select
		rs.open sql,connpet,1,1
		rs.movefirst
%>
	    <form action=YD_petweaponshop.asp name="name" method=post>
	    <table class=tableborder1 style="width:530" cellspacing=1 cellpadding=3 align=center>
	      <TR>
		<TH colspan=5 width=100% align=center><%=shopname%>柜台</TH>
	      </TR>
		<TD class=TableBody2 width=100 align=center>名字</TD>
		<TD class=TableBody2 width=100 align=center>形象</TD>
		<TD class=TableBody2 width=100 align=center><%=atkdef%></TD>
		<TD class=TableBody2 width=100 align=center>价格</TD>
		<TD class=TableBody2 width=100 align=center>购买选项</TD>
	      </TR>
<%
		do while not rs.eof
%>
	      <TR>
		<TD class=TableBody1 width=100 align=center><%=rs("ItemName")%></TD>
		<TD class=TableBody1 width=100 align=center><IMG height=30 src="YD_plus/YD_pet/PET/<%=rs("ItemClass")%>/<%=rs("itemNum")%>.gif" width=30></TD>
		<TD class=TableBody1 width=100 align=center>＋<%=rs("itemNum")*3%></TD>
		<TD class=TableBody1 align=center><%=clng(MPO*rs("itemNum")*(1+rs("itemNum")/10))%></TD>
		<TD class=TableBody1 width=100 align=middle align="center"><input type="radio" name="<%=rs("itemclass")%>" value="<%=rs("itemNum")%>">购买</TD>
	      </TR>
<%
			rs.movenext
		loop
		rs.movefirst
%>
	      <TR>
		<TD class=TableBody1 colspan="5" align=center>
		<input name="action" type="hidden" id="action" value="buy<%=rs("itemclass")%>">
		<input type="submit" name="Submit2" value="结帐购买"></DIV>
		</TD>
	      </TR>
	    </TABLE>
	    </form>
<%
		rs.close
end sub

'===============装备升级页面=============
sub shengji()
		SQL = "SELECT * FROM mypetdata WHERE username='"&DvBBS.MemberName&"'"
		set rs = connpet.execute(SQL)
		'用很无聊的循环使用变量得到每种道具的名字……
		dim rs3,swordname,necklacename,headname,bodyname,footname
		set rs3 = connpet.execute("select * from petitemshop where itemclass='sword' and itemnum="&rs("item1"))
		swordname = rs3("itemname")
		rs3.close
		set rs3 = connpet.execute("select * from petitemshop where itemclass='necklace' and itemnum="&rs("item2"))
		necklacename = rs3("itemname")
		rs3.close
		set rs3 = connpet.execute("select * from petitemshop where itemclass='head' and itemnum="&rs("item3"))
		headname = rs3("itemname")
		rs3.close
		set rs3 = connpet.execute("select * from petitemshop where itemclass='body' and itemnum="&rs("item4"))
		bodyname = rs3("itemname")
		rs3.close
		set rs3 = connpet.execute("select * from petitemshop where itemclass='foot' and itemnum="&rs("item5"))
		footname = rs3("itemname")
		rs3.close
%>
	    <table class=tableborder1 style="width:530" cellspacing=1 cellpadding=3 align=center>
	      <tr>
		<th colspan=5 width=100% align=center>升级柜台</th>
	      </th>
	      <tr>
		<td class=TableBody2 width="25%" height="30" align=center>宠物装备</td>
		<td class=TableBody2 width="25%" height="30" align=center>目前加强值</td>
		<td class=TableBody2 width="25%" height="30" colspan=2 align=center>消耗材料</td>
		<td class=TableBody2 width="25%" height="30" align=center>升级 <br><font color=red>(每次将消耗<%=DEF_UpWeopMoney%><%=DEF_PointsName%>)</font></td>
	      </tr>
	      <tr>
		<form action="YD_petweaponshop.asp" method="post">
		<td class=TableBody1 width="25%" height="30" align=center><img height=30 src="YD_plus/YD_pet/PET/sword/<%=rs("item1")%>.gif" alt="<%=swordname%>"></td>
		<td class=TableBody1 width="25%" height="30" align=center>＋ <%=rs("item1Num")%></td>
		<td class=TableBody1 width="12.5%" height="30" align=center><img src="YD_plus/YD_pet/PET/wp.gif" width="40" height="40" border="0" alt="武器升级材料"></td>
		<td class=TableBody1 width="12.5%" height="30" align=center> × <%=rs("item1")%></td>
		<td class=TableBody1 width="25%" height="30" align=center><input type="submit" value="升级"></td>
		<input type="hidden" name="action" value="upwna">
		<input type="hidden" name="type" value="1">
		<input type="hidden" name="num" value="<%=rs("item1")%>">
		</form>
	      </tr>
	      <tr>
		<form action="YD_petweaponshop.asp" method="post">
		<td class=TableBody1 width="25%" height="30" align=center><img height=30 src="YD_plus/YD_pet/PET/necklace/<%=rs("item2")%>.gif" alt="<%=necklacename%>"></td>
		<td class=TableBody1 width="25%" height="30" align=center>＋ <%=rs("item2Num")%></td>
		<td class=TableBody1 width="12.5%" height="30" align=center><img src="YD_plus/YD_pet/PET/wp.gif" width="40" height="40" border="0" alt="武器升级材料"></td>
		<td class=TableBody1 width="12.5%" height="30" align=center> × <%=rs("item2")%></td>
		<td class=TableBody1 width="25%" height="30" align=center><input type="submit" value="升级"></td>
		<input type="hidden" name="action" value="upwna">
		<input type="hidden" name="type" value="2">
		<input type="hidden" name="num" value="<%=rs("item2")%>">
		</form>
	      </tr>
	      <tr>
		<form action="YD_petweaponshop.asp" method="post">
		<td class=TableBody1 width="25%" height="30" align=center><img height=30 src="YD_plus/YD_pet/PET/head/<%=rs("item3")%>.gif" alt="<%=headname%>"></td>
		<td class=TableBody1 width="25%" height="30" align=center>＋ <%=rs("item3Num")%></td>
		<td class=TableBody1 width="12.5%" height="30" align=center><img src="YD_plus/YD_pet/PET/am.gif" width="40" height="40" border="0" alt="防具升级材料"></td>
		<td class=TableBody1 width="12.5%" height="30" align=center> × <%=rs("item3")%></td>
		<td class=TableBody1 width="25%" height="30" align=center><input type="submit" value="升级"></td>
		<input type="hidden" name="action" value="upwna">
		<input type="hidden" name="type" value="3">
		<input type="hidden" name="num" value="<%=rs("item3")%>">
		</form>
	      </tr>
	      <tr>
		<form action="YD_petweaponshop.asp" method="post">
		<td class=TableBody1 width="25%" height="30" align=center><img height=30 src="YD_plus/YD_pet/PET/body/<%=rs("item4")%>.gif" alt="<%=bodyname%>"></td>
		<td class=TableBody1 width="25%" height="30" align=center>＋ <%=rs("item4Num")%></td>
		<td class=TableBody1 width="12.5%" height="30" align=center><img src="YD_plus/YD_pet/PET/am.gif" width="40" height="40" border="0" alt="防具升级材料"></td>
		<td class=TableBody1 width="12.5%" height="30" align=center> × <%=rs("item4")%></td>
		<td class=TableBody1 width="25%" height="30" align=center><input type="submit" value="升级"></td>
		<input type="hidden" name="action" value="upwna">
		<input type="hidden" name="type" value="4">
		<input type="hidden" name="num" value="<%=rs("item4")%>">
		</form>
	      </tr>
	      <tr>
		<form action="YD_petweaponshop.asp" method="post">
		<td class=TableBody1 width="25%" height="30" align=center><img height=30 src="YD_plus/YD_pet/PET/foot/<%=rs("item5")%>.gif" alt="<%=footname%>"></td>
		<td class=TableBody1 width="25%" height="30" align=center>＋ <%=rs("item5Num")%></td>
		<td class=TableBody1 width="12.5%" height="30" align=center><img src="YD_plus/YD_pet/PET/am.gif" width="40" height="40" border="0" alt="防具升级材料"></td>
		<td class=TableBody1 width="12.5%" height="30" align=center> × <%=rs("item5")%></td>
		<td class=TableBody1 width="25%" height="30" align=center><input type="submit" value="升级"></td>
		<input type="hidden" name="action" value="upwna">
		<input type="hidden" name="type" value="5">
		<input type="hidden" name="num" value="<%=rs("item5")%>">
		</form>
	      </tr>
	    </table>
	    <br>
	    <table class=tableborder1 style="width:530" cellspacing=1 cellpadding=3 align=center>
	      <tr>
		<th colspan=2 align=center>我目前拥有武器/防具升级材料</th>
	      </tr>
	      <tr>
		<td class=TableBody1 align=center><img src="YD_plus/YD_pet/PET/wp.gif" width="40" height="40" border="0" alt="武器升级材料"> × <%=weopitem%> 个</td>
		<td class=TableBody1 align=center><img src="YD_plus/YD_pet/PET/am.gif" width="40" height="40" border="0" alt="防具升级材料"> × <%=amoritem%> 个</td>
	      </tr>
	    </table>
<%
		rs.close
end sub
%>