<!--#include file="inc.asp"-->
<!--#include file="conn.asp"-->
<card title="球类投注后台">
<p>
<%

'统一日期
Function fordate3(riqi)
if IsDate(riqi) = True then
   fordate3 =""
  fordate3 = fordate3&month(riqi) & "月"
  fordate3 = fordate3&day(riqi)&"日"
end if
End Function

response.write "【投注列表管理】<br/>"
response.write "<a href=""admin_ball.asp?TP=0&amp;saytk="&saytk&"&amp;sid="&sid&""">全部</a>"&chr(13)
response.write "<a href=""admin_ball.asp?TP=1&amp;saytk="&saytk&"&amp;sid="&sid&""">足球</a>"&chr(13)
response.write "<a href=""admin_ball.asp?TP=2&amp;saytk="&saytk&"&amp;sid="&sid&""">篮球</a>"&chr(13)
response.write "<a href=""admin_ball.asp?TP=3&amp;saytk="&saytk&"&amp;sid="&sid&""">其它</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 balltype="&TP&" order by balltime1 desc",ydzqconn,1,1
  else
  rs1.open"select * from YD_vote order by balltime1 desc ",ydzqconn,1,1
  end if
 If not rs1.eof Then 
 Dim PageSize,i
	PageSize=20
	Dim Count,page,pagecount,gopage			
	gopage="admin_ball.asp?TP="&TP&"&amp;saytk="&saytk&"&amp;sid="&sid&"&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	
	
   if jinday<>fordate3(rs1("balltime1")) then
   response.write fordate3(rs1("balltime1"))&"<br/>"
   end if
   
Response.Write "[<a href='admin_ball_v.asp?id="&rs1("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>管理</a>] "

   Response.write ""&i+(page-1)*PageSize&"."
response.write"<a href=""admin_ball_v.asp?id="&rs1("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"
	if rs1("active")=1 then
response.write"＾"
	end if
response.write fordate2(rs1("balltime1"))&" "
response.write""&rs1("ballvote1")&"VS"&rs1("ballvote2")&"</a>"
if rs1("ballresult1")<>"0" and rs1("ballresult2")<>"0" then
response.write "(结果"&rs1("ballresult1")&":"&rs1("ballresult2")&")"
Response.Write "[<a href='admin_ball_k.asp?id="&rs1("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>编辑</a>] "
else
Response.Write "[<a href='admin_ball_k.asp?id="&rs1("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>开出</a>] "
end if
'Response.Write "<a href='admin_ball_b.asp?id="&rs1("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>编辑投注</a>"
jinday=fordate3(rs1("balltime1"))
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)
if pagecount>1 then response.write"<br/>"
	end if
rs1.close
set rs1=nothing
Response.Write "【常规管理】<a href='admin_so.asp?saytk="&saytk&"&amp;sid="&sid&"'>搜索</a><br/>"
Response.Write "<a href='admin_config.asp?saytk="&saytk&"&amp;sid="&sid&"'>投注设置</a> "
Response.Write "<a href='admin_balladd.asp?saytk="&saytk&"&amp;sid="&sid&"'>增加投注</a><br/>"
Response.Write "<a href='admin_config2.asp?saytk="&saytk&"&amp;sid="&sid&"'>设置管理</a> "
Response.Write "<a href='admin_ball_gg.asp?saytk="&saytk&"&amp;sid="&sid&"'>高级管理</a><br/>"
%>
<!--#include file="fanhui.asp"-->
<br/></p></card></wml>