<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="inc.asp" -->
<%
top""
abo=shopnet("id")%>
  <table width="762" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="table-zuoyou">
    <tr> 
      <td height="400" valign="top" class="table-shang"> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td height="30" valign="middle">&nbsp; 您目前的位置：<a href="index.asp">网站首页</a> 
              -&gt; <a href="guestbook.asp">留言反馈</a></td>
          </tr>
        </table>
        <table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
          <tr> 
            <td height="1" background="/image/1x3.gif"></td>
          </tr>
        </table>
<%if shopnet("add")="yes" then
if shopnet("name")="" then 
response.write "<table width=500 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=30>&nbsp;</td></tr><tr><td>请留下您的姓名，谢谢！</td></tr></table>"
response.end
end if
if shopnet("content")="" then 
response.write "<table width=500 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=30>&nbsp;</td></tr><tr><td>不写留言反馈内容怎么提交！</td></tr></table>"
response.end
end if
if Len(shopnet("content"))>800 then 
response.write "<table width=500 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=30>&nbsp;</td></tr><tr><td>错误提示:每条留言反馈的内容不能大于800字!<br>&nbsp;&nbsp;<a href=# onclick='history.back()'>返回修改</a></td></tr></table>"
response.end
end if

tel=shopnet("tel")
email=shopnet("email")
content=shopnet("content")
name=shopnet("name")
ip = Request.servervariables("REMOTE_ADDR")
set rs=server.createobject("adodb.recordset")
sql="select * from guestbook" 
rs.open sql,conn,1,3
rs.addnew
rs("email")=email
rs("tel")=tel
rs("content")=content
rs("name")=name
rs("ip")=ip
rs.update
rs.close
set rs=nothing
Response.write "<table width=500 border=0 align=center cellpadding=0 cellspacing=0><tr><td height=30>&nbsp;</td></tr><tr><td><img src=../image/tp06.gif  align=absmiddle>留言成功，您的意见、建议或投诉对我们很重要。我们会认真的处理您的留言反馈内容。我们的发展离不开您的支持，谢谢您对我们的支持与厚爱！<br><br>&nbsp;&nbsp;<a href=index.asp>&gt;&gt;返回网站首页</a><br><br>&nbsp;&nbsp;<a href=guestbook.asp>&gt;&gt;返回留言反馈网页继续留言</a></td></tr></table>"
else%>
<script language="javascript">
<!--//
function checksignup() {
if ( document.guestbook.name.value == '' ) {
window.alert('请输入您的姓名!!');
document.guestbook.name.focus();
return false;}
if ( document.guestbook.content.value == '' ) {
window.alert('请输入留言反馈内容!!');
document.guestbook.content.focus();
return false;}
if ( document.guestbook.email.value.length> 0 &&!document.guestbook.email.value.indexOf("@")==-1|document.guestbook.email.value.indexOf(".")==-1 ) {
window.alert('请输入正确的Email地址!!');
document.guestbook.email.focus();
return false;}
if((document.guestbook.tel.value!="")){if(isNaN(document.guestbook.tel.value)||(document.guestbook.tel.value.length<7)) {
window.alert("请输入有效电话号码,只能是数字!!");
document.guestbook.tel.focus();
return false;}}
if (document.guestbook.content.value.length>800){
window.alert("留言反馈内容不能超过800字!！");
document.guestbook.content.focus();
return false;}
return true;}
//-->
</script> 
<table width="400" border="0" align="center" cellpadding="2" cellspacing="0">
          <form ACTION="?add=yes" METHOD="POST" NAME="guestbook" id="guestbook">
            <tr> 
              <td width="100" height="80" align="center" valign="middle">&nbsp;</td>
              <td width="300" height="80" align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../image/guestbook.gif" width="145" height="47"></td>
            </tr>
            <tr valign="middle"> 
              <td width="100" height="25" align="center">您的姓名<font color="#ff3333">*</font></td>
              <td width="300" height="25"> <INPUT name=name class=wenbenkuang onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="<%=huiyuan%>" size=25 maxlength="5"> 
              </td>
            </tr>
            <tr valign="middle"> 
              <td width="100" height="25" align="center">联系电话&nbsp; </td>
              <td width="300" height="25"> <INPUT name=tel class=wenbenkuang id="tel" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size=45 maxlength="25"></td>
            </tr>
            <tr valign="middle"> 
              <td width="100" height="25" align="center">电子信箱&nbsp;</td>
              <td width="300" height="25"> <INPUT name=email class=wenbenkuang onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size=45 maxlength="49"></td>
            </tr>
            <tr valign="middle"> 
              <td width="100" height="25" align="center"> <br>
                留言内容<font color="#ff3333">*</font></td>
              <td width="300" height="25"> <textarea title="留言反馈的内容，每条不能超过800字。
如果您有多项问题要反馈，请分开提交。
谢谢您对我们的支持！" name="content" class="wenbenkuang" cols="44" rows="5" id="content"  onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"><%=abo%></textarea></td>
            </tr>
            <tr valign="middle"> 
              <td width="100" height="25" align="center">&nbsp;</td>
              <td width="300" height="25"> &nbsp; <input name=submit type=submit class="go-wenbenkuang" id="submit" onClick="javascript:return checksignup()" value='提 交' onFocus="this.blur()"> 
                <input name="Reset" type="reset" class="go-wenbenkuang" id="Reset" value="重 写" onFocus="this.blur()"> 
              </td>
            </tr>
          </form>
      </table>
<%end if%></td>
    </tr>
  </table>
<!--#include file="bottom.asp" -->
