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

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

if Instr(","&ballAdmin&",",","&myid&",") > 0 Or keys=1 Or keys=2 then
else
call error("权限不足！")
end if
response.write "【投注列表管理】<br/>"
response.write "<a href=""admin_ball.asp?TP=0&amp;sid="&sid&"&amp;saytk="&saytk&""">全部</a>"&chr(13)
response.write "<a href=""admin_ball.asp?TP=1&amp;sid="&sid&"&amp;saytk="&saytk&""">足球</a>"&chr(13)
response.write "<a href=""admin_ball.asp?TP=2&amp;sid="&sid&"&amp;saytk="&saytk&""">篮球</a>"&chr(13)
response.write "<a href=""admin_ball.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 balltype="&TP&" order by id desc",ydzqconn,1,1
  else
  rs1.open"select * from YD_vote 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="admin_ball.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 "[<a href='admin_ball_v.asp?id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>管理</a>] "

   Response.write ""&i+(page-1)*PageSize&"."
response.write"<a href=""admin_ball_v.asp?id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"
	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")<>"" and rs1("ballresult2")<>"" then
response.write "(结果"&rs1("ballresult1")&":"&rs1("ballresult2")&")"
Response.Write "[<a href='admin_ball_k.asp?id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>编辑</a>] "
else
Response.Write "[<a href='admin_ball_k.asp?id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>开出</a>] "
end if
'Response.Write "<a href='admin_ball_b.asp?id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>编辑投注</a>"
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?sid="&sid&"&amp;saytk="&saytk&"'>搜索</a><br/>"
Response.Write "<a href='admin_config.asp?sid="&sid&"&amp;saytk="&saytk&"'>投注设置</a> "
Response.Write "<a href='admin_balladd.asp?sid="&sid&"&amp;saytk="&saytk&"'>增加投注</a><br/>"
Response.Write "<a href='admin_config2.asp?sid="&sid&"&amp;saytk="&saytk&"'>设置管理</a> "
Response.Write "<a href='admin_ball_gg.asp?sid="&sid&"&amp;saytk="&saytk&"'>高级管理</a><br/>"
Response.write "<a href=""index.asp?sid="&sid&"&amp;saytk="&saytk&""">返回球类投注中心</a><br/>"
Response.write "<a href=""../show.asp?sid="&sid&"&amp;saytk="&saytk&""">地盘</a>&gt;&gt;<a href=""/bbs/index.asp?sid="&sid&"&amp;saytk="&saytk&""">社区首页</a><br/>(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
call headsay()%>