File: D:/web/secure/csl/bam/global.asa
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Option Explicit
' ===============
' Version No: 2014.10.10
' (SS,03/10/14) Added ability to hide address and credit card details, organisation field label can be set.
' Implemented for ATL, where address, credit card hidden, and organisation is branch, and branch is required
' (SS,10/10/14) Latest version, modified for BETT
' (SS,05/12/14) New version which works with MySQL and 5 separate BAM databases all using the same code, settings taken from database
Sub Application_OnStart
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
' determine database name from script name, bam1 connects to csl_bam1, bam2 connects to csl_bam2 etc.
Dim LDBName, LPos
LDBName = LCase(Mid(Request.ServerVariables("SCRIPT_NAME"), 2))
LPos = InStr(LDBName, "/")
If LPos > 0 Then LDBName = Left(LDBName, LPos - 1)
LDBName = "csl_" & LDBName
Application("ConnectionString") = "MySQL_" & LDBName
Session.Timeout = 60 ' time out after one hour of non-use
' 3/03/03 (SS)
' Set the server locale to UK, mainly to prevent date problems (day and month being reversed)
Session.LCID = 2057
End Sub
Sub Session_OnEnd
End Sub
</SCRIPT>