📄 product_list.asp
字号:
<%
dim key,toppath,dbpath
toppath="../"
dbpath="../"
%>
<!--#include file="../db_conn.asp" -->
<!--#include file="../include/shopsub.asp" -->
<!--#include file="../my_lib/my_request.asp" -->
<!--#include file="../my_lib/pages.asp" -->
<!--#include file="../my_lib/char.asp" -->
<%
id=cint(my_request("id",1))
sql="update yqj_product set hitnums=hitnums+1 where id="&id
conn.execute (sql)
sql="select id,bid,sid,p_name,p_spec,p_unit,p_nums,p_cmoney,p_mmoney,big_pic,small_pic,content,flag,addtime,hitnums from yqj_product where id="&id&" and issale=1"
set rs=conn.execute (sql)
idd=rs("id")
bid=rs("bid")
sid=rs("sid")
p_name=rs("p_name")
p_spec=rs("p_spec")
p_unit=rs("p_unit")
p_nums=rs("p_nums")
p_cmoney=rs("p_cmoney")
p_mmoney=rs("p_mmoney")
big_pic=rs("big_pic")
small_pic=rs("small_pic")
content=rs("content")
flag=rs("flag")
addtime=rs("addtime")
hitnums=rs("hitnums")
rs.close
set rs=nothing
sqlb="select txt_big_class from big_class where id="&bid
sqls="select txt_small_class from small_class where id="&sid
set rs=conn.execute (sqlb)
txt_big_class=rs("txt_big_class")
rs.close
set rs=nothing
set rs=conn.execute (sqls)
txt_small_class=rs("txt_small_class")
rs.close
set rs=nothing
set rs1=conn.execute("select count(id) as num from product_leave where pid="&idd)
count=rs1("num")
rs1.close
Set rs1=nothing
'/////加入收藏夹
Sub PutIntoFav( add, ProductList )
If Len(ProductList) = 0 Then
ProductList = add
'ProductList = "'" & add & "'"
ElseIf InStr( ProductList, add ) <= 0 Then
ProductList = ProductList & "," & add
End If
End Sub
ProductList = request.cookies("ssort")("fav")
Products = Split(id,",")
For I=0 To UBound(Products)
PutIntoFav Products(I), ProductList
Next
response.Cookies("ssort")("fav") = ProductList
'////结束
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/main.css" rel="stylesheet" type="text/css">
<title>商品-<%=p_name%></title>
</head>
<body topmargin="1">
<!--#include file="../top.asp"-->
<div align="center">
<table border="0" width="760" id="table1" cellpadding="0" cellspacing="0">
<tr>
<td width="150" valign="top">
<table border="0" width="100%" id="table3" cellspacing="1" cellpadding="0">
<tr>
<td valign="top">
<table border="1" width="100%" id="table5" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#CCCC99">
<tr>
<td valign="top" bordercolor="#C0C0C0">
<table border="0" width="100%" id="table6" cellspacing="0" cellpadding="0">
<tr>
<td height="30" bgcolor="#CFF3F8" align="center" background="../images/title_bg.gif">
<p align="left"><font color="#666666"><b>
您最近浏览过的商品</b></font></td>
</tr>
<tr>
<td style="line-height: 150%"><%fav()%></td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="middle" height="25" align="right">
<A href="../ClearCookies.asp">清除浏览记录</a></td>
</tr>
<tr>
<td>
<table border="1" width="100%" id="table9" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#CCCC99">
<tr>
<td>
<table border="0" width="100%" id="table10" cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#CFF3F8" height="30" align="center" background="../images/title_bg.gif">
<p align="left"><b><font color="#666666"> 相关最新商品</font></b></td>
</tr>
<tr>
<td style="line-height: 150%">
<%
sql="select top 15 id,p_name,p_mmoney from yqj_product where sid="&sid&" order by addtime desc"
set rs=conn.execute (sql)
ii=1
do while not rs.eof and ii<=15
set ids=rs("id")
set p_names=rs("p_name")
set p_mmoneys=rs("p_mmoney")
response.write " ·<a href=product_list.asp?id="&ids&" target=_blank>"&p_names&"</a> ¥"&formatnumber(p_mmoneys,2)&"<br>"
rs.movenext
ii=ii+1
loop
rs.close
set rs=nothing
%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" height="25" valign="middle">
<a href="../small_class.asp?bid=<%=bid%>&sid=<%=sid%>">更多>></a></td>
</tr>
</table>
</td>
<td width="610" valign="top">
<table border="1" width="99%" id="table2" cellpadding="0" style="border-collapse: collapse" bordercolor="#CCCC99" cellspacing="0" align=right>
<tr>
<td>
<table border="0" width="100%" id="table11" cellspacing="1" cellpadding="0">
<tr>
<td width="40%" valign="top">
<table border="0" width="100%" id="table12" cellspacing="0" cellpadding="0">
<tr>
<td>
<img border="0" src="../upimg/<%=small_pic%>" width="232" height="204"></td>
</tr>
</table>
</td>
<td width="60%" rowspan="2" valign="top">
<table border="0" width="100%" id="table13" cellspacing="1" cellpadding="0">
<tr>
<td height="23">
<span style="font-size: 14px"><b><%=p_name%></b></span></td>
</tr>
<tr>
<td align=center>
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td> <span style="font-size: 14px"><b>是否有货:
<%
if p_nums<=0 then
response.write "缺货"
elseif p_nums>0 then
response.write "有货"
else
response.write "有"
end if
%></b></span></td>
</tr>
<tr>
<td align=center>
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td> <font color="#F77D31"><span style="font-size: 14px"><b>【基本信息】</b></span></font></td>
</tr>
<tr>
<td> <span style="font-size: 12px"><b>规格:</b><%=p_spec%></span></td>
</tr>
<tr>
<td align=center>
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td height="23"> <font color="#F77D31"><span style="font-size: 14px"><b>【所属类别】</b></span></font></td>
</tr>
<tr>
<td> <a href=../big_class.asp?bid=<%=bid%>><%=txt_big_class%></a>>>><a href=../small_class.asp?bid=<%=bid%>&sid=<%=sid%>><%=txt_small_class%></a></td>
</tr>
<tr>
<td> 市场价:<s>¥<%=p_cmoney%>元</s> <font color="#FF0000">会员价:¥<%=p_mmoney%>元</font></td>
</tr>
<tr>
<td> <a href="../buy.asp?id=<%=idd%>"><img border="0" src="../images/gm02.gif"></a>
<a href="../favorite.asp?id=<%=idd%>">
<img border="0" src="../images/gm01.gif"></a></td>
</tr>
<tr>
<td> 浏览次数:<%=hitnums%> 上架时间:<%=addtime%> 评论(<u><font color="#FF0000"><%=count%></font></u>)条</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="40%">
<p align="center">
<a target="_blank" href="../ViewGigPic.asp?bigpic=<%=big_pic%>">点击查看清晰图片</a></td>
</tr>
<tr>
<td colspan="2" align=center>
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td colspan="2"><font color="#F77D31"><span style="font-size: 14px"><b>【商品简介】</b></span></font></td>
</tr>
<tr>
<td colspan="2"> <%=content%></td>
</tr>
<tr>
<td colspan="2" align=center>
<hr color="#CCCCCC" size="1"></td>
</tr>
<tr>
<td><font color="#F77D31"><span style="font-size: 14px"><b>【商品评论】 </b></span></font></td>
<td>
<p align="right"><B><U><a href="#" onclick="window.open('../message.asp?id=<%=id%>','message','width=600,height=200');"><FONT style="CURSOR: hand" color=#993300 size=2>我要写评论</FONT></a></U></B></td>
</tr>
<tr>
<td colspan="2">
<table border="0" width="604" id="table14" cellspacing="0" cellpadding="0">
<%
sql="select * from product_leave where pid="&idd&" order by addtime desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if (rs.eof and rs.bof) then
response.write "<tr>"
response.write "<td><font color=#FF0000>目前还没有任何留言</font></td>"
response.write "</tr>"
else
rs.PageSize =5 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
end if
ii=1
while not rs.eof and ii<=rs.pagesize
username=rs("username")
xingxing=rs("xingxing")
ip=rs("ip")
addtime=rs("addtime")
neirong=rs("neirong")
ip=left(ip,instrrev(ip,".")-1)
ip=left(ip,instrrev(ip,".")-1)
ip=ip&".*.*"
%>
<tr>
<td width="151">笔名:<%=username%></td>
<td width="151">评价等级:
<%
for ai=1 to cint(xingxing)
response.write "<img border=0 src=../images/art1.gif>"
next
%></td>
<td width="56">IP:<img border=0 src=../images/ip.gif title=IP已记录:<%=ip%>></td>
<td width="246">留言时间:<%=addtime%></td>
</tr>
<tr>
<td colspan="4">内容:<%=leach(neirong)%></td>
</tr>
<tr>
<td colspan="4"><font color="#C0C0C0">
----------------------------------------------------------------------------------------------------</font></td>
</tr>
<%
rs.movenext
ii=ii+1
wend
%>
</table>
</td>
</tr>
<tr>
<td colspan="2"><%call PageControl(iCount,maxpage,page,"border=0 align=left","<p align=left>")%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="../end.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -