<%
' =========================================
' 处理检索
'
if request("submit2")<>"" then
IF intaclassid="" Then
sql = "Select * From tproduct where ttitle like '%" & strProductName & "%' and mDel = 0 and mPublish = 1 and webtype = 1 order by usernewsid desc"
Else
if intaclassid<>"" and intancatalogid="" then
sql = "Select * From tproduct where Aclassid = '"& intaclassid &"' and mDel = 0 and mPublish = 1 and webtype = 1 and ttitle like '%" & strProductName & "%' "
sql = sql & " Order by usernewsid desc"
else
sql = "Select * From tproduct where Aclassid = '"& intaclassid &"' and Anclassid='"& intancatalogid &"' and mDel = 0 and mPublish = 1 and webtype = 1 and ttitle like '%" & strProductName & "%' "
sql = sql & " Order by usernewsid desc"
end if
End If
else
sql = "Select * From tproduct where mDel = 0 and mPublish = 1 and webtype = 1 Order by usernewsid desc"
end if
'response.write sql
'response.end
Set objTemp = Server.CreateObject ("ADODB.Recordset")
objTemp.Open sql, objConn, 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
objTemp.AbsolutePage = CLng (intCurrentPage)
%>
<% If Clng (intCurrentPage) = 1 Then %>
首页 前页
<% ElseIf CLng (intCurrentPage) > 1 Then %>
[首页][前页]
<% End If %>
<% If Clng (intCurrentPage) = intTotalPageCount Then %>
[后页] [尾页]
<% ElseIf CLng (intCurrentPage) < intTotalPageCount Then %>
[后页][尾页]
<% End If %>
<%
Dim ii
For ii = 1 to objTemp.PageSize
If not objTemp.EOF Then
If ii mod 2 = 0 Then
iColorValue = "#f0f7fd"
Else
iColorValue = "white"
End If
%>
<% If Clng (intCurrentPage) = 1 Then %>
首页 前页
<% ElseIf CLng (intCurrentPage) > 1 Then %>
[首页][前页]
<% End If %>
<% If Clng (intCurrentPage) = intTotalPageCount Then %>
[后页] [尾页]
<% ElseIf CLng (intCurrentPage) < intTotalPageCount Then %>
[后页][尾页]
<% End If %>