| " > <%=objrs1("sitename")%>:: " ><%=objrs1("galleryname")%>::
<%response.write ""&catname1&""%>
|
<%
if catid=0 then
sql="select * from gallery order by id desc"
else
sql="select * from gallery where catid="&catid&" order by id desc"
end if
Set objrs= Server.CreateObject("ADODB.Recordset")
objrs.open sql,objconn,1,1
if objrs.eof then
response.write " | "
else
totalPut=objrs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showdown totalput,MaxPerPage,"default.asp"
else
if (currentPage-1)*MaxPerPage
<%sub showcontent
dim i
i=1%>
<%do while not objrs.eof and i < MaxPerPage
%>
<%Dim Column
Column = 0
Do WHILE column <> 3 AND not objrs.eof AND i <= MaxPerPage%>
|
|
<%
objrs.MoveNext
column = column + 1
i = i + 1
Loop%>
<%loop%>
<%
end sub
function showdown(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
Response.Write ""
response.write "| 图片总数:"&totalnumber&" 页面总数:"&n&" 当前页面:"¤tpage&""
if CurrentPage <> 1 Then
response.write "[<< 上一页] "
end if
if CurrentPage < n Then
response.write "[下一页 >>] "
end if
Response.Write ""
gotopage
end function
sub gotopage %>
<%end sub%>
|
|
 |