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

📄 maintain_record_list.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
''*******************************************************************************
' 文件名: maintain_record_list.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-11-15
' 
' 修改历史 :蔡晓燕
'   2002-11-21 ****** 修改内容:**************************************************
' 功能描述 : 设备查询,即对表T_equipment进行查询
'  版 本 :
'-------------------------------------------------------------------------------------------------------------------------------
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="maintain_record_list.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 sSQL, sWhere, sOrderby
Dim sFileName				: sFileName = "maintain_record_list.asp"
Dim iTotalRecords			: iTotalRecords = 0			' 分页
Dim iRecordsPerPage	: iRecordsPerPage = 15
Dim iTotalPages			: iTotalPages = 0
Dim iCols						: iCols = 3
Dim iCurrentPage			: iCurrentPage = GetParam("Page")
Dim sSorting					: sSorting = GetParam("Sorting")
Dim sSorted					: sSorted = GetParam("Sorted")
Dim sSortParams			: sSortParams = ""
Dim sFormParams		: sFormParams = ""
Dim sDirection				: sDirection = ""

''*******************************************************************************
'' 构造分页的SQL语句
''*******************************************************************************
'sSQL = "select t1.equi_id, t1.name, t1.number, t2.type_desc, t1.model, t1.room_no, t1.sys_id, t1.parent_equi_id" & _
'			" from t_equipment t1" & _
'			" left join t_equipment_type t2 on t2.type_id = t1.type"
'sOrderby = " order by t1.name asc"

 sSQL = "select * from t_worksheet"
 sOrderby = " order by starttime"
''*******************************************************************************
'' 构造Where子句
'-------------------------------------------------------------------------------------------------------------------------------
' 定义全局变量 ---- 查询参数

'pSysId:	传递到本页面的参数
dim pEquiSysId,pObjectType 
	pEquiSysId = GetParam("id")
	pObjectType = GetParam("objecttype")
if IsEmpty(pEquiSysId) or IsEmpty(pObjectType) then
'	Response.Redirect "../include/error.asp"
'	Response.end
else
	dim sEquiSysDesc
	if pObjectType = 0 then
		sEquiSysDesc = DLookUp(conn, "select sys_desc from t_sys where sys_id = " & ToSQL(pEquiSysId, "Number"))
	else
		sEquiSysDesc = DLookUp(conn, "select name from t_equipment where equi_id = " & ToSQL(pEquiSysId, "Number"))
	end if
	if sEquiSysDesc = "" then
		Response.Redirect "../include/error.asp"
		Response.end
	end if
	sFormParams = "objecttype="&pObjecttype&"&id="&pEquiSysId&"&"
	sWhere = " where equi_sys_id = " & ToSQL(pEquiSysId, "Number") & " and object_type = " & ToSQL(pObjectType, "Number")

	'response.write sSQL & sWhere & sOrderby & "<br>"
	'response.end
	''*******************************************************************************
	' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
	'-------------------------------------------------------------------------------------------------------------------------------
	dim arrayFields(3), sDelimiter
	sDelimiter = "*"
	arrayFields(0) = "starttime"
	arrayFields(1) = "content"
	arrayFields(2) = "confirmer"
	call PrepareListData(conn, sSQL&sWhere, Join(arrayFields, sDelimiter), sDelimiter)
	''*******************************************************************************
end if
%>

<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">
<script language="javascript">
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<%
''*******************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------
'Response.Write FormSearchEquip
if (not IsEmpty(pEquiSysId)) and (not IsEmpty(pObjectType)) then
Response.Write ListTableHeader()
'	response.write sSQL&sWhere&sOrderby
'	response.end
Response.Write ListTableRecords(sSQL&sWhere&sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
Response.Write ListTableTailer()
end if
'-------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
''*******************************************************************************
Disconnect(conn)

%>

</body>
</html>

⌨️ 快捷键说明

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