📄 news_e.asp
字号:
<%
'************************************************************************************************
' 文件名: news_e.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-05-13
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 编辑大楼动态(新增、修改、删除)
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../common/commonpage.inc" -->
<!-- #include file="news_e.inc" -->
<%
call CheckSecurity()
if Not IsNewsAdmin then
Response.Clear
Response.Redirect "../common/error.asp?error=您不是大楼动态新闻管理员,不能编辑大楼动态新闻!&"
Response.end
end if
'********************************************************************************************************
' 服务器端代码
Dim pNewsSerial : pNewsSerial = GetParam("serial")
Dim sNewsTitle, sNewsContent
dim sSQL, crs, rs
if Not IsEmpty(pNewsSerial) then
sSQL = "select subject, content from t_news where serial = " & pNewsSerial
set crs = New CRecordset
set rs = crs.Open(dbLocal, sSQL)
if rs.EOF then
crs.Close()
Response.Clear
Server.Transfer("../common/error.asp")
Response.end
end if
sNewsTitle = crs.GetValue("subject")
sNewsContent = crs.GetValue("content")
crs.Close()
end if
'********************************************************************************************************
' 如果是提交,则调用函数InsertTitle或UpdateTitle或DeleteTitle更新数据库
Dim sFormAction
if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
sFormAction = GetParam("FormAction")
sNewsTitle = GetParam("subject")
sNewsContent = GetParam("content")
select case sFormAction
case "insert":
call AddNews()
case "update":
call UpdateNews()
case "delete":
call DeleteNews()
end select
end if
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">
<style type="text/css">
input {color:blue;border-width:1}
</style>
<script language="javascript" src="news_e.js"></script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>
<%
Response.Write OuterTableHeader
Response.Write HeaderWithMenu
Response.Write InnerTableHeader
'********************************************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write FormNews
Response.Write TableLink
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -