sp; dim k
%>
<tr align="center" valign="middle">
<td width="25%">ID1</td>
<td width="25%">name1</td>
<td width="25%">ID2</td>
<td width="25%">name2</td>
</tr>
<%do while not rs.eof and rowcount > 0%>
<tr align="center" valign="middle">
<td width="25%"><%=rs("id")%></td>
<td width="25%"><%=rs("testname")%></td>
<td>
<%
rowcount=rowcount-1
rs.MoveNext
if not rs.EOF then
%>
<%=rs("id")%>
</td>
<td width="25%"><%=rs("testname")%></td>
</tr>
<%
rowcount=rowcount-1
rs.MoveNext
else
Response.Write " </td><td> </td></tr>"
end if
loop
end if
end if
rs.close
set rs=nothing
%>
</table>
<table border="0" align="center">
<tr>
<td align="center" valign="middle">
<%call listPages()%>
</td>
</tr>
</table>
</body>
</html>
<%
sub listPages()
if n <= 1 then exit sub
for i=0 to nmsg_per_page-1
for j=1 to msg_per_page
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">[<% =i*msg_per_page+j %>]</a></font>
<%
next
next
EndPage = n mod msg_per_page
for j=1 to EndPage
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">[<% =i*msg_per_page+j %>]</a></font>
<%next%>
<font color=black face="arial" >
  Page:<%=currentpage%>/<%=n%>pages  <%=msg_per_page%>notes/page   Total:<%=totalrec%>notes</font>
<%end sub%>
%>
<tr align="center" valign="middle">
<td width="25%">ID1</td>
<td width="25%">name1</td>
<td width="25%">ID2</td>
<td width="25%">name2</td>
</tr>
<%do while not rs.eof and rowcount > 0%>
<tr align="center" valign="middle">
<td width="25%"><%=rs("id")%></td>
<td width="25%"><%=rs("testname")%></td>
<td>
<%
rowcount=rowcount-1
rs.MoveNext
if not rs.EOF then
%>
<%=rs("id")%>
</td>
<td width="25%"><%=rs("testname")%></td>
</tr>
<%
rowcount=rowcount-1
rs.MoveNext
else
Response.Write " </td><td> </td></tr>"
end if
loop
end if
end if
rs.close
set rs=nothing
%>
</table>
<table border="0" align="center">
<tr>
<td align="center" valign="middle">
<%call listPages()%>
</td>
</tr>
</table>
</body>
</html>
<%
sub listPages()
if n <= 1 then exit sub
for i=0 to nmsg_per_page-1
for j=1 to msg_per_page
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<%=i*msg_per_page+j %>">[<% =i*msg_per_page+j %>]</a></font>
<%
next
next
EndPage = n mod msg_per_page
for j=1 to EndPage
%>
<font size="2" color="#006600">
<a href="<%=request.ServerVariables("script_name")%>?page=<% =i*msg_per_page+j %>">[<% =i*msg_per_page+j %>]</a></font>
<%next%>
<font color=black face="arial" >
  Page:<%=currentpage%>/<%=n%>pages  <%=msg_per_page%>notes/page   Total:<%=totalrec%>notes</font>
<%end sub%>