<!--#include file="userCheck.asp"-->
<!-- #include file="conn.asp"-->
<%
dim action
action = request.QueryString("action")
if action = "submit" then call tijiao()
%>
<!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>
<title>我要写信</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" href="css.css" type="text/css" />
<link href="css/comm.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="bodyDiv">
<!--#include file="user_top.asp"-->
  <table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="178" valign="top"><!--#include file="user_left.asp"--></td>
      <td width="732" valign="top">
	  <table width="100%" border="0" cellpadding="2" cellspacing="1" bordercolorlight="#626D78" bordercolordark="#ffffff" bgcolor="#CCCCCC">
        <form action="?action=submit" method="post" name="frmAnnounce" id="frmAnnounce" onSubmit="return validate()">
          <tr bgcolor="#FFFFFF"> 
            <td height="25" colspan="3" align="right"> 
              <div align="center"><strong>我要写信</strong></div></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="150" align="right">信件标题:</td>
            <td width="917" height="22" colspan="2"> 
              <input name="title" type="text" id="title" size="40" />
              <font color="#FF0000"> *</font></td>
          </tr>
		  <tr bgcolor="#FFFFFF">
		  	<td align="right" valign="top">信件内容:</td>
		    <td colspan="2"><textarea name="content" cols="55" rows="8" id="content"></textarea></td>
		  </tr>
          <tr bgcolor="#FFFFFF"> 
            <td colspan="3" align="right" valign="top"> 
              <div align="center"> 
                <input type="submit" name="Submit2" value="确定提交" class="an" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                <input type="reset" name="Submit" value="重新填写" class="an" />
                </div></td>
          </tr>
        </form>
</table>
	  </td>
    </tr>
    
    <tr>
      <td colspan="2"><!--#include file="model_bottom.asp"--></td>
    </tr>
  </table>
</div>
</body>
</html>
<%
'==========================
'功能：提交信息
function tijiao()
	dim strsql
	dim title, content, shijian

	title    = trim(request.Form("title"))
	content  = toHTML(request.Form("content"))
	shijian  = now()
	
	if title = "" then call wrong("请填写你的信件标题！")

    strsql = "select * from fenxianglaixin"
    rs.open strsql,conn,1,3
	rs.addnew
	   rs("userId")   = session("userId23")
	   rs("title")    = title
	   rs("content")  = content
	   rs("shijian")  = shijian
	   rs("shenhe")   = "no"
	 rs.update
	 rs.close
	call tiaozhuan("信件提交成功，谢谢您对本公司的支持！","user_main.asp")
end function
%>