⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newsdetail.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'************************************************************************************************
' 文件名: newsdetail.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
'  创建人 : 周秋舫
'  日 期 : 2002-05-30
' 修改历史 :
'   ****年**月**日 ****** 修改内容:******************************************************************
' 功能描述 : 某一条大楼最新动态的详细信息
'  版 本 :
'************************************************************************************************
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="newsdetail.inc" -->

<%
'call Security()
'********************************************************************************************************
' 服务器端代码

Dim sFileName		: sFileName = "newsdetail.asp"
Dim iParamSerial	: iParamSerial = GetParam("serial")		'' serial参数和flag参数合起来得到当前的序列号、上一条、下一条的序列号
Dim sFlag																		'' 标记是是第一条还是最后一条动态新闻
Dim iNewsCurrent, iNewsLast, iNewsNext							'' 当前显示的动态新闻的序列号、上一条、下一条

'********************************************************************************************************
' 查询参数serial,如果参数不存在,跳转到出错页面
'-------------------------------------------------------------------------------------------------------------------------------------------------
if IsEmpty(iParamSerial) then
	Response.Clear
	Server.Transfer("../common/error.asp")
	Response.end
end if

'********************************************************************************************************
' 如果动态新闻的serial参数不对,即找不到该序列号的动态新闻,也跳转到出错页面
'-------------------------------------------------------------------------------------------------------------------------------------------------
if 0 = DLookUp(dbLocal, "T_News", "count(*)", "serial=" & iParamSerial) then
	Response.Clear
	Server.Transfer("../common/error.asp")
	Response.end
end if

'********************************************************************************************************
' 分别获取当前动态新闻、上一条、下一条动态新闻的序列号
'-------------------------------------------------------------------------------------------------------------------------------------------------
iNewsCurrent = iParamSerial				'' 参数serial就是当前显示的动态新闻的序列号
iNewsLast = DLookUp(dbLocal, "T_News", "serial", "serial < " & iNewsCurrent & " order by record_time desc")
iNewsNext = DLookUp(dbLocal, "T_News", "serial", "serial > " & iNewsCurrent & " order by record_time asc")
if iNewsLast = "" then					'' 表示当前这条动态新闻是最最last动态新闻,也就是没有上一条动态新闻了
	iNewsLast = iNewsCurrent
	sFlag = "no_last_news"
end if
if iNewsNext = "" then
	iNewsNext = iNewsCurrent
	sFlag = "no_next_news"
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">
.shadow1 {font-family:楷体_GB2312,宋体,arial;font-size:14pt;font-weight:600;
				color:#000099;FILTER: DropShadow(color=cccccc, offX=2, offY=2, positive=1); width:100%;}
</style>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>

<%
Response.Write OuterTableHeader
if IsLogin then
	Response.Write HeaderWithMenu
else
	Response.Write _
		"<table width=""750"" border=""0"" cellspacing=""0"" cellpadding=""0"" height=""100"" background=""../images/bg/index.gif"">" & _
			"<tr>" & _ 
				"<td valign=""bottom"" align=""right"">" & _
				"</td>" & _
			"</tr>" & _
		"</table>"	
end if
Response.Write InnerTableHeader
'********************************************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------------------------

'********************************************************************************************************
' 从这里开始显示动态新闻本身的信息
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write NewsDetail()

'********************************************************************************************************
' 从这里开始显示链接信息
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write TableLink()

'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
%>

</body>
</html>

⌨️ 快捷键说明

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