<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="islogin.asp"-->
<!--#include file="admin_conn.asp"-->
<!--#include file = "config.asp"-->
<!--#include file = "const.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>添加信息</title>
</head>
<%
ClassName=Request.Form("ClassName")
title=request.form("txttitle")
picture=Request.Form("picture")
keywords=Request.Form("keywords")

set rs = server.CreateObject ("Adodb.recordset")
sql="select * from class where ClassName='"&ClassName&"'"
rs.open sql,conn,1,1
jsid=rs("id")
Classid=rs("ID")
rs.close
set rs=nothing

' 开始：eWebEditor编辑区取值
Content = ""
For i = 1 To Request.Form("d_content").Count
	Content = Content & Request.Form("d_content")(i)
Next
' 上传后保存到本地服务器的路径文件名，多个以"|"分隔
Dim SavePathFileName
SavePathFileName = GetSafeStr(Request.Form("d_savepathfilename"))
'写入数据库
Set rs=CreateObject("Adodb.recordset")
sql="select * from article where id=0"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("ClassName")=ClassName
rs("ClassID")=ClassID
if Content<>"" then
rs("content")=Content
end if
if Picture<>"" then
rs("Picture") = Picture
end if
if keywords<>"" then
	rs("keywords")=keywords
else
	keywords=title&"_"&website
end if
if SavePathFileName<>"" then
rs("SavePathFileName") = SavePathFileName
end if
rs("addtime")=date()
addtime=date()
rs("hits")=1
rs.update
id=rs("id")
rs.close
set rs = nothing


conn.close
set conn=nothing
Response.Write "<div align=center><br><br>保存成功！<p>是否继续添加此小类信息 <a href='ArticleAdd.asp?ClassName="&ClassName&"'>是</a> / <a href='ArticleAddSelClass.asp'>否</a></div>"
%>
