Subversion Repositories DevTools

Rev

Rev 5514 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
64 jtweddle 1
<%
2
'=====================================================
3
'					CONFIG FILE
4
'=====================================================
5
%>
6
<%
7
' -- VARIABLE DEFINITION ------------------------------
8
Dim OraSession, OraDatabase		' DB connection
9
Dim QUERIES_PATH
10
Dim SCRIPT_NAME
11
Dim TNS_NAME, DB_AUTHENTICATION
12
Dim APP_ROOT
13
Dim rootPath
14
Dim scriptName
4808 dpurdie 15
Dim SMTP_HOST
5356 dpurdie 16
Dim ACCESS_MANAGER_URL
17
Dim strRelativePath             ' Rel Path from script to URL
18
Dim managerSuiteBase            ' Url to the base of the Manager Suite
19
Dim FavIcon                     ' Favorite Icon
20
Dim RmDebug                     ' Debug Display
21
 
64 jtweddle 22
' -----------------------------------------------------
23
%>
24
<%
25
' -- DATABASE CONNECTIONS -----------------------------
26
'Set OraSession = CreateObject("OracleInProcServer.XOraSession")
66 ghuddy 27
'OraSession.CreateDatabasePool 1,10,100, Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), 0
64 jtweddle 28
'Set OraDatabase = OraSession.GetDatabaseFromPool(10)
29
 
30
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
31
Set OraDatabase = OraSession.OpenDatabase( Application("TNS_NAME"), Application("DEPLOYMENT_MANAGER_LOGIN"), Cint(0))
32
' -----------------------------------------------------
33
%>
34
<%
5356 dpurdie 35
' -- Basic Functions ----------------------------------
36
' --------------------------------------------------------------------------------------
37
' Determine if a variable or Const exists and is not empty
38
'   Use to check if a vbscript variable has been declared and contains a non-empty value
39
Function isDefined( var)
40
    If (not IsEmpty(Eval(var))) AND Eval(var & " <> """"") Then
41
        isDefined = TRUE
42
    Else
43
        isDefined = FALSE
44
   End If
45
End Function
46
 
4808 dpurdie 47
'--------------------------------------------------------------------------------------
48
'Returns the server of the package archive
49
Function Get_Mail_Server()
50
   Dim sqry: sqry = "SELECT * FROM RELEASE_MANAGER.BUILD_SERVICE_CONFIG WHERE SERVICE='MAIL SERVER'"
51
   Dim rsTemp
52
   Set rsTemp = OraDatabase.DbCreateDynaset( sqry , cint(0) )
53
   Get_Mail_Server = rsTemp("config")
54
   rsTemp.Close()
55
   Set rsTemp = Nothing
56
End Function
57
 
5356 dpurdie 58
'--------------------------------------------------------------------------------------
59
'Return a relative path to the server base. Used for relative pathing to 'images'
60
'Assumes server base is two directores below the web serve root (ManageSuite/Release_Manager)
61
Function GetPathToBase()
62
    Dim url,depth,rv,ii
63
    url = request.servervariables("URL")
64
    depth =  len(url) - len(replace(url, "/", ""))
65
    rv = ""
66
    For ii = 4 To depth
67
        rv = rv & "../"
68
    Next
69
    GetPathToBase = rv
70
End Function
71
 
72
' Return a URL to the base of the Manager suite
73
' Assumes this is one directory down from the web server root
74
Function GetManagerSuiteBase
75
    Dim data
76
    data = Split(request.servervariables("URL"),"/")
77
    GetManagerSuiteBase =  "/" & data(1)
78
End Function
5962 dpurdie 79
'-----------------------------------------------------------------------------------------------------------------------------
80
'   Destroy_All_Objects
81
'   Should be used by ALL pages and error handling code in order to reduce memory and handle leaks
82
'   May be used directly or via _footer.asp or globals_destructor.asp
83
Sub Destroy_All_Objects
84
    On Error Resume Next
85
    '   Some global objects
86
    Set objAccessControl = Nothing
87
    Set objPMod = Nothing
88
    Set objEH = Nothing
89
    Set oEnumStateTypeNames = Nothing
90
    Set objTabControl = Nothing
91
    Set objCrumbs = Nothing
92
    Set objBtnControl = Nothing
93
    Set objFormCollector = Nothing
5356 dpurdie 94
 
5962 dpurdie 95
    '   Global package info
96
    Set pkgInfoHash = Nothing
97
 
98
    '   Delete ALL Oracle bound variables
99
    '   Note: Bound Variables that remain at the end of a Page Process will cause an Oracle Session leak
100
    If TypeName(OraDatabase) = "IOraDatabase" Then
101
        While OraDatabase.Parameters.Count > 0
102
            OraDatabase.Parameters.Remove(0)
103
        Wend
104
    End  If
105
 
106
    '   Some commonly used database objects
107
    rsTemp.Close
108
    Set rsTemp = Nothing
109
 
110
    rsRep.Close
111
    Set rsRep = Nothing
112
 
113
    rsQry.Close
114
    Set rsQry = Nothing
115
 
116
    '   Database objects
117
    set OraDatabase = Nothing
118
    set OraSession = Nothing
119
End Sub
120
 
64 jtweddle 121
' -- CONFIGURATIONS -----------------------------------
122
Const DOC_FOLDER = "doc"
123
Const TEMP_FOLDER = "temp"
124
Const APPLICATION_ID = 10  			' Stored in Deployment Manager, [APPLICATIONS] table
125
APP_ROOT = Server.MapPath(".")
66 ghuddy 126
TNS_NAME = Application("TNS_NAME") '"RELEASEM"
64 jtweddle 127
DB_AUTHENTICATION = Application("DEPLOYMENT_MANAGER_LOGIN") '"release_manager_devl/release_manager_devl"								' DEVL schema
128
QUERIES_PATH = APP_ROOT &"\queries"
129
scriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
130
rootPath = Left( Server.MapPath( scriptName ), InStrRev(Server.MapPath( scriptName ), "\") )
4808 dpurdie 131
SMTP_HOST = Get_Mail_Server()
4014 dpurdie 132
Const ADMIN_EMAIL = "VixIT@vixtechnology.com"
64 jtweddle 133
Const enumDB_PERMISSION_TYPE_VISIBLE = 1		' Stored in Access Manager, [Permission_Types] table
134
Const enumDB_PERMISSION_TYPE_ACTIVE = 2			' Stored in Access Manager, [Permission_Types] table
135
Const enumRELEASES_DAYS_BACK_IN_TIME = 7		' Number of days back in time searching for released products
5356 dpurdie 136
 
137
strRelativePath = GetPathToBase()
138
managerSuiteBase = GetManagerSuiteBase()
139
ACCESS_MANAGER_URL      = ManagerSuiteBase & "/Access_Manager"
5370 dpurdie 140
FavIcon = strRelativePath & "favicons/PM" & Application("FavIconSuffix") & ".png"
5356 dpurdie 141
 
64 jtweddle 142
' -----------------------------------------------------
143
%>
144
<%
145
' -- VARIABLE INITIALISATION --------------------------
146
SCRIPT_NAME = Mid(Request.ServerVariables("SCRIPT_NAME"), InStrRev(Request.ServerVariables("SCRIPT_NAME"), "/") + 1 )
147
Const enumDB_DIFF_NO_CHANGE = 0
148
Const enumDB_DIFF_UPDATED = 2
149
Const enumDB_DIFF_NEW = 1
150
Const enumDB_DIFF_REMOVED = -1
151
Const enumPRODUCTS_BASE_VIEW_ID = 5					' Release Manager products base view id
152
Const enumAUTOPRODUCTS_BASE_VIEW_ID = 2602					' Release Manager auto_products base view id
153
' -----------------------------------------------------
154
%>
155
<%
66 ghuddy 156
' -- CONSTANTS --------------------------------------
64 jtweddle 157
Const enumDB_DEFAULT_EMPTY = -1
158
Const enumISSUES_STATE_FIXED = 1
159
Const enumCLEARQUEST_TDSE_ID = 3
160
Const enumCLEARQUEST_DEVI_ID = 4
161
Const enumCLEARQUEST_VT5DM_ID = 5
162
Const enumCLEARQUEST_VTSUP_ID = 7
163
Const enumISSUES_STATE_IMPORTED = 0
164
Const enumDB_YES = "Y"
165
Const enumDB_NO = "N"
166
Const enumDEFAULT = "default"
167
Const enumCOOKIE_NAME = "DeploymentManager"
168
Const enumSEPARATOR_LABEL = "SEPARATOR_LABLE"
169
Const enumDB_ALL_DATA = 0
170
Const SPACER = "<img src='images/spacer.gif' width='1' height='1'>"
171
Const enumMSSQL_ERROR = "<img src='icons/i_no_db_connection.gif' width='16' height='17' hspace='2' border='0' align='absmiddle' title='3rd party database is off-line'><SPAN class='body_txtr'>Information not currently available.</SPAN>"
172
Const enumSESSION_COPY_TYPE = "COPY_TYPE"
173
Const enumSESSION_COPY_ITEMS = "COPY_ITEMS"
174
Const enumSESSION_COPY_FROM = "COPY_FROM"
175
Const enumLOADING = "Loading..."
176
'----- TESTS ------------------------------------------
177
Const enumTEST_TYPE_SANITY = 2
178
Const enumTEST_TYPE_NOT_DONE = 1
179
' -- ACTION TRAIL -------------------------------------
180
Const enumAT_EVENT_COMMENT 	= 0
181
Const enumAT_EVENT_ADDED 	= 1
182
Const enumAT_EVENT_MODIFIED = 2
183
Const enumAT_EVENT_REMOVED 	= 3
184
Const enum_MSG_PROCESS_EXISTS = "msg_process_exists.asp"
185
' -----------------------------------------------------
186
%>
187
<%
188
' -- OO4O ---------------------------------------------
189
const ORATYPE_VARCHAR2 = 1
190
const ORATYPE_NUMBER = 2
191
const ORATYPE_SINT = 3
192
const ORATYPE_FLOAT = 4
193
const ORATYPE_STRING = 5
194
const ORATYPE_VARCHAR = 9
195
const ORATYPE_DATE = 12
196
const ORATYPE_UINT = 68
197
const ORATYPE_RAW = 95
198
const ORATYPE_CHAR = 96
199
const ORATYPE_CHARZ = 97
200
const ORATYPE_MLSLABEL = 105
201
const ORATYPE_OBJECT = 108
202
const ORATYPE_REF = 110
203
const ORATYPE_CLOB = 112
204
const ORATYPE_BLOB = 113
205
const ORATYPE_BFILE = 114
206
const ORATYPE_VARRAY = 247
207
const ORATYPE_TABLE = 248
208
const ORATYPE_CURSOR = 102
209
 
5962 dpurdie 210
const ORALOB_ONE_PIECE = 0 
211
const ORALOB_FIRST_PIECE = 1 
212
const ORALOB_NEXT_PIECE = 2 
213
const ORALOB_LAST_PIECE = 3
64 jtweddle 214
 
5962 dpurdie 215
Const ORALOB_SUCCESS = 0
216
Const ORALOB_NEED_DATA = 99
217
Const ORALOB_NODATA = 100
218
 
66 ghuddy 219
const ORAPARM_INPUT=1
220
const ORAPARM_OUTPUT=2
64 jtweddle 221
const ORAPARM_BOTH=3
222
 
223
const ORADYN_DEFAULT=&H0&
224
' -----------------------------------------------------
225
%>
226
<%
227
' -- ERROR MESSAGES -----------------------------------
228
' -----------------------------------------------------
229
%>
230
<%
231
' -- ICONS --------------------------------------------
232
' -- ICONS SMALL --------------------------------------
233
' -----------------------------------------------------
234
' -- Other Configuration -----------------------------
235
Const enum_RELMGR_COOKIE_DOMAIN = "RELMGR_USER_COOKIES"
236
Const COOKIE_HIDE_FILES_FILTER = "COOKIE_HIDE_FILES_FILTER"
237
Const COOKIE_HIDE_DEPS_FILTER = "COOKIE_HIDE_DEPS_FILTER"
238
Const COOKIE_HIDE_DIFF_FILTER = "COOKIE_HIDE_DIFF_FILTER"
239
Const COOKIE_RELMGR_SHOW_VIEW = "COOKIE_RELMGR_SHOW_VIEW"
240
Const COOKIE_RELEASE_MANAGER_MEMORY = "RELEASE_MANAGER_MEMORY"
241
Const COOKIE_PATCH_OPTIONS_FILTER = "COOKIE_PATCH_OPTIONS_FILTER"
242
%>