<!--#include file="conn.asp"-->
<%
function ChangeHTML(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	ChangeHTML = fString
end function
title=request.form("title")
typeid=request.form("typeid")
content=request.form("content")
if title="" then jmessage="标题没填写，请填标题！<BR>"
if content="" then jmessage=jmessage&"内容没填写，请填内容！<BR>"
if typeid="0" or typeid="" then jmessage=jmessage&"类别没填写，请选类别！<BR>"
if jmessage="" then
sql = "select * from learning"
          set rs = server.createobject("adodb.recordset")
          rs.open sql,conn,3,3
          rs.addnew
          rs("title") = title
          rs("typeid") = typeid
          rs("content") = ChangeHTML(content)
          rs("hits") = 0
          rs("dateandtime") = date
		  rs("hidden") = 1
          rs.update
          rs.close
          set rs = nothing
		  jmessage="恭喜你，成功添加信息<BR>请等待管理员审核！<BR>"
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 type=text/css>BODY {
	COLOR: #000000; FONT-SIZE: 12px
}
TD {
	COLOR: #000000; FONT-SIZE: 12px
}
TH {
	COLOR: #6f1006; FONT-SIZE: 12px
}
A {
	FONT-SIZE: 12px
}
A:link {
	COLOR: blue;TEXT-DECORATION: none;
}
A:visited {
	COLOR: blue;TEXT-DECORATION: none;

}
A:hover {
	COLOR: green;
}
A.top:link {
	COLOR: #000000; TEXT-DECORATION: none
}
A.top:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A.top:hover {
	COLOR: blue; TEXT-DECORATION: underline
}
</STYLE>


</head>

<body topmargin="2" leftmargin="0" bgcolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" width="469" align="center">
  <tr>
    <td width="469" bgcolor="#000000"><table border="0" cellspacing="1" width="100%" height="35">
        <tr>
          <td width="100%" bgcolor="#00659C" height="31"><table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
              <tr>
                <td width="100%" bgcolor="#00659C"><table border="0" cellspacing="1" width="100%" height="287">
                    <tr>
                      <td width="100%" bgcolor="#40BDE8" align="center" height="21"> 添加结果</td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#ffffff" align="left" height="247" valign="top"><table border="0" cellspacing="0" width="96%" cellpadding="0" height="173" align="center">
                          <tr>
                            <td width="100%" height="201" align="center">
							添加结果：<br><br>
							<%=jmessage%>
							<BR>
							<a href='javascript:history.go(-1);'>【回上一页】</a>
                                                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="16"><hr style="border-style: dotted" size="1" color="#808080">
                            </td>
                          </tr>
                          <tr>
                            <td width="100%" height="17">说明：请看提示信息。</td>
                          </tr>
                      </table></td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#40BDE8" align="left" height="17"><div align="center"><A href="javascript:window.close()">[关闭窗口]</A></div></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>

