<% if session("username")="" then Response.Redirect("login.asp") end if %> <% 'if request("pass") = 1 then ' Response.Write("Password Successfuly changed...") 'end if %> Choose Opponent
 
<% chkmenu=10 %>
<% set rs = Server.CreateObject("ADODB.RECORDSET") rs.open "SELECT UserPetTable.* FROM UserPetTable INNER JOIN opponenttable ON UserPetTable.userPetId = opponenttable.userpetid WHERE (((opponenttable.userpetid)=" & session("petselected") &") or ((UserPetTable.userid)="&session("userid")&"));",conn if not rs.eof then Response.Redirect("chooseopp.asp?w=1") end if rs.close if request("alltime") = "" then alltime = 0 else alltime = clng(request("alltime")) if alltime < 0 then alltime = 0 end if end if %> <%if request("nem") = 1 then%> <%end if%>
  Choose An Opponent To Fight With
You don't have enough money to except that bet.
<% set rswin = Server.CreateObject("ADODB.RECORDSET") rswin.open "SELECT UserPetTable.userpetName, PetTable.petName, opponenttable.userpetid, opponenttable.Betamount FROM PetTable INNER JOIN (opponenttable INNER JOIN UserPetTable ON opponenttable.userpetid = UserPetTable.userPetId) ON PetTable.petId = UserPetTable.petId GROUP BY UserPetTable.userpetName, PetTable.petName, opponenttable.userpetid, opponenttable.Betamount;",conn,3,2 if not rswin.eof then rswin.move clng(alltime)+0,1 end if %> <%if rswin.eof then%> <%end if%> <%for i=1 to 5 if not rswin.eof then alltime= alltime + 1 %> <% end if rswin.movenext End if Next %>
Pet Name Type Wins Loses Wp.Types Wps. Wps. Cost Bet
Sorry No Opponents Avaialable.
&betamount=<%=rswin("betamount")%>"><%=rswin("userpetname")%> <%=rswin("PetName")%> <%set rsw = Server.CreateObject("Adodb.recordset") rsw.open "select count(userpetid) as cnt from fighthistorytable where result = 'WIN' and userpetid="& rswin("userpetid"),conn if not rsw.eof then Response.Write(rsw("cnt")) end if %> <%set rsl = Server.CreateObject("Adodb.recordset") rsl.open "select count(userpetid) as cnt from fighthistorytable where result = 'LOSE' and userpetid="& rswin("userpetid"),conn if not rsl.eof then Response.Write(rsl("cnt")) end if %> <%set rst = Server.CreateObject("ADODB.RECORDSET") rst.open "SELECT Count(weaponPetTable.weaponId) AS CountOfweaponId, Sum(weaponPetTable.cost) AS SumOfcost, Count(weapontable.levelId) AS CountOflevelId FROM weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId GROUP BY weaponPetTable.userpetId HAVING (((weaponPetTable.userpetId)="&rswin("userpetid")&"));",conn if not rst.eof then %> <%=rst("CountOflevelId")%> <%=rst("CountOfweaponId")%> <%=rst("SumOfcost")%> <%=rswin("betamount")%>
<%if alltime > 5 then%> <   <%else%> < <%end if%> <%if not rswin.eof then%> > <%else%> > <%end if%>




INSTRUCTIONS

Opponents who setup a battle are listed above. To fight against one of these pets, simply click the link for the pet you wish to battle. The chart above shows the different pets that are waiting to battle, along with stats about each pet. The bet amount that is listed next to each pet is the amount that you have to put up to fight. If you win, then you win your money back along with the same amount from the other pet. But if you lose, then you lose the amount you put up for the bet.

Good Luck in your battle!!!


<%set rspett = Server.CreateObject("ADODB.RECORDSET") rspett.open "SELECT UserPetTable.userPetname,UserPetTable.energylevel, PetTable.smallimg FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userPetId)=" & session("petselected") & "));",conn %>
" width="34" height="34">
Pet Name <%=rspett("userpetname")%>
Energy Level <%=rspett("energylevel")%>
No. of Weapons <% rspett.close rspett.open "select count(weaponpetid) as totalc,sum(cost) as total from weaponpettable where userpetid="& session("petselected") ,conn if not rspett.eof then%> <%=rspett("totalc")%> <%end if%>
Weapons Worth $ <%if not rspett.eof then%> <%=rspett("total")%> <%end if%>