📄 list.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="Ubb.asp"-->
<html>
<head>
<title><%=webname%>--商品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<table width="770" height="74" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><%dim id
id=trim(request("id"))
if IsNumeric(request.QueryString("id"))=False or request.QueryString("id")="" then
response.write"<SCRIPT language=JavaScript>alert('参数错误');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
sql="select * from sh_chanpin where bookid=" &id & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.write"<SCRIPT language=JavaScript>alert('参数错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("liulancount")=rs("liulancount")+1
rs.update
'call history
if request.cookies("shopzhiwang")("username")<>"" then
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [sh_user] where username='"&request.cookies("shopzhiwang")("username")&"'",conn,1,1
t_userid=rs_s("userid")
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from sh_his where bookid="&request("id")&" and username='"&request.cookies("shopzhiwang")("username")&"' and lx=1",conn,1,3
if rs_s.recordcount>0 then
rs_s("ltime")=now()
rs_s("userid")=t_userid
rs_s.update
rs_s.close
set rs_s=nothing
else
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from sh_his where username='"&request.cookies("shopzhiwang")("username")&"' and lx=1 order by ltime",conn,1,3
if rs_s.recordcount>=4 then
rs_s.delete
rs_s.update
end if
rs_s.addnew
rs_s("username")=request.cookies("shopzhiwang")("username")
rs_s("bookid")=request("id")
rs_s("bookname")=rs("bookname")
rs_s("userid")=t_userid
rs_s("lx")=1
rs_s("ltime")=now()
rs_s.update
rs_s.close
set rs_s=nothing
end if
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td colspan="4" align="center"><div align="left"></div></td>
</tr>
<tr>
<td colspan="4" background="images/bj_x1.gif" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
<tr>
<td height="31" colspan="3" align="left">您目前的位置:
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from sh_sort where anclassid="&rs("anclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=class.asp?id=big&anid="&rs2("anclassid")&" targer=_blank>"&rs2("anclass")&"</a>>>>>"
end if
rs2.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from sh_sort2 where nclassid="&rs("nclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=class2.asp?id=small&anid="&rs2("anclassid")&"&nid="&rs2("nclassid")&" targer=_blank>"&rs2("nclass")
end if
rs2.close
set rs2=nothing%></td>
<td width="62%" height="31" align="left"><font color="#ff0000" size="4"><strong><%=rs("bookname")%></strong></font><font color="#FF0000" size="5"></font></td>
</tr>
<tr>
<td colspan="4" background="images/bj_x1.gif" height="4"></td>
</tr>
</table>
<table width="100%" height="626" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<table width="100%%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="160" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<div align="center">
<%if rs("zhuang")="" then
response.write "<img src=images/emptybook.gif width=150 border=0>"
else
%>
<a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="<%=trim(rs("bookpic"))%>" width=130 border=0 alt="点击浏览商品大图" height="130"></a>
<%end if%>
</div></td>
</tr>
<tr>
<td>
<div align="center"><a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="images/view2.gif" width="115" height="36" border="0"></a></div></td>
</tr>
<tr>
<td>
<div align="center">市场价:<s><%=rs("shichangjia")%>元</s></div></td>
</tr>
<tr>
<td>
<div align="center">会员价:<font color="#FF0000"><strong><%=rs("huiyuanjia")%>元</strong></font></div></td>
</tr>
<tr>
<td>
<div align="center">VIP 价:<font color="#FF0000"><%=rs("Vipjia")%>元</font></div></td>
</tr>
</table></td>
<td width="369" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<%
end if
%>
<br>
<tr>
<td>【商品规格】 <%=rs("isbn")%></td>
</tr>
<tr>
<td>【商品单位】 <font color="#FF0000"><%=rs("bookchuban")%></font></td>
</tr>
<tr>
<td>【商品状态】
<%if rs("kucun")>0 then%>
有货
<%else%>
暂时缺货
<%end if%>
</td>
</tr>
<tr>
<td>【所属类别】
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from sh_sort where anclassid="&rs("anclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=class.asp?id=big&anid="&rs2("anclassid")&" targer=_blank>"&rs2("anclass")&"</a>>>>>"
end if
rs2.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from sh_sort2 where nclassid="&rs("nclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=class.asp?id=small&anid="&rs2("anclassid")&"&nid="&rs2("nclassid")&" targer=_blank>"&rs2("nclass")
end if
rs2.close
set rs2=nothing%>
</td>
</tr>
<tr>
<td>【评分星级】
<%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级>"%>
有<%=rs("pingji")%>位网友评论 </td>
</tr>
<tr>
<td> <font color="#FFFFFF">c</font>此商品已被浏览:<font color="#FF0000"><strong><%=rs("liulancount")%>次</strong></font></td>
</tr>
</table>
<table height="80">
<tr>
<td width="221"align="center" valign="bottom"><a href="javascript:;" onClick="javascript:window.open('shopcart.asp?id=<%=rs("bookid")%>&action=add','gouwu','width=600,height=600,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/shopcart2.gif" width="100" height="36" border=0></a> <a href="javascript:;" onClick="javascript:window.open('favorites.asp?id=<%=rs("bookid")%>&action=add','shouchang','width=600,height=600,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/Favorites2.gif" width="100" height="36" border=0></a></td>
</tr>
</table></td>
<td width="1" valign="top" background="images/bj_x1.gif"> </td>
<td width="234" valign="top"><table width="226" height="264" border="0" cellpadding="0" cellspacing="0" background="images/hygn.gif">
<tr>
<td width="226" height="51"> </td>
</tr>
<tr>
<td height="206" valign="top"><table width="171" height="190" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="188"><!--#include file="info1.asp"--> <!--#include file="info_history1.asp"--></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/bj_x1.gif" height="1"></td>
</tr>
<tr>
<td>
<table width="100%" height="37" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/view0.gif" width="770" height="56"></td>
</tr>
</table>
<%
sql="select * from sh_chanpin where bookid=" &id & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
%>
<%=Code_Ubb(rs("bookcontent"))%> </td>
</tr>
</table></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -