<!--#include file="conn.asp"-->
<%
page_title=Eval("feedback_title"&Language)
page_keywords=Eval("feedback_keywords"&Language)
page_description=Eval("feedback_description"&Language)
if page_title="" then
page_title=city_title
page_keywords=city_keywords
page_description=city_description
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="zh-CN">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><%=page_title%></title>
<meta name="keywords" content="<%=page_keywords%>" />
<meta name="description" content="<%=page_description%>" />
<!--#include file="top.asp"-->
<!--#include file="header.asp"-->
<!--#include file="../inc/page.asp"-->
<link rel="stylesheet" href="<%=filepath%>inc/style8.css" type="text/css">
<link href="<%=filepath%>inc/gns_product.css" rel="stylesheet" type="text/css">

    <div class="product-cen">
    	<div class="weizhi"> 您的位置：<a href="../index.asp">首页</a> »  <%call title()%>  <%call title1()%> » <a href="#" title="购买咨询">购买咨询</a></div>   

<div class="maxw_in"><script language="javascript">
<!--
function CheckForm()
{  
if  (document.proform1.comment.value.length ==  0)     {  
alert("请完善表单必填项!");
document.proform1.comment.focus();
return false;
}else{
return  true;
}
}

function CheckForm2()
{  
if  (document.proform2.comment.value.length ==  0)     {  
alert("请完善表单必填项!");
document.proform2.comment.focus();
return false;
}else{
return  true;
}
}
-->
</script>
<%
typeid=request("typeid")
Id=request("subId")
set rs=server.CreateObject("adodb.recordset")
if id="" then
rs.open "select top 1 * from com_books where  look"&language&"=1 order by Id desc",conn,1,3
else
rs.open "select * from com_books where  look"&language&"=1 and Id="&id&"",conn,1,3
end if
rs("ck")=rs("ck")+1
subId=rs("id")
subCid=rs("cid")
subTitle=rs("title"&language)
subText=rs("text"&language)
subDate=rs("books_date")
subck=rs("ck")
%>
<%
sql00 = "select * from com_message where proid="&subId&" and look"&Language&"=1 and type=1 order by ID desc"
Set rs00=server.CreateObject("adodb.recordset")
rs00.open sql00,conn,1,1
page1("18")
%>	
<div class="section pdtdetail" tab="商品评论 (&lt;em&gt;<%=Cstr(rs00.RecordCount)%>&lt;/em&gt;)" style="">  
<div class="commentTabLeft floatLeft"><strong>商品评论</strong><span><a href="#">（已有<em><%=Cstr(rs00.RecordCount)%></em>条评论）</a></span></div>
            <div class="commentTabRight floatLeft"></div>
            <div style="clear:both;"></div>
<%
if rs00.eof then
response.Write("")
else
%>	
<div class="detail_comKpi clfix pdtdetail">
            <div class="kpiNum"><span class="kpistar"><i style="width:<%=(100*(pifn(subId)/5))%>%"></i></span> <span class="kpistar_des"><i class="cc00">商品评分<i class="point"><%=pifn(subId)%></i>分</i><br>
              共有<%=Cstr(rs00.RecordCount)%>人参与了评分</span> </div>
            <div class="comUpBtn"> 我购买过此商品<br>
              <a href="#pl" class="combtn">我要评论</a>  </div>
			  <div style="clear:both;"></div>
          </div>
            <div class="FormWrap">
              <div class="Comments" id="goods-comment">
<%
pi=1
while not rs00.eof and pi<=rs00.pagesize
%>
                <div class="division clearfix">
                  <div class="scn_member_b">
                    <div> <img src="images/8b710b71802a0401.png" alt="会员图片"  class="member_img"> </div>
                    <div class="textblue m5"><%=rs00("yname")%></div>
                    <div class="m5">注册会员</div>
                  </div>
                  <div class="scn_member_p"> <span class="scn_memner_p_1"></span>
                    <div class="commentwarp">
                      <div class="tr_1"> <i class="c999 fr">评论时间：<%=rs00("mydate")%></i> 商品评分：<span class="comCountBar"><i class="s<%=rs00("xjb")%>"></i></span> <i class="c666"></i></div>
                      <div class="tr_2"><%=rs00("textcn")%></div><div class="tr_3">  <i class="cc00">回复：</i><%=rs00("hf_text")%><i class="c999">&nbsp;&nbsp;<%=rs00("hf_date")%></i> <div class="box10"></div>  <i class="jt"></i> </div>
                      <!--<div class="tr_4">这条评论对您有用吗？<a href="javascript:void(0)" onclick="check_tf(&quot;668874&quot;,&quot;T&quot;)" class="votebtn">有用(<span id="t_count_668874">1</span>)</a></div>-->
                    </div>
                  </div>
                </div>
<%
pi=pi+1
rs00.movenext
Wend
%>
                <div class="division clearfix">
<%
if subId="" then
call page2(8,"")
else
call page2(8,"subId="&subId&"&")
end if
%>
				
				</div>
              </div>
            </div>

<%
end if
rs00.close
set rs00=nothing
%>
		  <div class="FormWrap" style="background:#f6f6f6; margin-top:0px;">
              <div class="boxBrown division"> 如果您对本商品有什么评价或经验,欢迎分享! </div>
 <%if session("user_xxx_name")<>"" then%>
 			<a id="pl" name="pl" ></a>
               <form class="addcomment" id="proform2" name="proform2" method="post" action="toComment.asp">
                <h4>发表评论</h4>
                <div class="title">标题：
                  <input autocomplete="off" class="x-input inputstyle blur" type="text" required="true" size="50" name="title" value="[评论]<%=subTitle%>" vtype="text">
				  <input type="hidden" value="1" name="type" />
				  <input type="hidden" value="<%=subId%>" name="proid" />
				  <input type="hidden" value="<%=subcId%>" name="procid" />
				  <input type="hidden" value="<%=session("user_xxx_name")%>" name="yname" />
                </div>
                <div class="division">
				
                  <table border="0" cellpadding="0" cellspacing="0" width="100%" class="forform">
                    <tbody>
					 <tr>
                        <th><em>*</em>评分等级：</th>
                        <td>
<ul class="Star" style="list-style:none;">
  <li>
      <span class="number"></span>
         <span class="Select"> 
              <a onMouseOver="javascript:setProfix('xjb_');showStars(1,'xjb');" onMouseOut="javascript:setProfix('xjb_');clearStars('xjb');" href="javascript:setProfix('xjb_');setStars(1,'xjb');"><img id="xjb_1" title="差(1)" src="images/icon_star_1.gif"></a>
              <a onMouseOver="javascript:setProfix('xjb_');showStars(2,'xjb');" onMouseOut="javascript:setProfix('xjb_');clearStars('xjb');" href="javascript:setProfix('xjb_');setStars(2,'xjb');"><img id="xjb_2" title="一般(2)" src="images/icon_star_1.gif"></a>
              <a onMouseOver="javascript:setProfix('xjb_');showStars(3,'xjb');" onMouseOut="javascript:setProfix('xjb_');clearStars('xjb');" href="javascript:setProfix('xjb_');setStars(3,'xjb');"><img id="xjb_3" title="好(3)" src="images/icon_star_1.gif"></a>
              <a onMouseOver="javascript:setProfix('xjb_');showStars(4,'xjb');" onMouseOut="javascript:setProfix('xjb_');clearStars('xjb');" href="javascript:setProfix('xjb_');setStars(4,'xjb');"><img id="xjb_4" title="很好(4)" src="images/icon_star_1.gif"></a>
              <a onMouseOver="javascript:setProfix('xjb_');showStars(5,'xjb');" onMouseOut="javascript:setProfix('xjb_');clearStars('xjb');" href="javascript:setProfix('xjb_');setStars(5,'xjb');"><img id="xjb_5" title="非常好(5)" src="images/icon_star_1.gif"></a>
         </span><span><input id="xjb" name="xjb" value="0" type="text" style="margin-left:12px; border:1px #FFFFFF solid; font-size:14px; font-weight:bold; color:#fff;" onFocus="this.blur()"></span> 
   </li>
  
</ul></td>
                      </tr>
                      <tr>
                        <th><em>*</em>评论内容：</th>
                        <td><textarea class="x-input inputstyle" vtype="required" rows="5" name="comment" style="width:80%;"></textarea></td>
                      </tr>
                      <tr>
                        <th>联系方式：</th>
                        <td><input autocomplete="off" class="x-input inputstyle" type="text" size="20" name="contact" vtype="text">
                          <span class="infotips">(可以是电话、email、qq等).</span></td>
                      </tr>
                      <tr>
                        <td></td>
                        <td><input type="submit" value="提交评论" onclick="return CheckForm2();"></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </form>
<script>initStar();</script>
<script>
var sArray = new Object;
    sArray[0] = new Image;
    sArray[0].src = "images/icon_star_1.gif";
    for (var i=1; i<6; i++) {
        sArray[i] = new Image();
        sArray[i].src = "images/icon_star_2.gif";
    }
    
    var pro ; 
    var rate ; 
    function initStar() {
        
        try {
            setProfix("xjb_");
            setStars(document.getElementById("xjb").value,'xjb');
                
        } catch(e){
        
        }    
    }
    
    function showStars(starNum,rate) {
    try {
        
        greyStars();
        colorStars(starNum);
        } catch(e){}
        //setStars(starNum,rate);
        
    }
    function setProfix(profix) {
         pro = profix ;
    }
    function colorStars(starNum) {
        try {
            for (var i=1; i <= starNum; i++) {
                var tmpStar = document.getElementById(pro + i);
                tmpStar.src = sArray[starNum].src;
            }
        } catch(e){}
    }
    function greyStars() {
        try {
            for (var i=1; i<6; i++) {
                var tmpStar = document.getElementById(pro + i);
                tmpStar.src = sArray[0].src;
            }
        } catch(e){}
    }
    
    function greyAll(curpro,currate) {
        try {
            document.getElementById(currate).value ="";    
            for (var i=1; i<6; i++) {
                var tmpStar = document.getElementById(curpro + i);
                tmpStar.src = sArray[0].src;
            }
        } catch(e){}    
    }

    function setStars(starNum,rate) {
        rate = rate ;
        try {
            
            var fuwu = document.getElementById(rate);
            fuwu.value = starNum;
            showStars(starNum);
            } catch(e){}    
    }

    function clearStars(currate) {
        rate = currate ;
        try {
            var fuwu = document.getElementById(rate);
            if (fuwu.value != '') {
                setStars(fuwu.value,rate);
            } else {
                greyStars();
            }
        } catch(e){}
    }
    
    function resetStars() {
        try {
            
            var fuwu = document.getElementById(rate);
            if (fuwu.value != '') {
                setStars(fuwu.value,rate);
            } else {
                greyStars();
            }
        } catch(e){}
    }
    
    
    
</script>
<%else%>
<div class="boxBrown division"><a href="UserLogin.asp?height=150;width=350" title="请登录后再评论！" class="thickbox"><img src="images/btn-discuss.gif"></a> </div>
<%end if%>
			  
            </div>
			

			
          </div>

<%
rs.update
rs.close
set rs=nothing
%>
</div>

    </div>  
   <div class="clear"></div>
   
<!--#include file="foot.asp"--> 


<script>
/*设置浏览过的商品*/
withBroswerStore(function(broswerStore){
  broswerStore.get('history',function(history){
  history=JSON.decode(history);
  if(!history||$type(history)!=='array')history=[];
   if(history.length==40){history.pop()};
   var newhis={'goodsId':<%=request("id")%>,
			   'goodsCid':<%=request("cid")%>,
               'goodsName':<%=request("id")%>,
               'goodsImg':<%=request("id")%>,
               'viewTime':$time()
              };
   if(!history.some(function(i,index){


   if(i['goodsId']==newhis['goodsId']){
         history.erase(i);
         history.include(newhis)
         return true;
   }
      return false;

   })){
       history.include(newhis);
   }
   broswerStore.set('history',history);

  });
});


</script>


<%
sub title()
typeid=request("typeid")
if typeid="" then
response.write "商品信息"
elseif typeid=0 then
response.write "商品信息"
end if
if typeid<>"" and typeid<>0 then
set rstype=server.CreateObject("adodb.recordset")	
rstype.open "select * from com_class where id="&typeid&" order by pid asc,id desc",conn,1,1
response.write " "&rstype("ClassName"&language)&""
rstype.close
set rstype=nothing
end if
end sub


sub title1()
styleid=request("cid")
if styleid="" then
response.write ""
elseif styleid=0 then
response.write ""
end if
if styleid<>"" and styleid<>0 then
set rstype=server.CreateObject("adodb.recordset")	
rstype.open "select * from com_class where id="&styleid&" order by pid asc,id desc",conn,1,1
response.write " >> "&rstype("ClassName"&language)&" "
rstype.close
set rstype=nothing
end if
end sub

function pifn(proid)
if proid<>""then
set rstype=server.CreateObject("adodb.recordset")	
rstype.open "select * from com_message where proid="&proid&" and look"&Language&"=1 and type=1 order by ID desc",conn,1,1
if rstype.eof then
response.Write("0")
else
pi=0
xjb=0
while not rstype.eof
xjb=rstype("xjb")+xjb
pi=pi+1
rstype.movenext
Wend
end if
rstype.close
set rstype=nothing
pifn=Formatnumber(xjb/pi,1,-1,-1,0)
end if
end function
%>