<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--商品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦！：）';return false">
<%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="webtop.asp"-->
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr> 
<td width="180" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<!--#include file="history.asp"-->
<!--#include file="gouwucheinfo.asp"-->
<!--#include file="xiaoshouinfo.asp"-->
</td>
<td valign="top" class="table-zuo" align="center" bgcolor="#FFFFFF" bordercolor="#FFFFFF"> 
<%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_books where bookid="&request("id"),conn,1,3
if rs.recordcount=0 then 
%>
商品已不存在
<%
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
			%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="table-shangxia" bgcolor="#ffffff" height="35"><img src="images/menu_06.gif" width="41" height="33" align="absmiddle"> <a href=index.asp><%=webname%></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")&" targer=_blank>"&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")&" targer=_blank>"&rs2("nclass")
									end if
									rs2.close
									set rs2=nothing%>
</td>
</tr>
<tr> 
<td> 
<table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr> 
<td valign="top" width="240"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr> 
<td> 
<table cellspacing=0 cellpadding=0 width=220 height=220 border=0>
<tbody>
<tr> 
<td background=images/cla.gif align=center>
<%if rs("zhuang")="" then 
response.write "<img src=images/emptybook.gif width=200 border=0>"
else%>
<a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="<%=trim(rs("zhuang"))%>" width=200 border=0 alt="点击浏览商品大图" height="200"></a> 
<%end if%>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</td>
<td valign="top"> 
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr> 
<td height="30"><font color="#ff6600" size="3"><strong><%=rs("bookname")%></strong></font></td>
</tr>
<%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
%>
<tr> 
<td>销 售 商：<a href="user/index.asp?id=<%=rs_shjia("shjiaid")%>" target="_blank"><u><%=rs_shjia("name")%></u></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")%>" target="_blank">给销售商留言</a>
</td>
</tr>
<tr>
<td>
商家星级：<img src=images/level<%=rs_shjia("tj")%>.gif>
				<%
			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")&">商家付款方式</a>"
			response.write "/"
			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")&">商家配送说明</a>"
			response.write " "
			else
			response.write " "
			end if%>
			</td>
            </tr>
<%
end if					  
rs_shjia.close
set rs_shjia=nothing
%>
<!--<tr> <td><%=rs("isbn1")%>：<%=rs("isbn")%></td></tr>-->
<tr> 
<td>商品数量：<%=trim(rs("kucun"))%> <%=rs("bookchuban")%>　被浏览<%=trim(rs("liulancount"))%>次　<%if rs("kucun")>0 then%>热卖中<%else%>缺货<%end if%></td>
</tr>
<tr>
<tr> 
<td>商品折扣：<%response.write rs("dazhe")*10&" 折"%>　赠送积分：<%=rs("yeshu")%> 分</td>
</tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="65">商品价格：</td>
<td width="65" align="center" valign="bottom"><s>￥<%=rs("shichangjia")%>元</s> <br><img src="images/graph01.gif"></td>
<td width="65" align="center" valign="bottom"><font color="#FF0000">￥<%=rs("huiyuanjia")%>元</font> <br><img src="images/graph02.gif"></td>
<td width="65" align="center" valign="bottom"><%if Request.Cookies("godbook")("reglx")=2 then%><font color="#FF0000"><%=rs("Vipjia")%>元</font> <br><img src="images/graph03.gif"><%end if%></td>
</tr>
<tr>
<td align="center" valign="bottom"></td>
<td align="center">市场价</td>
<td align="center">会员价</td>
<td align="center"><%if Request.Cookies("godbook")("reglx")=2 then%>VIP 价<%end if%></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
                <td align="center" height="60">
<a href="<%=trim(rs("zhuang"))%>" target=_blank><img src="images/detailview_s.gif" width="115" height="36" border=0></a></td>
                <td  height="60" class="table-shang"> <a href="gouwu.asp?id=<%=rs("bookid")%>&action=add"><img src="images/detailview_b.gif" width="100" height="36" border=0></a>　<a href="shoucang.asp?id=<%=rs("bookid")%>&action=add" target=_blank><img src="images/detailview_c.gif" width="100" height="36" border=0></a> 
                </td>
</tr>
</table>
<table width="100%" class="table-shang" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="images/top_img_01.gif" align="absmiddle">
<table width="98%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td><p></p>
<%=rs("bookcontent")%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<%
response.write "<tr><td align=right><a href=research.asp?action=1&anclassid=0&searchkey="&trim(rs("bookname"))&" target=_blank>查看更多关于<font color=red>"&trim(rs("bookname"))&"</font>的商品>></a>&nbsp;&nbsp;&nbsp;</td>"
rs.close
set rs=nothing
end if%>
<tr> 
<td class="table-shang">
<img src="images/top_img_02.gif" align="absmiddle">
</td>
</tr>
        <%
		set rs=server.createobject("adodb.recordset")
		rs.open "select  * from shop_pinglun where bookid="&request("id")&" order by pinglundate desc",conn,1,1
		j=rs.recordcount
		plcount=rs.recordcount
		if j>3 then j=3
		for i=1 to j
		%>
<tr> 
<td> 
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF"> 
<td align="center">
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr bgcolor="#FFFFFF"> 
<td colspan="2">主题：
<%=trim(rs("pingluntitle"))%></td>
<td width="20%"><img src="images/level<%=rs("pingji")%>.gif"></td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td colspan="2">作者：
<%=trim(rs("pinglunname"))%>　(<%=trim(rs("pinglundate"))%>)</td>
<td width="20%"><%=trim(rs("ip"))%></td>
</tr>
<tr bgcolor="#FFFFFF"> 
<td colspan="3" bgcolor="#FFFFFF">内容：
<%if len(rs("pingluncontent"))>24 then 
	response.write left(rs("pingluncontent"),20)&"... <a href=""javascript:;"" onClick=""javascript:window.open('pinglunll.asp?id="&rs("pinglunid")&"','pinglun','width=300,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&trim(rs("pingluntitle"))&">[详细内容]</a>" 
	else response.write rs("pingluncontent")
	end if%>
</td>
</tr>
<%if trim(rs("huifu"))<>"" then%>
<tr bgcolor="#FFFFFF">
<td colspan="3"><b><font color="#ff6600">销售商回复：</font></b><%=rs("huifu")%> 
</td>
</tr>
<%end if%>
</table>
</td>
</tr>
</table>
<br>
</td>
</tr>
<%	
rs.movenext
next
if plcount>0 then 
%>
<tr> 
<td align=right><a href=listpl.asp?id=<%=request("id")%> target=_blank>浏览该商品的全部<%=plcount%>条评论>></a>&nbsp;&nbsp;&nbsp;</td>
</tr>
<%end if%>
<tr> 
<td align="center" height="180">
<!--#include file="pinglun.asp"-->
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>