savenews.asp

来自「. 缓存处理技术」· ASP 代码 · 共 41 行

ASP
41
字号
<!-- #include file="sysconfig.asp" -->
<!--#include file="checkadmin.asp" -->
<!--#include file="../Inc/DataUpdate_Application.asp" -->
<%
Dim NewsID
newsid=CheckStr(Trim(Request.Form("id")))
if Not isNum(NewsID) then Call AlertInfo("无效的参数传递,请返回重新尝试!","",0)

Dim BBR_IsHelp
BBR_IsHelp=CheckStr(trim(rst("InfoType")))
if Not isNum(BBR_IsHelp) then Call AlertInfo("无效的信息类型参数传递,请返回重新尝试!","",0)

set Rs=server.createobject("adodb.recordset")
sql="select * from news where newsid="&newsid
Rs.open sql,conn,1,3
if rst("act")="edit" then
   Rs("newstitle")=CheckStr(trim(rst("title")))
   Rs("newsauthor")=CheckStr(trim(rst("author")))
   Rs("newscontent")=HTMLENCODE(CheckStr(Trim(rst("content"))))
   Rs("BBR_IsHelp")=BBR_IsHelp
   Rs("newscolor")=rst("color")
   Rs("updatetime")=now()
   Rs.update
elseif rst("act")="del" then
   Rs.delete
   Rs.update
end if
session("edit")="success"

Rs.close
set Rs=nothing

Application.Lock
  Application("CnbbrSysNews")=Cnbbr_SysNews
  Application("AucLastUpdate0")=CStr(Now)
Application.Unlock
response.write"<script language='javascript'>alert('系统信息修改成功!');this.location.href='PEditNews.asp';</script>"
response.end

%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?