admin_affiche_save.asp
来自「ASP+Accesss数据库设备WEB报修」· ASP 代码 · 共 41 行
ASP
41 行
<%if session("pass")<>"ok" then
Response.Redirect "index.asp"
Response.End
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="ChkURL.asp"-->
<!--#include file="../inc/char.asp"-->
<%
if request.form("affichename")="" then
response.write "错误提示:请输入公告标题!"
response.end
end if
if request.form("affichecontent")="" then
response.write "错误提示:请输入公告内容!"
response.end
end if
dim affichecontent
dim affichename
dim sql
dim rs
dim afficheid
affichename=request.form("affichename")
affichecontent=htmlencode2(request("affichecontent"))
set rs=server.createobject("adodb.recordset")
sql="select * from affiche where (afficheid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("affichename")=affichename
rs("affichecontent")=affichecontent
rs("affichetime")=now()
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language="javascript">
alert("公告添加成功!");
window.location.href="Admin_Affiche.asp";
</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?