Subversion Repositories DevTools

Rev

Rev 6265 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rsolanki 1
<%
2
'=====================================================
5354 dpurdie 3
'                   CONFIG FILE
2 rsolanki 4
'=====================================================
5
%>
6
<%
7
' -- VARIABLE DEFINITION ------------------------------
5354 dpurdie 8
Dim OraSession, OraDatabase     ' DB connection
2 rsolanki 9
Dim QUERIES_PATH
10
Dim SCRIPT_NAME
11
Dim APP_ROOT
5354 dpurdie 12
Dim strRelativePath             ' Rel Path from script to URL
13
Dim FavIcon                     ' Favorite Icon
14
Dim RmDebug                     ' Debug Display
6658 dpurdie 15
Dim managerSuiteBase
16
Dim ACCESS_MANAGER_URL
17
Dim DEPLOYMENT_MANAGER_URL
18
Dim PRODUCTION_MANAGER_URL
19
Dim RELEASE_MANAGER_URL
5354 dpurdie 20
 
21
' -- Basic Functions ----------------------------------
22
' --------------------------------------------------------------------------------------
23
' Determine if a variable or Const exists and is not empty
24
'   Use to check if a vbscript variable has been declared and contains a non-empty value
25
Function isDefined( var)
26
    If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then
27
        isDefined = TRUE
28
    Else
29
        isDefined = FALSE
30
   End If
31
End Function
32
 
33
' --------------------------------------------------------------------------------------
34
' Return a relative path to the server base. Used for relative pathing to 'images'
35
' Assumes server base is two directores below the web serve root (ie: /ManageSuite/XXXXXX_Manager)
36
Function GetPathToBase()
37
    Dim url,depth,rv,ii
38
    url = request.servervariables("URL")
39
    depth =  len(url) - len(replace(url, "/", ""))
40
    rv = ""
41
    For ii = 4 To depth
42
        rv = rv & "../"
43
    Next
44
    GetPathToBase = rv
45
End Function
6658 dpurdie 46
' --------------------------------------------------------------------------------------
47
' Return a URL to the base of the Manager suite
48
' Assumes this is one directory down from the web server root
49
Function GetManagerSuiteBase
50
    Dim data
51
    data = Split(request.servervariables("URL"),"/")
52
    GetManagerSuiteBase =  "/" & data(1)
53
End Function
5354 dpurdie 54
 
5959 dpurdie 55
'-----------------------------------------------------------------------------------------------------------------------------
56
'   Destroy_All_Objects
57
'   Should be used by ALL pages and error handling code in order to reduce memory and handle leaks
58
'   May be used directly or via _footer.asp or globals_destructor.asp
59
Sub Destroy_All_Objects
60
    On Error Resume Next
61
    '   Some global objects
62
    Set objAccessControl = Nothing
63
    Set objPMod = Nothing
64
    Set objEH = Nothing
65
    Set objTabControl = Nothing
66
    Set objBtnControl = Nothing
67
    Set objFormCollector = Nothing
68
 
69
    '   Delete ALL Oracle bound variables
70
    '   Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leak
71
    If TypeName(OraDatabase) = "IOraDatabase" Then
72
        While OraDatabase.Parameters.Count > 0
73
            OraDatabase.Parameters.Remove(0)
74
        Wend
75
    End  If
76
 
77
    '   Some commonly used database objects
78
    rsTemp.Close
79
    Set rsTemp = Nothing
80
 
81
    rsRep.Close
82
    Set rsRep = Nothing
83
 
84
    rsQry.Close
85
    Set rsQry = Nothing
86
 
87
    '   Database objects
88
    set OraDatabase = Nothing
89
    set OraSession = Nothing
90
End Sub
91
 
2 rsolanki 92
' -- DATABASE CONNECTIONS -----------------------------
93
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
94
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("ACCESS_MANAGER_LOGIN"), Cint(0))
95
 
96
' -- CONFIGURATIONS -----------------------------------
97
APP_ROOT = Server.MapPath(".")
98
QUERIES_PATH = APP_ROOT &"\queries"
3943 dpurdie 99
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
5354 dpurdie 100
Const APPLICATION_ID = 9                        ' Stored in Access Manager, [APPLICATIONS] table
101
Const enumDB_PERMISSION_TYPE_VISIBLE = 1        ' Stored in Access Manager, [Permission_Types] table
102
Const enumDB_PERMISSION_TYPE_ACTIVE = 2         ' Stored in Access Manager, [Permission_Types] table
103
 
2 rsolanki 104
' -- VARIABLE INITIALISATION --------------------------
105
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
5354 dpurdie 106
strRelativePath = GetPathToBase()
5372 dpurdie 107
FavIcon = strRelativePath & "favicons/AM" & Application("FavIconSuffix") & ".png"
6658 dpurdie 108
managerSuiteBase = GetManagerSuiteBase()
109
ACCESS_MANAGER_URL      = ManagerSuiteBase & "/Access_Manager"
110
DEPLOYMENT_MANAGER_URL  = ManagerSuiteBase & "/Deployment_Manager"
111
PRODUCTION_MANAGER_URL  = ManagerSuiteBase & "/Production_Manager"
112
RELEASE_MANAGER_URL     = ManagerSuiteBase & "/Release_Manager"
5354 dpurdie 113
 
2 rsolanki 114
' -- CONSTANTS ----------------------------------------
115
Const enumDB_DEFAULT_EMPTY = -1
116
Const enumDB_YES = "Y"
117
Const enumDB_NO = "N"
118
Const enumCOOKIE_NAME = "ACCESS_MANAGER"
119
Const SPACER = "<img src='images/spacer.gif' width='1' height='1'>"
120
' -----------------------------------------------------
121
%>
122
<%
123
' -- OO4O ---------------------------------------------
124
const ORATYPE_VARCHAR2 = 1
125
const ORATYPE_NUMBER = 2
126
const ORATYPE_SINT = 3
127
const ORATYPE_FLOAT = 4
128
const ORATYPE_STRING = 5
129
const ORATYPE_VARCHAR = 9
130
const ORATYPE_DATE = 12
131
const ORATYPE_UINT = 68
132
const ORATYPE_RAW = 95
133
const ORATYPE_CHAR = 96
134
const ORATYPE_CHARZ = 97
135
const ORATYPE_MLSLABEL = 105
136
const ORATYPE_OBJECT = 108
137
const ORATYPE_REF = 110
138
const ORATYPE_CLOB = 112
139
const ORATYPE_BLOB = 113
140
const ORATYPE_BFILE = 114
141
const ORATYPE_VARRAY = 247
142
const ORATYPE_TABLE = 248
5306 dpurdie 143
const ORATYPE_CURSOR = 102
2 rsolanki 144
 
5354 dpurdie 145
const ORAPARM_INPUT=1   
146
const ORAPARM_OUTPUT=2  
2 rsolanki 147
const ORAPARM_BOTH=3
148
 
149
const ORADYN_DEFAULT=&H0&
150
' -----------------------------------------------------
151
%>
152
<%
153
' -- ERROR MESSAGES -----------------------------------
154
' -----------------------------------------------------
155
%>
156
<%
157
' -- ICONS --------------------------------------------
158
' -- ICONS SMALL --------------------------------------
5299 dpurdie 159
Const LIMG_COMPUTERS = "<img src='images/i_computer.gif' width='11' height='16' hspace='2' border='0' align='absmiddle'>"
160
Const LIMG_COMPUTERS_LRG = "<img src='images/i_computer_lrg.gif' width='18' height='18' hspace='2' border='0' align='absmiddle'>"
161
Const LIMG_CONTROL = "<img src='images/i_control.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
162
Const LIMG_CONTROL_LRG = "<img src='images/i_control_lrg.gif' width='13' height='18' hspace='4' border='0' align='absmiddle'>"
163
Const LIMG_DATA_TABLE = "<img src='images/i_data_table.gif' hspace='2' border='0' align='absmiddle' title='See this Control Data Filter (Filter is ON)'>"
164
Const LIMG_DATA_TABLE_OFF = "<img src='images/i_data_table_off.gif' hspace='2' border='0' align='absmiddle' title='See this Control Data Filter (Filter is OFF)'>"
165
Const LIMG_DISK = "<img src='images/i_disk.gif' width='16' height='16' hspace='4' border='0' align='absmiddle'>"
166
Const LIMG_DRILL_DOWN = "<img src='images/i_drill_down.gif' width='12' hspace='2' height='14' border='0'>"
167
Const LIMG_EDIT = "<img src='images/i_edit_no_border.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
168
Const LIMG_EDIT_OFF = "<img src='images/i_edit_no_border.gif' width='16' height='16' hspace='2' border='0' align='absmiddle' class='lessOpacity'>"
169
Const LIMG_LOGOFF = "<img src='icons/i_logoff.gif' width='18' height='18' hspace='2' border='0' align='absmiddle' title='User Logoff'>"
170
Const LIMG_LOGON_FAIL = "<img src='icons/i_logon_fail.gif' width='18' height='18' hspace='2' border='0' align='absmiddle' title='User Logon Fail'>"
171
Const LIMG_LOGON_SUCCESS = "<img src='icons/i_logon_success.gif' width='18' height='18' hspace='2' border='0' align='absmiddle' title='User Logon Successful'>"
172
Const LIMG_REMOVE = "<img src='images/i_remove_no_border.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
173
Const LIMG_ROLE = "<img src='images/i_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
6265 dpurdie 174
Const LIMG_ROLE_OFF = "<img src='images/i_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle' class='lessOpacity'>"
5299 dpurdie 175
Const LIMG_ROLE_LRG = "<img src='images/i_role_lrg.gif' width='13' height='18' hspace='4' border='0' align='absmiddle'>"
176
Const LIMG_SESSION_EXPIRE = "<img src='icons/i_session_expire.gif' width='18' height='18' hspace='2' border='0' align='absmiddle' title='Session Timed Out'>"
177
Const LIMG_SPEC_ROLE = "<img src='images/i_spec_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
6265 dpurdie 178
Const LIMG_SPEC_ROLE_OFF = "<img src='images/i_spec_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle' class='lessOpacity'>"
5299 dpurdie 179
Const LIMG_SPEC_ROLE_LRG = "<img src='images/i_spec_role_lrg.gif' width='13' height='18' hspace='4' border='0' align='absmiddle'>"
180
Const LIMG_USER = "<img src='images/i_user.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
181
Const LIMG_USER_DISABLED = "<img src='images/i_user_disabled.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
182
Const LIMG_USER_DISABLED_LRG = "<img src='images/i_user_disabled_lrg.gif' width='17' height='18' hspace='2' border='0' align='absmiddle'>"
183
Const LIMG_USER_LRG = "<img src='images/i_user_lrg.gif' width='13' height='17' hspace='2' border='0' align='absmiddle'>"
2 rsolanki 184
' -----------------------------------------------------
185
%>