global.asa
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<SCRIPT LANGUAGE=VBScript RUNAT="Server">
Sub Application_Onstart
On Error Resume Next
dim sServer,sUser,sDBName,sPass,sTmpPath,sInstallPath,sVersion
Dim WshShell
set WshShell=Server.CreateObject("WScript.Shell")
set application("conn")=CreateObject("ADODB.Connection")
if right(sInstallPath,1)="\" then sInstallPath = mid(sInstallPath,1,len(sInstallPath)-1)
set WshShell = nothing
if sserver&"" = "" then sserver="192.168.8.20"
Application("ConnectString") = _
"provider=sqloledb;data source=(local);uid=sa;pwd=sa;database=sjgroupoa"
Application("ConnectStrings") = _
"provider=sqloledb;data source=(local);uid=sa;pwd=sa;database=sjgroupoa"
Application("RecPerPage") = 15
Application.Lock
Application("whoson")=0
Application.UnLock
Application("Pub_Gs_ShowStr") = "公司"
Application("Pub_Bm_ShowStr") = "公司和部门"
Application("Pub_Yg_ShowStr") = "员工"
Application("TempPath") = sTmpPath
Application("LKOAPath") = sInstallPath
Application("LKOAVersion") = sVersion
Application("conn").open = Application("ConnectString")
Application("conn").Execute("update oa_ygdqzt set dqzt='20'")
Application.lock
Application.UnLock
Application("conn").Close
application("conn").open = Application("ConnectString")
application.lock
application("conn").Execute("update oa_ygdqzt set dqzt='0'")
application.UnLock
application("conn").Close
set application("conn")=nothing
End sub
Sub application_onend
application("conn").open = Application("ConnectString")
application.lock
application("conn").Execute("update oa_ygdqzt set dqzt='0'")
application.UnLock
application("conn").Close
set application("conn")=nothing
End sub
Sub Session_Onstart
On Error Resume Next
set Session("CZQX1")=server.CreateObject("Scripting.Dictionary")
Session("uID")=""
Session("uDeptID")=""
Session("uName")=""
Session("uNC")=""
Session("uDeptName")=""
Session("uYGBH")=""
Session("uKL")=""
Session("bbs_userName")=""
Session("bbs_userID")=""
Session("bbs_Dl") = ""
session.Timeout=3
Set Session("DBDemo")=Server.CreateObject("ADODB.Connection")
Session("DBDemo").Open Application("ConnectString")
End sub
sub session_onend
On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
' conn.open Application("ConnectString")
' conn.Execute("update oa_ygdqzt set dqzt='0' where ygbh=" & session.contents("uygbh"))
' conn.close
set conn=nothing
end sub
</SCRIPT>