📄 list.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#Include File="WrSky_Sql.Asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>-商品信息</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%if IsNumeric(request.QueryString("id"))=False then
response.write("<script>alert(""非法访问!"");location.href=""index.asp"";</script>")
response.end
end if
dim id
id=request.QueryString("id")
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""index.asp"";</script>"
end if%>
<%dim bookid,action
bookid=request.QueryString("id")
action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun",conn,1,3
rs.addnew
rs("bookid")=bookid
rs("pingji")=request("pingji")
rs("pinglunname")=HTMLEncode2(trim(request("pinglunname")))
rs("pingluntitle")=HTMLEncode2(trim(request("pingluntitle")))
rs("pingluncontent")=HTMLEncode2(trim(request("pingluncontent")))
rs("ip")=Request.servervariables("REMOTE_ADDR")
rs("pinglundate")=now()
rs("shenhe")=1
rs.update
rs.close
set rs=nothing
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_books where bookid="&bookid,conn,1,3
rs("pingji")=rs("pingji")+1
rs("pingjizong")=rs("pingjizong")+request("pingji")
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('您的评论已成功提交!');history.go(-1);</script>"
response.End
end if
%>
<!-- 导航菜单 -->
<!--#include file="top.asp" -->
<div id="content">
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_books where bookid="&request("id"),conn,1,3
if rs.recordcount=0 then
response.write"<script>alert(""商品已不存在!"");location.href=""index.asp"";</script>"
else
rs("liulancount")=rs("liulancount")+1
rs.update
if request.cookies("godbook")("username")<>"" then
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [user] where username='"&request.cookies("godbook")("username")&"'",conn,1,1
t_userid=rs_s("userid")
rs_s.close
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_his where bookid="&request("id")&" and username='"&request.cookies("godbook")("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 shop_his where username='"&request.cookies("godbook")("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("godbook")("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
%>
<!-- 快捷导航 -->
<div id="content_m"><a href="index.asp">首页</a> >
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_anclass where anclassid="&rs("anclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=""class.asp?lx=big&anid="&rs2("anclassid")&""">"&rs2("anclass")&"</a> > "
end if
rs2.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_nclass where nclassid="&rs("nclassid"),conn,1,1
if rs2.recordcount>0 then
response.write "<a href=""class.asp?lx=small&anid="&rs2("anclassid")&"&nid="&rs2("nclassid")&""">"&rs2("nclass")&"</a>"
end if
rs2.close
set rs2=nothing%>
</div>
<!-- 右侧内容 -->
<div id="content_r">
<!-- 产品详细介绍 -->
<div id="product">
<div id="introduce">
<div id="product_img"><%if rs("zhuang")="" then
response.write "<img src=images/emptybook.gif width=250 height=250 />"
else%><a href="<%=trim(rs("zhuang"))%>"><img src="<%=trim(rs("bookpic"))%>" width="250" height="250" alt="点击浏览商品大图" /></a>
<a href="<%=trim(rs("zhuang"))%>" class="btn_seebigpic" ><span class="hide">观看大图片</span></a>
</div>
<div>
<ul>
<li><strong><%=rs("bookname")%></strong></li>
<%set rs_shjia=server.createobject("adodb.recordset")
rs_shjia.open "select * from shjia where username='"&rs("shjianame")&"'",conn,1,1
if rs_shjia.recordcount<>"0" then%>
<li>销 售 商:<a href="user/index.asp?id=<%=rs_shjia("shjiaid")%>"><%=rs_shjia("name")%></a><%if rs_shjia("tj")=5 then
response.write "<img src=""images/icon1.gif"" alt=""超级商家"">"
end if%> <a href="user/gbook.asp?id=<%=rs_shjia("shjiaid")%>"><strong>给销售商留言</strong></a></li>
<li>商家星级:<img src="images/level<%=rs_shjia("tj")%>.gif" alt="" />
<%
set rs_shjfk=server.CreateObject("adodb.recordset")
strshjiafk="select * from fkfs where shjiaid="&rs_shjia("shjiaid")
rs_shjfk.open strshjiafk,conn,1,1
if rs_shjfk.recordcount<>0 then
response.write " <a href=""user/about.asp?id="&rs_shjfk("shjiaid")&"""><strong>商家付款方式</strong></a>"
else
response.write ""
end if
set rs_shjps=server.CreateObject("adodb.recordset")
strshjiaps="select * from ps where shjiaid="&rs_shjia("shjiaid")
rs_shjps.open strshjiaps,conn,1,1
if rs_shjps.recordcount<>0 then
response.write " <a href=""user/about.asp?id="&rs_shjps("shjiaid")&"""><strong>商家配送说明</strong></a>"
else
response.write ""
end if
response.write "</li>"
end if
rs_shjia.close
set rs_shjia=nothing
%>
<li>商品数量:<%=trim(rs("kucun"))%> <%=rs("bookchuban")%> 被浏览<%=trim(rs("liulancount"))%>次 <%if rs("kucun")>0 then%>热卖中<%else%>缺货<%end if%></li>
<li>商品折扣:
<%response.write rs("dazhe")*10&" 折"%>
赠送积分:<%=rs("yeshu")%> 分</li>
<li>市场价:¥<%=rs("shichangjia")%>元 <span class="new">会员价:¥<%=rs("huiyuanjia")%>元</span> <%if Request.Cookies("godbook")("reglx")=2 then%><span class="new">VIP价:<%=rs("Vipjia")%>元</span><%end if%></li>
</ul><a href="shoucang.asp?id=<%=rs("bookid")%>&action=add" class="btn_collection" target="_blank"><span class="hide">加入收藏夹</span></a><a href="gouwu.asp?id=<%=rs("bookid")%>&action=add" class="btn_buyNow" target="_blank"><span class="hide">放入购物车</span></a>
</div>
<%end if%>
</div>
<div class="clear-both"> </div>
<!-- 文字广告 -->
<p id="textad2"><a href="#">·在线购物可以得到什么优惠呢?>></a></p>
<!-- 文字详细介绍 -->
<div id="introducetext"><h3>↓此商品更多信息</h3><p><%=rs("bookcontent")%></p><h4><%
response.write "<a href=""research.asp?action=1&anclassid=0&searchkey="&trim(rs("bookname"))&""" target=""_blank"">查看更多关于"&trim(rs("bookname"))&"的商品>></a> "
rs.close
set rs=nothing
%></h4></div>
</div>
<%end if%>
</div>
<!-- 主内容左侧 -->
<div id="content_l">
<!-- 公告 -->
<!--#include file="history.asp"-->
<!-- 左侧目录 -->
<!--#include file="shoppingbag.asp"-->
<!-- 人气排行 -->
<!--#include file="hotmerchandise.asp"-->
<div class="clear-both"> </div>
</div>
</div>
<div class="clear-both"> </div>
<!-- 服务声明 -->
<!--#include file="service.asp" -->
<!-- 版权信息 -->
<!--#include file="copyright.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -