| 添加文章 |
|
<%
strMSG=" "
if Request.QueryString("act")="add" then
akind=Request.Form("akind")
atitle=Request.Form("atitle")
akey=Request.Form("akey")
aauthor=Request.Form("aauthor")
aemail=Request.Form("aemail")
afrom=Request.Form("afrom")
alink=Request.Form("alink")
atext=Request.Form("atext")
acontent=Request.Form("content")
if akind<>"" and atitle<>"" and akey<>"" and aauthor<>"" and aemail<>"" and afrom<>"" and alink<>"" and acontent<>"" then
set cnConn=Server.CreateObject("ADODB.Connection")
set rsTable=Server.CreateObject("ADODB.Recordset")
cnConn.Open strCONNECT
aid=Month(Now)&Day(Now)&Hour(Now)&Minute(Now)&Second(Now)
awhen=Now
acontent = replace(acontent, "'", "''")
if atext = "0" then
acontent = Text2Html(acontent, 0)
end if
strSql="INSERT INTO artic (aid,akind,atitle,akey,awhen,aauthor,aemail,afrom,alink,aicon,acontent) VALUES ('"&aid&"','"&akind&"','"&atitle&"','"&akey&"','"&awhen&"','"&aauthor&"','"&aemail&"','"&afrom&"','"&alink&"','','"&acontent&"')"
cnConn.Execute strSql
strMSG="恭喜,文章添加成功,请继续添加 ..."
cnConn.Close
Set cnConn=Nothing
Set rsTable=Nothing
atitle=""
acontent=""
else
strMSG="对不起,每一项都要填写 ..."
end if
end if
%>
|
|
|
|
| 本站申明 |
|
我们所载的文章是为了学习和借鉴之用, 其版权归其作者所有. 如有异议, 请联系我们, 我们立即删除.
文章上传后, 不是马上发布成页面, 需经我们编辑查阅; 同时, 我们保留最后的部分修改权, 如错别字, 段落格式等.
|
|