<!--#include file="articleconn.asp"-->
<!--#include file="inc/articlechar.inc"-->
<%
if request.cookies("adminok")="" then
  response.redirect "login.asp"
end if
if request.form("txttitle")="" then 
response.write "错误提示:请输入文章标题!"
response.end
end if
if request.form("txtcontent")="" then 
response.write "错误提示:请未输入文章内容!"
response.end
end if
%>
<%
dim listname
dim typename
dim title
dim content
dim sql
dim rs
dim filename
dim articleid
dim outfile
dim typeid

title=htmlencode2(request.form("txttitle"))
typeid=request.form("typeid")

if request.form("checkbox")="on" then
content=htmlencode(request.form("txtcontent"))
else
content=htmlencode2(request.form("txtcontent"))
end if

set rs=server.createobject("adodb.recordset")
sql="select * from learning where (articleid is null)" 

rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=content
rs("typeid")=typeid
rs("dateandtime")=date()
rs.update

articleid=rs("articleid")

rs.close
set rs=nothing
conn.close
set conn=nothing

%><head>
<link rel="stylesheet" href="style/style.css" type="text/css">
</head>



<body style="background-color: #FFFFFF" background="../skin/skin_1/bg.gif">



<div align="center">
  <table border="1" cellspacing="0" width="50%" bordercolorlight="#000000" bordercolordark="#ffffff">
    <tr>
      <td width="100%" height="20" align="center" background="../skin/skin_3/bg_menu.gif"> <b>添加文章成功</b></td>
    </tr>
    <tr>
      <td width="100%"> 其文件名为： 
        <%response.write "article"&articleid%>
        <br>
        文件标题为：
        <%response.write title%>
        <p align="center">是否继续添加？<br>
    <br>
          <a href="addarticle.asp"> 是</a>&nbsp;&nbsp; <a href="manage.asp">否</a></p>
        </td>
    </tr>
    </table>
</div>