📄 equi_statistic_by_sys.asp
字号:
<%
''*******************************************************************************
' 文件名: equi_statistic_by_sys.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 蔡晓燕
' 日 期 : 2002-11-25
'
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 统计系统下面的设备数量,包括子系统的设备数量
' 版 本 :
'-------------------------------------------------------------------------------------------------------------------------------
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/commonpage.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="equi_statistic_by_sys.inc" -->
<%
call CheckSecurity()
'' 如果不是设备管理员,则无权进入本页
if hasright(ID_EQUIPMENT) < RIGHT_READ then
Response.Clear
Response.Redirect "../include/error.asp?error=对不起,您没有设备统计权限!"
Response.end
end if
''*******************************************************************************
' 服务器端代码
''*******************************************************************************
' 建立数据库连接
dim conn : Set conn = DBConnection
dim iParentId, sParentSys
iParentId = GetParam("id")
if IsEmpty(iParentId) then
iParentId = 0
sParentSys = ""
end if
'-------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName : sFileName = "equi_statistic_by_sys.asp"
Dim iCols : iCols = 5
Dim sSorting : sSorting = GetParam("Sorting")
Dim sSorted : sSorted = GetParam("Sorted")
Dim sSortParams : sSortParams = ""
Dim sFormParams : sFormParams = ""
Dim sDirection : sDirection = ""
'response.write "ssorting="&sSorting&"<br>"
'response.write "ssorted="&sSorted&"<br>"
'response.write "ssorting="&sSorting&"<br>"
''*******************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------
if IsEmpty(sSorting) then sSorting = "sys_id" '' 缺省按设备类型排序
dim arrayFields(4), sDelimiter
sDelimiter = "*"
arrayFields(0) = "sys_id"
arrayFields(1) = "sys_desc"
arrayFields(2) = "nodiscarded_count"
arrayFields(3) = "discarded_count"
arrayFields(4) = "all_count"
call PrepareOrderbyStmt(Join(arrayFields, sDelimiter), sDelimiter)
'response.write "sOrderby="&sOrderby
'response.end
''*******************************************************************************
'' 构造分页的SQL语句
''*******************************************************************************
if sOrderby = "" then sOrderby = " order by sys_id asc"
'sSQL = "proc_equi_statistic_by_type " & ToSQL(sOrderby, "Text")
sSQL = "proc_equi_statistic_by_sys " & ToSQL(iParentId, "Number")&","& ToSQL(sOrderby, "Text")
'response.write sSQL
'response.end
''*******************************************************************************
%>
<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<link rel="stylesheet" href="../include/common.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<%
'Response.Write OuterTableHeader
'Response.Write HeaderWithMenu
'Response.Write InnerTableHeader
''*******************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------
Response.Write ListTableRecords(sSQL,iCols)
'-------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
''*******************************************************************************
'Response.Write InnerTableTailer
'Response.Write Footer
'Response.Write OuterTableTailer
Disconnect(conn)
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -