<!--#include file="../Inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="conn.asp"-->

<%'=============================
call head()
Call cardgame("球类投注中心",yanse12)

response.write "【历史投注比赛】<br/>"
response.write "<a href=""ball_r.asp?TP=0&amp;sid="&sid&"&amp;saytk="&saytk&""">全部</a>"&chr(13)
response.write "<a href=""ball_r.asp?TP=1&amp;sid="&sid&"&amp;saytk="&saytk&""">足球</a>"&chr(13)
response.write "<a href=""ball_r.asp?TP=2&amp;sid="&sid&"&amp;saytk="&saytk&""">篮球</a>"&chr(13)
response.write "<a href=""ball_r.asp?TP=3&amp;sid="&sid&"&amp;saytk="&saytk&""">其它</a><br/>"&chr(13)
dim TP
TP=trim(Request.Querystring("TP"))
if TP="" or Isnumeric(TP)=False then TP=0
TP=abs(TP)
  dim rs1
  set rs1=Server.CreateObject("ADODB.Recordset")
  if TP<>0 then
  rs1.open"select * from YD_vote where active=1 and balltype="&TP&" order by id desc",ydzqconn,1,1
  else
  rs1.open"select * from YD_vote where active=1  order by id desc",ydzqconn,1,1
  end if
 If not rs1.eof Then 
 Dim PageSize,i
	PageSize=10
	Dim Count,page,pagecount,gopage			
	gopage="ball_r.asp?TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs1.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
	rs1.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs1.eof Then Exit For	

response.write rs1("balltime1")&" "
response.write""&rs1("ballvote1")&"("&rs1("ballvotelu1")&")"&rs1("ballvote")&""&rs1("ballvote2")&"("&rs1("ballvotelu2")&")"
if rs1("ballresult1")<>"" and rs1("ballresult2")<>"" then
response.write "整场比分("&rs1("ballresult1")&":"&rs1("ballresult2")&")"
end if
response.write"<br/>"
rs1.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)

else
response.write "暂无历史记录！<br/>"
end if
rs1.close
set rs1=nothing
response.write "<a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">近期投注比赛</a><br/>"&chr(13)
response.write "<a href=""ball_h.asp?sid="&sid&"&amp;saytk="&saytk&""">规则说明</a>"&chr(13)

%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>