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

📄 backaction.asp

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


<%
'****************************************************************************
' 本页面必须是由其它页面打开的,因此如果直接在地址栏输入地址,就跳转到出错页面
'****************************************************************************
%>
<script language="javascript">
<!--
if ( typeof(window.opener) == "undefined" )
{
	window.location.href = "../include/error.asp"
}
//-->
</script>

<%
'****************************************************************************
' 如果用户尚未登录,或已经登录但Session或Cookie过期导致用户信息失效,则其opener跳转到登录页面
' 这里已经排除了opener为undefined的情况,不需要再对window.opener进行判断了
'****************************************************************************
If Not IsLogin then
	Response.Clear()
	Response.Write( _
		"<script language=""javascript"">" & vbLF & _
		"<!--" & vbLF & _
		"if (typeof(window.opener) != 'undefined')" & vbLF & _
		"	window.opener.location.href=""../include/home.asp"";" & vbLF & _
		"window.close();" & vbLF & _
		"//-->" & vbLF & _
		"</script>")
	Response.end
End if


'****************************************************************************
' 以下这段代码调用IAmBack函数真正实现用户回到岗位的操作:更新数据库,更新在岗状态
'-----------------------------------------------------------------------------------------------------------
call IAmBack()
Response.Write _
		"<script language=""javascript"">" & vbLF & _
		"<!--" & vbLF & _
			"self.opener.location.href=""../include/main.asp"";" & vbLF & _
			"self.close();" & vbLF & _
		"//-->" & vbLF & _
		"</script>"
Response.end
'****************************************************************************


'****************************************************************************
' IAmBack函数真正实现用户回到岗位的操作,更新数据库,更新在岗状态
'-----------------------------------------------------------------------------------------------------------
Sub IAmBack()
	Dim sSQL, sUserId
	sUserId = GetUserId()

	'' 更新数据库
	sSQL = "update T_OnlineStatus" & _
				" set login_status=1" & _
				", online_status=1" & _
				", leave_time = null" & _
				", leave_infor = null" & _
				" where account_id = " & ToSQL(sUserId,"Text")
	dim conn:set conn=DBConnection
	conn.Execute(sSQL)		
	Disconnect(conn)
	
	'' 更新在岗状态
	SetOnline()
End Sub
'****************************************************************************
%>

⌨️ 快捷键说明

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