<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!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-Type" content="text/html; charset=gb2312" />
<title>网友留言</title>
<link href="style/global.css" rel="stylesheet" type="text/css" />
<link href="member/style/member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/common.js"></script>
<script src="js/reg.js" type="text/javascript"></script>
</head>
<body>
<%
function alertstr(t,v)
	response.Write("<script>alert('"&t&"');history.back();</script>")
	response.End()
end function
dim act,UserName,Content,Tel,Email,QQ,PubDate,PubIp
act=request.QueryString("act")

if(act="do") then
	UserName=request.Form("UserName")
	Content=request.Form("Content")
	if(len(UserName)<1 or len(Content)<1) then
		call alertstr("姓名及内容不能为空",1)
	end if
	if(len(Content)>5000) then
		Content=left(Content,5000)
	end if
	Tel=request.Form("Tel")
	Email=request.Form("Email")
	QQ=request.Form("QQ")
	PubDate=now()
	PubIp=request.ServerVariables("REMOTE_ADDR")
	set rs=server.CreateObject("adodb.recordset") 
	rs.open "select * from t_gb where 1=0 order by id desc",conn,3,3
	rs.addnew
	rs("UserName")=UserName
	rs("Content")=Content
	rs("Tel")=Tel
	rs("Email")=Email
	rs("QQ")=QQ
	rs("PubDate")=PubDate
	rs("PubIp")=PubIp
	rs.update
	rs.close
	set rs=nothing
	response.Write("<script>alert('信息成功提交');location.href='/';</script>")
else
%>
<!--#include file="templet/head.htm" -->
<form id="form1" name="form1" method="post" action="?act=do">
  <table width="960" align="center" cellpadding="0" cellspacing="1" bgcolor="#fff0cf" class="tableborder">
    <tr align="middle">
      <th colspan="2" class="pad5">网友留言</th>
    </tr>
    <tr>
      <td width="34%" height="22" align="right" bgcolor="#FFFFFF" class="pformleft">姓名：</td>
      <td width="66%" bgcolor="#FFFFFF" class="pformleft"><input type="text" name="UserName" id="UserName" />
        (*)</td>
    </tr>
    <tr>
      <td height="22" align="right" bgcolor="#FFFFFF" class="pformleft">内容：</td>
      <td bgcolor="#FFFFFF" class="pformleft"><textarea name="Content" id="Content" cols="60" rows="8"></textarea>
      (*)</td>
    </tr>
    <tr>
      <td height="22" align="right" bgcolor="#FFFFFF" class="pformleft">联系电话：</td>
      <td bgcolor="#FFFFFF" class="pformleft"><input type="text" name="Tel" id="Tel" /></td>
    </tr>
    <tr>
      <td height="22" align="right" bgcolor="#FFFFFF" class="pformleft">电子邮箱：</td>
      <td bgcolor="#FFFFFF" class="pformleft"><input type="text" name="Email" id="Email" /></td>
    </tr>
    <tr>
      <td height="22" align="right" bgcolor="#FFFFFF" class="pformleft">QQ：
      </td>
      <td bgcolor="#FFFFFF" class="pformleft"><input type="text" name="QQ" id="QQ" /></td>
    </tr>
    <tr>
      <td height="32" colspan="2" align="center" bgcolor="#FFFFFF" class="row4"><input type="submit" name="button" id="button" value="填好了，马上提交" /></td>
    </tr>
    
  </table></form>
<!--#include file="templet/root.htm" -->
<%
end if
%>
</body>
</html>
<%
call connclose()
%>