<%mainborderlight = objrs1("mainborderlight") mainborderdark = objrs1("mainborderdark") mainbordersize = objrs1("mainbordersize") trback = objrs1("trback") tabwidth = objrs1("tabwidth") MaxPerPage=objrs1("number") %> <%=objrs1("sitename")%>::<%=objrs1("galleryname")%> <% dim totalPut dim CurrentPage dim TotalPages dim i,j dim catname catid=request("catid") if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if dim rscat dim catsql dim catid,catname1 if not isEmpty(request("catid")) then catid=request("catid") else catid=0 end if set rscat=server.createobject("adodb.recordset") catsql="select * from cat where catid="&catid&"" rscat.open catsql,objconn,1,1 if not rscat.eof then catname1=rscat("catname") else catname1="所有图片" end if rscat.close %>
精彩活动图片展示
<% 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%>
" >  <%=objrs1("sitename")%>:: " ><%=objrs1("galleryname")%>:: <%response.write ""&catname1&""%>
<%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%>
)"> <% if not isnull(objrs("thumb")) and objrs("thumb")<> "" then%> border=0> <%else%> <%end if%>
点击:<%=objrs("hits")%>
类别:<%=objrs("catname")%>
名称:<%=objrs("imagename")%>
大小:<%=objrs("size")%>kb
尺寸:<%=objrs("width")%>x<%=objrs("height")%>
评论数:( <% if objrs("reviewcount")<>0 then%> )"><%=objrs("reviewcount")%> <%else%> 0 <%end if%> )
日期:<%=objrs("dateandtime")%>
<% 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 %> method="POST" name=form1>
跳转页面: size="4" maxlength="4" style="font-size:9pt;background-color:#FFFFFF;border-left: 1px solid rgb(138,138,138); border-right: 1px solid rgb(138,138,138); border-top: 1px solid rgb(138,138,138); border-bottom: 1px solid rgb(138,138,138)">
查找图片:
<%end sub%>