
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp" -->
<!--#include file="alipay/alipay_payto.asp"-->
<%
id=request("id")
if Not isChkInteger(request("id")) then
	%>
            <script language=javascript>
		alert("参数错误！");
		window.close();
	</script> 
            <%
	response.end
end if

set snsn=server.CreateObject("adodb.recordset")
snsn.open "select * from shop_snsn where shopid="&id,conn,1,3
		if snsn.recordcount=0 then 
		%>
<script language='javascript'>alert('商品调用错误，请返回！');window.location.href='index.asp';</script> 
            <%
		end if
sftc=snsn("sftc")
url=snsn("lj")
if snsn("lj")="www" then%>
<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.pinglunform.pinglunname.value)) {
	document.pinglunform.pinglunname.focus();
    alert("请填写您的姓名！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluntitle.value)) {
	document.pinglunform.pingluntitle.focus();
    alert("请填写评论标题！");
	return false;
  }
  if(checkspace(document.pinglunform.pingluncontent.value)) {
	document.pinglunform.pingluncontent.focus();
    alert("请填写评论正文！");
	return false;
  }
	  }
//-->
</script>
<head>
<title><%=webname%>--商品信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="webtop.asp"-->
<div align="center">
<TABLE id=table1 style="MARGIN: 0px auto; BORDER-BOTTOM: #ffffff 0px solid" 
height="100%" cellSpacing=0 borderColorDark=#FFFFFF cellPadding=0 width=976 
borderColorLight=#CECECE border=1>
  <TBODY>
  <TR><!--sart left-->
    <TD vAlign=top width=234 bgcolor="#F1F1F1">
      <p align="center"><!--#include file="left.asp"--></TD><!---end left--><!--start right-->
    <TD vAlign=top align=middle width=736>
            <br> 
            <%
'yaosxia
if Not isChkInteger(request("id")) then
	%>
            <script language=javascript>
		alert("参数错误！");
		window.close();
	</script> 
            <%
	response.end
end if
%>
            <% dim p1,p2,p3,p4
		set rs=server.createobject("adodb.recordset")
		rs.open "select * from shop_snsn where shopid="&request("id"),conn,1,3
		p1=trim(rs("p1"))
		p2=trim(rs("p2"))
		p3=trim(rs("p3"))
		p4=trim(rs("p4"))
		%>
            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" id="table2">
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
              <tr> 
                <td height="25" bgcolor="efefef"><strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                  </strong><b><%=rs("shopname")%>的商品信息：</b></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5" id="table3">
              <tr> 
                <td height="10"></td>
              </tr>
            </table>
            <%
		if rs.recordcount=0 then 
		%>
            <%
		else
rs("liulancount")=rs("liulancount")+1
rs.update
		'call history
		if request.cookies("snsn")("username")<>"" then 
set rs_s=server.CreateObject("adodb.recordset")
rs_s.open "select * from [shop_user] where username='"&checkFFSQLStr(request.cookies("snsn")("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 shopid="&request("id")&" and username='"&checkFFSQLStr(request.cookies("snsn")("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='"&checkFFSQLStr(request.cookies("snsn")("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("snsn")("username")
		    	    rs_s("shopid")=request("id")
		    	    rs_s("shopname")=rs("shopname")
			    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" id="table5">
              <tr> 
                <td> 
				<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="table6">
                    <tr> 
                      <td valign="top" width="224"> 
						<table width="100%" border="0" cellspacing="0" cellpadding="2" id="table7">
                          <tr> 
                            <td> 
                              <%if rs("zhuang")="" then%>
                              <table width="138" border="0" cellpadding="0" cellspacing="0" id="table8">
                                <tr> 
                                  <td> <div align="center"><img src=images/emptyshop.gif border=0></div></td>
                                </tr>
                              </table>
                              <%else%>
                              <table width="120" border="0" cellspacing="0" cellpadding="0" height="100" id="table9">
                                <tr> 
                                  <td> <div align="center"><a href=<%=trim(rs("zhuang"))%> target=_blank>
									<img src="<%=trim(rs("shoppic"))%>" border=0 alt="<%=trim(rs("shopname"))%>"></a></div></td>
                                </tr>
                              </table>
                              <%end if%>
                            </td>
                          </tr>
                          <tr> 
                            <td><font color="#FF0000"> &nbsp;</font></td>
                          </tr>
                        </table></td>
                      <td valign="top"> 
						<table width="98%" border="0" cellspacing="0" cellpadding="2" id="table10">
                          <tr> 
                            <td height="25">【<%=rs("PP")%>】<font color="#FF0000"><%=rs("pingpai")%></font></td>
                          </tr>
                          <tr> 
                            <td height="25">【<%=rs("mch")%>】<%=rs("shopname")%></td>
                          </tr>
                          <tr> 
                            <td height="25">【商品状态】 
                              <%if rs("kucun")>0 then%>
                              上架 
                              <%else%>
                              <font color="#FF0000">缺货</font> 
                              <%end if%>
                            </td>
                          </tr>
                          <tr> 
                            <td height="25">【<%=rs("isbn1")%>】<%=rs("isbn")%></td>
                          </tr>
                          <tr> 
                            <td height="25">【<%=rs("jj")%>】<%=rs("shopchuban")%></td>
                          </tr>
                          <tr> 
                            <td height="25">【评分】 
                              <%if rs("pingjizong")>0 and rs("pingji")>0 then
xx=rs("pingjizong")\rs("pingji")
else
xx=5
end if
response.write "<img src=images/pingji/"&xx&".gif alt=评论星级>"%>
                              &nbsp;&nbsp;&nbsp;共有<%=rs("pingji")%>位网友参与打分</td>
                          </tr>
                          <tr> 
                            <td height="25">【所属类别】 
                              <%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> 【商品价格】&nbsp;<s><font color="#000000">市场价：<%=rs("shichangjia")%>元</font></s><strong> 
                              </strong> <font color="#FF0000">&nbsp;</font></td>
                          </tr>
							<tr>
                            <td><font color="#FF0000"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 会员价：<%=rs("huiyuanjia")%>元</font>　<s>节省：<%=rs("shichangjia")-rs("huiyuanjia")%>元</s></td>
                          </tr>
                          <tr> 
                            <td height="40">
							<table border="0" width="100%" id="table18">
								<tr>
									<td width="149">
									<p align="center"><a href="gouwu.asp?id=<%=rs("shopid")%>&action=add" ><img src="images/gm1.gif" width="110" height="36" border="0"></a></td>
									<td><a href="shoucang.asp?id=<%=rs("shopid")%>&action=add" <%=sftc%>><img src="images/shc1.gif" width="98" height="36" border="0"></a></td>
									
								</tr>
							</table>
                            </td>
                          </tr>
                        </table></td>
                    </tr>
                  </table>
                  <br> 
				<table width="100%" border="0" cellspacing="0" cellpadding="0" id="table11">
                    <tr> 
                      <td> 
						<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" id="table12">
                          <tr> 
                            <td>
                              <%
if p1<>"" then
      response.Write "<img src="&p1&" border=0>"
end if
 response.Write "<br>"
if  p2<>"" then
      response.Write "<img src="&p2&" border=0>"
end if
 response.Write "<br>"
if  p3<>"" then
      response.Write "<img src="&p3&" border=0>"
end if 
 response.Write "<br>"
if p4<>"" then
      response.Write "<img src="&p4&" border=0>"
end if
%>
                              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" id="table13">
                                <tr> 
                                  <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                                </tr>
                                <tr> 
                                  <td height="25" bgcolor="efefef"><strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                                    </strong><b><%=rs("shopname")%>的说明：</b></td>
                                </tr>
                                <tr> 
                                  <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
                                </tr>
                              </table>
                              <br> <b>&nbsp;&nbsp;<%=rs("nr")%></b><br> <%=rs("shopcontent")%><br> 
                              &nbsp;&nbsp;</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
              <%
rs.close
set rs=nothing
end if%>
              <tr> 
                <td height="30">
<div align="center"><a href="list.asp?id=<%=id-1%>"><strong><font color="#FF0000"><img src="images/ansh.gif" width="47" height="19" border="0"></font></strong></a> &nbsp;<strong>
	<a href="list.asp?id=<%=id+1%>"><font color="#FF0000"><img src="images/anx.gif" width="47" height="19" border="0"></font></a> &nbsp; <a href="index.asp"><img src="images/anf.gif" width="47" height="19" border="0"></a></strong></div></td>
              </tr>
              <tr> 
                <td height="25">&nbsp;&nbsp;<b>网友评论</b> 欢迎您对商品进行评论，表明您对此商品的感觉。 
                  <input name="Submit2" type="reset" class="go-wenbenkuang" value="推荐给朋友" onClick="javascript:window.open('shangpintj.asp?id=<%=request("id")%>','pingluntj','width=325,height=200,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no')"> 
                </td>
              </tr>
              <%
		set rs=server.createobject("adodb.recordset")
		rs.open "select  * from shop_pinglun where shopid="&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="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#e8eef3" id="table14">
                    <tr bgcolor="#FFFFFF"> 
                      <td width="5%" height="22" align="right"><img src="images/image002.gif" width="15" height="15"></td>
                      <td height="22" colspan="2" bgcolor="#FFFFFF"><b>主题：</b><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=no');return false;" title="<%=trim(rs("pingluntitle"))%>"><%=trim(rs("pingluntitle"))%></a></td>
                      <td width="36%" height="22"><img src="images/pingji/<%=rs("pingji")%>.gif"></td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="5%">　</td>
                      <td colspan="2" bgcolor="#FFFFFF"><b>作者：</b><%=trim(rs("pinglunname"))%>　(<%=trim(rs("pinglundate"))%>)</td>
                      <td width="36%" bgcolor="#FFFFFF"><strong>IP：</strong><%=trim(rs("ip"))%></td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="5%">　</td>
                      <td colspan="3">&nbsp;&nbsp; <%=rs("pingluncontent")%> </td>
                    </tr>
                    <%if trim(rs("huifu"))<>"" then%>
                    <tr bgcolor="#FFFFFF"> 
                      <td width="5%">　</td>
                      <td width="11%">　</td>
                      <td colspan="2"><b>管理员回复：</b><%=rs("huifu")%> </td>
                    </tr>
                    <%end if%>
                  </table>
                  <br></td>
              </tr>
              <%	
		rs.movenext
		next
		if plcount>0 then 
  %>
              <tr> 
                <td align=right height="22"><a href=listpl.asp?id=<%=request("id")%>>&gt;&gt;浏览该商品的全部<%=plcount%>条评论&nbsp;&nbsp;</a></td>
              </tr>
              <%end if%>
              <tr> 
                <td align="center" height="38"><FORM action=pinglun.asp method=post name="pinglunform" id="pinglunform">
					<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" id="table15">
                    <tr bgcolor="#FFFFFF"> 
                      <td height="25"> <font color=#b70000>&nbsp;<img 
                        src="images/go.gif"></font><FONT 
                  color=#000000><B> <strong>&nbsp;<font color="<%=flzhzt%>">发表您的评论：</font></strong></B></FONT></td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td height="23" bgcolor="#FFFFFF">&nbsp;姓名： 
                        <input name="pinglunname" class="wenbenkuang"type="text" id="pinglunname3" size="12">
                        标题： 
                        <input name="pingluntitle"  class="wenbenkuang"type="text" id="pingluntitle" size="26"></td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td height="23" bgcolor="#FFFFFF">&nbsp;评级： 
                        <input type="radio" name="pingji" value="5" checked> <img src="images/pingji/5.gif"> 
                        <input type="radio" name="pingji" value="4"> <img src="images/pingji/4.gif"> 
                        <input type="radio" name="pingji" value="3"> <img src="images/pingji/3.gif"> 
                        <input type="radio" name="pingji" value="2"> <img src="images/pingji/2.gif"> 
                        <input type="radio" name="pingji" value="1"> <img src="images/pingji/1.gif"> 
                      </td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                        <td height="23" bgcolor="#FFFFFF"> <FONT 
                  color=#000000><B> <strong>&nbsp;</strong></B></FONT>请在以下填写评论正文：
                          <input name="id" type="hidden" value=<%=request("id")%>> 
                        </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                      <td height="12" valign="top" bgcolor="#FFFFFF">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table16">
                          <tr> 
                            <td><IMG height=5 src="images/block.gif" width=1></td>
                          </tr>
                        </table>
                        <FONT 
                  color=#000000><B><strong>&nbsp;</strong></B></FONT> 
                        <textarea name="pingluncontent"border-right: #ffffff 1px groove; border-top: border-left: color: #333333; border-bottom: height: 18px; background-color:"; ";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";";" cols="50" rows="5" id="textarea" class="wenbenkuang"></textarea>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="table17">
                          <tr> 
                            <td><IMG height=5 src="images/block.gif" width=1></td>
                          </tr>
                        </table>
            </td>
                    </tr>
                    <tr bgcolor="#FFFFFF"> 
                      <td height="30" bgcolor="#FFFFFF"> <FONT 
                  color=#000000><B> <strong>&nbsp;</strong></B></FONT> 
                        <input name="Submit" type="submit" class="go-wenbenkuang" value="提交保存" onClick="return check();"> 
                        <input name="Submit22" type="reset" class="go-wenbenkuang" value="清除重来"> 
                        <input name="Submit3" type="button" class="go-wenbenkuang" value="关闭窗口" onClick="javascript:window.close()"> 
                      </td>
                    </tr>
                  </table></form></td>
              </tr>
            </table>
            
          　</TD><!--end right--></TR></TBODY></TABLE></div>
<!--#include file="copyright.asp"-->
</body>
</html>
<%else
Response.Redirect url
end if
snsn.close
%>