function pageList()
dim i
if page<1 then
page=1
end if
if pagecount<1 then
pagecount=1
end if
pageList="<table border=0 width=500 cellspacing=0 cellpadding=3 align=center>"
pageList=pageList & "<tr><td width=200 style='letter-spacing: 1'>共有主题 <font color=#FF0000>"& totalput &"</font> 个,共 <font color=#FF0000>"&n &"</font> 页 </td>"
pageList=pageList & "<td width=150 style='letter-spacing: 1' align=center>"
if page=1 then
pageList=pageList & " [前一页] "
else
pageList=pageList & " <a href=?page="& (page-1) &">[前一页]</a>"
end if
if n-page=0 then
pageList=pageList & "[下一页]"
else
pageList=pageList & " <a href=?page="& (page+1) &"> [下一页] </a>"
end if
'pagecount=2
p=int(page/pageLinkNum)
if page mod pageLinkNum>0 then
p=p+1
end if
p=(p-1)*pageLinkNum+1
'response.write p
'response.end
i=p+(pageLinkNum-1)
if i> n then
i=n
end if
if p>pageLinkNum then
pageList=pageList & "<a href='?page="&p-1&"'>[<<]</a>"
end if
do while p<=i
if p=page then
pageList=pageList & "["&p&"]"
else
pageList=pageList & "<a href='?page="&p&"'>["&p&"]</a>"
end if
p=p+1
loop
p=p-1
if p< n then
pageList=pageList & "<a href='?page="&(p+1)&"'>[>>]</a>"
end if
pageList=pageList & "</td></tr></table>"
end function %>
if trim(request("Page"))<>"" then
CurrentPage=CInt(request("Page"))
if CurrentPage>salers.PageCount then
CurrentPage=salers.PageCount
end if
else
CurrentPage=1
end if
if salers.EOF then
Response.Write "<p align='center'>ERROR!<BR>No record found!</p>"
else
ttotalPut=salers.RecordCount
if CurrentPage<>1 then
if (CurrentPage-1)*MMaxPerPage<ttotalPut then
salers.Move(CurrentPage-1)*MMaxPerPage
bookmark=salers.Bookmark
end if
end if
end if
if (ttotalPut mod MMaxPerPage)=0 then
mm=ttotalPut\MMaxPerPage
else
mm=ttotalPut\MMaxPerPage+1
end if
if (ttotalPut mod (MMaxPerPage*10))=0 then
nn=ttotalPut\(MMaxPerPage*10)
else
nn=ttotalPut\(MMaxPerPage*10)+1
end if
%>
<%
k=0
for y=(page-1)*30+1 to (page-1)*30+30
if not salers.EOF then
if (k mod 2)=0 then
%>
<tr bgcolor="#F6F6F6" onmouseover="javascript:this.style.background='#B5C6F7'" onmouseout="javascript:this.style.background='#F6F6F6'" ondblClick="MM_openBrWindow('../sales/mingxi.asp?id=<%=salers("number")%>','','width=600,height=330')">
<% else %>
<tr bgcolor=white onmouseover="javascript:this.style.background='#B5C6F7'" onmouseout="javascript:this.style.background='white'" ondblClick="MM_openBrWindow('../sales/mingxi.asp?id=<%=salers("number")%>','','width=600,height=330')">
<% end if %>
<td align=center valign=middle><font size=2><%=salers("number")%></font></td>
<td align=center valign=middle><font size=2><%=salers("writedate")%></font></td>
<td align=center valign=middle><font color=red size=2>促销中</font></td>
<td align=left valign=middle><font size=2><%=salers("marktename")%></font></td>
<td align=center valign=middle><font size=2><%=salers("startdate")%></font></td>
<td align=center valign=middle><font size=2><%=salers("enddate")%></font></td>
<td align=center valign=middle><font size=2><%=salers("mode")%></font></td>
</tr>
<% k=k+1
else
exit for
end if
salers.MoveNext
next
%>
<tr align=center valign=middle bgcolor=gainsboro>
<td colspan=8>
<font size=2>共有促销记录</font><font size=2 color=red><b> <%=salers.recordcount%> </b></font><font size=2>条</font>
<%
if (CurrentPage mod 10)=0 then
kk=CurrentPage\10-1
else
kk=CurrentPage\10
end if
if nn>1 and CurrentPage>10 then
Response.Write "<b><a href='../sales/saleslist.asp?page="+CStr((kk-1)*10+1)+"'>Previous</a></b>"
end if
for ii=1 to 10
jj=kk*10+ii
if jj<=mm then
if jj=CurrentPage then
Response.Write "| "+CStr(jj)
else
Response.Write " | <b>"+"<a href='../sales/saleslist.asp?page="+CStr(jj)+"'>"+CStr(jj)+"</a></b>"
end if
end if
next
Response.Write "| "
if kk<nn-1 then
Response.Write " <b>"+"<a href='../sales/saleslist.asp?page="+CStr((kk+1)*10+1)+"'>Next</a></b>"
end if
%>