<table width="858" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="979" height="214" valign="top" background="images/cenbg.jpg"><table align="center" border="0" cellpadding="0" cellspacing="0" width="811">
<tr>
<td width="26"><img name="list" src="images/list.jpg" width="26" height="30" border="0" id="list" alt="" /></td>
<td background="images/bglist.jpg" width="367">PRODUCTS</td>
<td width="15" ><img name="list2" src="images/list2.jpg" width="15" height="30" border="0" id="list2" alt="" /></td>
<td width="288" background="images/small.jpg">&nbsp;</td>
<td width="77">&nbsp;</td>
<td width="10" height="30">&nbsp;</td>
</tr>
</table>
<br />
<table width="858" height="159" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="52">&nbsp;</td>
<td width="538" valign="top"><table width="500" height="136" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="488" valign="top">


<%id=request.QueryString("id")
if id="" then
exec="select * from list order by id desc"
else
exec="select * from list where piccatid in(select id from cat where pcatid="&id&") or piccatid="&id&" order by id desc"
end if

set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"现在还没有产品"
else
%>
<%
rs.PageSize=10
pagecount=rs.PageCount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
rssum=rs.recordcount
if page>rs.pagecount then
response.write"你输入的页不存在,请查正后在来"
response.end
end if
%>
<%for i=1 to rs.PageSize %>
<table width="100%" height="83" border="0" cellpadding="0" cellspacing="3" style="BORDER-bottom: #000000 1px dashed;">
<tr>
<td width="19%" align="center" bordercolor="#666666"><a href="view.asp?action=pro&id=<%= rs("id") %>" target="_blank"><img src="<%=rs("spic")%>" width="80" height="80" border="0" class="bk" /></a></td>
<td width="81%"><a href="view.asp?action=pro&id=<%= rs("id") %>" target="_blank" >
<h4><%=rs("name")%></h4>
</a> <%=unHtm(left(rs("exm"),130)&"……")%></td>
</tr>
</table>
<%
Rs.movenext
if rs.eof then
exit for
end if
next
%></td>
</tr>
<tr>
<td height="20" colspan="4" align="center"><%if id="" then
link="<a href=?page="
else
link="<a href=?id="&id&"&page="
end if%>There are<font color=red><%=rssum%></font>products||Altogether has<font color=red><%=pagecount%></font>pages, The present is<font color=red><%=page%></font>pages||
<%if rssum<rs.pagesize then%>
<%response.write"next||Last||Page one||The end"%>
<%elseif page=1 and rssum>rs.pagesize then%>
<%=link%><%=page+1%>><font color=#6633CC>next</font></a>|| Last||Page one||<%=link%><%=pagecount%>><font color=#9999ff>The end</font></a>
<%elseif page=pagecount and rssum>rs.pagesize then%>
next||<%=link%><%=page-1%>><font color=#3333cc>Last</font></a>|| <%=link%>1><font color=#cc99ff>Page one</font></a>||The end
<%else%>
<%=link%><%=page+1%>>next</a> ||<%=link%><%=page-1%>">Last</a>|| <%=link%>1>Page one</a>|| <%=link%><%=pagecount%>>The end</a>
<% end if%>
<% End If
rs.close
set rs=nothing%>
</td>
</tr>
</table></td>
<td width="268" height="16" valign="top"><table width="185" border="0" align="center" cellpadding="0" cellspacing="0" background="images/7.jpg">
<tbody>
<tr>
<td height="100%"></td>
</tr>
</tbody>
<%
id=request.QueryString("id")

if id="" then
exec="select * from cat where pcatid=0 order by list asc"
else
exec="select * from cat where pcatid="&id&" order by list asc"
end if
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then

exec="select * from cat where pcatid=0 order by list asc"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
if rs.eof then
response.write"<img src=img/a.gif width=10 height=10>现在还没有产品分类"
else%>
<%do while not rs.eof%>
<tr>
<td width="47">&nbsp;</td>
<td width="138" height="40"><a href="products.asp?action=lei&id=<%= rs("id") %>" class="BLANK" ><%=rs("catname")%></a></td>
</tr>
<%rs.movenext
loop
%>
<%end if%>

<%else%>
<%do while not rs.eof%>
<tr>
<td width="47">&nbsp;</td>
<td width="138" height="40"><a href="products.asp?action=lei&id=<%= rs("id") %>" class="BLANK" ><%=rs("catname")%></a></td>
</tr>
<%rs.movenext
loop
%>
<%end if%>
<%rs.close
set rs=nothing
%>
</table></td>
</tr>
</table></td>
</tr>
</table>





作者:Else 's Blog
地址:http://www.aixq.com/post/88/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
最后编辑: admin 编辑于2006/04/14 01:04
代码 程序 编程 | 评论(0) | 引用(0) | 阅读(2381)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写