📄 product.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="dsn_root.asp" -->
<!-- #include file="func.inc.asp" -->
<%
dim cn, rs, sql
'指示当前活动的菜单项
set cn = Server.CreateObject("adodb.Connection")
set rs = Server.CreateObject("adodb.Recordset")
cn.Open mycnstr
pageno=Request.QueryString("pageno")
classcode=Request.QueryString("classcode")
if classcode="" then
sql="select classcode,parentcode,classname from product_class where parentcode<>'0' order by classcode"
else
sql="select classcode,parentcode,classname from product_class where classcode='"+classcode+"'"
end if
rs.Open sql,cn,0,1,1
if not rs.EOF then
classcode=rs(0)
parentcode=trim(rs(1))
classname=trim(rs(2))
else
Response.end
end if
rs.Close
%>
<!-- #include file="begin.asp" -->
<table width="1002" height="137" border="0" cellpadding="0" cellspacing="0" background="images/top_15.jpg">
<tr>
<td width="779"><img src="images/O2.jpg" width="779" height="137"></td>
<td width="223"> </td>
</tr>
</table>
<table width="1002" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="162" valign="top" bgcolor="#F4F4F4">
<!-- #include file="inc_productclass.asp" -->
</td>
<td width="617" valign="top" background="images/index4_15.jpg">
<table width="617" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13" height="31" background="images/index4_11.jpg"><img src="images/list2.jpg" width="5" height="31"></td>
<td width="604" valign="bottom" background="images/index4_11.jpg"> <table width="30%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" height="17"><img src="images/list.gif" width="14" height="13"></td>
<td width="88%"><%=classname%></td>
</tr>
<tr>
<td height="4" colspan="2"> </td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top">
<!-- #include file="inc_search2.asp" //-->
<%
sql = "select prono, title, protype, intro, price,picflag,picflag2 from product where state='1' and classcode='"+classcode+"' order by sortnum desc"
rs.Open sql,cn,1,1,1
pagesize = 4
rs.PageSize=pagesize
if not isnumeric(pageno) then
pageno = 1
else
pageno = cint(pageno)
end if
if pageno < 1 then pageno = 1
pagecount = rs.PageCount
reccount = rs.RecordCount
if pagecount > 0 then rs.AbsolutePage = pageno
i=1
do while not rs.EOF and i<=pagesize
%>
<table width="586" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="6"><img src="images/oeerrre_28.jpg" width="586" height="6"></td>
</tr>
<tr>
<td valign="top">
<table width="586" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="392" height="100" align="center" background="images/oeerrre_30.jpg">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%" align="center">
<%
if rs("picflag") = "1" then
if rs("picflag2") = "1" then
%>
<a href="admin/pic_displaybig.asp?code=product2&keyno=<%=rs("prono")%>" target="_blank" title="查看大图"><img src="admin/pic_display.asp?code=product&keyno=<%=rs("prono")%>" width="130" border="0"></a>
<%
else
%>
<img src="admin/pic_display.asp?code=product&keyno=<%=rs("prono")%>" width="130" border="0"></a>
<%
end if
else
%>
[暂无图片]
<%
end if
%>
</td>
<td width="64%" align="center">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15">
<img src="images/kk.gif" width="6" height="7"><strong><font color="#006300"> 产品名称:</font></strong><%=rs("title")%>
</td>
</tr>
<tr>
<td height="15">
<img src="images/kk.gif" width="6" height="7"></font><font color="#006300"><strong> 产品型号:</strong></font><%=rs("protype")%>
</td>
</tr>
<tr>
<td height="15">
<img src="images/kk.gif" width="6" height="7"><strong><font color="#006300"> 卖点功能:</font></strong><%=rs("intro")%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="194" align="right" valign="bottom" background="images/oeerrre_31.jpg">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" colspan="2">
<img src="images/kk.gif" width="6" height="9"> <font color="#006300"><strong>产品价格:<%=rs("price")%></strong></font>
</td>
</tr>
<tr>
<td colspan="2" align="center"> <a href="shopcart.asp?prono=<%=rs("prono")%>"><img src="images/tt2.jpg" width="102" height="26" border="0"></a></td>
</tr>
<tr>
<td><img src="images/kk.gif" width="6" height="9"> <a href="product_display.asp?prono=<%=rs("prono")%>" target="_blank" class="A4">点击查看详情</a></td>
<td align="right"><img src="images/oeerrre_35.jpg" width="45" height="33"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="8" background="images/oeerrre_37.jpg"> </td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"> </td>
</tr>
</table>
<%
i = i + 1
rs.MoveNext
loop
rs.Close
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="15"> </td>
</tr>
<tr>
<td height="1" bgcolor="#999999"></td>
</tr>
<tr>
<td height="5" bgcolor="#f5f5f5"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> <img src="images/jt.gif" width="23" height="11">共有<%=reccount%>个产品 [第<%=pageno%>页, 共<%=pagecount%>页]</td>
<td align="right">
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
if pageno > 1 then
%>
<td align="center"><img src="images/ditu2.gif" width="15" height="15"></td>
<td><a href="product.asp?classcode=<%=classcode%>&pageno=<%=pageno-1%>" class="A3">上一页</a></td>
<%
else
%>
<td align="center"><img src="images/ditu2.gif" width="15" height="15"></td>
<td>上一页</td>
<%
end if
if pageno < pagecount then
%>
<td align="center"><img src="images/ditu2.gif" width="15" height="15"></td>
<td><a href="product.asp?classcode=<%=classcode%>&pageno=<%=pageno+1%>" class="A3">下一页</a></td>
<%
else
%>
<td align="center"><img src="images/ditu2.gif" width="15" height="15"></td>
<td>下一页</td>
<%
end if
%>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10" colspan="2" align="right"></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="223" valign="top" background="images/list.jpg">
<!-- #include file="inc_hot.asp" //-->
</td>
</tr>
</table>
<!-- #include file="end.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -