<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim id
id=request.QueryString("id")
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
set rs_shjia=server.CreateObject("adodb.recordset")
strshjia="select * from shjia where flag<>1 and shjiaid="&id
rs_shjia.open strshjia,conn,1,1
if rs_shjia.bof and rs_shjia.eof then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
%>
<title><%=rs_shjia("name")%></title>
<link href="../image/css.css" rel="stylesheet" type="text/css">
<body class="body666"><%dim action
action=request.QueryString("action")%>
<!--#include file="top.asp" -->
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td style="padding-left:2px"><table width="98%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="171" style="border-top:1px solid #FFB71D;padding-left:5px"><font color="#B21C00">北京时间:</font>          <script language=javascript> 
　　today=new Date(); 
　　function date(){ 
　　this.length=date.arguments.length 
　　for(var i=0;i<this.length;i++) 
　　this[i+1]=date.arguments } 
　　var d=new date("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); 
　　document.write( "<font color=#B21C00 style=’font-size:9pt;font-family: 宋体’>", 
　　today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日","</font>" );</script>
        </td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="28"><img src="images/menu_06.gif" width="28" height="23"></td>
            <td bgcolor="#FFB71D" style="padding-left:20px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><font color="#B21C00" style="font-size:14px"><b>最新促销商品</b></font></td>
                  <td><iframe src="marqueenews.asp" frameborder="0" scrolling="no" height="18" width="250"></iframe></td>
                  <td align="right"><font color="#FFFFFF"><b>更多...</b></font></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td width="180" valign="top" style="padding-left:2px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          
          <tr>
            <td><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td bgcolor="#F9FCB9" style="padding:8px"><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td bgcolor="#FFB71D"><!--#include file="fenlei.asp" --></td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="2"></td>
          </tr>
          <tr>
            <td><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td bgcolor="#F9FCB9" style="padding:8px"><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td bgcolor="#FFB71D"><!--#include file="gouwucheinfo.asp"--></td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td valign="top" style="padding-left:2px"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top" style="padding-top:10px"><%select case action
case ""
%>
              <table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" style="border:1px solid #cccccc">
                <form name="fkinfo" method="post" action="gbook.asp?id=<%=rs_shjia("shjiaid")%>&action=save">
                  <tr>
                    <td height="30" colspan="2" align="center"><font color="#999999">尊敬的客户，请在这里将您们的宝贵建议反馈给<font color="#FF0000"><%=rs_shjia("name")%></font>，谢谢
                        ！</font></td>
                  </tr>
                  <tr>
                    <td width="30%"></td>
                    <td width="70%"><input name="shjiaid" type="hidden" value="<%=rs_shjia("shjiaid")%>">
                    </td>
                  </tr>
                  <tr>
                    <td width="30%" 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 width="30%" 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 width="30%" 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 width="30%" 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 width="30%" 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 width="30%" 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 width="30%" 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 width="30%" 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>
  </tr>
</table>
<!--#include file="copyright.asp" -->
</body>
	<%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("fksubject")=trim(request("fksubject"))
rs("fkleixing")=request("fkleixing")
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
session("fkfk")=minute(now)
response.write "<p align=center>您的信息反馈已成功提交，感谢您的参与！</p><br><a href=javascript:window.close()>关闭窗口</a></center>"
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> 