<!--#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=0 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><%=subTitle%> 购买咨询</strong><span><a href="#">（已有<%=Cstr(rs00.RecordCount)%>条咨询）</a></span></div>
            <div class="floatLeft commentTabRight"></div>
            <div style="clear:both;"></div>
<%
if rs00.eof then
response.Write("")
else
%>		
<div class="FormWrap">
            <div class=" Comments" id="goods-comment">       
<%
pi=1
while not rs00.eof and pi<=rs00.pagesize
%>	  
		  <div class="division boxBlue clearfix" style="margin-bottom:0px;">
                <div class=" floatLeft commentMain">
                  <div class="floatLeft commentAsk">提问</div>
                  <span class="author fontcolorOrange"><%=rs00("yname")%>
                  <!-- [注册会员] -->
                  </span> 说： <span class="timpstamp font10px fontcolorGray"><%=rs00("mydate")%></span>
                  <div style="clear:both;"></div>
                  <div class="commentText" style="width:auto"><%=rs00("textcn")%></div>
                  <!--<div style="color:#999;padding-top:10px">这条咨询对您有用吗？<a href="javascript:void(0)" onclick="check_tf(&quot;661747&quot;,&quot;T&quot;)" class="votebtn">有用(<span id="t_count_661747">0</span>)</a></div>-->
                </div>
                <!-- <div class="floatRight"><a class="floatRight lnk " href="http://www.s.cn/comment-661747-reply.html" arg1="ask">回复此评论</a></div>-->
              </div>
              <div class="commentReply">
                <div class="division item scn_line1 " style=" margin:0px;">
                  <div class="floatLeft commentReply-admin">回答</div>
                  <span class="author fontcolorgreen">管理员
                  <!-- -->
                  </span>&nbsp;&nbsp;回复： <span class="timpstamp font10px fontcolorGray"><%=rs00("hf_date")%></span>
                  <div style="clear:both;"></div>
                  <div class="commentText" style="width:auto"><%=rs00("hf_text")%></div>
                </div>
              </div>
<%
pi=pi+1
rs00.movenext
Wend
%>
            </div>
            <div class="textright m10"><%
if subId="" then
call page2(8,"")
else
call page2(8,"subId="&subId&"&")
end if
%></div>
            
          </div>
<%
end if
rs00.close
set rs00=nothing
%>


            <div class="FormWrap" style="background:#f6f6f6; margin-top:0px;">
              <div class="boxBlue division"> 如果您对本商品有什么问题,请提问咨询! </div>
			  <form class="addcomment"  id="proform1" name="proform1"  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="0" 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" width="100%" cellpadding="0" cellspacing="0" class="forform">
                    <tbody>
                      <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 CheckForm();"></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </form>
            </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
%>