品牌精品 |
|
<% call Writeproductpp()%>
|
|
.gif) |
|
|
|
|
<%
' =========================================
' 处理检索
sql = "Select * From tproduct where mDel = 0 and recommend=2 and show=0 order by tproduct_bh desc"
'sql = "Select tp.id,tp.tproduct,tp.tproduct_bh,tp.tprice,tp.tpricenet,tp.tprice1,tp.tprice2,tp.tprice3,tp.tprice4 From tproduct tp,tproduct_tj tj where tp.tproduct_bh=tj.tproduct_bh and tp.mDel = 0 and tp.show=0 and tj.ptype=3 Order by tj.porder DESC"
Set objTemp = Server.CreateObject ("ADODB.Recordset")
objTemp.Open sql, Conn, 1, 1
'response.write sql
If not objTemp.EOF Then
intTotalNum = objTemp.RecordCount
objTemp.PageSize = intPageSize
intTotalPageCount = objTemp.PageCount
intCurrentPage = Request("current")
If IsNumeric (intCurrentPage) Then
If CLng (intCurrentPage) = 0 Then
intCurrentPage = 1
ElseIf Clng (intCurrentPage) > intTotalPageCount Then
intCurrentPage = CLng (intTotalPageCount)
Else
intCurrentPage = Clng (intCurrentPage)
End If
Else
intCurrentPage = 1
End If
startpage=intCurrentPage-5
if startpage<1 then
startpage=1
end if
endpage=intCurrentPage+5
if endpage>objTemp.pagecount then
endpage=objTemp.pagecount
end if
objTemp.AbsolutePage = CLng (intCurrentPage)
%>
第
<% = intCurrentPage %>
页/共
<% = intTotalPageCount %>
页 共
<% = intTotalNum %>
条记录 |
<<
<%
for go=startpage to endpage
if go=intCurrentPage then%>
<%=go%>
<%else %>
<%=go%>
<% end if
next %>
>> |
<%
irecordsshown = 0
do while irecordsshown < 15 and NOT objtemp.EOF
%>
<% If not objTemp.EOF Then%>
|
<%irecordsshown =irecordsshown +1
objtemp.movenext
end if%>
<% If not objTemp.EOF Then%>
|
<%irecordsshown = irecordsshown +1
objtemp.movenext
end if%>
<% If not objTemp.EOF Then%>
|
<%irecordsshown = irecordsshown +1
objtemp.movenext
end if%>
|
<%'End If
'objTemp.MoveNext
loop
%>
|
<%
End If
objTemp.Close
Set objTemp = Nothing
%>
|
|
第
<% = intCurrentPage %>
页/共
<% = intTotalPageCount %>
页 共
<% = intTotalNum %>
条记录 |
<<
<%
for go=startpage to endpage
if go=intCurrentPage then%>
<%=go%>
<%else %>
<%=go%>
<% end if
next %>
>> |
|