<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title>咕噜噜电子商务--意见反馈</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #333333}
.style2 {
	font-weight: bold;
	font-size: 9px;
}
.style3 {font-size: 14px}
-->
</style>
</head>
<!--#include file=top.asp-->
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦！：）';return true">

<%dim action
action=request.QueryString("action")%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
  <tr>
    <td> 您目前的位置：<a href="index.asp">商店首页</a> 
              -&gt; <a href="gbook.asp">留言反馈</a>&nbsp;</td>           
  </tr>
</table>
<table width="0" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="758" height="89" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="195"><table border="0" align="center" cellpadding="0" cellspacing="0" width="742">
<tr> 
<td height="400" valign="top" align="center"> 
<%select case action
	case ""
	%>
<span class="style1">尊敬的客户，请在这里将您们的宝贵建议反馈给我们，我们会及时回复，谢谢 ！</span>           
<table border="0" cellspacing="2" cellpadding="1" align="center" width="658">
<form name="fkinfo" method="post" action="gbook.asp?action=save">
<tr> 
<td width="30%" align="right">类　型：</td>
<td style="padding-left:10px" width="25%"> 
<select class="wenbenkuang" name="fkleixing" id="fkleixing">
<option value="1">简单的留言</option>
<option value="2">对商店的意见</option>
<option value="3">对公司的建议</option>
<option value="4">具有合作意向</option>
<option value="5">产品投诉</option>
<option value="6">服务投诉</option>
</select>
</td>
<td width="45%" rowspan="3" style="padding-left:10px"><img src="imagess/guestbook.gif" width="145" height="47"></td>
</tr>
<tr> 
<td align="right">主　题：</td>
<td style="padding-left:10px"> 
<input class="wenbenkuang" name="fksubject" type="text" id="fksubject"onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
</td>
</tr>
<tr> 
<td align="right">姓　名：</td>
<td style="padding-left:10px"> 
<input class="wenbenkuang" name="fkusername" type="text" id="fkusername"onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
</td>
</tr>
<tr> 
<td align="right">e-mail：</td>
<td colspan="2" style="padding-left:10px"> 
<input class="wenbenkuang" name="fkemail" type="text" id="fkemail" size="50"onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
</td>
</tr>
<tr> 
<td align="right">地　址：</td>
<td colspan="2" style="padding-left:10px"> 
<input class="wenbenkuang" name="fklaizi" type="text" id="fklaizi" size="50"onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></td>
</tr>
<tr> 
<td align="right">电　话：</td>
<td colspan="2" style="padding-left:10px"> 
<input class="wenbenkuang" name="fktel" type="text" id="fktel"onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
</td>
</tr>
<tr> 
<td align="right">信　息：</td>
<td colspan="2" style="padding-left:10px">
<textarea class="wenbenkuang" name="fkcontent" cols="50" rows="8" id="fkcontent" onMouseOut = "this.style.backgroundColor = ''" onMouseOver="this.style.backgroundColor = '#E5F0FF'"></textarea>
</td>
</tr>
<tr> 
<td></td>
<td height="30" colspan="2" style="padding-left:10px">
<input class="go-wenbenkuang" name="submit" value=提交 type=submit onClick="return checkfk();">
<input name="Submit" type="reset" class="go-wenbenkuang" value="重置">
</td>
</tr>
</form>
</table>
		<%
	  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_fk",conn,1,3
rs.addnew
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 "<br><br><center>您的信息反馈已成功提交，感谢您的参与！<br><br><a href=index.asp>返回首页</a></center>"
end select%>
</td>
</tr>
</table></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<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> 