📄 product2.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%dim id
id=trim(request.QueryString("id"))
if id="" then
response.Write "<script language='javascript'>alert('请先选择产品!');history.go(-1);</script>"
response.End
end if
%><head>
<title><%=webname%>--商品详细资料</title>
<!--#include file="include/header.asp"-->
<%
dim prename,company,intro,predate,graph2,description,remarks,price,rs2
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id ,conn,1,3
'if rs2.recordcount>0 then
'rs2("viewnum")=rs2("viewnum")+1
'rs2.update
'end if
%>
<TABLE align="center" BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="771" BGCOLOR=<%=bgclr1%>>
<TR>
<TD HEIGHT="1" BGCOLOR=#FFFFFF></TD>
</TR>
<TR>
<TD HEIGHT="51" align="center" valign="middle" BGCOLOR=#FFFFFF><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7%" height="51" align="center" valign="middle"><img src="images/skin/default/index7.gif" width="14" height="10"></td>
<td width="93%"><FONT COLOR="#000000"><%=webname%>:->>><%=trim(rs2("mark"))%>:->><%=trim(rs2("name"))%></FONT>
</td>
</tr>
</table> </TD>
</TR>
<TR>
<TD bgcolor="#FFFFFF"> <TABLE WIDTH="98%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD WIDTH="15%" rowspan="2" align="center" valign="middle">
<%if trim(rs2("pic"))<>"" then %>
<a href=#pic target=_top><img src=<% = trim(rs2("pic")) %> alt=<% = trim(rs2("name")) %> width="<% = webimg9 %>" height="<% = webimg10 %>" border=0></a>
<% else %>
<img src=images/emptybook.jpg alt=此商品暂时没有图片>
<% end if %>
</TD>
<TD WIDTH="85%"> <TABLE WIDTH="100%" BORDER="0" ALIGN="center" CELLPADDING="1" CELLSPACING="1">
<TR>
<TD colspan="4"><B>
<% = rs2("prename") %>
</B><font color="#FF6600"><%=trim(rs2("name"))%></font></TD>
</TR>
<TR>
<TD colspan="4"><B>
<% = rs2("company") %>
</B><%=trim(rs2("mark"))%></TD>
</TR>
<TR>
<TD colspan="4"><B>
<% = rs2("intro") %>
</B><%=trim(rs2("introduce"))%></TD>
</TR>
<TR>
<TD colspan="4"><B>
<% = rs2("predate") %>
</B><%=trim(rs2("productdate"))%></TD>
</TR>
<TR>
<TD width="27%"><B>
<% = rs2("other") %>
</B><%=trim(rs2("grade"))%></TD>
<TD width="25%"><B>
<% = rs2("pretype") %>
</B><%=trim(rs2("type"))%></TD>
<TD width="26%"><B>浏览次数:</B> <%=trim(rs2("viewnum"))%></TD>
<TD width="22%"><B>售出次数: </B><%=trim(rs2("solded"))%></TD>
</TR>
<TR>
<TD><B>市场价格: </B><S>¥<%=rs2("price1")%></S>元</TD>
<TD><B>会员价格:</B> <font color="#FF0000"><%=rs2("price2")%>元</font></TD>
<TD><B>马上节省:</B> <%=rs2("price1")-rs2("price2")%>元</TD>
<TD><B>产品折扣:</B>
<% = rs2("discount")*100 %>
.00%</TD>
</TR>
<TR>
<TD><B>上货数量:</B> <%=rs2("amount")%> 件</TD>
<TD><B><font color="#999999">剩余数量:</font></B> <font color="#666666"><%=rs2("stock")%> 件</font></TD>
<TD><B><font color="#FF0033">VIP</font>价 格:</B> <%=rs2("vipprice")%>元</TD>
<TD><B>赠送积分:</B> <%=rs2("score")%>分 </TD>
</TR>
<tr>
<td height="5"></td>
</tr>
<TR>
<TD></TD>
<TD> <a href=# onClick="javascript:window.open('cart.asp?id=<% = rs2("id") %>','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><img src=images/skin/default/cart.gif width=50 height=19 align=absmiddle border=0></a>
</TD>
<TD> <a href=# onClick="javascript:window.open('addto.asp?id=<% = rs2("id") %>&action=add','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><img src=images/skin/default/addto.gif width=50 height=19 align=absmiddle border=0></a></TD>
<TD></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
<table width="96%" align="center">
<TR>
<TD width=96% BGCOLOR=<%=bgclr1%> height="1"></TD>
</TR>
</table>
<TABLE WIDTH="98%" BORDER="0" CELLPADDING="0" CELLSPACING="0" align="center">
<TR>
<TD align="center" colspan="2"> <table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15%" align="left" valign="top"></br>
<%if trim(rs2("pic"))<>"" then
response.write "<a href="&trim(rs2("photo"))&" target=_blank><img src="&rs2("photo")&" border=0 alt=点击返回页首!></a>"
else
response.Write "<img src=images/emptybook.jpg alt=此商品暂时没有大图片!>"
end if%>
</td>
</tr>
<tr bgcolor="#f2f2f2">
<td></td>
</tr>
<tr>
<td width="85%" valign="top"><strong> <font color="#FF6600"></br><%=trim(rs2("graph"))%></font></strong>
<br>
<br>
<% if rs2("content")<>"" then
response.write "<table width=19 height=4 border=0 cellpadding=0 cellspacing=0><tr><td height=4></td></tr></table>"&rs2("content")&"<table width=19 height=6 border=0 cellpadding=0 cellspacing=0><tr><td height=6></td></tr></table>"
end if
if rs2("detail")<>"" then
response.write "<strong><font color=red>【 详细说明 】</font></strong><table width=19 height=4 border=0 cellpadding=0 cellspacing=0><tr><td height=4></td></tr></table>"&rs2("detail")&"<table width=19 height=6 border=0 cellpadding=0 cellspacing=0><tr><td height=6></td></tr></table>"
end if
%>
<br>
<br>
</td>
</tr>
</table></TD>
</TR>
<TR>
<TD colspan="2" background="images/hor.gif"></TD>
</TR>
<a name="pic"></a>
<tr>
<td ><table height=1 cellspacing=0 cellpadding=0 width=500
align=center bgcolor=#f2f2f2 border=0 valign="top">
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table></td>
<tr>
<td width=70% ></br><font color="#CC0000">会员评级</font></td>
<%
if rs2("mark")<>"" then
response.write "<form name=searchmark method=post action=research.asp>"
response.write "<td width=30% ><div align=right><input type=hidden name=searchkey value="&trim(rs2("mark"))&"<input type=hidden name=selectaction value=2>"
response.write "</br>查看更多关于 <a href=research.asp?action=2&searchkey="&trim(rs2("mark"))&" target=_blank><font color=red>"&trim(rs2("mark"))&"</font></a> 的商品</div></td></form>"
end if
response.write "</tr>"
response.write "<tr><td colspan=2> "
call rank()
response.write " <a href=# onClick=""javascript:window.open('rank.asp?id="&id&"','','width=295,height=235,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"">发表您对本商品的评级</a></td></tr>"
rs2.close
set rs2=nothing
response.write "<tr><td>会员评论</td>"
response.write "<td><div align=right><a href=# onClick=""javascript:window.open('comment.asp?id="&id&"','','width=295,height=185,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"" ><img src=images/my_review.gif width=93 height=20 border=0 alt=用户评论></a></div></td></tr>"
'//用户评论
dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from review where id="&id&" and audit=1 ",conn,1,1
if rs1.eof and rs1.bof then
response.write"<tr><td colspan=2> 如果您用过本商品,或对本商品有所了解,欢迎您发表自己的评论。您的评论将被网络上成千上万的用户所共享,我们将对您的慷慨深表感谢。"
response.write " 您的评论在提交后将经过我们的审核,也许您需要等待一些时间才可以看到。谢谢合作。</td></tr>"
else
do while not rs1.eof
%>
<TR>
<TD>[<B><%=rs1("title")%></B>@<%=rs1("reviewdtm")%>]<BR> <%=rs1("reviewcontent")%></TD>
</TR>
<%rs1.movenext
loop
rs1.close
set rs1=nothing
end if%>
</TABLE></TD>
</TR>
</TABLE>
<!--#include file="include/footer.asp"-->
<%sub rank()
dim other
if rs2("ranknum")>0 and rs2("rank")>0 then
other=rs2("ranknum")\rs2("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -