<!--#include file="../ljconn.asp"-->
<%
cname=request.form("cname")
ctel=request.form("ctel")
cmail=request.form("cmail")
caddress=request.form("caddress")
cword=replace(request.form("cword"),vbcrlf,"<br>")
if cmail<>"" then
if instr(cmail,"@")=0 then
response.write"<script>alert(""邮箱地址一看就是假的，请重填！"");history.back();</script>"
response.end
end if
if instr(cmail,".")=0 then
response.write"<script>alert(""邮箱地址一看就是假的，请重填！"");history.back();</script>"
response.end
end if
end if
if cname<>"" then
sql="select * from gbook"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,3,2
rs.addnew
rs("name")=cname
rs("tel")=ctel
rs("mail")=cmail
rs("address")=caddress
rs("word")=cword
rs.update
response.redirect "lyok.asp"
rs.close
end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>留言本</title>
<style> 
BODY { SCROLLBAR-ARROW-COLOR:#999900;
SCROLLBAR-FACE-COLOR:#FFFFFF;
SCROLLBAR-DARKSHADOW-COLOR:#999999;
SCROLLBAR-HIGHLIGHT-COLOR:#CCCCCC;
SCROLLBAR-3DLIGHT-COLOR:#CCCCCC;
SCROLLBAR-SHADOW-COLOR:#CCCCCC;
SCROLLBAR-TRACK-COLOR:#FFFFFF;}
</style>
<script language="javascript">
<!--
function checkadd()
{
if(document.postart.cname.value.length<1)
  {
  alert("请填写昵称！");
  document.postart.cname.focus();
  return false;
  }
  if(document.postart.ctel.value.length<1)
  {
  alert("请留下你的联系电话号码！");
  document.postart.ctel.focus();
  return false;
  }
  if(document.postart.caddress.value.length<1)
  {
  alert("请留下你的主页地址！");
  document.postart.caddress.focus();
  return false;
  }
  if(document.postart.cword.value.length>200)
  {
  alert("留言内容应少于200字！");
  document.postart.cword.focus();
  return false;
  }
}
-->
</script>
<link href="style.css" rel="stylesheet" type="text/css">

</head>

<body>
<SCRIPT language=JavaScript>
var currentpos,timer; 

function initialize() 
{ 
timer=setInterval("scrollwindow()",10);
} 
function sc(){
clearInterval(timer);	
}
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc();
} 
document.onmousedown=sc
document.ondblclick=initialize
</script>
  
  <div align="center">
       <table width="555" border="0" align="center" cellpadding="1" cellspacing="1" class="line1">
     <form action="" method="post" name="postart" onSubmit="return checkadd()"> <tr>
        <td height="25" align="right" valign="middle" bgcolor="#F5F5F5"><div align="center" class="style6">上海迈信网站欢迎你的留言</div></td>
      </tr>
      <tr>
        <td width="96%" height="17" align="right" valign="middle" class="style6">
          <p align="left">你的姓名：
              <input name="cname" type="text" class="input" size="30" maxlength="50">
              <font color="#FF0000">*</font><br>
          </p>          </td>
      </tr>
      <tr>
        <td height="17" align="right" valign="middle" bgcolor="#F5F5F5" class="style6"><div align="left">联系电话：
              <input name="ctel" type="text" class="input" size="30" maxlength="50" >
              <font color="#FF0000">*</font></div></td>
      </tr>
      <tr>
        <td height="17" align="right" valign="middle" class="style6"><div align="left">电子信箱：
              <input name="cmail" type="text" class="input" size="30" maxlength="50">
        </div></td>
      </tr>
      <tr>
        <td height="17" align="right" valign="middle" bgcolor="#F5F5F5" class="style6"><div align="left">通询地址：
              <input name="caddress" type="text" class="input" size="30" maxlength="50">
              <font color="#FF0000">*</font></div></td>
      </tr>
      <tr>
        <td width="96%" height="16" align="right" valign="top" class="style6">
          <p align="left">留言内容：<font color="#FF0000">200字以内</font></td>
      </tr>
      <tr>
        <td width="96%" height="111" align="right" valign="top" bgcolor="#F5F5F5">
          <p align="left">
            <textarea name="cword" cols="80" rows="8" class="input"></textarea>
            <font color="#FF0000">*</font></td>
      </tr>
      <tr>
        <td align="right" height="30">
          <p align="center">
            <input name="submit" type="submit" class="input" value="好了提交">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#FF0000">*</font>为必填内容</td>
      </tr></form> 
    </table>          
<div align="center">  <br>
</div>
  <div align="center"><center>
    <BR>
    <A class=f2 href="/help/aboutus.asp"><FONT color=#000000></FONT></A>
    <table width="555" border="0" cellpadding="0" cellspacing="0" class="line1">
      <tr>
        <td height="20" bgcolor="#F5F5F5"><div align="center">技术支持 <a href="http://www.wangtoo.com/help/aboutus.asp" target="_blank" class="setred">上海万拓网络科技有限公司</a></div></td>
      </tr>
    </table>
    </center>                         
  </div>                         
</body>                                                                                                          
                                                                                                          
</html>                                                                                                          
</script>                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                        
                                                                       
                                                                       
                                                                       
                                                                       
                         
                    
                    
                  
                  
                  
                  
              
              
