<table width="100%">
<tr>
<td width="218" align="left" style="padding-top:5px;">总页数:<font style="color:#FF0000;"><%=pagination.getTotalPage() %></font> 页 总记录数:<font style="color:#FF0000;"><%=StringTools.isEmpty(total)? 0 : total %></font> 条</td>
<td style="padding-top:5px;">
<div id="pagelist" class="scott2 fj">
<%
int startPage = pagination.getPageNo(); //开始页
int endPage = pagination.getPageNo() + 4;//结束页
int lastStartPage = pagination.getTotalPage() - 1 ;
int lastEndPage = pagination.getTotalPage();
boolean forlast = true;
if( startPage - 2 > 0)
{
endPage = pagination.getPageNo() + 2;
startPage = startPage - 2;
}
else
{
endPage = pagination.getPageNo() + 5 - startPage;
startPage = startPage - startPage / 2;
}
if ( endPage > lastEndPage - 2)
{
forlast = false;
startPage = lastEndPage - 6 ;
endPage =lastEndPage;
}
if (startPage < 1)
{
startPage = 1;
}
if (pagination.getPageNo() == 1)
{
%><span class="current">|<<</span><%
}
else
{
%><span><a href="<%=urlPage %>1" >|<<</a></span><%
}
for ( int i = startPage; i <= endPage ; i++)
{
%><span <%
if (pagination.getPageNo() == i )
{
%>class="current"><%=i%><%
}
else
{
%>><a href="<%=urlPage %><%=i%>"><%=i%></a><%
}
%></span><%
}
if (endPage + 1 < lastStartPage )
{
%>...<%
}
if (forlast)
{
for (int i = lastStartPage ; i <= lastEndPage ; i++)
{
%><a href="<%=urlPage %><%=i%>"><%=i%></a><%
}
}
if (pagination.getPageNo() == pagination.getTotalPage())
{
%><span class="current">>>|</span><%
}
else
{
%><span><a href="<%=urlPage %><%=pagination.getTotalPage() %>">>>|</a></span><%
}
%>
</div>
</td>
<td width="48" style="border-top: 0px dotted rgb(204, 204, 204); padding-top:5px;"><input id="pageNum" name="pageNum" οnkeyup="value=value.replace(/[^\d]/g,'')" type="text" style="width: 35px; height: 22px; text-align: center; line-height: 22px; border:#AACDE9 1px solid ; m-top:15px;"/></td>
<td align="right" style="padding:0; border-top: 0px dotted rgb(204, 204, 204);padding-top:5px;"><input type="button" style="color: rgb(15, 112, 145); background: url("<%=path %>/www/marketingcenter/images/go.gif") no-repeat scroll center top transparent; height: 22px; width: 22px; font-size: 12px; cursor: pointer;" οnclick="getPageNum('<%=urlPage %>','<%=lastEndPage%>');" value="GO"/></td>
</tr>
</table>
<tr>
<td width="218" align="left" style="padding-top:5px;">总页数:<font style="color:#FF0000;"><%=pagination.getTotalPage() %></font> 页 总记录数:<font style="color:#FF0000;"><%=StringTools.isEmpty(total)? 0 : total %></font> 条</td>
<td style="padding-top:5px;">
<div id="pagelist" class="scott2 fj">
<%
int startPage = pagination.getPageNo(); //开始页
int endPage = pagination.getPageNo() + 4;//结束页
int lastStartPage = pagination.getTotalPage() - 1 ;
int lastEndPage = pagination.getTotalPage();
boolean forlast = true;
if( startPage - 2 > 0)
{
endPage = pagination.getPageNo() + 2;
startPage = startPage - 2;
}
else
{
endPage = pagination.getPageNo() + 5 - startPage;
startPage = startPage - startPage / 2;
}
if ( endPage > lastEndPage - 2)
{
forlast = false;
startPage = lastEndPage - 6 ;
endPage =lastEndPage;
}
if (startPage < 1)
{
startPage = 1;
}
if (pagination.getPageNo() == 1)
{
%><span class="current">|<<</span><%
}
else
{
%><span><a href="<%=urlPage %>1" >|<<</a></span><%
}
for ( int i = startPage; i <= endPage ; i++)
{
%><span <%
if (pagination.getPageNo() == i )
{
%>class="current"><%=i%><%
}
else
{
%>><a href="<%=urlPage %><%=i%>"><%=i%></a><%
}
%></span><%
}
if (endPage + 1 < lastStartPage )
{
%>...<%
}
if (forlast)
{
for (int i = lastStartPage ; i <= lastEndPage ; i++)
{
%><a href="<%=urlPage %><%=i%>"><%=i%></a><%
}
}
if (pagination.getPageNo() == pagination.getTotalPage())
{
%><span class="current">>>|</span><%
}
else
{
%><span><a href="<%=urlPage %><%=pagination.getTotalPage() %>">>>|</a></span><%
}
%>
</div>
</td>
<td width="48" style="border-top: 0px dotted rgb(204, 204, 204); padding-top:5px;"><input id="pageNum" name="pageNum" οnkeyup="value=value.replace(/[^\d]/g,'')" type="text" style="width: 35px; height: 22px; text-align: center; line-height: 22px; border:#AACDE9 1px solid ; m-top:15px;"/></td>
<td align="right" style="padding:0; border-top: 0px dotted rgb(204, 204, 204);padding-top:5px;"><input type="button" style="color: rgb(15, 112, 145); background: url("<%=path %>/www/marketingcenter/images/go.gif") no-repeat scroll center top transparent; height: 22px; width: 22px; font-size: 12px; cursor: pointer;" οnclick="getPageNum('<%=urlPage %>','<%=lastEndPage%>');" value="GO"/></td>
</tr>
</table>