%
dim Titletop,c
c=3
Titletop = "案例展示" '########### 网页名称
%>
<%=Titletop%>:<%=webname%>-<%=VPcopyright%>
<%
Const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(SafeRequest("page",1)) then
currentPage=Cint(SafeRequest("page",1))
else
currentPage=1
end if
set rs = server.CreateObject("adodb.recordset")
if nameSearch="" then
if SafeRequest("cid",1)="" then
rs.open "select id,name,adddate,pic,detail,content,contentt from product order by viewnum desc",conn,1,1
else
rs.open "select id,name,adddate,pic,detail,content,contentt from product where sortsid="&cid&" order by viewnum desc",conn,1,1
end if
else
if search_name=0 then
rs.open "select id,name,adddate,pic,detail,content,contentt from product where name like '%"&nameSearch&"%' order by viewnum desc",conn,1,1
else
rs.open "select id,name,adddate,pic,detail,content,contentt from product where name like '%"&nameSearch&"%' order by viewnum desc",conn,1,1
end if
end if
if rs.eof And rs.bof then
Response.Write " 对不起,此分类暂时还没有内容! | "
else
totalPut=rs.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
showpage totalput,MaxPerPage,"Product.asp"
else
if (currentPage-1)*MaxPerPage
|
<% if row_count mod 4 =0 then
response.write ""
end if
i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
row_count=row_count+1
loop
rs.close
set rs=nothing
%>
<%
End Sub
Function showpage(totalnumber,maxperpage,filename)
Dim n
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
if cid<>"" then %>
<% End Function %>
|