📄 view_product.asp
字号:
<!--#include file="../../include/db_conn.asp" -->
<%
ProductID = Request.QueryString("pid")
if ProductID = "" then
Response.Write "参数传输错误!"
Response.End
end if
set rs1= server.CreateObject("ADODB.RECORDSET")
set rs2 = server.CreateObject("ADODB.RECORDSET")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>预览产品信息</title>
<link href="../include/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
sqlstr1="select p.*,c.catalogname from ys_product as p inner join ys_product_catalog as c on p.catalogid=c.catalogid "
sqlstr1= sqlstr1 & " WHERE ID = " & ProductID
rs1.Open sqlstr1,conn,1,1
sqlstr2= "SELECT Field1,Field2,Field3,Field4 FROM ys_product_catalog where catalogid="&rs1("catalogid")
rs2.Open sqlstr2,conn,1,1
if rs1.EOF or rs1.EOF then
Response.Write "数据库错误,或没有该产品"
else
sqlstr = "UPDATE ys_product SET hitCount=hitCount+1 WHERE ID=" &ProductID
conn.Execute sqlstr
%>
<table width="98%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td height="35" class="p9"><%=rs1("catalogname")%> </td>
</tr>
<tr>
<td height="35" class="p9">
<table width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<%if rs1("BigPhoto") <> "" then%>
<td width="200" align="center">
<img src="../../productimg/s/<%if rs1("smallPhoto") <> "" then Response.Write rs1("smallphoto")%>" width="160" height="160" border="0">
</td>
<%end if%>
<td valign="top"><span class="ProFont"><%=rs1("ProductName")%></span>
<br> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#f0f0f0" class="p9">
<%if rs2("Field1") <> "" then%>
<tr>
<td width="120" bgcolor="#FFFFFF">【<%=rs2("Field1")%>】</td>
<td bgcolor="#FFFFFF"><%=rs1("Field1")%></td>
</tr>
<%end if%>
<%if rs2("Field2") <> "" then%>
<tr>
<td width="120" bgcolor="#FFFFFF">【<%=rs2("Field2")%>】</td>
<td bgcolor="#FFFFFF"><%=rs1("Field2")%></td>
</tr>
<%end if%>
<%if rs2("Field3") <> "" then%>
<tr>
<td width="120" bgcolor="#FFFFFF">【<%=rs2("Field3")%>】</td>
<td bgcolor="#FFFFFF"><%=rs1("Field3")%></td>
</tr>
<%end if%>
<%if rs2("Field4") <> "" then%>
<tr>
<td width="120" bgcolor="#FFFFFF">【<%=rs2("Field4")%>】</td>
<td bgcolor="#FFFFFF"><%=rs1("Field4")%></td>
</tr>
<%end if%>
</table>
</td>
</tr>
</table>
<hr size="1"></td>
</tr>
<tr>
<td height="35" class="p9"><span class="p10">产品简介</span><br> <br>
<%=rs1("Content")%></td>
</tr>
<tr>
<td class="p9"><hr size="1"></td>
</tr>
<%if rs1("BigPhoto") <> "" or rs1("BigPhoto") <> "" then%>
<tr>
<td height="35" class="p9"><span class="p10">详细图片</span><br>
<% if rs1("BigPhoto") <> "" then%>
<a href="../../product/productimg/b/<%=rs1("BigPhoto")%>" target="_blank"><img src="../../productimg/b/<%=rs1("BigPhoto")%>" border="0"></a><BR><BR>
<%end if%>
</td>
</tr>
<tr>
<td class="p9"><hr size="1"></td>
</tr>
<%end if%>
<tr>
<td height="35" align="center" class="p9"><a href="#" onClick="javascript:window.close()">关闭</a></td>
</tr>
</table>
<%end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -