📄 savearticle.asp
字号:
<!--#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>
</head>
<div align="center">
<table border="1" cellspacing="0" width="50%" bgcolor="#F0F8FF" bordercolorlight="#11B1FF" bordercolordark="#F0F8FF">
<tr>
<td width="100%" bgcolor="#0080C0" height="20">
<p align="center"><font color="#FFFFFF"><b>添加文章成功</b></font></td>
</tr>
<tr>
<td width="100%">
<p align="left"><br>
其文件名为:<%response.write "article"&articleid%><br>
文件标题为:<%response.write title%></p>
<center>
<p align="center">是否继续添加?<br>
<br>
<a href="addarticle.asp">
是</a> <a href="manage.asp">否</a><br>
<br>
</p>
</td>
</tr>
</table>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -