| Line 1... |
Line 1... |
| 1 |
<%
|
1 |
<%
|
| 2 |
'=====================================================
|
2 |
'=====================================================
|
| 3 |
' CONFIG FILE
|
3 |
' CONFIG FILE
|
| 4 |
'=====================================================
|
4 |
'=====================================================
|
| 5 |
%>
|
5 |
%>
|
| 6 |
<%
|
6 |
<%
|
| 7 |
' -- VARIABLE DEFINITION ------------------------------
|
7 |
' -- VARIABLE DEFINITION ------------------------------
|
| 8 |
Dim OraSession, OraDatabase ' DB connection
|
8 |
Dim OraSession, OraDatabase ' DB connection
|
| 9 |
Dim QUERIES_PATH
|
9 |
Dim QUERIES_PATH
|
| 10 |
Dim SCRIPT_NAME
|
10 |
Dim SCRIPT_NAME
|
| 11 |
Dim APP_ROOT
|
11 |
Dim APP_ROOT
|
| 12 |
' -----------------------------------------------------
|
12 |
Dim strRelativePath ' Rel Path from script to URL
|
| 13 |
%>
|
- |
|
| - |
|
13 |
Dim FavIcon ' Favorite Icon
|
| - |
|
14 |
Dim RmDebug ' Debug Display
|
| 14 |
<%
|
15 |
|
| 15 |
' -- DATABASE CONNECTIONS -----------------------------
|
16 |
' -- Basic Functions ----------------------------------
|
| - |
|
17 |
' --------------------------------------------------------------------------------------
|
| 16 |
'Set OraSession = CreateObject("OracleInProcServer.XOraSession")
|
18 |
' Determine if a variable or Const exists and is not empty
|
| 17 |
'OraSession.CreateDatabasePool 1,10,100, Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), 0
|
19 |
' Use to check if a vbscript variable has been declared and contains a non-empty value
|
| - |
|
20 |
Function isDefined( var)
|
| 18 |
'Set OraDatabase = OraSession.GetDatabaseFromPool(10)
|
21 |
If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then
|
| - |
|
22 |
isDefined = TRUE
|
| - |
|
23 |
Else
|
| - |
|
24 |
isDefined = FALSE
|
| - |
|
25 |
End If
|
| - |
|
26 |
End Function
|
| 19 |
|
27 |
|
| - |
|
28 |
' --------------------------------------------------------------------------------------
|
| - |
|
29 |
' Return a relative path to the server base. Used for relative pathing to 'images'
|
| - |
|
30 |
' Assumes server base is two directores below the web serve root (ie: /ManageSuite/XXXXXX_Manager)
|
| - |
|
31 |
Function GetPathToBase()
|
| - |
|
32 |
Dim url,depth,rv,ii
|
| - |
|
33 |
url = request.servervariables("URL")
|
| - |
|
34 |
depth = len(url) - len(replace(url, "/", ""))
|
| - |
|
35 |
rv = ""
|
| - |
|
36 |
For ii = 4 To depth
|
| - |
|
37 |
rv = rv & "../"
|
| - |
|
38 |
Next
|
| - |
|
39 |
GetPathToBase = rv
|
| - |
|
40 |
End Function
|
| - |
|
41 |
|
| - |
|
42 |
' -- DATABASE CONNECTIONS -----------------------------
|
| 20 |
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
|
43 |
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
|
| 21 |
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), Cint(0))
|
44 |
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), Cint(0))
|
| 22 |
|
45 |
|
| 23 |
' -----------------------------------------------------
|
- |
|
| 24 |
%>
|
- |
|
| 25 |
<%
|
- |
|
| 26 |
' -- CONFIGURATIONS -----------------------------------
|
46 |
' -- CONFIGURATIONS -----------------------------------
|
| 27 |
APP_ROOT = Server.MapPath(".")
|
47 |
APP_ROOT = Server.MapPath(".")
|
| 28 |
Const APPLICATION_ID = 9 ' Stored in Access Manager, [APPLICATIONS] table
|
- |
|
| 29 |
QUERIES_PATH = APP_ROOT &"\queries"
|
48 |
QUERIES_PATH = APP_ROOT &"\queries"
|
| 30 |
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
|
49 |
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
|
| - |
|
50 |
Const APPLICATION_ID = 9 ' Stored in Access Manager, [APPLICATIONS] table
|
| 31 |
Const enumDB_PERMISSION_TYPE_VISIBLE = 1 ' Stored in Access Manager, [Permission_Types] table
|
51 |
Const enumDB_PERMISSION_TYPE_VISIBLE = 1 ' Stored in Access Manager, [Permission_Types] table
|
| 32 |
Const enumDB_PERMISSION_TYPE_ACTIVE = 2 ' Stored in Access Manager, [Permission_Types] table
|
52 |
Const enumDB_PERMISSION_TYPE_ACTIVE = 2 ' Stored in Access Manager, [Permission_Types] table
|
| 33 |
' -----------------------------------------------------
|
- |
|
| 34 |
%>
|
- |
|
| 35 |
<%
|
53 |
|
| 36 |
' -- VARIABLE INITIALISATION --------------------------
|
54 |
' -- VARIABLE INITIALISATION --------------------------
|
| 37 |
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
|
55 |
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
|
| - |
|
56 |
strRelativePath = GetPathToBase()
|
| 38 |
' -----------------------------------------------------
|
57 |
FavIcon = strRelativePath & "icons/AM" & Application("FavIconSuffix") & ".png"
|
| 39 |
%>
|
58 |
|
| 40 |
<%
|
- |
|
| 41 |
' -- CONSTANTS ----------------------------------------
|
59 |
' -- CONSTANTS ----------------------------------------
|
| 42 |
Const enumDB_DEFAULT_EMPTY = -1
|
60 |
Const enumDB_DEFAULT_EMPTY = -1
|
| 43 |
Const enumDB_YES = "Y"
|
61 |
Const enumDB_YES = "Y"
|
| 44 |
Const enumDB_NO = "N"
|
62 |
Const enumDB_NO = "N"
|
| 45 |
Const enumCOOKIE_NAME = "ACCESS_MANAGER"
|
63 |
Const enumCOOKIE_NAME = "ACCESS_MANAGER"
|
| Line 67... |
Line 85... |
| 67 |
const ORATYPE_BFILE = 114
|
85 |
const ORATYPE_BFILE = 114
|
| 68 |
const ORATYPE_VARRAY = 247
|
86 |
const ORATYPE_VARRAY = 247
|
| 69 |
const ORATYPE_TABLE = 248
|
87 |
const ORATYPE_TABLE = 248
|
| 70 |
const ORATYPE_CURSOR = 102
|
88 |
const ORATYPE_CURSOR = 102
|
| 71 |
|
89 |
|
| 72 |
const ORAPARM_INPUT=1
|
90 |
const ORAPARM_INPUT=1
|
| 73 |
const ORAPARM_OUTPUT=2
|
91 |
const ORAPARM_OUTPUT=2
|
| 74 |
const ORAPARM_BOTH=3
|
92 |
const ORAPARM_BOTH=3
|
| 75 |
|
93 |
|
| 76 |
const ORADYN_DEFAULT=&H0&
|
94 |
const ORADYN_DEFAULT=&H0&
|
| 77 |
' -----------------------------------------------------
|
95 |
' -----------------------------------------------------
|
| 78 |
%>
|
96 |
%>
|