<%
urllink="&ddd=" & ddd
pagenc=2 '--------------------每页显示的分页页码数量=pagenc*2+1
jilusum=100 '-----------------获取记录总数
pages=12 '--------------------每页条数
if request("page")="" then
page=1
else
page=int(request("page"))
end if
min=(page - 1) * pages + 1
max=page * pages
myself=request.servervariables("path_info")
if jilusum mod pages=0 then
pagec=int(jilusum / pages)
else
pagec=int(jilusum / pages)+1
end if
%>
<table cellspacing="0" border="1" width="100%" bgcolor="#CCCCCC" style="border-collapse: collapse" bordercolor="#666666">
<tr>
<td bgcolor="#E6E8FA" align="center" height="30"><font color="#FF0000">年</font></td>
<td bgcolor="#E6E8FA" align="center" height="30"><font color="#FF0000">查看获奖人</font></td>
<td bgcolor="#E6E8FA" align="center" height="30"><font color="#FF0000">分红操作</font></td>
</tr>
<%
for i=min to max
if i <= jilusum then
%>
<tr>
<td bgcolor="#FAFAFA" align="center" height="20"><%=i%></td>
<td bgcolor="#FAFAFA" align="center" height="20"></td>
<td bgcolor="#FAFAFA" align="center" height="20"></td>
</tr>
<%
else
exit for
end if
next
%>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="zw">
<tr align="center">
<td align="left" bgcolor="#E6E8FA">共<strong><font color="#0000ff"><%=jilusum%></font></strong>条,第<strong><font color="#0000ff"><%=page%>/<%=pagec%></font></strong>页,每页<strong><font color="#0000ff"><%=pages%></font></strong>条</td>
<td align="right" bgcolor="#E6E8FA">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="zw">
<tr align="center">
<td align="right">
<%
pagenmin=page-pagenc'------------------------计算页码开始值
pagenmax=page+pagenc'------------------------计算页码结束值
if pagenmin < 1 then pagenmin=1
if page > 1 then response.write ("<a href='"& myself &"?page=1" & urllink &"'>首页</a> ")
if pagenmin > 1 then response.write ("<a href='"& myself &"?page="& page-1 & urllink &"'>前页</a> ")
if pagenmax > pagec then pagenmax=pagec
for i = pagenmin to pagenmax
if i = page then
response.write ("<font color='#990000'><strong>"& i &"</strong></font> ")
else
response.write ("[<a href="& myself &"?page="& i & urllink &">"& i &"</a>] ")
end if
next
if pagenmax < pagec then response.write ("<a href='"& myself &"?page="& page+1 & urllink &"'>后页</a> ")
if page < pagec then response.write ("<a href='"& myself &"?page="& pagec & urllink &"'>尾页</a> ")
%>
跳转→
<select onchange="window.open(this.value,'_self')" size="1" style="background-color: #e4e8fa; color:#333333; font-size:12px" name="page">
<option value="<%=myself%>?page=<%=i%><%=urllink%>" selected><%=page%>/<%=pagec%></option>
<% for i=1 to pagec%>
<option value="<%=myself%>?page=<%=i%><%=urllink%>"><%=i%>/<%=pagec%></option>
<% next %></select> </td>
</tr>
</table>
</td>
</tr>
</table>