<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<div id="wrapper">
<%
dim id
id=SafeRequest("id",1)

dim prename,company,intro,predate,graph2,description,rebrand,price,rs2,strSorts,strCategory,addlink,YourPrice
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from product where id="&id,conn,1,3
if rs2.eof and rs2.bof then
response.Write "<script language='javascript'>alert('查无此记录，请正确操作！');history.go(-1);</script>"
response.End
end if
rs2("viewnum")=rs2("viewnum")+1
rs2.update 

webtitle=rs2("name")&"|"&webname
webkeywords=rs2("name")
webdescription=rs2("name")&"|"&webname
%> 

<!--#include file="include/header.asp"--> 
<div id="main2">
  <div id="leftcolumn2">
  <!--#include file="include/pronav1.asp"--></TD>
      
   <!--#include file="include/ems.asp"-->
      <!--#include file="include/comment.asp"-->

</div>
<div id="content2">

<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"  align="center" bgcolor="#FFFFFF">
<TR><TD HEIGHT="30"  bgcolor="#f1f1f1" width="75" class=table-xia><FONT COLOR="#999999">&nbsp;<b>您的位置：</b></FONT></TD>
<td bgcolor="#FFFFFF" class=table-xia>&nbsp;<a href="index.asp"><b><%=webname%></b></a>&nbsp;-&gt;&nbsp;<a href="product.asp?id=<% = trim(rs2("id")) %>"><%=trim(rs2("name"))%></a></td></TR></table>

<TABLE align="center" BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="100%"  bgcolor="#FFFFFF"  class=table-zuoyou> 

<TR><TD height="300"  align="center" >
  <table height="260" WIDTH="260" BORDER="0" CELLPADDING="0" CELLSPACING="1" BGCOLOR="<% = bgclr7 %>">
         <tr><td height="220"  BGCOLOR="#FFFFFF" align="center" > 
      <%if trim(rs2("pic1"))<>"" and trim(rs2("pic1"))<>"images/emptybook.jpg" then %>
	  <a href=<%=trim(rs2("pic1"))%> target=_blank><img src=<% = trim(rs2("pic1")) %>  border=0 width="220"   alt=<% = trim(rs2("name")) %> ></a>
	  <% elseif rs2("pic")<>"" then %>
           <a href=<%=trim(rs2("pic"))%> target=_blank><img src=<% = trim(rs2("pic")) %>  border=0 width="220"   alt=<% = trim(rs2("name")) %> ></a>
          <%else %>  
	  <img src=images/emptybook.jpg  alt=此商品暂时没有图片 >
	  <% end if %>
                </TD></TR>
            </TABLE>
       </TD>
                <TD     class=table-zuo>
				<TABLE WIDTH="100%" BORDER="0"  CELLPADDING="0" CELLSPACING="0">
              <TR> 
                <TD colspan="3" height="50" >   <%=trim(rs2("name"))%></TD>
              </TR>
              <TR> 
                <TD colspan="3"   bgcolor="#EA2646" height="3"></TD>
              </TR>
               <TR> 
                <TD colspan="3"    height="20"></TD>
              </TR>
              <TR> 
                <TD colspan="3" height="30">&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;<% = rs2("intro") %><%=trim(rs2("introduce"))%></TD>
              </TR>
              <TR> 
                <TD colspan="3" height="30">&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;<% = rs2("company") %><a href=proclass.asp?bd=<% = rs2("brand") %>><font color="#930000"> 
                  <% = rs2("brand") %>
                  </font></a></TD>
              </TR>
             <%if rs2("grade")<> "" then%>
              <TR> 
                <TD colspan="3" height="30">&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;<% = rs2("other") %><%=trim(rs2("grade"))%></TD>
              </TR>
              <% end if %>
               <%if rs2("type")<> "" then%>
               <TR> 
                <TD colspan="3" height="30">&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;<% = rs2("pretype") %><%=trim(rs2("type"))%></TD>
              </TR>
               <% end if %>
              <TR> 
                <TD height="30" >&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;赠送积分：<%=rs2("score")%>分</TD>
                <TD colspan="2">库存数量：<%If rs2("stock") > 0  Then %>有货<% Else %>缺货<% end if %></TD>
              
                 
              
               
              </TR>
              <TR> 
                <TD height="30" width="40%">&nbsp;<img src=images/icon01.gif border="0" width=4 height="8">&nbsp;市场价格：<S>￥<% if rs2("price1")<1 then%>
                   <FONT COLOR=#004F69>0<%=trim(rs2("price1"))%></FONT>元
                  <%else%>
                  <FONT COLOR=#004F69><%=trim(rs2("price1"))%></FONT>元
                   <%end if%></S></TD>
                <TD width="30%">网店价格：<%
		If rs2("amount") = 0 or  LngUserID=0 or Lnggrdid = 4 Then %>

               <% if rs2("price2")<1 then%>
                   <FONT COLOR=#004F69>0<%=trim(rs2("price2"))%></FONT>元
                  <%else%>
                  <FONT COLOR=#004F69><%=trim(rs2("price2"))%></FONT>元
                   <%end if%>


           <% Else %>
                    <% if Round(trim(rs2("price2")*LngDiscount),2)<1 then %>
                   <FONT COLOR=#004F69>0<%=Round(trim(rs2("price2")*LngDiscount),2)%></FONT>元
                  <%else%>
                  <FONT COLOR=#004F69><%=Round(trim(rs2("price2")*LngDiscount),2)%></FONT>元
                   <%end if%>

               <%end if%></TD>
                <TD width="30%" >节省：<%=FormatNumber(rs2("price1")-rs2("price2"))%>元</TD>
                
              </TR>
              <% if rs2("stock") > 0 then %>
              <TR> 
                <TD align="center" colspan="3"> <a href="shopcart.asp?ProdId=<% = rs2("id") %>" target="_blank"><img src=skin/skin<%=skin%>/cart/mnu<% = webbg16 %>_bg.png align=absmiddle border=0></a></TD>
              </TR>
              <% else %>
              <tr> 
                <td colspan="3" align="center"><font color="#930000">暂时缺货</font></td>
              </tr>
              <% end if %>
            </TABLE></TD>
              </TR>
            </TABLE> 
<TABLE align="center" BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="100%"  bgcolor="#FFFFFF"  class=table-zuoyou> 
	
  <tr><td   align="center" bgcolor="#f1f1f1" height="30" class=table-shangxia><font color="#999999"><b>详细说明</b></font>	</td></tr>
  <tr><td  valign="top" style="word-wrap:break-word;word-break:break-all;width:700px;">
	 <div class="editp_line" >
                        <%if rs2("detail")<>"" then
		  response.write ""&rs2("detail")&""
		  end if
		  
		
		  %>
             </div>		  
                      </td></tr>
                  </table>
            
<TABLE align="center" BORDER="0" CELLPADDING="0" CELLSPACING="1" WIDTH="100%"  bgcolor="#FFFFFF"  class=table-zuoyou> 
			  <tr><td  style="PADDING-LEFT: 20px;"></br>会员评级</td>
              <%

		response.write "</tr>"
		response.write "<tr><td colspan=2 style='PADDING-LEFT: 20px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
		call rank()
		response.write "&nbsp;&nbsp;<a href=# onClick=""javascript:window.open('rank.asp?id="&id&"','','width=295,height=235,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"">发表您对本商品的评级</a></td></tr>"
		rs2.close
		set rs2=nothing
		
		response.write "<tr><td style='PADDING-LEFT: 20px;'><b>会员评论<b>&nbsp;&nbsp;<a href=# onClick=""javascript:window.open('comment.asp?id="&id&"','','width=350,height=280,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"" ><img src=images/my_review.gif width=93 height=20 border=0 alt=用户评论></a></td>"
		response.write "<td></td></tr>"
		'//用户评论
		
		set rs1=server.CreateObject("adodb.recordset")
		rs1.open "select * from review where id="&id&" and audit=1 ",conn,1,1
		if rs1.eof and rs1.bof then
		response.write"<tr><td colspan=2 style='PADDING-LEFT: 20px;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;如果您用过本商品，或对本商品有所了解，欢迎您发表自己的评论。您的评论将被网络上成千上万的用户所共享，我们将对您的慷慨深表感谢。"
		response.write "&nbsp;您的评论在提交后将经过我们的审核，也许您需要等待一些时间才可以看到。谢谢合作。</td></tr>"
		else
		do while not rs1.eof 
				%>
              <TR> 
                <TD style="word-wrap:break-word;word-break:break-all;PADDING-LEFT: 20px;">评论主题：<%=rs1("title")%>&nbsp;&nbsp;发表时间：<%=rs1("reviewdtm")%><BR> 
                 评论正文： <%=rs1("reviewcontent")%></TD>
              </TR>
			   <TR> 
                <TD style="word-wrap:break-word;word-break:break-all;PADDING-LEFT: 20px;">管理回复：<%=rs1("replyto") %></TD>
              </TR>
			  <TR> 
                <TD height="10"></TD>
              </TR>
              <%rs1.movenext
		loop
                 end if
		rs1.close
		set rs1=nothing
		%>
            </TABLE>
</div>
		
	</div>
           
			<!--#include file="include/footer.asp"--> 
</div>
<%sub rank()
dim other
if rs2("ranknum")>0 and rs2("rank")>0 then
other=rs2("ranknum")\rs2("rank")
else
other=0
end if
response.write "<img src=images/rank/"&other&".gif alt=评论星级>"
end sub
%>