| Line 12... |
Line 12... |
| 12 |
<!--#include file="common/conf.asp"-->
|
12 |
<!--#include file="common/conf.asp"-->
|
| 13 |
<!--#include file="common/globals.asp"-->
|
13 |
<!--#include file="common/globals.asp"-->
|
| 14 |
<!--#include file="common/formating.asp"-->
|
14 |
<!--#include file="common/formating.asp"-->
|
| 15 |
<!--#include file="common/qstr.asp"-->
|
15 |
<!--#include file="common/qstr.asp"-->
|
| 16 |
<!--#include file="common/common_subs.asp"-->
|
16 |
<!--#include file="common/common_subs.asp"-->
|
| - |
|
17 |
<!--#include file="common/common_dbedit.asp"-->
|
| 17 |
<!--#include file="common/_form_window_common.asp"-->
|
18 |
<!--#include file="common/_form_window_common.asp"-->
|
| 18 |
<%
|
19 |
<%
|
| 19 |
' Make sure rtag_id is always present
|
20 |
' Make sure rtag_id is always present
|
| 20 |
If Request("rtag_id") = "" Then
|
21 |
If Request("rtag_id") = "" Then
|
| 21 |
Response.Redirect("index.asp")
|
22 |
Response.Redirect("index.asp")
|
| Line 30... |
Line 31... |
| 30 |
<!--#include file="_access_control_project.asp"-->
|
31 |
<!--#include file="_access_control_project.asp"-->
|
| 31 |
<%
|
32 |
<%
|
| 32 |
'------------ Variable Definition -------------
|
33 |
'------------ Variable Definition -------------
|
| 33 |
Dim selectedLicence
|
34 |
Dim selectedLicence
|
| 34 |
Dim httpReferer
|
35 |
Dim httpReferer
|
| - |
|
36 |
Dim licenceList
|
| - |
|
37 |
|
| 35 |
|
38 |
|
| 36 |
'------------ Constants Declaration -----------
|
39 |
'------------ Constants Declaration -----------
|
| 37 |
|
40 |
|
| 38 |
Const available_licences_query_string = " SELECT * from licences ORDER BY UPPER(name) "
|
41 |
Const available_licences_query_string = " SELECT * from licences ORDER BY UPPER(name) "
|
| 39 |
|
42 |
|
| Line 46... |
Line 49... |
| 46 |
selectedLicence = Request("selected_licence")
|
49 |
selectedLicence = Request("selected_licence")
|
| 47 |
If (IsNull(selectedLicence) OR selectedLicence = "") Then
|
50 |
If (IsNull(selectedLicence) OR selectedLicence = "") Then
|
| 48 |
selectedLicence = -1
|
51 |
selectedLicence = -1
|
| 49 |
End If
|
52 |
End If
|
| 50 |
|
53 |
|
| 51 |
|
- |
|
| 52 |
'--------------------------------------------------------------------------------------------------------------------------
|
54 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 53 |
' release_licencing_query_string
|
55 |
' release_licencing_query_string
|
| 54 |
'
|
56 |
'
|
| 55 |
' DESCRIPTION
|
57 |
' DESCRIPTION
|
| 56 |
' Constructs a query string using the provided release tag, designed to elicit
|
58 |
' Constructs a query string using the provided release tag, designed to elicit
|
| Line 137... |
Line 139... |
| 137 |
OraDatabase.ExecuteSQL ("begin INSERT INTO licencing (pv_id, licence) VALUES (:PV_ID, :LICENCE); end;")
|
139 |
OraDatabase.ExecuteSQL ("begin INSERT INTO licencing (pv_id, licence) VALUES (:PV_ID, :LICENCE); end;")
|
| 138 |
objEH.CatchORA( OraSession )
|
140 |
objEH.CatchORA( OraSession )
|
| 139 |
|
141 |
|
| 140 |
OraDatabase.Parameters.Remove "PV_ID"
|
142 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 141 |
OraDatabase.Parameters.Remove "LICENCE"
|
143 |
OraDatabase.Parameters.Remove "LICENCE"
|
| - |
|
144 |
On Error Goto 0
|
| - |
|
145 |
|
| - |
|
146 |
' Log Action
|
| - |
|
147 |
Call Log_Action ( NNpv_id, "software_licence", "Added: " & licenceList.Item(Cint(NNlicence)))
|
| - |
|
148 |
|
| 142 |
End Sub
|
149 |
End Sub
|
| 143 |
|
150 |
|
| 144 |
'--------------------------------------------------------------------------------------------------------------------------
|
151 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 145 |
' RemoveLicencing
|
152 |
' RemoveLicencing
|
| 146 |
'
|
153 |
'
|
| Line 161... |
Line 168... |
| 161 |
OraDatabase.ExecuteSQL ("begin DELETE FROM licencing WHERE pv_id=:PV_ID AND licence=:LICENCE; end;")
|
168 |
OraDatabase.ExecuteSQL ("begin DELETE FROM licencing WHERE pv_id=:PV_ID AND licence=:LICENCE; end;")
|
| 162 |
objEH.CatchORA( OraSession )
|
169 |
objEH.CatchORA( OraSession )
|
| 163 |
|
170 |
|
| 164 |
OraDatabase.Parameters.Remove "PV_ID"
|
171 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 165 |
OraDatabase.Parameters.Remove "LICENCE"
|
172 |
OraDatabase.Parameters.Remove "LICENCE"
|
| - |
|
173 |
On Error Goto 0
|
| - |
|
174 |
|
| - |
|
175 |
' Log Action
|
| - |
|
176 |
Call Log_Action ( NNpv_id, "software_licence", "Removed: " & licenceList.Item(Cint(NNlicence)))
|
| - |
|
177 |
|
| 166 |
End Sub
|
178 |
End Sub
|
| 167 |
|
179 |
|
| 168 |
'--------------------------------------------------------------------------------------------------------------------------
|
180 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 169 |
' initialLicence
|
181 |
' initialLicence
|
| 170 |
'
|
182 |
'
|
| Line 258... |
Line 270... |
| 258 |
checkedItemsArray = Split(checkedItemsFromForm,",")
|
270 |
checkedItemsArray = Split(checkedItemsFromForm,",")
|
| 259 |
For Each item in checkedItemsArray
|
271 |
For Each item in checkedItemsArray
|
| 260 |
checkedItemsDict.Add Trim(CStr( item )), ""
|
272 |
checkedItemsDict.Add Trim(CStr( item )), ""
|
| 261 |
Next
|
273 |
Next
|
| 262 |
|
274 |
|
| - |
|
275 |
' Populate the licence name diction - for logging
|
| - |
|
276 |
Call getLicenceNames
|
| - |
|
277 |
|
| 263 |
' Get the record set for the entire set of PV_IDs in the release
|
278 |
' Get the record set for the entire set of PV_IDs in the release
|
| 264 |
Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
|
279 |
Set rsQry = OraDatabase.DbCreateDynaset( release_licencing_query_string(parRtag_Id), cint(0) )
|
| 265 |
|
280 |
|
| 266 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
281 |
Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| 267 |
|
282 |
|
| Line 327... |
Line 342... |
| 327 |
html_string = html_string & " onChange=""Cascaded_Menu('parent','"& scriptName &"?rtag_id="& parRtag_Id &"&selected_licence=',this,0)"""
|
342 |
html_string = html_string & " onChange=""Cascaded_Menu('parent','"& scriptName &"?rtag_id="& parRtag_Id &"&selected_licence=',this,0)"""
|
| 328 |
html_string = html_string & " class='form_item'>"
|
343 |
html_string = html_string & " class='form_item'>"
|
| 329 |
|
344 |
|
| 330 |
' Add each licence to the select, using the option tag, and set the initially selected option
|
345 |
' Add each licence to the select, using the option tag, and set the initially selected option
|
| 331 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
346 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| - |
|
347 |
|
| 332 |
If CDbl(Request("selected_licence")) = CDbl(rsQry.Fields("licence")) or selectedLicence = -1 Then
|
348 |
If CDbl(Request("selected_licence")) = CDbl(rsQry.Fields("licence")) or selectedLicence = -1 Then
|
| 333 |
html_string = html_string & "<option value='"& rsQry.Fields("licence") &"' selected>"& rsQry.Fields("name") &"</option>"
|
349 |
html_string = html_string & "<option value='"& rsQry.Fields("licence") &"' selected>"& rsQry.Fields("name") &"</option>"
|
| 334 |
selectedLicence = CDbl(rsQry("licence"))
|
350 |
selectedLicence = CDbl(rsQry("licence"))
|
| 335 |
Else
|
351 |
Else
|
| 336 |
html_string = html_string & "<option value='"& rsQry.Fields("licence") &"'>"& rsQry.Fields("name") &"</option>"
|
352 |
html_string = html_string & "<option value='"& rsQry.Fields("licence") &"'>"& rsQry.Fields("name") &"</option>"
|
| Line 348... |
Line 364... |
| 348 |
' return result
|
364 |
' return result
|
| 349 |
LicenceDropDownHTML = html_string
|
365 |
LicenceDropDownHTML = html_string
|
| 350 |
End Function
|
366 |
End Function
|
| 351 |
|
367 |
|
| 352 |
'--------------------------------------------------------------------------------------------------------------------------
|
368 |
'--------------------------------------------------------------------------------------------------------------------------
|
| - |
|
369 |
' getLicenceNames
|
| - |
|
370 |
'
|
| - |
|
371 |
' DESCRIPTION
|
| - |
|
372 |
' Populates a dictionary to simplify conversion of licence data to text
|
| - |
|
373 |
' Used in logging changes
|
| - |
|
374 |
'
|
| - |
|
375 |
Sub getLicenceNames
|
| - |
|
376 |
|
| - |
|
377 |
Dim rsQry
|
| - |
|
378 |
Set licenceList=Server.CreateObject("Scripting.Dictionary")
|
| - |
|
379 |
|
| - |
|
380 |
' Get the full list of licences availabel from the database
|
| - |
|
381 |
Set rsQry = OraDatabase.DbCreateDynaset( available_licences_query_string, cint(0) )
|
| - |
|
382 |
|
| - |
|
383 |
' Add each licence to the select, using the option tag, and set the initially selected option
|
| - |
|
384 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| - |
|
385 |
licenceList.Add Cint(rsQry.Fields("licence")), CStr(rsQry.Fields("name"))
|
| - |
|
386 |
rsQry.MoveNext
|
| - |
|
387 |
WEnd
|
| - |
|
388 |
|
| - |
|
389 |
' destroy objects
|
| - |
|
390 |
rsQry.Close()
|
| - |
|
391 |
Set rsQry = nothing
|
| - |
|
392 |
End Sub
|
| - |
|
393 |
|
| - |
|
394 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 353 |
' PV_ID_ListHTML
|
395 |
' PV_ID_ListHTML
|
| 354 |
'
|
396 |
'
|
| 355 |
' DESCRIPTION
|
397 |
' DESCRIPTION
|
| 356 |
' Constructs the HTML to render the rows of checkboxes, package names, versions and extensions
|
398 |
' Constructs the HTML to render the rows of checkboxes, package names, versions and extensions
|
| 357 |
'
|
399 |
'
|