<!--#include file="head.asp"-->
<% 
if session("user")<>"" then
%>

<%
if request("action")="add" then
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open "Select * from book",conn,1,3
rs.Addnew
rs("name")=request("name")
rs("tel")=request("tel")
rs("address")=request("address")
rs("email")=request("email")
rs("content")=request("content")
rs("addtime")=now()
rs.update
Response.Write "<script language=javascript>alert('恭喜，留言成功，返回首页!!');location.href='index.asp';</script>"
end if

%>
<script type="text/javascript">
function checkForm(){
	
	if(document.book.name.value==""){
		alert('真实姓名必须填写！');
		document.book.name.focus();
		return false;
	}
		
		if(document.book.tel.value==""){
		alert('电话号码必须填写！');
		document.book.tel.focus();
		return false;
	}
	if(document.book.address.value==""){
		alert('联系地址不能为空！');
		document.book.address.focus();
		return false;
	}
	if(document.book.content.value.length>400){
		alert('内容必须在400字以内！');
		document.book.content.focus();
		return false;
	}
	document.book.submit();
}
</script>        

<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=215 background=images/ne_left_pic03.gif>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=175 src="images/ne_left_pic06.gif" width=215></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=30 src="images/ne_left_tt03.gif" width=215></TD></TR></TBODY></TABLE>
      <TABLE height="100%" cellSpacing=5 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD vAlign=top><BR><B>&nbsp;&nbsp;留言步骤</B><BR>&nbsp;&nbsp;一、会员登陆
			<FONT color=#ff0000>√</FONT><BR>&nbsp;&nbsp;二、填写信息
			<FONT color=#ff0000>→</FONT><BR>&nbsp;&nbsp;三、完成留言
			<FONT color=#ff0000>→</FONT></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=10 src="images/ne_main01.gif" width=10></TD></TR></TBODY></TABLE><BR>
      <TABLE height=28 cellSpacing=0 cellPadding=3 width="95%" align=center border=0>
        <TBODY>
        <TR>
          <TD background=images/ne_login_bg01.gif>北京华北星学校 <IMG height=5 src="images/ne_patch01.gif" width=3 align=middle> 家长留言</TD></TR></TBODY></TABLE>
	  <table width="95.2%" align="center" style="margin-top:5px; margin-bottom:5px"> 
	  <tr>
		   <TD class=phbox height=25 width="92%">
<SPAN>尊敬的家长：<BR>&nbsp;&nbsp;您好！感谢您对我们关注和支持！您可以把你们的意见或建议通过留言的方式告诉我们，我们会尽快为你解决。<br>&nbsp;&nbsp;如有其他问题请及时与我们取得联系。电话：028-86131259、028-86131245、13880252822</SPAN></TD></tr></table>
						
      <FORM name=book action=?action=add method=post>
      <TABLE cellSpacing=0 cellPadding=3 width="95%" align=center border=0>
        <TBODY>        
        <TR>
          <TD width="20%">姓名</TD>
          <TD><INPUT id=name size=30 name=realname> *</TD></TR>       
        <TR>
          <TD width="20%">电话</TD>
          <TD><INPUT id=tel size=30 name=tel> *</TD></TR>
        <TR>
          <TD width="20%">联系地址</TD>
          <TD><INPUT id=address size=50 name=tel> *</TD></TR>
        <TR>
          <TD width="20%">Email</TD>
          <TD><INPUT id=email size=30 name=email></TD></TR> 
        <TR>
          <TD width="20%">留言内容</TD>
          <TD><TEXTAREA id=others name=content rows=6 cols=35></TEXTAREA></TD></TR>
        <TR>
          <TD>&nbsp;</TD>
          <TD><img src="images/search_btn.gif" onClick="javascript:checkForm();" style="cursor:hand">&nbsp;<img type="image" onClick="javascript:book.reset();return false;"  src="images/qingchu.gif" style="cursor:hand"></TD></TR></TBODY></TABLE></FORM>
      </TD></TR></TBODY></TABLE>
<!--#include file="foot.asp"-->
<% 
else
Response.Write "<script language=javascript>alert('您还没有登陆，或者登陆超时!!');location.href='index.asp';</script>"
end if
%>