品 牌 精 品 |
<% call Writeproductpp()%> |
|
|
|
<% Call WriteproductCatalog (classid) %>
|
|
|
|
<%
' =========================================
' 处理检索
if request("submit")<>"" then
classid=request("Aclassid")
anclassid=request("Ancatalogid")
Keyword = Replace (Trim (Request ("keyword")), "'", "''")
if anclassid="" then
if classid="" then
sql = "Select * From tproduct where mDel = 0 and tproduct like '%"& keyword & "%' and show=0 order by id "
else
sql = "Select * From tproduct where mDel = 0 and aclassid="&classid&" and tproduct like '%"& keyword & "%' and show=0 order by id "
end if
else
sql = "Select * From tproduct where mDel = 0 and aclassid="&classid&" and Anclassid="&anclassid&" and tproduct like '%"& keyword & "%' and show=0order by id "
end if
else
if classid="" then
if anclassid="" then
sql = "Select * From tproduct where mDel = 0 and show=0 order by id "
end if
else
if anclassid= "" then
sql = "Select * From tproduct where mDel = 0 and aclassid="&classid&" and show=0 order by id "
else
sql = "Select * From tproduct where mDel = 0 and aclassid="&classid&" and Anclassid="&anclassid&" and show=0 order by id "
end if
end if
end if
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 %>
>> |
|