📄 showproduct.asp
字号:
<!-- #include file="conn.asp" -->
<!--#include file="webconfig.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%></title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="include/top.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="1" bgcolor="#cccccc"></td>
<td width="220" height="100"><!-- #include file="include/left.asp" --></td>
<td width="1" bgcolor="cccccc"></td>
<td align="center">
<table width="96%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td valign="top"> <%
id=trim(request.QueryString("id"))
sql="select * from Net008_productlist where id="&cint(id)
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
if rs.recordcount<1 then
response.write"暂无信息!"
'response.end
end if
%> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="250" height="22" align="center" valign="top" class="centertitle">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center"> <table border="0" cellspacing="0" cellpadding="3" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF" align="center"><img src="<%if rs("imgsize")=0 then%>images/noimage.gif<%else%>admin/show_productimg1.asp?id=<%=rs("id")%><%end if%>" border="0" align="absmiddle" width="224" height="245"></td>
</tr>
</table></td>
</tr>
<%
if rs("imgsize1")<>0 then
response.write "<tr><td align=center>"
response.write "<a href=admin/show_productimg1.asp?id="&rs("id")&" target=_blank class=LeftTypeLinkU><img src='images/zoom1.gif' border='0' align='absmiddle'>点击放大</a>"
response.write "</td></tr>"
end if
%>
<tr>
<td align="center"><span class=main><font color="#999999">[实物拍摄,供参考]<br>
[提示:如没看到图片,请按<font color="#FF0000">F5</font>键刷新页面]
</font></span></td>
</tr>
</table>
</td>
<td align="center" class="centertitle">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center" class="lefttitle"><img src="images/items.gif" width="11" height="11" align="absmiddle">
<%=rs("productname")%></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td><b>[商品编号]:</b><%=rs("productid")%></td>
</tr>
<tr>
<td><b>[商品名称]:</b><%=rs("productname")%></td>
</tr>
<tr>
<td><b>[商品产地]:</b><%=rs("productaddress")%></td>
</tr>
<tr>
<td><b>[商品品牌]:</b>
<%
productbrandID=rs("productbrand")
sql_temp="select * from Net008_productbrand where BrandId='"&cstr(productbrandID)&"'"
set rs_temp=server.createobject("adodb.recordset")
rs_temp.open sql_temp,conn,1,2
response.write rs_temp("CnName")
rs_temp.close
set rs_temp=nothing
%>
</td>
</tr>
<tr>
<td><b>[商品规格]:</b><%=rs("spec")%></td>
</tr>
<tr>
<td><b>[适合人群]:</b><%=rs("skin")%></td>
</tr>
<tr>
<td><b>[市 场 价]:</b><s>¥<font color=#993300 size=3><%=rs("marketprice")%></font></s>元</td>
</tr>
<tr>
<td><b>[会 员 价]:
<%
marketprice=rs("marketprice")
vipprice=rs("vipprice")
newprice=rs("newprice")
diffprice=marketprice-newprice
diffvipprice=marketprice-vipprice
response.write "¥<font color=#ff000 size=3>"&newprice&"</font>"
%></b>元 节省:<%=diffprice%>元</td>
</tr>
<tr>
<td><b>[ VIP 价]:<%="¥<font color=ff0000 size=3>"&rs("vipprice")&"</font>"%></b>元 节省:<%=diffvipprice%>元</td>
</tr>
<tr>
<td><b>[品质保证]:</b><img src="images/true.gif" width="100" height="20" align="absmiddle"></td>
</tr>
</table>
<table width="70%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td align="center"><a href="shopping.asp?id=<%=rs("id")%>"><img src="images/shopcart.gif" width="74" height="23" border="0"></a></td>
<td align="center"><a href="shopping.asp?id=<%=rs("id")%>"><img src="images/favorites.gif" width="74" height="23" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="lefttitle"><img src="images/img_03.gif" width="12" height="12" align="absmiddle">详细介绍</td>
<td width="350" align="right" class="lefttitle"><font color="#999999">该商品有
<%
sql_number="select * from Net008_productbbs where ProductId="&cint(id)
set rs_number=server.createobject("adodb.recordset")
rs_number.open sql_number,conn,1,2
response.write rs_number.recordcount
set rs_number=nothing
%>
条网友评论![ <a href="#add1" class="LeftTypeLinkU">查看该商品的全部评论</a>
]</font></td>
</tr>
<tr>
<td bgcolor="cccccc" height="1"></td>
<td bgcolor="cccccc"></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="puptext"> <%
response.write replace(rs("content"),chr(13)+chr(10),"<br>")
rs("click")=rs("click")+1
rs.update
%> </td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"><a href="shopping.asp?id=<%=rs("id")%>"><img src="images/shopcart.gif" width="74" height="23" border="0" align="absmiddle"></a>
<%
rs.close
set rs=nothing
%> </td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="cccccc" height="1"></td>
</tr>
<tr>
<td class="product_title"><img src="images/items.gif" width="11" height="11" align="absmiddle">发表评论:<a href="review.asp?id=<%=id%>" onClick="window.open(this.href,'newtxt','top=150,left=250,width=350,height=270,scrollbars=yes,resizable=no');return false;"><img src="images/sendpl.gif" width="60" height="19" border="0" align="absmiddle"></a><font color="#FFFFFF"><a name="add1" id="add1"></a></font></td>
</tr>
<tr>
<td bgcolor="cccccc" height="1"></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<%
sql="select * from Net008_productbbs where ProductId="&cint(id)&" order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql ,conn,1,2
if rs.recordcount<1 then
response.write"暂无评论信息!<br><br>"
'response.write " <input type='button' name='Submit2' value='返回上页' onClick='javascript:history.back()'>"
'response.end
end if
const maxperpage=50 '定义每一页显示的数据记录的常量
dim currentpage '定义当前页的变量
rs.pagesize=maxperpage
currentpage=request.querystring("pageid")
if currentpage="" then
currentpage=1
elseif currentpage<1 then
currentpage=1
else
currentpage=clng(currentpage)
if currentpage > rs.pagecount then
currentpage=rs.pagecount
end if
end if
'如果变量currentpage的数据类型不是数值型
'就1赋给变量currentpage
if not isnumeric(currentpage) then
currentpage=1
end if
dim totalput,n '定义变量
totalput=rs.recordcount
if totalput mod maxperpage=0 then
n=totalput\maxperpage
else
n=totalput\maxperpage+1
end if
if n=0 then
n=1
end if
rs.move(currentpage-1)*maxperpage
i=0
do while i< maxperpage and not rs.eof
%>
<table width="96%"
border=0 align="center" cellpadding=3 cellspacing=1>
<tbody>
<tr>
<td height=25 bgcolor="#EAEAEA" width="200"><img src="images/hand.gif" border="0" align="absmiddle">
评论人:
<%
response.write rs("UserName")
%>
</td>
<td bgcolor="#EAEAEA"> 评论时间:
<%
response.write FormatDateTime(rs("adddate"),2)
%>
</td>
</tr>
<tr valign="top">
<td colspan="2"> 评论内容:
<%
response.write replace(rs("SendMsg"),chr(13)+chr(10),"<br>")
%>
</td>
</tr>
<tr valign="top">
<td colspan="2"><font color="#993300">管理员回复:</font>
<%
response.write replace(rs("ReMsg"),chr(13)+chr(10),"<br>")
response.write " <font color=999999>"&rs("Readddate")&"</font>"
%>
</td>
</tr>
</tbody>
</table>
<%
i=i+1
rs.movenext
loop
%>
</td>
<td width="1" bgcolor="cccccc"></td>
</tr>
</table>
<!-- #include file="include/bottom.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -