<%
dir="../"
channel="product"
%><% action = "http://" & Request.ServerVariables("HTTP_HOST")%><!--#include file="../conn.asp"--><!--#include file="../sub.asp"-->
<% bid=request("bid")
sid=request("sid")
if bid<>"" then
p_name=conn.execute("select type_name from mm_product_bigclass where then
s_name=conn.execute("select type_name from mm_product_smallclass where then
s_name="产品中心"
end if%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<TITLE><%p_name%> <%=s_name%>--<%=enweb_name%></TITLE>
<!--#include file="../meta.inc"-->
<link rel="stylesheet" type="text/css" href="../jiasheng.css"/>
<SCRIPT language=JavaScript type=text/javascript src="jquery.js"></SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="preview.js"></SCRIPT>
</head>
<body>
<!--#include file="../top.asp"-->
<table width="984" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:30px">
<tr>
<td width="209" height="278" align="left" valign="top"><!--#include file="catalog.asp"-->
</td>
<td align="center" valign="top"><table width="770" height="320" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" class="table" height="40"><img src="../images/icon.jpg" width="19" height="24" /><img src="../images/products.gif" width="130" height="22" /></td>
</tr>
<tr>
<td align="left" valign="top" class="font13" style=" padding-top:10px; padding-bottom:10px;">
<%const recpage=12
if not isempty(request("page")) then
currentpage=cint(request("page"))
else
currentpage=1
end if
if request("page")="" or request("page")<1 then
currentpage=1
end if
sql1=""
if bid<>"" then
sql1=" and product_bigclass="&bid&" "
end if
if sid<>"" then
sql1=" and product_smallclass="&sid&" "
end if
set rs=server.createobject("adodb.recordset")
rs.open "select count(*) AS co from product where 1=1 "&sql1,conn,3,1
allrec=rs("co")
totalpage=int((allrec+recpage-1)/recpage)
rs.close
set rs=nothing
set rs=server.createobject("adodb.recordset")
if currentpage=1 then
sql="select top "&recpage&" * from product where 1=1 "&sql1&" order by id desc"
else
sql="select top "&recpage&" * from product where 1=1 and id not in (select top "&(recpage*(currentpage-1))&" id from product where 1=1 "&sql1&" order by id desc) "&sql1&" order by id desc"
end if
rs.open sql,conn,1,1
%> <%do while not rs.eof%>
<div class="productdiv">
<div )%></a></span></div>
<%
rs.movenext
loop
%></td>
</tr>
<tr>
<td height="40" align="center" valign="middle" class="font13" style="padding-left:4px; border-top:#CCCCCC 1px solid"><div class="page">
<form method="post" name="forms"
End If
Next
n=currentpage+1
p=currentpage-1
if p<= 0 then
p=1
end if
if n>= totalpage then
n=totalpage
end if
minpage=currentpage-5
maxpage=currentpage+5
if minpage<= 0 then
minpage=1
maxpage=10
end if
if maxpage >totalpage then
maxpage=totalpage
minpage=maxpage-9
if minpage<= 0 then
minpage=1
end if
end if
%>
<div class="scott" >
<div align="center">
<%
response.write(" Total<font color=red> "&allrec&" </font>个")
response.Write(" Page <font color=red>"¤tpage&"</font>/<font color=red>"&totalpage&"</font> ")
%>
<% if currentpage<>1 then %>
<a href="index.asp?<%=temp%>page=<%=p%>" style="margin-right:5px;"> < </a>
<%else%>
<a style="margin-right:5px;"> < </a>
<%end if%>
<%
i=1
for page=minpage to maxpage
if page=currentpage then
%>
<span class="current"><%=page%></span>
<%else%>
<a href="index.asp?<%=temp%>page=<%=page%>" style="color:#FFFFFF"><%=page%></a>
<%
end if
i=i+1
next
if currentpage<totalpage then
%>
<a href="index.asp?<%=temp%>page=<%=n%>"> > </a>
<%else%>
<a > > </a>
<%end if%>
<select name="menu1" onChange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}" class="input1">
<%for i=1 to totalpage %>
<option value="index.asp?<%=temp%>page=<%=i%>" <%if i=currentpage then%> selected="selected" <%end if%>><%=i%></option>
<%next%>
</select>
</div>
</div>
</form>
</div></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="../bottom.asp"-->
</body>
</html>