<!--#include file="inc_top.asp"-->
<table width="762" bgcolor="#ffffff" align="center" cellpadding="0" cellspacing="0" class="pian3">
  <tr>
    <td width="152" valign="top" class="table-you"> 
      <%
if Request("ping")<>"" and Request("add")<>"" then
if Len(request("ping"))>255 then 
Response.Write("<script>alert(""产品评论不能多于255字!"");history.back();</script>")
response.end
end if
conn.execute("Insert into ping(cpid,name,ping,userid)values("&Request("id")&",'"&Request("name")&"','"&Request("ping")&"',"&Request("userid")&")")
response.write"<script>alert(""您的评论已经发表，经过管理员审核后才能在网站显示。谢谢您的大力支持！"");location.href=""product.asp?id="&request("id")&""";</script>"
end if
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from chanpin where id="&request("id")&" order by id DESC"
rs.open sql,conn,3,3
if rs.eof then
response.write "<br>出错了，请确认您的链接来自本网站"
else 
rs("rq")=rs("rq")+1
rs.update
'统计 
set rsjs = conn.execute("select * from js where cpid="&rs("id")&"")
if rsjs.eof then
conn.execute("Insert into js(cpid,mc,lbid,jg2,xt)values("&rs("id")&",'"&rs("mc")&"','"&rs("lbid")&"',"&rs("jg2")&",'"&rs("xt")&"')")
else
conn.execute("Update js set js = js+1 where cpid="&rs("id")&"")
end if
rsjs.close
set rsjs=nothing
end if%>
      <table width="152" border="0" align="center" cellpadding="0" cellspacing="0">
        <form name="form1" method="post" action="?add=yes">
          <tr valign="middle"> 
            <td height="25" align="center" class="table-shang" ><img src="image/ping.gif" width="166" height="30"></td>
          </tr>
          <tr valign="middle"> 
            <td height="30" align="center" nowrap class="d13" >姓名/网名 
              <input name="name" type="text" class="wenbenkuang" id="name" value="<%=session("huiyuan")%>" size="12"> 
            </td>
          </tr>
          <tr valign="middle"> 
            <td height="25" align="center" nowrap class="d13"> <textarea name="ping" cols="22" rows="3" class="wenbenkuang" id="ping"></textarea> 
            </td>
          </tr>
          <tr valign="middle"> 
            <td height="25" align="center" class="d13"> <input name="Submit" type="submit" class="go-wenbenkuang" value="提交"> 
              <input name="Submit2" type="reset" class="go-wenbenkuang" value="重写"> 
              <input type="hidden"  name=id value=<%=request("id")%>> 
              <input  name=userid type="hidden" id="userid" value=<%=rs("userid")%>> 
	</td>
	</tr>
	</form>
	</table></td>
    <td width="610" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="30" valign="middle">&nbsp;&nbsp;<img src="image/tp009.gif" width="15" height="15"> 
	<a href="index.asp" target="_blank">首页</a> &gt;&gt; <%set rs2 = conn.execute("select * from lb where  lbid="&rs("lbid")&"")
	Response.Write("<a href=lb.asp?lbid="&rs("lbid")&" target=_blank>"&rs2("lbname")&"</a>")
	rs2.close%> &gt;&gt; 
<%set rs2 = conn.execute("select * from xlb where  xlbid="&rs("xlbid")&"")
	xlbname=rs2("xlbname")
	Response.Write("<a href=xlb.asp?lbid="&rs2("lbid")&"&xlbname="&rs2("xlbname")&"&xlbid="&rs2("xlbid")&" target=_blank>"&rs2("xlbname")&"</a>")
	rs2.close
	sorts=rs("slb")
	sorts=trim(sorts)
	if sorts<>"" then 
	response.write " &gt;&gt; " 
	bsort=split(sorts,",")
	for i=0 to ubound(bsort)
	bsortb=bsort(i)
	bsortb=trim(bsortb)
	response.write "<a href=/slb.asp?lbid="&rs("lbid")&"&xlbid="&rs("xlbid")&"&xlbname="&xlbname&"&slbname="&bsortb&" target=_blank>"&bsortb&"</a>"&"&nbsp;"
	next
	end if%></td>
        </tr>
      </table>
<% dim jg1,jg2,jgshang,shuqian,shuhou
jg1=rs("jg1")
jg2=rs("jg2")
if jg1<>0 then
jgshang=formatnumber(jg2/jg1,2)*100
shuqian=int(jgshang/10)
shuhou=jgshang mod 10
else
shuqian=0
shuhou=0
end if%>
      <table width="590" align="center" cellpadding="5" cellspacing="0">
        <tr> 
          <td width="260" align="center" valign="top"> 
            <TABLE cellSpacing=0 cellPadding=0 width=244 border=0>
              <TBODY>
                <TR> 
                  <TD width=22><IMG height=22 src="image/zt/jiao-1.gif" 
            width=22></TD>
                  <TD width=200 background="image/zt/jiao-l1.gif">&nbsp;</TD>
                  <TD width=22><IMG height=22 src="image/zt/jiao-2.gif" 
            width=22></TD>
                </TR>
                <TR> 
                  <TD background="image/zt/jiao-l2.gif">&nbsp;</TD>
                  <TD vAlign=center align=middle><a href="user/image_cp/<%=rs("dt")%>"  onFocus="this.blur()" target="_blank"><img src="user/image_cp/<%=rs("zt")%>" width="200" height="200" border="0"></a>
	<P style="MARGIN-TOP: -30px" align=right><IMG height=36 src="image/zhekou/<%=shuqian%>d.gif" width=20><IMG height=38 src="image/zhekou/<%=shuhou%>z.gif" width=17></P> 
                  </TD>
                  <TD background="image/zt/jiao-l3.gif">&nbsp;</TD>
                </TR>
                <TR> 
                  <TD><IMG height=22 src="image/zt/jiao-3.gif" width=22></TD>
                  <TD background="image/zt/jiao-l4.gif">&nbsp;</TD>
                  <TD><IMG height=22 src="image/zt/jiao-4.gif" 
        width=22></TD>
                </TR>
              </TBODY>
            </TABLE>
<%set rs2 = conn.execute("select id,name,xing,tel from user_name where id="&rs("userid")&"")%>
<a href=user/index.asp?userid=<%=rs("userid")%> target=_blank><u><%=rs2("name")%></u></a><br><font color="#006600">商品定购电话：<%=rs2("tel")%></font></td>
          <td width="330" valign="top"> 
            <table width="320" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td height=30><font color="#FF6600" size="2"><strong><%=rs("mc")%></strong></font></td>
              </tr>
              <tr> 
                <td height="1" background="image/1x3.gif"></td>
              </tr>
              <tr> 
                <td bgcolor="#f1f1f1">销售商：
<%
		Response.Write("<a href=user/index.asp?userid="&rs("userid")&" target=_blank><u>"&rs2("name")&"</u></a>")
				Response.Write("<br>商户星级：<img src=image/xing/"&rs2("xing")&"stars.gif>")
				rs2.close%>
                  &nbsp;〖<a href="user/service.asp?userid=<%=rs("userid")%>#truck" target="_blank"><u>配送/支付方式</u></a>〗 
                  〖<a href="user/service.asp?userid=<%=rs("userid")%>#rule" target="_blank"><u>售后服务</u></a>〗</td>
              </tr>
              <tr> 
                <td bgcolor="#f1f1f1">关键字: 
                  <%
	   sorts2=rs("cj")
	  sorts2=trim(sorts2)
	if sorts2<>"" then 
	   bsort2=split(sorts2,"|")
	  for i=0 to ubound(bsort2)
	   bsortb2=bsort2(i)
	   bsortb2=trim(bsortb2)
	   response.write "<a href=search.asp?lbid=0&key="&bsortb2&" target=_blank><u>"&bsortb2&"</u></a>&nbsp;"
	    next
		  end if%>
                </td>
              </tr>
              <tr> 
                <td bgcolor="#f1f1f1"><s>市场价：￥<%=rs("jg1")%>元</s>&nbsp; <font color="#FF3333">会员价：￥<%=rs("jg2")%>元</font>&nbsp;立刻节省：￥<%=rs("jg1")-rs("jg2")%>元</td>
              </tr>
              <tr> 
                <td><font color=#006600><b>▍产品简评：</b><br><%
jp = rs("jp")
jp = Replace(jp, chr(32), "&nbsp;")
jp = Replace(jp, vbCrLf, "<br>")
Response.Write jp
%></font></td>
              </tr>
            </table>
            <br>
            　　　　　　　　　　　　<a href="addcart.asp?cpid=<%=rs("id")%>" target="_blank" onFocus="this.blur()"><img src="image/buy.gif" width="65" height="20" border="0"></a> 
            <a href="addfav.asp?cp_id=<%=rs("id")%>" target="_blank" onFocus="this.blur()"><img src="image/aad.gif" width="65" height="20" border="0"></a> 
            &nbsp;&nbsp;&nbsp; </td>
        </tr>
      </table>
      <table width="98%" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><hr align="left" color="#cccccc" width="95%" size="1" noshade> <img src="image/dot2.gif" width="27" height="27" align="absmiddle"><strong><font size="3"> 
            </font></strong><font size="3"><strong>产品介绍</strong></font><br><br> 
            <%
txt = rs("js")
txt = Replace(txt, chr(32), "&nbsp;")
txt = Replace(txt, vbCrLf, "<br>")
Response.Write txt
%>
	<br> 
	<hr align="left" color="#cccccc" width="95%" size="1" noshade>
	<img src="image/dot2.gif" width="27" height="27" align="absmiddle"> 
	<strong><font size="3">网友评论</font></strong><br>
	<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
	<tr>
	<td>
<%set rsre = conn.execute("select top 5 * from ping where zt=1 and cpid="&request("id")&"")
	if not rsre.eof then 
	while not rsre.eof %>
                  作者:<%if rsre("name")="" then
	Response.Write("匿名")
	else
	Response.Write(""&rsre("name")&"")
	end if%>&nbsp;&nbsp;[<%=rsre("sj")%>]<br>
                  评论内容：<%=rsre("ping")%><% if rsre("hf")<>"" then Response.Write "<br><font color=#FF6600>【评论回复】"&rsre("hf")&"</font>" %><br>
	<%rsre.movenext
	wend 
	rsre.close
	set rsre=nothing
	else 
	response.write "<tr><td>暂时没有此商品的相关评论!</td></tr>"
	end if 
%>
	</td>
	</tr>
	</table> 
	<hr align="left" color="#cccccc" width="95%" size="1" noshade>
	<img src="image/dot2.gif" width="27" height="27" align="absmiddle"> 
	<strong><font size="3">相关产品<br></font></strong><table width="90%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#CCCCCC">
	<% c=replace(rs("cj"),"|","%' or cj like '%")
	set rsrs=server.createobject("adodb.recordset")
	sql1="select top 10 * from chanpin where (cj like '%"&c&"%') and id<>"&request("id")&" and cang=0 order by id desc"
	rsrs.open sql1,conn,1,1 
	if not rsrs.eof then 
	while not rsrs.eof %>
	<tr>
	<td bgcolor="#FFFFFF" class="unnamed1"> <img src="image/tp006.gif" width="12" height="11" border="0"> 
	<% response.write  "<a href=product.asp?id="&rsrs("id")&" target=_blank>"&rsrs("mc")&"</a>&nbsp;<s>￥"&rsrs("jg1")&"元</s>&nbsp;<font color=#ff3300>￥"&rsrs("jg2")&"元</font><br>"%> </td>
	</tr>
	<% rsrs.movenext
	wend 
	end if 
	rsrs.close
	set rsrs=nothing%>
	</table><br>
	</table>
</td>
</tr>
</table>
<table width="0" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<%rs.close
set rs=nothing%>
<!--#include file="inc_end.asp"-->