📄 add-text.asp
字号:
<% if isempty(session("flag")) then
Response.Redirect "."
end if %>
<% Response.Buffer=True %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<form method="POST" action="add-text.asp">
<head>
<LINK rel="stylesheet" href="css/index.css" type="text/css">
<title>先锋ASP精华网——添加文章</title>
</head>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="72%" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF" height="280">
<tr>
<td width="100%" height="12" background="images/t-image1.gif">
<p align="center"><font color="#000000">——添 加 文 章——</font></td>
</tr>
<tr>
<td width="100%" bgcolor="#B0B498" height="257" align="center" valign="top"><br>
文章标题:<input type="text" name="title" size="20" style="font-family: 宋体; font-size: 9pt; background-color: #B0B498; color: #000064">
<p> 作者:<input type="text" name="zuozhe" size="20" style="font-family: 宋体; font-size: 9pt; background-color: #B0B498; color: #000064"></p>
<p> E-mail:<input type="text" name="email" size="20" style="font-family: 宋体; font-size: 9pt; background-color: #B0B498; color: #000064"></p>
<p>文章正文:<br>
<textarea rows="9" name="text" cols="71" style="font-family: 宋体; font-size: 9pt; background-color: #B0B498; color: #000064"></textarea></p>
<p><input type="submit" value="提 交" name="B1" style="font-family: 宋体; font-size: 9pt; color: #000064">
<input type="reset" value="重 置" name="B2" style="font-family: 宋体; font-size: 9pt; color: #000064"><br>
<br>
</td>
</tr>
</center><center>
</table>
</center>
</div>
</form>
<% dim title,zuozhe,text,email
title=request.form("title")
if title ="" then
Response.End
end if
zuozhe=request.form("zuozhe")
text=htmlencode2(request.form("text"))
email=request.form("email")
if zuozhe="" then zuozhe="==未知=="
if text ="" then text = title
if email="" then email="未知"
%>
<!--#include file="dbconn.asp"-->
<!--#include file="inc/ksk-html.inc"-->
<% set rs=server.createobject("adodb.recordset")
sql="select * from text1 where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("text")=text
rs("zuozhe")=zuozhe
rs("email")=email
rs("date")=date()
rs.update
id=rs("id")
response.write "<CENTER>ID=<FONT COLOR='#0000A0'>"&id&"</FONT> 标题为<A HREF='view-text.asp?id="&id&"'>【<A HREF='view-text.asp?id="&id&"'><FONT COLOR='#0000A0'>"&title&"</FONT></A>】的文章添加成功</CENTER>"
response.write"<p align='center'><a href='sys-text.asp'><font color='#000064'>返回管理首页>>></font> </a></p>"
rs.close
set rs=nothing
conn.close
set conn=nothing %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -