<!--#include file=top.asp-->
<%dim action
action=request.QueryString("action")%>
<head>
</head>

<body topmargin="0">
<table border="0" width="1024" cellspacing="0" cellpadding="0" height="986">
  <tr>
    <td width="100" height="503"></td>
    <td width="168" height="503" valign="top">
    <table border="0" width="100%" cellspacing="0" cellpadding="0" height="169">
      <tr>
        <td width="100%" height="115" valign="top">
          <table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100%"><img border="0" src="moban/2/images/class.gif"></td>
            </tr>
            <tr>
              <td width="170" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="167" cellspacing="0" cellpadding="0" >
                    <tr>
                      <td width="167" height="6" background="moban/2/images/class_top.gif"></td>
                    </tr>
                    <tr>
                      <td width="167" height="285" background="moban/2/images/class_mid.gif" valign="top" align="center">
                      <table width="100%" cellpadding="0" cellspacing="0">
  <%set rs=server.CreateObject("adodb.recordset")
rs.open "select top 10 * from shop_shjclass where shjname='"&shjianame&"' order by shjclassidorder",conn,1,1
if rs.bof and rs.eof then
response.write"&nbsp;&nbsp;<font color=red>!</font>该商家暂时没有分类！"
else
do while not rs.eof
%>
<tr>
<td width="100%" valgin="top" height=20>
&nbsp;&nbsp;<img src=moban/2/images/class_c.gif width=5 height=5>&nbsp;<a href=guidelist.asp?shjclassid=<%=rs("shjclassid")%>&id=<%=id%>><%=left(rs("shjclass"),10)%></a></td>
</tr>
<tr>
<td align="center" valgin="top" height=1><img border="0" src="moban/2/images/class_line.gif" width="148" height="1">
</td>
</tr>
<%rs.movenext
loop	
rs.close
set rs=nothing
end if
%>
</table>

                      </td>
                    </tr>
                    <tr>
                      <td width="167" height="8" background="moban/2/images/class_d.gif"></td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18">
          <table border="0" width="100%" cellspacing="0" cellpadding="0" height="114">
            <tr>
              <td width="100%" height="53"><img border="0" src="moban/2/images/youhui.gif"></td>
            </tr>
            <tr>
              <td width="100%" height="61" valign="top" align="center">
                <div align="center">
                  <center>
                  <table border="0" width="167" cellspacing="0" cellpadding="0" >
                    <tr>
                      <td width="167" background="moban/2/images/youhui_T.gif" height="8"></td>
                    </tr>
                    <tr>
                      <td width="167" background="moban/2/images/youhui_m.gif"  align="center" height="200" valign="top">
                      <table width="100%" cellpadding="0" cellspacing="0">
<%
shjiaid=rs_shjia("shjiaid")
set rsy=server.CreateObject("adodb.recordset")
rsy.open "select top 5 * from youhui where shjiaid="&shjiaid,conn,1,1
if rsy.bof and rsy.eof then
response.write"&nbsp;&nbsp;<font color=red>!</font>该商家暂时没有发布优惠信息！"
else
do while not rsy.eof
%>
<tr>
<td  valign="top"> 
&nbsp;&nbsp;<a href=youhuishow.asp?youhuiid=<%=rsy("id")%>&id=<%=id%>><%=rsy("yhname")%></a>
</td>
</tr>
<tr>
<td align="center">
<img border="0" src="moban/2/images/youhui_line.gif" >
</td>
</tr>
<%rsy.movenext
loop	
rsy.close
set rsy=nothing
end if
%>
</table>
                      </td>
                    </tr>
                    <tr>
                      <td width="167" background="moban/2/images/youhui_D.gif" height="10"></td>
                    </tr>
                  </table>
                  </center>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18" valign="top" align="center">
          <table border="0" width="100%">
            <tr>
              <td width="100%"><img border="0" src="moban/2/images/lianxi.gif"></td>
            </tr>
            <tr>
              <td width="100%" align="center">&nbsp;&nbsp;<img border="0" src="moban/2/images/lc.gif">&nbsp;<%=rs_shjia("tel")%><br>
              &nbsp;&nbsp;<img border="0" src="moban/2/images/lc.gif">&nbsp;<%=rs_shjia("dz")%>
              </td>
            </tr>
            <tr>
              <td width="100%"></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="100%" height="18" valign="top" align="center">
          <div align="center">
            <center>
            <table border="0" width="167" background="moban/2/images/renzheng.gif" height="140">
              <tr>
                <td width="100%" valign="top" align="center">
                  <table border="0" width="100%" height="127">
                    <tr>
                      <td width="100%" height="123" valign="top">                <table border="0" width="100%">
                  <tr>
                    <td width="100%"><img src="../images/ring01.gif" broder="0">   
                      认证状态</td>                                                                 
                  </tr>
                  <tr>
                    <td width="100%">商家认证：                                                                         
<%if rs_shjia("tj")=5 then
response.write "<img src=../images/icon1.gif alt=超级商家>"
end if%>&nbsp;                                                                         
<%if rs_shjia("renzheng")=1 then
response.write "<img src=../images/yingyezhizhao.gif alt=营业执照认证商家>"
end if%>
<%if rs_shjia("renzheng2")=1 then                                                                         
response.write "&nbsp;<img src=../images/mobile.gif alt=电话认证商家>"
end if%>
<%if rs_shjia("renzheng3")=1 then                                                                         
response.write "&nbsp;<img src=../images/estrella_6.gif alt=钻石认证商家>"
end if%>
<%if rs_shjia("renzheng4")=1 then                                                                         
response.write "&nbsp;<img src=../images/vip_renzheng.gif alt=ＶＩＰ认证商家>"
end if%>
<br>
商家星级：&nbsp;<img src=../images/estrella_<%=rs_shjia("tj")%>.gif alt=<%=rs_shjia("tj")%>星级商家 ></td>
                  </tr>
                </table></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            </center>
          </div>
        </td>
      </tr>
    </table>
    </td>
    <td width="642" height="503" valign="top">
    <table border="0" width="640" cellspacing="0" cellpadding="0" height="986">
      <tr>
        <td width="640" colspan="3" height="9" background="moban/2/images/body_top.gif"></td>
      </tr>
      <tr>
        <td width="2" height="986" background="moban/2/images/body_left.gif"><img src=moban/2/images/body_left.gif border=0></td>
        <td width="636" height="986" background="moban/2/images/body_mid.gif" valign="top">
          <table border="0" width="577" cellspacing="0" cellpadding="0" height="92">
            <tr><form name="userlogin" method="post" action="../checkuserlogin.asp"></form>
            </tr>
            <tr>
              <td width="634" height="1">
                <table border="0" width="633" cellspacing="1" cellpadding="2">
                  <tr>
                    <td width="382" height="32">
                      <table border="0" width="92%">
                        <tr>
                          <td width="100%"><marquee direction="left" width="376" height="20" scrollamount="1" id=info onMouseOver=info.stop() onMouseOut=info.start()><font color="red"><%=rs_shjia("content")%></font></marquee></td>
                        </tr>
                      </table>
                    </td>
                    <td width="235" height="32" background="moban/2/images/sobg.gif">
                     <form method="post" action="search.asp?id=<%=rs_shjia("shjiaid")%>">      
                      <table border="0" width="231" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="72">&nbsp;<img border="0" src="moban/2/images/so.gif">   
                            搜索</td>                                                                                                
                          <td width="105"><input type="text"  class=wenbenkuang  name="searchkey" size="15" value="请输入搜索关键字！"></td>  
                          <td width="48"><INPUT  name="submit" border="0" src="moban/2/images/search.gif" type="image" align="absmiddle" ></td>
                        </tr></form>
                      </table>
                      
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td width="634" height="2" valign="top" align="center">
                                          <div align="center">
                              <center>
                              <table border="0" width="634" height="138" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="634" background="moban/2/images/adbg.gif" height="138" valign="top">
                                    <table border="0" width="100%" height="100%">
                                      <tr>
                                        <td width="28%"></td>
                                        <td width="72%" valign="middle" align="center">
                                        <%if rs_shjia("textbanner")<>"" then%>
                                        <a href="<%=rs_shjia("texturl")%>" targrt=_top><strong><font size="6" color="#ffffff" face="华文行楷"><%=left(rs_shjia("textbanner"),16)%></font></strong></a>
                                        <%else%>
                                        <strong><font size="6" color="#ffffff" face="华文行楷"><%=rs_shjia("name")%>欢迎您！</font></strong>
                                        <%end if%>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                              </center>
                            </div>
              </td>
            </tr>
            <tr>
              <td width="634" height="1" valign="top" align="center">
                                          <div align="center">
                              <center>
                              <table border="0" width="625" height="34" cellspacing="1" cellpadding="2">
                                <tr>
                                  <td width="100%" background="moban/2/images/center.gif"  width="625" height="34">
                                    <table border="0" width="100%">
                                      <tr>
                                        <td width="4%"></td>
                                        <td width="96%"><a href="index.asp?id=<%=rs_shjia("shjiaid")%>"><font color="#106DA0"><b>首页</b></font></a>&nbsp;&gt;&nbsp;<font color="#CC6600"><b>网店留言</b></font></td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                              </center>
                            </div>
              </td>
            </tr>
            <tr>
              <td width="634" height="1" valign="top" align="center">
              
              
                      <table border="0" width="622">
          <tr>
            <td width="622">
<%
fkid=request.QueryString("id")
  If len(trim(request("page")))=0 then
Page=1
Else
Page=CInt(trim(request("page")))
End if
set rs=server.CreateObject("adodb.recordset")
sql="select * from shop_shjiafk where shjiaid="&fkid
rs.open sql,conn,1,1
	if err.number<>0 then
	response.write "数据库中无数据"
	end if  
rs.pagesize=5
if not rs.eof then
rs.Absolutepage=page
for k=1 to rs.pagesize
%>
              <table border="0" width="602" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="602"><img border="0" src="moban/1/images/gline1.gif"></td>
                </tr>
                <tr>
                  <td width="602" background="moban/1/images/gline2.gif" align="center">
                    <table border="0" width="96%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="50%"><img border="0" src="moban/1/images/mingzi.gif" width="25" height="25"><%=rs("fkusername")%>        
                          &nbsp;<a href="mailto:<%=rs("fkemail")%>"><img border="0" src="moban/1/images/email.gif"></a>&nbsp;&nbsp;<img border="0" src="moban/1/images/homepage.gif">&nbsp;<%=rs("fksubject")%>  </td>                           
                        <td width="50%"><img border="0" src="moban/1/images/shijian.gif"><%=rs("fkdate")%></td> 
                      </tr>
                      <tr>
                        <td width="100%" bgcolor="#E1E1E1" height="1" colspan="2"></td>
                      </tr>
                      <tr>
                        <td width="100%" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=rs("fkcontent")%> </td>
                      </tr>
                      <% if rs("fkhuifu")<>"" then%>
                       <tr>
                        <td width="100%" bgcolor="#E1E1E1" height="1" colspan="2"></td>
                      </tr>
                      <tr>
                        <td width="100%" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red"><b>商家回复：</b></font><font color="red"><%=rs("fkhuifu")%></font></td>
                      </tr>
                      <tr>
                        <td width="100%" bgcolor="#E1E1E1" height="1" colspan="2"></td>
                      </tr>
                       <tr>
                        <td width="100%" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">[回复时间]<%=rs("hfdate")%></font> </td>
                      </tr>
                      <%end if%>
                    </table>
                  </td>
                </tr>
                <tr>
                  <td width="602"><img border="0" src="moban/1/images/gline3.gif" width="602" height="8"></td>
                </tr>
              </table><br>
    <% rs.movenext 
        if rs.eof then Exit For 
        next 
        End if 
          %>
            </td>
          </tr>
          <tr>
            <td width="100%" align="center"><%
  if page <>1 then
     Response.Write "<a href=gbook.asp?id="&id&"&page=1>首页</a> "
  end if
  tmppage = page - 1 
  if tmppage <= 0 then 
     tmppage = 1 
  else
     Response.Write"<a href=gbook.asp?id="&id&"&page="&tmppage&">上一页</a>"
  end if
  tmppage = page + 1 
  if tmppage >rs.PageCount then 
     tmppage = page
  else
     Response.Write " <a href=gbook.asp?id="&id&"&page="&tmppage&">下一页</a> "
  end if 
  if Cstr(page) <> Cstr(rs.PageCount) and Cstr(rs.PageCount) <> 0 then
    Response.Write "<a href=gbook.asp?id="&id&"&page="&rs.PageCount&">尾页</a>"
  end if
  if Cstr(rs.PageCount) <> 0 then
  Response.Write "每页显示<font color=red>5</font>条留言  第<font color='blue'>" & page & "/"&rs.PageCount&"</font>页"
  end if
  Response.Write "  共有<font color='blue'>"&rs.RecordCount&"</font>条留言"
 rs.close
%></td>         
          </tr>
          <tr>
            <td width="100%"><%select case action
case ""
%>
<table width="100%" border="1" align="center" cellpadding="1" cellspacing="1" bordercolorlight="#FFFFFF" bordercolordark="#E1E1E1">
<form name="fkinfo" method="post" action="gbook.asp?id=<%=rs_shjia("shjiaid")%>&action=save">
<tr> 
<td height="30" colspan="3" align="center" bgcolor="#F4F4F4"><span class="style1">尊敬的客户，请在这里将您们的宝贵建议反馈给</span><font color="#999999"><font color="#FF0000"><%=rs_shjia("name")%></font></font><span class="style1">，谢谢 ！</span></td>
</tr>
<tr> 
<td width="20%" rowspan="5" align="left"><div align="right"><img border="0" src="moban/1/images/gbook.gif"></div></td>
<td width="10%"></td>
<td width="70%"> 
<input name="shjiaid" type="hidden" value="<%=rs_shjia("shjiaid")%>"> 
</td>
</tr>
<tr> 
<td align="right">类　型：</td>
<td width="70%" style="padding-left:10px"> 
<select class="wenbenkuang" name="fkleixing" id="fkleixing">
<option value="简单的留言" selected>简单的留言</option>
<option value="对网站的意见">对网站的意见</option>
<option value="对公司的建议">对公司的建议</option>
<option value="具有合作意向">具有合作意向</option>
<option value="产品投诉">产品投诉</option>
<option value="服务投诉">服务投诉</option>
</select></td>
</tr>
<tr> 
<td align="right">姓　名：</td>
<td width="70%" style="padding-left:10px">
<input class="wenbenkuang" name="fkusername" type="text" id="fkusername" size="20"> 
</td>
</tr>
<tr> 
<td align="right">e-mail：</td>
<td width="70%" style="padding-left:10px">
<input class="wenbenkuang" name="fkemail" type="text" id="fkemail" size="40"> 
</td>
</tr>
<tr> 
<td align="right">地　址：</td>
<td width="70%" style="padding-left:10px">
<input class="wenbenkuang" name="fklaizi" type="text" id="fklaizi" size="40"></td>
</tr>
<tr> 
<td colspan="2" align="right">电　话：</td>
<td width="70%" style="padding-left:10px">
<input class="wenbenkuang" name="fktel" type="text" id="fktel" size="20"> 
</td>
</tr>
<tr> 
<td colspan="2" align="right">主　题：</td>
<td width="70%" style="padding-left:10px">
<input class="wenbenkuang" name="fksubject" type="text" id="fksubject" size="40"> 
</td>
</tr>
<tr> 
<td colspan="2" align="right">信　息：</td>
<td width="70%" style="padding-left:10px">
<textarea class="wenbenkuang" name="fkcontent" cols="40" rows="5" id="fkcontent"></textarea> 
</td>
</tr>
<tr> 
<td colspan="2" align="right"></td>
<td width="70%" style="padding-left:10px">
<input class="go-wenbenkuang" name="submit" value=提交信息 type=submit onClick="return checkfk();">
[请注意适当使用<font color="#FF0000">Enter</font>键来换行]                               
</td>
</tr>
</form>
</table>
 </td>
          </tr>
        </table>
                     
              </td>
            </tr>
          </table>
        </td>
        <td width="2" height="986" valign="top" align="center"><img src=moban/2/images/body_right.gif border=0></td>
      </tr>
      <tr>
        <td width="640" colspan="3" height="15" background="moban/2/images/body_down.gif"></td>
      </tr>
    </table>
    </td>
    <td width="100" height="503"></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
<%
	case "save"
	if session("fkfk")=minute(now) then
	response.write "<script language=javascript>alert('对不起，您不可以重复提交信息，请稍后再试！');history.go(-1);</script>"
	response.End
	end if
	function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
	end function
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_shjiafk",conn,1,3
rs.addnew
rs("shjiaid")=trim(request("shjiaid"))
rs("fkleixing")=request("fkleixing")
rs("fksubject")=trim(request("fksubject"))
rs("fkcontent")=htmlencode2(trim(request("fkcontent")))
rs("fkusername")=trim(request("fkusername"))
rs("fkemail")=trim(request("fkemail"))
rs("fktel")=trim(request("fktel"))
rs("fklaizi")=trim(request("fklaizi"))
rs("fkdate")=now
rs("fkip")=Request.ServerVariables("remote_addr")
rs.update
rs.close
set rs=nothing
response.write "<script>alert('您的留言已成功提交，感谢您的参与！');window.location.href='gbook.asp?id="&id&"';</script>"
session("fkfk")=minute(now)
end select%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkfk()
{
   if(checkspace(document.fkinfo.fksubject.value)) {
	document.fkinfo.fksubject.focus();
    alert("您没有填写主题！");
	return false;
  }
   if(checkspace(document.fkinfo.fkusername.value)) {
	document.fkinfo.fkusername.focus();
    alert("请填写您的姓名！");
	return false;
  }
   if(checkspace(document.fkinfo.fklaizi.value)) {
	document.fkinfo.fklaizi.focus();
    alert("请填写您来自哪里！");
	return false;
  }
     if(checkspace(document.fkinfo.fkcontent.value)) {
	document.fkinfo.fkcontent.focus();
    alert("请填写反馈信息内容！");
	return false;
  }
  
  if(document.fkinfo.fkemail.value.length!=0)
  {
    if (document.fkinfo.fkemail.value.charAt(0)=="." ||        
         document.fkinfo.fkemail.value.charAt(0)=="@"||       
         document.fkinfo.fkemail.value.indexOf('@', 0) == -1 || 
         document.fkinfo.fkemail.value.indexOf('.', 0) == -1 || 
         document.fkinfo.fkemail.value.lastIndexOf("@")==document.fkinfo.fkemail.value.length-1 || 
         document.fkinfo.fkemail.value.lastIndexOf(".")==document.fkinfo.fkemail.value.length-1)
     {
      alert("Email地址格式不正确！");
      document.fkinfo.fkemail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空！");
   document.fkinfo.fkemail.focus();
   return false;
   }

}
//-->
</script> 

