<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq1.asp"-->
<!--#include file="conn.asp"-->
<%
'=============================
call head()



Dim p,gettxt,yd
TP=trim(request.querystring("TP"))
if TP="" or Isnumeric(TP)= false then TP=0
TP=clng(TP)
if TP=1 then 
gettxt=" where jbnum>0 order by jbnum desc"
yd="财神榜单"
else
gettxt="where clng(votenum)>0 order by abs(votenum) desc"
yd="赌神榜单"
end If
Call cardgame(""&yd&"",yanse12)

dim myjbnum,myvotenum
myjbnum=0
myvotenum=0
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select jbnum,votenum from YD_plist where userid="&myid,ydzqconn,1,1
if not rs.eof then
myjbnum = rs("jbnum")
myvotenum = rs("votenum")
end if
rs.close
set rs=nothing

if TP=1 then
response.write "【买球彩财神榜单】<br/>"

response.write "您现在的获利是"&myjbnum&"<br/>"

response.write "财神榜|<a href=""ball_l.asp?TP=2&amp;sid="&sid&"&amp;saytk="&saytk&""">赌神榜</a><br/>"
else
response.write "【买球彩赌神榜单】<br/>"
response.write "您现在的胜率是"&myvotenum&"<br/>"

response.write "输一场扣1点,输半扣0.5点,平盘不扣,赢盘和赢半都加1点<br/>"
response.write "<a href=""ball_l.asp?TP=1&amp;sid="&sid&"&amp;saytk="&saytk&""">财神榜</a>|赌神榜<br/>"
end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select jbnum,votenum,id,userid from YD_plist  "&gettxt&"",ydzqconn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="ball_l.asp?TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For
   Response.write "[第"&i+(page-1)*PageSize&"名]."
   dim ballusername
set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select name from users where id="&rs("userid")&"",conn,1,1
   if not rs1.eof then
   ballusername=rs1("name")
   end if
   rs1.close
   set rs1=nothing
   if TP=1 then
   Response.write "<a href=""../uinfo.asp?id="&rs("userid")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(ballusername)&"(ID:"&ubb(rs("userid"))&")</a>,获利"&getcent&"<b>"&rs("jbnum")&"</b><br/>"
   else
   Response.write "<a href=""../uinfo.asp?id="&rs("userid")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(ballusername)&"(ID:"&ubb(rs("userid"))&")</a>,获胜点<b>"&rs("votenum")&"</b><br/>"
  end if
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下一页</a>"&chr(13)
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上一页</a>"&chr(13)

response.write "<br/>("&page&"/"&pagecount&")共"&count&"人"
if saytk=1 then
	if pagecount>1 then response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""2""/><a href="""&gopage&"page=$(page)"">页</a>"
end if
Else
response.write"暂时没有记录！"
end if
rs.close
set rs=nothing
conn.close
set conn=Nothing
ydzqconn.close
set ydzqconn=Nothing
   Response.write "<br/>------------<br/>"
response.write "<a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">返回球类投注中心</a>"
%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>