<!--#include file="conn.asp"-->
<!--#include file="buy2buysys.asp"-->
<% 
dim id,prename,company,intro,predate,graph2,description,remarks,price,rs2,strSorts,strCategory,YourPrice
id=SafeRequest("id",1)
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 
IntCatID = rs2("categoryid")

	     set rs=server.CreateObject("adodb.recordset")
		do while not IntCatID = 0
		 rs.open "Select categoryid,category,ParentID From category Where categoryid="&IntCatID,conn,1,1
		 
		 if rs.eof and rs.bof then
		response.Write "<script LANGUAGE='javascript'>alert('您输入的参数非法，请正确操作！');history.go(-1);</script>"
		rs.close
		set rs = Nothing
		conn.Close
		set conn=nothing
		response.end
		end if

		 strCategory = "<a href=b2b_cplist.asp?catid="&rs("categoryid")&">"&rs("category")&"</a>－&gt;"&strCategory
		 TitleCategory = TitleCategory&""&rs("category")&"－&gt;"
		 IntCatID = rs("ParentID")
		 rs.close 
		 loop
		 
set rs = nothing
%> 

<html>
<head>
<title><%=rs2("name")%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #ffffff;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style></head>
<body>
<!--#include file="b2b_includefile/b2b_top.asp" -->
<table align="center" border="0" cellpadding="0" cellspacing="0" width="959">
  <tr>
    <td background="image/index_15.gif"><img name="index_15" src="image/index_15.gif" width="10" height="154" border="0" alt=""></td>
    <td width="938" bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="0" width="938">
        <tr>
          <td width="178" valign="top"><!--#include file="b2b_includefile/b2b_userloginleft.asp" -->
              <br>
          </td>
          <td align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="760">
              <tr>
                <td width="760"><img name="main3_02" src="image/listleft2.gif" width="760" height="17" border="0" alt=""></td>
              </tr>
            </table>
              <img src="image/repic.gif" width="730" height="60">
              <table width="730"  border="0" align="center" cellpadding="1" cellspacing="1">
                <tr>
                  <td width="760"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" align="center">
                      <tr>
                        <%

		response.write "</tr>"
		response.write "<tr><td colspan=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
		call rank()
		rs2.close
		
		response.write "<td></td></tr>"
		'//用户评论
		rs2.open "select * from review where id="&id&" and audit=1 ",conn,1,1
		if rs2.eof and rs2.bof then
		response.write"<tr><td colspan=2>&nbsp;&nbsp;&nbsp;&nbsp;<font color=#ff0000>暂时还没有客户对此商品作出评论。</font></td></tr>"
		else
		do while not rs2.eof 
				%>
                      <TR>
                        <TD>&nbsp;</TD>
                      </TR>
                      <TR>
                        <TD></TD>
                      </TR>
                      <TR>
                        <TD><table width="100%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#E1E1E1">
                            <tr bgcolor="#f7f7f7">
                              <td width="11%" height="30"><strong>发表时间</strong></td>
                              <td width="89%" height="30"><%=rs2("reviewdtm")%></td>
                            </tr>
                            <tr bgcolor="#FFFFFF">
                              <td height="30"><strong>评论正文</strong></td>
                              <td height="30"><%=rs2("reviewcontent")%></td>
                            </tr>
                            <tr bgcolor="#FFFFFF">
                              <td height="30"><strong>管理回复</strong></td>
                              <td height="30"><%=rs2("replyto") %></td>
                            </tr>
                        </table></TD>
                      </TR>
                      <%rs2.movenext
		loop
		rs2.close
		set rs2=nothing
		end if%>
                  </TABLE></td>
                </tr>
              </table>                        </td>
        </tr>
    </table></td>
    <td background="image/index_17.gif"><img name="index_17" src="image/index_17.gif" width="11" height="154" border="0" alt=""></td>
  </tr>
</table>
<!--#include file="b2b_includefile/b2b_ver.asp" -->
</body>
</html>
<script LANGUAGE="javascript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function check()
{
  if(checkspace(document.reviewform.title.value)) {
	document.reviewform.title.focus();
    alert("请填写您的姓名！");
	return false;
  }
  if(checkspace(document.reviewform.reviewcontent.value)) {
	document.reviewform.reviewcontent.focus();
    alert("请填写评论正文！");
	return false;
  }
	  }
	  //-->
</script>
