<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Conn.asp"-->
<!--#include file="../Trade/Include/KR.CommonCls.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="content-type" content="text/html;charset=GBK">
<link href="/Css/index.css" type="text/css" rel="stylesheet">
<link href="/Trade/Css/Szc.css" type="text/css" rel="stylesheet">
</head>
<body><%
UserID=KR(request("UserID"))
sql="select * from KR_User where id='"&UserID&"'"
set rs=conn.execute(sql)
UserName=rs("UserName")
AddTime=rs("AddTime")
u=request("u")
select case u
case "Main"  call Main()
case "Title"  call Title()
case else
call Main()
end select
Sub Title()
%><div style="background:url(/Images/Public/tit_rep.gif);font-family:Verdana; height:29px; line-height:29px; font-size:14px; font-weight:bold;">“<%=UserName%>” 的<%=Lottery_Name%>历史记录</div>
<%
End Sub
Sub Main()
%>
<table class='tb' width='100%' cellspacing='0' cellpadding='0' border='0'>
<colgroup>
<col width='13%'>
<col width='13%'>
<col width='13%'>
<col width='11%'>
<col width='10%'>
<col width='10%'>
<col width='20%'>
<col width='10%'>
</colgroup>
<thead>
<tr class=''>
<th>游戏</th>
<th>方案号</th>
<th class='fa_money'>发起人</th>
<th>方案<%=Setting(56)%></th>
<th>投注<%=Setting(56)%></th>
<th>我的奖金</th>
<th>投注时间</th>
<th>查看</th>
</tr>
</thead>
<tbody><%
set rs1=server.createobject("ADODB.recordset")
sqlok="select * from KR_Bank_Back where username='"&UserName&"' and LotteryName='"&Lottery_Name&"' and follows like '%派奖%' order by id desc"
rs1.open sqlok,conn,1,1
page=1    ' 设置变量PAGE=1
rs1.PageSize = 10 '每页显示记录数
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
if Page > rs1.PageCount then '如果接收的页数大于总页数
rs1.AbsolutePage = rs1.PageCount '设置当前显示页等于最后页
elseif Page <= 0 then '如果page小于等于0
Page = 1 '设置PAGE等于第一页
else
rs1.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数 
end if
else
Page = 1
end if
For x = 1 to rs1.PageSize
if rs1.EOF then     
Exit For 
end if
i=i+1
%>
<tr>
<td class=splittd><%=Rs1("LotteryName")%></td>
<td><%=Rs1("LotteryID")%></td>
<td><%=Rs1("UserName")%></td>
<td class='fa_money'><%=Formatnumber(rs1("allmoney"),2,-1)%></td>
<td class='fa_money'><%=Formatnumber(rs1("Mainpaymoney"),2,-1)%></td>
<td class='fa_money'><%=Formatnumber(rs1("win_cost_get"),2,-1)%></td>
<td><%=rs1("addtime")%></td>
<td><a href="/Trade/<%=Lottery_Type%>/Project-Info.asp?id=<%=right(Rs1("LotteryID"),6)%>.html" target="_blank">查看</a></td>
</tr>
<%
rs1.movenext
next
%>
<tr> 
<td class="page" colspan="10" style="padding:8px;">
<%if page>1 then%>
<a class=h_l href='?lotid=<%=Lottery_ID%>&UserID=<%=UserID%>'>首页</a>
<a class=pre href='?lotid=<%=Lottery_ID%>&UserID=<%=UserID%>&page=<%=page-1%>'>上一页</a>
<%else%>
<a class=h_l>首页</a><a class=pre>上一页</a>
<%end if%>
<%if page<rs1.pagecount then %>
<a class=next href='?lotid=<%=Lottery_ID%>&UserID=<%=UserID%>&page=<%=page+1%>'>下一页</a>
<a class=h_l href='?lotid=<%=Lottery_ID%>&UserID=<%=UserID%>&page=<%=rs1.PageCount%>'>末页</a>
<%else%>
<a class=next>下一页</a><a class=h_l>末页</a>
<%end if%>
<SPAN class=gray><FONT color=#999999>当前第<%=page%></FONT>页，总共有<%=rs1.pagecount%>页，<%=rs1.recordcount%>条记录，每页<%=rs1.PageSize%>条</FONT></SPAN>
转到：<select name='gopage' onChange="javascript:location.href='?lotid=<%=Lottery_ID%>&UserID=<%=UserID%>&page=' + this.value">
<% for i=1 to rs1.PageCount
if page=i then 
selected="selected"
else
selected=""
end if%>
<option value='<%=i%>' <%=selected%>><%=i%></option>
<%next%>
</select> 页
</td>
</tr>
</tbody>
</table><%
End Sub
%>
</body>
</html>
