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

📄 online.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'************************************************************************************************
' 文件名: online.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="online.inc" -->

<%
'call CheckSecurity()

'********************************************************************************************************
' 服务器端代码

'-------------------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName			: sFileName = "online.asp"
Dim iTotalRecords		: iTotalRecords = 0			' 分页
Dim iRecordsPerPage	: iRecordsPerPage = 20
Dim iTotalPages			: iTotalPages = 0
Dim iCols					: iCols = 4
Dim iCurrentPage		: iCurrentPage = GetParam("Page")
Dim iSort					: iSort = GetParam("Sorting")
Dim iSorted				: iSorted = GetParam("Sorted")
Dim sSortParams		: sSortParams = ""
Dim sFormParams		: sFormParams = ""
Dim sDirection			: sDirection = ""

''********************************************************************************************************
'' 构造分页的SQL语句
''********************************************************************************************************
sSQL = "select t1.emp_serial, t1.account_id, hostname, login_status, online_status" & _
			", login_time, leave_time, logout_time, leave_infor, t2.name from t_onlinestatus t1" & _
			" left join t_employee t2 on t2.serial = t1.emp_serial" & _
			" left join t_account t3 on t3.emp_serial = t1.emp_serial"
sWhere = " where t3.status = 0" & _
			" and t2.co_id = 1 and t2.isdummy = 0 and t2.dismissed = 0"' & _
sOrderby = " order by online_status desc, login_status desc"		'' 先显示登录在线人员,再显示登录暂离人员,最后显示未登录人员

'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(4), sDelimiter
sDelimiter = "*"
arrayFields(0) = "name"
arrayFields(1) = "online_status"
arrayFields(3) = "leave_time"
arrayFields(4) = "leave_infor"
call PrepareListData(sSQL & sWhere & sOrderby, Join(arrayFields, sDelimiter), sDelimiter)


'' 如果点击状态排序,则要两个字段组合起来进行排序,因此在这里作额外的处理
if iSort = "online_status" and iSorted = "online_status" then					'' 升序,先显示登录在线人员,再显示登录暂离人员,最后显示未登录人员
	sOrderby = " order by online_status desc, login_status desc"
elseif iSort = "online_status" and iSorted <> "online_status" then			'' 降序,先显示未登录人员,再显示登录暂离人员,最后显示登录在线人员
	sOrderby = " order by online_status asc, login_status asc"
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">
.tdlist		{border-width:0px}
.tdHead	{border-width:0px}
</style>

<script language="VBScript">
Sub btnSearch_OnClick()
	document.all.frmSearch.submit()
End Sub
</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 TableHeader
Response.Write TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
Response.Write TableTailer
'Response.Write TableLink
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
%>

</body>
</html>

⌨️ 快捷键说明

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