<!--#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">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.css03 {FONT-SIZE: 12px; LINE-HEIGHT: 130%}
.style2 {
	color: #333300;
	font-weight: bold;
	font-size: 12px;
}
.style3 {
	color: #75710A;
	font-weight: bold;
}
-->
</style>
</head>
<script language="JavaScript">
	
	<!--
	
	function OpenNews() 
	{
			window.name = "news"
			win = window.open('','newswin','left=110,width=600,height=420,scrollbars=1');
	}
	//-->
	</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<%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")=HTMLEncode(trim(request("pinglunname")))
rs("pingluntitle")=HTMLEncode(trim(request("pingluntitle")))
rs("pingluncontent")=HTMLEncode(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=778 border=0 align=center cellPadding=0 cellSpacing=0 background="images/content.gif" bgcolor="#F9AD38">
  <TBODY>
    <TR>
      <TD class=b width=10>&nbsp;</TD>
      <TD class=b vAlign=top align=left width=764><table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CFD0A7" bgcolor="#EDF0DB" class="table-zuoyou">
        <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="#EDF0DB" bordercolor="#CFD0A7"><%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("bjx")("username")<>"" then 
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [user] where username='"&request.Cookies("bjx")("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("bjx")("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("bjx")("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("bjx")("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" cellpadding="0" cellspacing="0" bgcolor="#EDF0DB">
          <tr>
            <td height="35" background="image/bar.gif" class="table-shangxia"> &nbsp; &nbsp; &nbsp; &nbsp; <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" cellpadding="2" cellspacing="0" bgcolor="#EDF0DB">
                      <tr>
                        <td><table cellspacing=0 cellpadding=0 width=220 height=220 border=0>
                            <tbody>
                              <tr>
                                <td align=center background=images/cla.gif bgcolor="#EDF0DB"><%if rs("zhuang")="" then 
response.write "<img src=images/emptybook.gif width=200 border=0>"
else%>
                                    <a href="<%=trim(rs("zhuang"))%>" target="newswin" ><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"><span class="style2"><%=rs("bookname")%></span></td>
                      </tr>
                      <tr>
                        <td>商品数量：                            <%=trim(rs("kucun"))%> <%=rs("bookchuban")%>
                          <%if rs("kucun")>0 then%>                          <span class="style1">热卖中</span>                            <%else%>
                            <span class="style1">缺货</span>                            <%end if%></td>
                      </tr>
                      <tr>
                        <td>点击次数：                            <%=trim(rs("liulancount"))%>次</td>
                      </tr>
                      <tr>
                      <tr>
                        <td>商品折扣：
                            <%response.write rs("dazhe")*10&" 折"%>
                            　</td>
                      </tr>
                      <tr>
                        <td>赠送积分：                            <%=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"><font color="#FF0000"><%=rs("Vipjia")%>元</font> <br>
                                <img src="images/graph03.gif"></td>
                          </tr>
                          <tr>
                            <td align="center" valign="bottom"></td>
                            <td align="center">市场价</td>
                            <td align="center">会员价</td>
                            <td align="center">VIP 价</td>
                          </tr>
                      </table>
                        <table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC" class="css03">
                          <tr>
                            <td align="center" bgcolor="EEEEEE"><a  href="tuangou.asp?bookid=<%=id%>&bookname=<%=rs("bookname")%>&huiyuanjia=<%=rs("huiyuanjia")%>" onClick="OpenNews()" target="newswin"><font color="cc0000">批发或集团采购</font></a></td>
                            <td align="center" bgcolor="EEEEEE"><a href=# onClick="window.open('sendmail.asp?bookid=<%=id%>&bookname=<%=rs("bookname")%>', 'basket','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=0,resizable=0,width=550,top=10,left=0,height=345')"><font color="cc0000">推荐给朋友</font></a> </td>
                            <td align="center" bgcolor="EEEEEE"><a href="help.asp"><font color="cc0000">帮助中心</font></a></td>
                            <td align="center" bgcolor="EEEEEE"><a href="user.asp"><font color="cc0000">我的购物管家</font></a></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td align="center" height="60"><a href="<%=trim(rs("zhuang"))%>" target="newswin" ><img src="images/detailview_s.gif" width="115" height="36" border=0></a></td>
                  <td  height="60" class="table-shang">
				  
				  <%
if rs("checkcard")=1 then
%>
<a href="getcard.asp?id=<%=rs("bookid")%>" target="_blank" ><img src="images/btn_buy_1.gif"  border=0></a> （<span class="style1">在线取卡</span>）
<%else%>
<a href="gouwu.asp?id=<%=rs("bookid")%>&action=add" target="_blank" ><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>
<%end if%> 
				  
				  </td>
                </tr>
              </table>
                <table width="100%" class="table-shang" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td >
                        <table width="99%" border="0" cellspacing="0" cellpadding="10" align="center">
                          <tr>
                            <td height="30" background="image/bar.gif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong class="style1"><font color=#75710A>产 品 说 明</font></strong></td>
                          </tr>
                          <tr>
                            <td height="30"><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"))&" >查看更多关于<font color=red>"&trim(rs("bookname"))&"</font>的商品>></a>&nbsp;&nbsp;&nbsp;</td>"
rs.close
set rs=nothing
end if%>
          <tr>
            <td height="37" background="image/bar.gif" class="table-shang">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong class="style1"><font color=#75710A> 网 友 评 论</font></strong> </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"><span class="style3">销售商回复：</span><%=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")%> >浏览该商品的全部<%=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></TD>
      <TD class=b width=10></TD>
    </TR>
  </TBODY>
</TABLE>
<!--#include file="service.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>