Subversion Repositories DevTools

Rev

Rev 5207 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5207 Rev 5357
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|                    ADD                            |
5
'|                    ADD                            |
6
'|                 PACKAGES                          |
6
'|                 PACKAGES                          |
7
'|              OR DEPENDENCIES                      |
7
'|              OR DEPENDENCIES                      |
8
'=====================================================
8
'=====================================================
9
%>
9
%>
10
<%
10
<%
11
Option explicit
11
Option explicit
12
' Good idea to set when using redirect
12
' Good idea to set when using redirect
13
Response.Expires = 0   ' always load the page, dont store
13
Response.Expires = 0   ' always load the page, dont store
14
%>
14
%>
15
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/formating.asp"-->
18
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/qstr.asp"-->
19
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_subs.asp"-->
20
<!--#include file="class/classSortHelper.asp"-->
20
<!--#include file="class/classSortHelper.asp"-->
21
<%
21
<%
22
 
22
 
23
'------------ ACCESS CONTROL ------------------
23
'------------ ACCESS CONTROL ------------------
24
%>
24
%>
25
<!--#include file="_access_control_login.asp"-->
25
<!--#include file="_access_control_login.asp"-->
26
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_general.asp"-->
27
<!--#include file="_access_control_project.asp"-->
27
<!--#include file="_access_control_project.asp"-->
28
<%
28
<%
29
' Make sure rtag_id is always present
29
' Make sure rtag_id is always present
30
If Request("pv_id") = "" AND Request("rtag_id") = "" Then
30
If Request("pv_id") = "" AND Request("rtag_id") = "" Then
31
   Response.Redirect("index.asp")
31
   Response.Redirect("index.asp")
32
End If
32
End If
33
%>
33
%>
34
<%
34
<%
35
'------------ Variable Definition -------------
35
'------------ Variable Definition -------------
36
Dim parAdd_type
36
Dim parAdd_type
37
Dim parPkg_list
37
Dim parPkg_list
38
Dim parBase_view_id
38
Dim parBase_view_id
39
Dim rsPkgs
39
Dim rsPkgs
40
Dim HTML_pkg_list
40
Dim HTML_pkg_list
41
Dim parPv_id
41
Dim parPv_id
42
Dim parPkgfind
42
Dim parPkgfind
43
'------------ Constants Declaration -----------
43
'------------ Constants Declaration -----------
44
'------------ Variable Init -------------------
44
'------------ Variable Init -------------------
45
parAdd_type = Request("add_type")
45
parAdd_type = Request("add_type")
46
parPkg_list = Request("pkg_list")
46
parPkg_list = Request("pkg_list")
47
parBase_view_id = Request("base_view_id")
47
parBase_view_id = Request("base_view_id")
48
parPv_id = Request("pv_id")
48
parPv_id = Request("pv_id")
49
parPkgfind = Request("pkgfind")
49
parPkgfind = Request("pkgfind")
50
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
50
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
51
'----------------------------------------------
51
'----------------------------------------------
52
%>
52
%>
53
<%
53
<%
54
' ---- Action requirements ----
54
' ---- Action requirements ----
55
If parPkg_list = "" Then Response.Redirect( "form_search_result_pkgs.asp?pv_id="& parPv_id &_
55
If parPkg_list = "" Then Response.Redirect( "form_search_result_pkgs.asp?pv_id="& parPv_id &_
56
                                            "&rtag_id="& parRtag_id &_
56
                                            "&rtag_id="& parRtag_id &_
57
                                            "&pkgfind="& parPkgfind &_
57
                                            "&pkgfind="& parPkgfind &_
58
                                            "&add_type="& parAdd_type &_
58
                                            "&add_type="& parAdd_type &_
59
                                            "&errmsg=true" )
59
                                            "&errmsg=true" )
60
%>
60
%>
61
<%
61
<%
62
Function Page_Title ( NNadd_type )
62
Function Page_Title ( NNadd_type )
63
   If NNadd_type = Cstr(enum_ADD_PACKAGES) Then
63
   If NNadd_type = Cstr(enum_ADD_PACKAGES) Then
64
      Page_Title = "ADD Package"
64
      Page_Title = "ADD Package"
65
 
65
 
66
   ElseIf NNadd_type = Cstr(enum_ADD_DEPENDENCIES) Then
66
   ElseIf NNadd_type = Cstr(enum_ADD_DEPENDENCIES) Then
67
      Page_Title = "ADD Dependency"
67
      Page_Title = "ADD Dependency"
68
 
68
 
69
   ElseIf NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
69
   ElseIf NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
70
      Page_Title = "ADD Runtime Dependency"
70
      Page_Title = "ADD Runtime Dependency"
71
 
71
 
72
   Else
72
   Else
73
      Page_Title = ""
73
      Page_Title = ""
74
 
74
 
75
   End If
75
   End If
76
End Function
76
End Function
77
 
77
 
78
' Gets a set of records each one being unique by pkg_id, each row having (pkg_id, pkg_name, and num_of_versions)
78
' Gets a set of records each one being unique by pkg_id, each row having (pkg_id, pkg_name, and num_of_versions)
79
Function Get_Pkg_Names ( NNpkg_or_pvid_list, NNadd_type )
79
Function Get_Pkg_Names ( NNpkg_or_pvid_list, NNadd_type )
80
 
80
 
81
   If NNadd_type = Cstr(enum_ADD_DEPENDENCIES) OR NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
81
   If NNadd_type = Cstr(enum_ADD_DEPENDENCIES) OR NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
82
      ' When adding dependencies, the NNpkg_or_pvid_list is a list of PV_ID's
82
      ' When adding dependencies, the NNpkg_or_pvid_list is a list of PV_ID's
83
      Get_Pkg_Names = _
83
      Get_Pkg_Names = _
84
      " SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
84
      " SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
85
      "     FROM PACKAGE_VERSIONS pv,"&_
85
      "     FROM PACKAGE_VERSIONS pv,"&_
86
      "           PACKAGES pkg"&_
86
      "           PACKAGES pkg"&_
87
      "    WHERE pv.PV_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
87
      "    WHERE pv.PV_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
88
      "      AND pv.PKG_ID (+) = pkg.PKG_ID"&_
88
      "      AND pv.PKG_ID (+) = pkg.PKG_ID"&_
89
      "    GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
89
      "    GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
90
   Else
90
   Else
91
      ' When adding packages, the NNpkg_or_pvid_list is a list of PKG_ID's
91
      ' When adding packages, the NNpkg_or_pvid_list is a list of PKG_ID's
92
      Get_Pkg_Names = _
92
      Get_Pkg_Names = _
93
      " SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
93
      " SELECT pkg.PKG_ID, pkg.PKG_NAME, COUNT(pv.PV_ID) AS NUM_OF_VERSIONS "&_
94
      "     FROM PACKAGE_VERSIONS pv,"&_
94
      "     FROM PACKAGE_VERSIONS pv,"&_
95
      "           PACKAGES pkg"&_
95
      "           PACKAGES pkg"&_
96
      "    WHERE pkg.PKG_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
96
      "    WHERE pkg.PKG_ID IN ( "& NNpkg_or_pvid_list &" ) "&_
97
      "      AND pv.PKG_ID (+) = pkg.PKG_ID"&_
97
      "      AND pv.PKG_ID (+) = pkg.PKG_ID"&_
98
      "    GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
98
      "    GROUP BY pv.PKG_ID, pkg.PKG_ID, pkg.PKG_NAME"
99
   End If
99
   End If
100
End Function
100
End Function
101
 
101
 
102
 
102
 
103
Sub Get_All_Base_Views ( NNnewgroup_id, nPkg_id )
103
Sub Get_All_Base_Views ( NNnewgroup_id, nPkg_id )
104
   Dim rsTemp, Query_String
104
   Dim rsTemp, Query_String
105
 
105
 
106
   Query_String = _
106
   Query_String = _
107
   "   SELECT vi.view_id, vi.view_name, bv.hint "&_
107
   "   SELECT vi.view_id, vi.view_name, bv.hint "&_
108
   "     FROM views vi,"&_
108
   "     FROM views vi,"&_
109
   "         ("&_
109
   "         ("&_
110
   "         SELECT DISTINCT rc.BASE_VIEW_ID, '>&nbsp;' AS hint"&_
110
   "         SELECT DISTINCT rc.BASE_VIEW_ID, '>&nbsp;' AS hint"&_
111
   "           FROM release_content rc,"&_
111
   "           FROM release_content rc,"&_
112
   "               package_versions pv"&_
112
   "               package_versions pv"&_
113
   "          WHERE rc.pv_id = pv.pv_id"&_
113
   "          WHERE rc.pv_id = pv.pv_id"&_
114
   "            AND pv.pkg_id IN ( "& nPkg_id &" )"&_
114
   "            AND pv.pkg_id IN ( "& nPkg_id &" )"&_
115
   "         ) bv"&_
115
   "         ) bv"&_
116
   "    WHERE UPPER(vi.base_view) = 'Y'"&_
116
   "    WHERE UPPER(vi.base_view) = 'Y'"&_
117
   "      AND bv.BASE_VIEW_ID (+) = vi.VIEW_ID"&_
117
   "      AND bv.BASE_VIEW_ID (+) = vi.VIEW_ID"&_
118
   "    ORDER BY vi.view_name ASC"
118
   "    ORDER BY vi.view_name ASC"
119
 
119
 
120
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
120
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
121
 
121
 
122
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
122
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
123
      If NNnewgroup_id = Cstr( rsTemp.Fields("view_id") )  OR NOT IsNull(rsTemp("hint")) Then
123
      If NNnewgroup_id = Cstr( rsTemp.Fields("view_id") )  OR NOT IsNull(rsTemp("hint")) Then
124
         Response.write "<option value='"& rsTemp("view_id") &"' selected>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
124
         Response.write "<option value='"& rsTemp("view_id") &"' selected>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
125
      Else
125
      Else
126
         Response.write "<option value='"& rsTemp("view_id") &"'>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
126
         Response.write "<option value='"& rsTemp("view_id") &"'>"& rsTemp("hint") & rsTemp("view_name") &"</option>"
127
      End If
127
      End If
128
 
128
 
129
      rsTemp.MoveNext
129
      rsTemp.MoveNext
130
   WEnd
130
   WEnd
131
 
131
 
132
   rsTemp.Close
132
   rsTemp.Close
133
   Set rsTemp = nothing
133
   Set rsTemp = nothing
134
End Sub
134
End Sub
135
 
135
 
136
 
136
 
137
Sub Get_All_Personal_Views ( NNuser_id )
137
Sub Get_All_Personal_Views ( NNuser_id )
138
   Dim rsTemp, Query_String
138
   Dim rsTemp, Query_String
139
   If NNuser_id = "" Then Exit Sub
139
   If NNuser_id = "" Then Exit Sub
140
 
140
 
141
   Query_String = _
141
   Query_String = _
142
   " SELECT vi.view_id, vi.view_name"&_
142
   " SELECT vi.view_id, vi.view_name"&_
143
   "  FROM view_settings vs,"&_
143
   "  FROM view_settings vs,"&_
144
   "       views vi"&_
144
   "       views vi"&_
145
   " WHERE vs.view_id = vi.view_id"&_
145
   " WHERE vs.view_id = vi.view_id"&_
146
   "   AND vs.user_id = vi.owner_id  "&_
146
   "   AND vs.user_id = vi.owner_id  "&_
147
   "   AND vs.user_id = "& NNuser_id &_
147
   "   AND vs.user_id = "& NNuser_id &_
148
   "   AND vi.base_view = 'N'"&_
148
   "   AND vi.base_view = 'N'"&_
149
   " ORDER BY UPPER(vi.view_name)"
149
   " ORDER BY UPPER(vi.view_name)"
150
 
150
 
151
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
151
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
152
 
152
 
153
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
153
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
154
      Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& rsTemp.Fields("view_name") &"</option>"
154
      Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& rsTemp.Fields("view_name") &"</option>"
155
 
155
 
156
      rsTemp.MoveNext
156
      rsTemp.MoveNext
157
   WEnd
157
   WEnd
158
 
158
 
159
   rsTemp.Close
159
   rsTemp.Close
160
   Set rsTemp = nothing
160
   Set rsTemp = nothing
161
End Sub
161
End Sub
162
 
162
 
163
 
163
 
164
' This function is only called when adding dependencies. It gets all of the items in the specified release
164
' This function is only called when adding dependencies. It gets all of the items in the specified release
165
' and sets up dictionaries as follows:
165
' and sets up dictionaries as follows:
166
'
166
'
167
'  Dict Name       key     item
167
'  Dict Name       key     item
168
'  ------------------------------------
168
'  ------------------------------------
169
'  DDdictPkgId     pv_id   pkg_id
169
'  DDdictPkgId     pv_id   pkg_id
170
'  DDdictPkgName   pv_id   pkg_name
170
'  DDdictPkgName   pv_id   pkg_name
171
'  DDdictPkgVer    pv_id   pkg_version
171
'  DDdictPkgVer    pv_id   pkg_version
172
'  DDdictPkgExt    pv_id   v_ext
172
'  DDdictPkgExt    pv_id   v_ext
173
'
173
'
174
Sub Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, DDdictPkgId, DDdictPkgName, DDdictPkgVer, DDdictPkgExt )
174
Sub Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, DDdictPkgId, DDdictPkgName, DDdictPkgVer, DDdictPkgExt )
175
   Dim rsTemp, Query_String
175
   Dim rsTemp, Query_String
176
 
176
 
177
   If NNrtag_id = "" Then
177
   If NNrtag_id = "" Then
178
      Exit Sub
178
      Exit Sub
179
   End If
179
   End If
180
 
180
 
181
   Query_String = _
181
   Query_String = _
182
   " SELECT pv.pkg_id, pkgs.pkg_name, pv.pkg_version, pv.pv_id, pv.v_ext"&_
182
   " SELECT pv.pkg_id, pkgs.pkg_name, pv.pkg_version, pv.pv_id, pv.v_ext"&_
183
   "  FROM release_content rc,"&_
183
   "  FROM release_content rc,"&_
184
   "       package_versions pv,"&_
184
   "       package_versions pv,"&_
185
   "       packages pkgs"&_
185
   "       packages pkgs"&_
186
   " WHERE rc.pv_id = pv.pv_id"&_
186
   " WHERE rc.pv_id = pv.pv_id"&_
187
   "   AND pkgs.pkg_id = pv.pkg_id"&_
187
   "   AND pkgs.pkg_id = pv.pkg_id"&_
188
   "   AND rc.rtag_id = "& NNrtag_id &_
188
   "   AND rc.rtag_id = "& NNrtag_id &_
189
   "   AND pv.pv_id IN ( "& NNpv_id_list &" )"
189
   "   AND pv.pv_id IN ( "& NNpv_id_list &" )"
190
 
190
 
191
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
191
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
192
 
192
 
193
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
193
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
194
 
194
 
195
      DDdictPkgId.ADD    Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_id"))
195
      DDdictPkgId.ADD    Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_id"))
196
      DDdictPkgName.ADD  Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_name"))
196
      DDdictPkgName.ADD  Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_name"))
197
      DDdictPkgVer.ADD   Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_version"))
197
      DDdictPkgVer.ADD   Cstr(rsTemp("pv_id")), Cstr(rsTemp("pkg_version"))
198
      If NOT IsNull(rsTemp("v_ext")) Then
198
      If NOT IsNull(rsTemp("v_ext")) Then
199
         DDdictPkgExt.ADD   Cstr(rsTemp("pv_id")), Cstr(rsTemp("v_ext"))
199
         DDdictPkgExt.ADD   Cstr(rsTemp("pv_id")), Cstr(rsTemp("v_ext"))
200
      Else
200
      Else
201
         DDdictPkgExt.ADD   Cstr(rsTemp("pv_id")), Cstr("")
201
         DDdictPkgExt.ADD   Cstr(rsTemp("pv_id")), Cstr("")
202
      End If
202
      End If
203
 
203
 
204
      rsTemp.MoveNext
204
      rsTemp.MoveNext
205
   WEnd
205
   WEnd
206
 
206
 
207
   rsTemp.Close
207
   rsTemp.Close
208
   Set rsTemp = nothing
208
   Set rsTemp = nothing
209
End Sub
209
End Sub
210
 
210
 
211
 
211
 
212
' This function is used when adding packages to a release. The function processes a list of package ID's
212
' This function is used when adding packages to a release. The function processes a list of package ID's
213
' and forms the HTML to display for each item, the name, all available full versions in a list box
213
' and forms the HTML to display for each item, the name, all available full versions in a list box
214
Sub Generate_Package_List ( NNpkg_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
214
Sub Generate_Package_List ( NNpkg_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
215
 
215
 
216
   Dim rsPkgs, hidePatches, currRsPkg, qparPkg_list
216
   Dim rsPkgs, hidePatches, currRsPkg, qparPkg_list
217
   Dim spanPkgNameId
217
   Dim spanPkgNameId
218
   Dim commonHTML
218
   Dim commonHTML
219
   hidePatches = "hidepatches=true&"
219
   hidePatches = "hidepatches=true&"
220
 
220
 
221
   If pkgInfoHash.Item ("is_patch") = "Y" Then hidePatches = ""
221
   If pkgInfoHash.Item ("is_patch") = "Y" Then hidePatches = ""
222
 
222
 
223
   Set rsPkgs = OraDatabase.DbCreateDynaset( Get_Pkg_Names( NNpkg_list, NNadd_type ), cint(0))
223
   Set rsPkgs = OraDatabase.DbCreateDynaset( Get_Pkg_Names( NNpkg_list, NNadd_type ), cint(0))
224
   While ((NOT rsPkgs.BOF) AND (NOT rsPkgs.EOF))
224
   While ((NOT rsPkgs.BOF) AND (NOT rsPkgs.EOF))
225
 
225
 
226
      currRsPkg = chr(34) & rsPkgs("pkg_id") & chr(34)
226
      currRsPkg = chr(34) & rsPkgs("pkg_id") & chr(34)
227
      qparPkg_list = chr(34) & parPkg_list & chr(34)
227
      qparPkg_list = chr(34) & parPkg_list & chr(34)
228
 
228
 
229
      ' Begin table row
229
      ' Begin table row
230
      SShtml_pkg_list = SShtml_pkg_list &"<tr> "
230
      SShtml_pkg_list = SShtml_pkg_list &"<tr> "
231
 
231
 
232
      spanPkgNameId = "spanPkgName" & rsPkgs("pkg_id")
232
      spanPkgNameId = "spanPkgName" & rsPkgs("pkg_id")
233
 
233
 
234
      ' Form package name
234
      ' Form package name
235
      SShtml_pkg_list = SShtml_pkg_list &"  <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
235
      SShtml_pkg_list = SShtml_pkg_list &"  <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
236
                                        & "<span id='" & spanPkgNameId & "'>"& rsPkgs("pkg_name") &"</span></td>"
236
                                        & "<span id='" & spanPkgNameId & "'>"& rsPkgs("pkg_name") &"</span></td>"
237
 
237
 
238
      ' setup some common html so that we can make the (full) Version field on the right-most column of the
238
      ' setup some common html so that we can make the (full) Version field on the right-most column of the
239
      ' table row update on certain events taking place in the version base input box, and version extension
239
      ' table row update on certain events taking place in the version base input box, and version extension
240
      ' drop down list box
240
      ' drop down list box
241
      commonHTML = rsPkgs("pkg_id") & "'  onblur='updateVersion(" & currRsPkg & ");'" &_
241
      commonHTML = rsPkgs("pkg_id") & "'  onblur='updateVersion(" & currRsPkg & ");'" &_
242
                                        " onchange='updateVersion(" & currRsPkg & ");'"
242
                                        " onchange='updateVersion(" & currRsPkg & ");'"
243
 
243
 
244
      SShtml_pkg_list = SShtml_pkg_list & "<td><select class='form_item' id='pkgn" & commonHTML & "name='pkgn" & rsPkgs("pkg_id") & "'>"
244
      SShtml_pkg_list = SShtml_pkg_list & "<td><select class='form_item' id='pkgn" & commonHTML & "name='pkgn" & rsPkgs("pkg_id") & "'>"
245
      SShtml_pkg_list = SShtml_pkg_list & populateVersionList( rsPkgs("pkg_id") )
245
      SShtml_pkg_list = SShtml_pkg_list & populateVersionList( rsPkgs("pkg_id") )
246
      SShtml_pkg_list = SShtml_pkg_list & "</select></td>"
246
      SShtml_pkg_list = SShtml_pkg_list & "</select></td>"
247
 
247
 
248
      SShtml_pkg_list = SShtml_pkg_list  &"</td>"
248
      SShtml_pkg_list = SShtml_pkg_list  &"</td>"
249
 
249
 
250
      ' End table row
250
      ' End table row
251
      SShtml_pkg_list = SShtml_pkg_list  &"</tr>"
251
      SShtml_pkg_list = SShtml_pkg_list  &"</tr>"
252
 
252
 
253
      rsPkgs.MoveNext
253
      rsPkgs.MoveNext
254
   WEnd
254
   WEnd
255
End Sub
255
End Sub
256
 
256
 
257
' This function deals with a PV_ID list, not a PKG_ID list. Hence, it is used for the ADD Dependencies user operation.
257
' This function deals with a PV_ID list, not a PKG_ID list. Hence, it is used for the ADD Dependencies user operation.
258
' The function was initially based on the Generate_Package_List() function, and then stripped back and reworked to use
258
' The function was initially based on the Generate_Package_List() function, and then stripped back and reworked to use
259
' the result of the Get_Versions_From_Release() function, which now processes PV_ID lists also.
259
' the result of the Get_Versions_From_Release() function, which now processes PV_ID lists also.
260
' Adding a dependency means taking the latest version in the release, there is no choice about  it.
260
' Adding a dependency means taking the latest version in the release, there is no choice about  it.
261
Sub Generate_Version_List ( NNpv_id_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
261
Sub Generate_Version_List ( NNpv_id_list, SShtml_pkg_list, NNrtag_id, NNadd_type )
262
 
262
 
263
   Dim spanPkgNameId
263
   Dim spanPkgNameId
264
   Dim fullVersion
264
   Dim fullVersion
265
   Dim i
265
   Dim i
266
 
266
 
267
   ' dictionaries and arrays
267
   ' dictionaries and arrays
268
   Dim dictPkgId, dictPkgVer, dictPkgExt, dictPkgName
268
   Dim dictPkgId, dictPkgVer, dictPkgExt, dictPkgName
269
   Dim pv_ids, pkg_ids, versions, pkg_names
269
   Dim pv_ids, pkg_ids, versions, pkg_names
270
 
270
 
271
   ' create dictionaries
271
   ' create dictionaries
272
   Set dictPkgId   = CreateObject("Scripting.Dictionary")
272
   Set dictPkgId   = CreateObject("Scripting.Dictionary")
273
   Set dictPkgName = CreateObject("Scripting.Dictionary")
273
   Set dictPkgName = CreateObject("Scripting.Dictionary")
274
   Set dictPkgVer  = CreateObject("Scripting.Dictionary")
274
   Set dictPkgVer  = CreateObject("Scripting.Dictionary")
275
   Set dictPkgExt  = CreateObject("Scripting.Dictionary")   ' This one assigned, and populated, but currently not used thereafter
275
   Set dictPkgExt  = CreateObject("Scripting.Dictionary")   ' This one assigned, and populated, but currently not used thereafter
276
 
276
 
277
   ' populate dictionaries
277
   ' populate dictionaries
278
   Call Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, dictPkgId, dictPkgName, dictPkgVer, dictPkgExt )
278
   Call Get_Versions_From_Release ( NNpv_id_list, NNrtag_id, dictPkgId, dictPkgName, dictPkgVer, dictPkgExt )
279
 
279
 
280
   ' get the columns we need from the dictionaries
280
   ' get the columns we need from the dictionaries
281
   pv_ids    = dictPkgId.Keys
281
   pv_ids    = dictPkgId.Keys
282
   pkg_names = dictPkgName.Items
282
   pkg_names = dictPkgName.Items
283
   pkg_ids   = dictPkgId.Items
283
   pkg_ids   = dictPkgId.Items
284
   versions  = dictPkgVer.Items
284
   versions  = dictPkgVer.Items
285
 
285
 
286
   ' iterate through all the PV_ID's we found using the Get_Versions_From_Release() function
286
   ' iterate through all the PV_ID's we found using the Get_Versions_From_Release() function
287
   For i = 0 to ubound(pv_ids)
287
   For i = 0 to ubound(pv_ids)
288
 
288
 
289
      fullVersion = versions(i)
289
      fullVersion = versions(i)
290
 
290
 
291
      ' Begin table row
291
      ' Begin table row
292
      SShtml_pkg_list = SShtml_pkg_list &"<tr> "
292
      SShtml_pkg_list = SShtml_pkg_list &"<tr> "
293
 
293
 
294
      ' NOTE: the formation of this span name may result in more than one span of the same name in the HTML.
294
      ' NOTE: the formation of this span name may result in more than one span of the same name in the HTML.
295
      ' This is because there may be >1 package version of the same package ID (eg sysbasetypes.mas, sysbasetypes.sea)
295
      ' This is because there may be >1 package version of the same package ID (eg sysbasetypes.mas, sysbasetypes.sea)
296
      ' being added as dependencies. It doesn't seem to matter though. It just reflects the ancestry of this code which
296
      ' being added as dependencies. It doesn't seem to matter though. It just reflects the ancestry of this code which
297
      ' used to be exclusively package ID focused, whereas now, it has a pv_id focus when dealing with dependencies.
297
      ' used to be exclusively package ID focused, whereas now, it has a pv_id focus when dealing with dependencies.
298
      spanPkgNameId = "spanPkgName" & pkg_names(i)
298
      spanPkgNameId = "spanPkgName" & pkg_names(i)
299
 
299
 
300
      ' Form package name
300
      ' Form package name
301
      SShtml_pkg_list = SShtml_pkg_list & " <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
301
      SShtml_pkg_list = SShtml_pkg_list & " <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>" _
302
                                        & " <span id='" & spanPkgNameId & "'>"& pkg_names(i) &"</span></td>"
302
                                        & " <span id='" & spanPkgNameId & "'>"& pkg_names(i) &"</span></td>"
303
 
303
 
304
 
304
 
305
      ' Form the (full) Version display field
305
      ' Form the (full) Version display field
306
      SShtml_pkg_list = SShtml_pkg_list &"  <td background='images/bg_form_lightgray.gif'>"
306
      SShtml_pkg_list = SShtml_pkg_list &"  <td background='images/bg_form_lightgray.gif'>"
307
 
307
 
308
      If fullVersion = "" Then
308
      If fullVersion = "" Then
309
         SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
309
         SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
310
                                           & "' id='spanFullVersion" & pkg_ids(i) & "'> unset </span>"
310
                                           & "' id='spanFullVersion" & pkg_ids(i) & "'> unset </span>"
311
      Else
311
      Else
312
         SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
312
         SShtml_pkg_list = SShtml_pkg_list &"<span nowrap class='form_item' name='spanFullVersion" & pkg_ids(i) _
313
                                           & "' id='spanFullVersion" & pkg_ids(i) & "'>" & fullVersion & "</span>"
313
                                           & "' id='spanFullVersion" & pkg_ids(i) & "'>" & fullVersion & "</span>"
314
      End If
314
      End If
315
 
315
 
316
      SShtml_pkg_list = SShtml_pkg_list & "<input type='hidden'  id='pkgn" & pkg_ids(i) _
316
      SShtml_pkg_list = SShtml_pkg_list & "<input type='hidden'  id='pkgn" & pkg_ids(i) _
317
                                        & "' name='pkgn" & pkg_ids(i) & "' ' class='form_item' size='12' value='" & fullVersion & "'> "
317
                                        & "' name='pkgn" & pkg_ids(i) & "' ' class='form_item' size='12' value='" & fullVersion & "'> "
318
 
318
 
319
      ' End table row
319
      ' End table row
320
      SShtml_pkg_list = SShtml_pkg_list  &"</tr>"
320
      SShtml_pkg_list = SShtml_pkg_list  &"</tr>"
321
   Next
321
   Next
322
End Sub
322
End Sub
323
 
323
 
324
// Create HTML to populate a form selection with versions numbers for a specified
324
// Create HTML to populate a form selection with versions numbers for a specified
325
// package. This could be done via AJAX but is currently done when the page is
325
// package. This could be done via AJAX but is currently done when the page is
326
// rendered.
326
// rendered.
327
Function populateVersionList(NNpkg_id)
327
Function populateVersionList(NNpkg_id)
328
    Dim rsFind
328
    Dim rsFind
329
    Dim Query_String
329
    Dim Query_String
330
    Dim aVersions
330
    Dim aVersions
331
    Dim objSortHelper
331
    Dim objSortHelper
332
    Dim lastRow, i
332
    Dim lastRow, i
333
    
333
    
334
 
334
 
335
    // First one - Use as a prompt
335
    // First one - Use as a prompt
336
    populateVersionList = "<option>-- Select Version --</option>"
336
    populateVersionList = "<option>-- Select Version --</option>"
337
 
337
 
338
    Query_String = _
338
    Query_String = _
339
	" SELECT DISTINCT pv.pkg_version, pv.dlocked "&_
339
	" SELECT DISTINCT pv.pkg_version, pv.dlocked "&_
340
	"    FROM PACKAGES pkg, package_versions pv"&_
340
	"    FROM PACKAGES pkg, package_versions pv"&_
341
	"   WHERE pkg.pkg_id = pv.pkg_id  AND  pkg.pkg_id = " & NNpkg_id
341
	"   WHERE pkg.pkg_id = pv.pkg_id  AND  pkg.pkg_id = " & NNpkg_id
342
 
342
 
343
    Set rsFind = OraDatabase.DbCreateDynaset( Query_String, cint(0))
343
    Set rsFind = OraDatabase.DbCreateDynaset( Query_String, cint(0))
344
	If rsFind.RecordCount > 0 Then
344
	If rsFind.RecordCount > 0 Then
345
 
345
 
346
		aVersions = rsFind.GetRows()
346
		aVersions = rsFind.GetRows()
347
		lastRow = UBound( aVersions, 2 )
347
		lastRow = UBound( aVersions, 2 )
348
 
348
 
349
		Set objSortHelper = New SortHelper
349
		Set objSortHelper = New SortHelper
350
 
350
 
351
		' Sort versions
351
		' Sort versions
352
		Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsFind.FieldIndex("pkg_version") )
352
		Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsFind.FieldIndex("pkg_version") )
353
 
353
 
354
		' Descending order
354
		' Descending order
355
		For i = lastRow To 0 Step -1
355
		For i = lastRow To 0 Step -1
356
            Dim prefix
356
            Dim prefix
357
            Dim text
357
            Dim text
358
 
358
 
359
            text = aVersions( rsFind.FieldIndex("pkg_version"), i )
359
            text = aVersions( rsFind.FieldIndex("pkg_version"), i )
360
 
360
 
361
            If aVersions( rsFind.FieldIndex("dlocked"), i ) = "Y" Then
361
            If aVersions( rsFind.FieldIndex("dlocked"), i ) = "Y" Then
362
                prefix = "R&nbsp;"
362
                prefix = "R&nbsp;"
363
            Else
363
            Else
364
                prefix = "&nbsp;&nbsp;&nbsp;&nbsp;"
364
                prefix = "&nbsp;&nbsp;&nbsp;&nbsp;"
365
            End If
365
            End If
366
            
366
            
367
            populateVersionList = populateVersionList &_
367
            populateVersionList = populateVersionList &_
368
                "<option value='"& text &"'>" & prefix & text & "</option>"
368
                "<option value='"& text &"'>" & prefix & text & "</option>"
369
 
369
 
370
		Next
370
		Next
371
		Set objSortHelper = nothing
371
		Set objSortHelper = nothing
372
	End If
372
	End If
373
 
373
 
374
	rsFind.Close
374
	rsFind.Close
375
	Set rsFind = nothing
375
	Set rsFind = nothing
376
End Function
376
End Function
377
 
377
 
378
%>
378
%>
379
<%
379
<%
380
If parPv_id <> "" Then
380
If parPv_id <> "" Then
381
   Call Get_Pkg_Info ( parPv_id, NULL )
381
   Call Get_Pkg_Info ( parPv_id, NULL )
382
End If
382
End If
383
%>
383
%>
384
<html>
384
<html>
385
<head>
385
<head>
386
<title>Release Manager</title>
386
<title>Release Manager</title>
387
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
387
<link rel="shortcut icon" href="<%=FavIcon%>"/>
388
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
388
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
389
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
389
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
390
<link rel="stylesheet" href="images/navigation.css" type="text/css">
390
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
391
<script language="JavaScript" src="images/common.js"></script>
391
<link rel="stylesheet" href="images/navigation.css" type="text/css">
392
<script language="JavaScript" type="text/JavaScript">
392
<script language="JavaScript" src="images/common.js"></script>
393
<!--
393
<script language="JavaScript" type="text/JavaScript">
394
 
394
<!--
395
window.onload = function()
395
 
396
{
396
window.onload = function()
397
  checkSeletion(document.getElementById("base_view_id"));
397
{
398
   var versionObjectIds = getVersionObjectIds();
398
  checkSeletion(document.getElementById("base_view_id"));
399
   for( var iobj in versionObjectIds )
399
   var versionObjectIds = getVersionObjectIds();
400
   {
400
   for( var iobj in versionObjectIds )
401
      updateVersion(versionObjectIds[iobj]);
401
   {
402
   }
402
      updateVersion(versionObjectIds[iobj]);
403
}
403
   }
404
 
404
}
405
// getVersionObjectIds is only called when adding packages to a release.
405
 
406
function getVersionObjectIds ()
406
// getVersionObjectIds is only called when adding packages to a release.
407
{
407
function getVersionObjectIds ()
408
   var versionObjectIds = new Array(); // Memory leak?
408
{
409
 
409
   var versionObjectIds = new Array(); // Memory leak?
410
   <%
410
 
411
   Dim rsPkgs3, versionObjectId
411
   <%
412
   Set rsPkgs3 = OraDatabase.DbCreateDynaset( Get_Pkg_Names( parPkg_list, parAdd_type ), cint(0))
412
   Dim rsPkgs3, versionObjectId
413
 
413
   Set rsPkgs3 = OraDatabase.DbCreateDynaset( Get_Pkg_Names( parPkg_list, parAdd_type ), cint(0))
414
   While ((NOT rsPkgs3.BOF) AND (NOT rsPkgs3.EOF))
414
 
415
      versionObjectId = rsPkgs3("pkg_id")
415
   While ((NOT rsPkgs3.BOF) AND (NOT rsPkgs3.EOF))
416
      %>
416
      versionObjectId = rsPkgs3("pkg_id")
417
      versionObjectIds.push( "<%=versionObjectId%>" );
417
      %>
418
      <%
418
      versionObjectIds.push( "<%=versionObjectId%>" );
419
      rsPkgs3.MoveNext
419
      <%
420
   Wend
420
      rsPkgs3.MoveNext
421
   rsPkgs3.Close()
421
   Wend
422
   %>
422
   rsPkgs3.Close()
423
 
423
   %>
424
   return versionObjectIds;
424
 
425
}
425
   return versionObjectIds;
426
 
426
}
427
// CheckVersion is only called when adding packages to a release.
427
 
428
// Called before the form is submitted. Can validate the form
428
// CheckVersion is only called when adding packages to a release.
429
// Simply tests that all required fields have been entered
429
// Called before the form is submitted. Can validate the form
430
function checkVersion ()
430
// Simply tests that all required fields have been entered
431
{
431
function checkVersion ()
432
   var isValid = checkSeletion(document.getElementById("base_view_id"));
432
{
433
   var versionObjectIds = getVersionObjectIds();
433
   var isValid = checkSeletion(document.getElementById("base_view_id"));
434
   for( var iobj in versionObjectIds )
434
   var versionObjectIds = getVersionObjectIds();
435
   {
435
   for( var iobj in versionObjectIds )
436
      if (updateVersion(versionObjectIds[iobj]))
436
   {
437
        continue;
437
      if (updateVersion(versionObjectIds[iobj]))
438
 
438
        continue;
439
      isValid = false;
439
 
440
      break;
440
      isValid = false;
441
   }
441
      break;
442
 
442
   }
443
   if (isValid) {
443
 
444
    MM_showProgressBar();
444
   if (isValid) {
445
   }
445
    MM_showProgressBar();
446
   else
446
   }
447
   {
447
   else
448
      // failed - exit function, returning false for the form.
448
   {
449
      document.MM_returnValue = false;
449
      // failed - exit function, returning false for the form.
450
      MM_hideProgressBar();
450
      document.MM_returnValue = false;
451
      vixAlert ("Complete all selections");
451
      MM_hideProgressBar();
452
      return false;
452
      vixAlert ("Complete all selections");
453
   }
453
      return false;
454
   return true;
454
   }
455
}
455
   return true;
456
 
456
}
457
// updateVersion is only called when adding packages to a release.
457
 
458
function updateVersion( myPkgId, myParPkg_list )
458
// updateVersion is only called when adding packages to a release.
459
{
459
function updateVersion( myPkgId, myParPkg_list )
460
    return checkSeletion(document.getElementById("pkgn" + myPkgId));
460
{
461
}
461
    return checkSeletion(document.getElementById("pkgn" + myPkgId));
462
 
462
}
463
//-->
463
 
464
</script>
464
//-->
465
<!-- DROPDOWN MENUS -->
465
</script>
466
<!--#include file="_menu_def.asp"-->
466
<!-- DROPDOWN MENUS -->
467
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
467
<!--#include file="_menu_def.asp"-->
468
<script language="JavaScript" src="images/tipster.js"></script>
468
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
469
<script language="JavaScript" src="images/_help_tips.js"></script>
469
<script language="JavaScript" src="images/tipster.js"></script>
470
</head>
470
<script language="JavaScript" src="images/_help_tips.js"></script>
471
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
471
</head>
472
<!--#include file="_jquery_includes.asp"-->
472
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
473
<!-- MENU LAYERS -------------------------------------->
473
<!--#include file="_jquery_includes.asp"-->
474
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
474
<!-- MENU LAYERS -------------------------------------->
475
</div>
475
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
476
<!-- TIPS LAYERS -------------------------------------->
476
</div>
477
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
477
<!-- TIPS LAYERS -------------------------------------->
478
<!----------------------------------------------------->
478
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
479
<!-- HEADER -->
479
<!----------------------------------------------------->
480
<!--#include file="_header.asp"-->
480
<!-- HEADER -->
481
<!-- BODY ---->
481
<!--#include file="_header.asp"-->
482
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
482
<!-- BODY ---->
483
   <tr>
483
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
484
      <td align="center" valign="top" background="images/bg_lght_gray.gif">
484
   <tr>
485
         <!-- MIDDLE ---------------------------------------->
485
      <td align="center" valign="top" background="images/bg_lght_gray.gif">
486
         <table width="650" border="0" cellspacing="0" cellpadding="0">
486
         <!-- MIDDLE ---------------------------------------->
487
            <tr>
487
         <table width="650" border="0" cellspacing="0" cellpadding="0">
488
               <td>
488
            <tr>
489
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
489
               <td>
490
                     <tr>
490
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
491
                        <td width="1%"></td>
491
                     <tr>
492
                           <td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
492
                        <td width="1%"></td>
493
                        <td width="1%"></td>
493
                           <td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
494
                     </tr>
494
                        <td width="1%"></td>
495
                     <tr>
495
                     </tr>
496
                        <td width="1%"></td>
496
                     <tr>
497
                        <td>
497
                        <td width="1%"></td>
498
                           <table width="100%" border="0" cellspacing="0" cellpadding="0">
498
                        <td>
499
                              <tr>
499
                           <table width="100%" border="0" cellspacing="0" cellpadding="0">
500
                                 <td nowrap class="form_ttl"><%=Page_Title ( parAdd_type )%></td>
500
                              <tr>
501
                                 <td align="right" valign="bottom"></td>
501
                                 <td nowrap class="form_ttl"><%=Page_Title ( parAdd_type )%></td>
502
                              </tr>
502
                                 <td align="right" valign="bottom"></td>
503
                           </table>
503
                              </tr>
504
                        </td>
504
                           </table>
505
                        <td width="1%"></td>
505
                        </td>
506
                     </tr>
506
                        <td width="1%"></td>
507
                     <tr>
507
                     </tr>
508
                        <td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif">
508
                     <tr>
509
                           <img src="images/lbox_tl_cnr_b.gif" width="13" height="13">
509
                        <td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif">
510
                        </td>
510
                           <img src="images/lbox_tl_cnr_b.gif" width="13" height="13">
511
                        <td background="images/lbox_bg_blue.gif" align="right">
511
                        </td>
512
                           <!-- Heading -->
512
                        <td background="images/lbox_bg_blue.gif" align="right">
513
                           <img src="images/h_trsp_dot.gif" width="1" height="20">
513
                           <!-- Heading -->
514
                           <!-- END Heading -->
514
                           <img src="images/h_trsp_dot.gif" width="1" height="20">
515
                        </td>
515
                           <!-- END Heading -->
516
                        <td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif">
516
                        </td>
517
                           <img src="images/lbox_tr_cnr_b.gif" width="13" height="13">
517
                        <td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif">
518
                        </td>
518
                           <img src="images/lbox_tr_cnr_b.gif" width="13" height="13">
519
                     </tr>
519
                        </td>
520
                     <tr>
520
                     </tr>
521
                        <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
521
                     <tr>
522
                        <td bgcolor="#FFFFFF" valign="top">
522
                        <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
523
                           <!-- Body -->
523
                        <td bgcolor="#FFFFFF" valign="top">
524
                           <table width="100%" border="0" cellspacing="1" cellpadding="2">
524
                           <!-- Body -->
525
                              <% 'Use the parPkg_list in two different ways. When adding dependencies, the list contains pv_id's.
525
                           <table width="100%" border="0" cellspacing="1" cellpadding="2">
526
                                 'When adding packages it contains pkg_id's. Different functions deal with each situation.
526
                              <% 'Use the parPkg_list in two different ways. When adding dependencies, the list contains pv_id's.
527
                              If ( (parAdd_type <> Cstr(enum_ADD_DEPENDENCIES)) AND (parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES)) ) Then
527
                                 'When adding packages it contains pkg_id's. Different functions deal with each situation.
528
                                 Call Generate_Package_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
528
                              If ( (parAdd_type <> Cstr(enum_ADD_DEPENDENCIES)) AND (parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES)) ) Then
529
                              Else
529
                                 Call Generate_Package_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
530
                                 Call Generate_Version_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
530
                              Else
531
                              End If%>
531
                                 Call Generate_Version_List( parPkg_list, HTML_pkg_list, parRtag_id, parAdd_type )
532
 
532
                              End If%>
533
                              <%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
533
 
534
                                 <form name="addpkg" id="addpkg" method="post" action="_add_pkgs_to_release.asp" onSubmit="return checkVersion();">
534
                              <%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
535
                                 <%'----------- Base View --------------%>
535
                                 <form name="addpkg" id="addpkg" method="post" action="_add_pkgs_to_release.asp" onSubmit="return checkVersion();">
536
                                 <tr>
536
                                 <%'----------- Base View --------------%>
537
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
537
                                 <tr>
538
                                    <td nowrap width="100%" align="right" class="form_step">&nbsp;</td>
538
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
539
                                 </tr>
539
                                    <td nowrap width="100%" align="right" class="form_step">&nbsp;</td>
540
                                 <tr>
540
                                 </tr>
541
                                    <td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Base View</td>
541
                                 <tr>
542
                                 </tr>
542
                                    <td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Base View</td>
543
                                 <tr>
543
                                 </tr>
544
                                    <td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
544
                                 <tr>
545
                                       <select name="base_view_id" id="base_view_id" class="form_item" onblur="checkSeletion(this);" onchange="checkSeletion(this);">
545
                                    <td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
546
                                          <option></option>
546
                                       <select name="base_view_id" id="base_view_id" class="form_item" onblur="checkSeletion(this);" onchange="checkSeletion(this);">
547
                                          <%Call Get_All_Base_Views( parBase_view_id, parPkg_list )%>
547
                                          <option></option>
548
                                       </select>
548
                                          <%Call Get_All_Base_Views( parBase_view_id, parPkg_list )%>
549
 
549
                                       </select>
550
                                       <br>
550
 
551
                                       <span class="rep_small">NOTE: Symbol '>' in Base Views drop-down list is a suggestion where to place selected package(s).</span>
551
                                       <br>
552
                                    </td>
552
                                       <span class="rep_small">NOTE: Symbol '>' in Base Views drop-down list is a suggestion where to place selected package(s).</span>
553
                                 </tr>
553
                                    </td>
554
                                 <tr>
554
                                 </tr>
555
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
555
                                 <tr>
556
                                    <td nowrap width="100%" align="right" class="form_step"><br></td>
556
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
557
                                 </tr>
557
                                    <td nowrap width="100%" align="right" class="form_step"><br></td>
558
                                 <%'----------- Private View --------------%>
558
                                 </tr>
559
                                 <%If QStrPar("Pview") <> "disable" Then%>
559
                                 <%'----------- Private View --------------%>
560
                                    <tr>
560
                                 <%If QStrPar("Pview") <> "disable" Then%>
561
                                       <td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Personal View</td>
561
                                    <tr>
562
                                    </tr>
562
                                       <td colspan="2" width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">To Personal View</td>
563
                                    <tr>
563
                                    </tr>
564
                                       <td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
564
                                    <tr>
565
                                          <select name="personal_view_id" class="form_item">
565
                                       <td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
566
                                             <option value="">None</option>
566
                                          <select name="personal_view_id" class="form_item">
567
                                             <%Call Get_All_Personal_Views( objAccessControl.UserId )%>
567
                                             <option value="">None</option>
568
                                          </select>
568
                                             <%Call Get_All_Personal_Views( objAccessControl.UserId )%>
569
                                       </td>
569
                                          </select>
570
                                    </tr>
570
                                       </td>
571
                                    <tr>
571
                                    </tr>
572
                                       <td width="1%" nowrap class="form_group" valign="bottom"></td>
572
                                    <tr>
573
                                       <td nowrap width="100%" align="right" class="form_step"><br></td>
573
                                       <td width="1%" nowrap class="form_group" valign="bottom"></td>
574
                                    </tr>
574
                                       <td nowrap width="100%" align="right" class="form_step"><br></td>
575
                                 <%End If%>
575
                                    </tr>
576
                                 <%'---------------------------------------%>
576
                                 <%End If%>
577
                              <%Else%>
577
                                 <%'---------------------------------------%>
578
                                 <%If parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
578
                              <%Else%>
579
                                    <form name="addpkg" method="post" action="_add_runtime_dependencies.asp" onSubmit="return true">
579
                                 <%If parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
580
                                 <%Else%>
580
                                    <form name="addpkg" method="post" action="_add_runtime_dependencies.asp" onSubmit="return true">
581
                                    <form name="addpkg" method="post" action="_update_dependencies.asp" onSubmit="return true">
581
                                 <%Else%>
582
                                 <%End If%>
582
                                    <form name="addpkg" method="post" action="_update_dependencies.asp" onSubmit="return true">
583
                                 <tr>
583
                                 <%End If%>
584
                                    <td colspan="2" width="1%" nowrap class="form_field">
584
                                 <tr>
585
                                       <%=pkgInfoHash.Item ("pkg_name")%>&nbsp;<%=pkgInfoHash.Item ("pkg_version")%>
585
                                    <td colspan="2" width="1%" nowrap class="form_field">
586
                                    </td>
586
                                       <%=pkgInfoHash.Item ("pkg_name")%>&nbsp;<%=pkgInfoHash.Item ("pkg_version")%>
587
                                 </tr>
587
                                    </td>
588
                              <%End If%>
588
                                 </tr>
589
 
589
                              <%End If%>
590
                              <tr>
590
 
591
                                 <td colspan="2" width="1%" nowrap class="form_field">
591
                              <tr>
592
                                    <table width="100%" border="0" cellspacing="1" cellpadding="2">
592
                                 <td colspan="2" width="1%" nowrap class="form_field">
593
                                       <tr>
593
                                    <table width="100%" border="0" cellspacing="1" cellpadding="2">
594
                                          <td background="images/bg_form_lightbluedark.gif" nowrap width="10%" class="form_field">Package Name
594
                                       <tr>
595
                                             <img src="images/h_trsp_dot.gif" width="1" height="20" align="absmiddle">
595
                                          <td background="images/bg_form_lightbluedark.gif" nowrap width="10%" class="form_field">Package Name
596
                                          </td>
596
                                             <img src="images/h_trsp_dot.gif" width="1" height="20" align="absmiddle">
597
                                          <td background="images/bg_form_lightbluedark.gif" nowrap width="40%" class="form_field">Version
597
                                          </td>
598
                                          <%If parAdd_type <> Cstr(enum_ADD_DEPENDENCIES) AND parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
598
                                          <td background="images/bg_form_lightbluedark.gif" nowrap width="40%" class="form_field">Version
599
                                            <a onmouseout="formTips.hide()" onmouseover="formTips.show('existingVersion')" href="javascript:;">
599
                                          <%If parAdd_type <> Cstr(enum_ADD_DEPENDENCIES) AND parAdd_type <> Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then%>
600
                                               <img width="12" hspace="2" height="12" border="0" align="absmiddle" src="images/i_help.gif" />
600
                                            <a onmouseout="formTips.hide()" onmouseover="formTips.show('existingVersion')" href="javascript:;">
601
                                            </a>
601
                                               <img width="12" hspace="2" height="12" border="0" align="absmiddle" src="images/i_help.gif" />
602
                                          <%End If%>
602
                                            </a>
603
                                          </td>
603
                                          <%End If%>
604
                                       </tr>
604
                                          </td>
605
                                       <%=HTML_pkg_list%>
605
                                       </tr>
606
                                       <tr>
606
                                       <%=HTML_pkg_list%>
607
                                          <td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
607
                                       <tr>
608
                                          <td></td>
608
                                          <td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
609
                                       </tr>
609
                                          <td></td>
610
                                    </table>
610
                                       </tr>
611
                                 </td>
611
                                    </table>
612
                              </tr>
612
                                 </td>
613
                              <tr>
613
                              </tr>
614
                                 <td colspan="2" nowrap class="form_field">
614
                              <tr>
615
                                    <input type="reset" name="btn" value="&laquo; Back" class="form_btn" onClick="history.back();">
615
                                 <td colspan="2" nowrap class="form_field">
616
                                    <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.go(-3);">
616
                                    <input type="reset" name="btn" value="&laquo; Back" class="form_btn" onClick="history.back();">
617
                                    <input type="submit" name="btn" value="  Add  " class="form_btn">
617
                                    <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.go(-3);">
618
                                    <%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
618
                                    <input type="submit" name="btn" value="  Add  " class="form_btn">
619
                                    <span><input type="checkbox" name="iMode" value="pending">Add to Pending</span>
619
                                    <%If parAdd_type = Cstr(enum_ADD_PACKAGES) Then%>
620
                                    <%End If%>
620
                                    <span><input type="checkbox" name="iMode" value="pending">Add to Pending</span>
621
                                    <SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;" class="body_scol">
621
                                    <%End If%>
622
                                       <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
622
                                    <SPAN id="ProgressBar" name="ProgressBar" style="visibility:hidden;" class="body_scol">
623
                                    </SPAN>
623
                                       <img src="images/i_processing.gif" width="11" height="17" align="absmiddle" hspace="3">Processing...
624
                                    <br> <br>
624
                                    </SPAN>
625
                                 </td>
625
                                    <br> <br>
626
                              </tr>
626
                                 </td>
627
                              <input type="hidden" name="update_type" value="add_custom">
627
                              </tr>
628
                              <input type="hidden" name="pv_id" value="<%=parPv_id%>">
628
                              <input type="hidden" name="update_type" value="add_custom">
629
                              <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
629
                              <input type="hidden" name="pv_id" value="<%=parPv_id%>">
630
                              <input type="hidden" name="pkg_list" value="<%=parPkg_list%>">
630
                              <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
631
                              </form>
631
                              <input type="hidden" name="pkg_list" value="<%=parPkg_list%>">
632
                           </table>
632
                              </form>
633
                           <!-- END Body-->
633
                           </table>
634
                        </td>
634
                           <!-- END Body-->
635
                        <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
635
                        </td>
636
                     </tr>
636
                        <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
637
                     <tr>
637
                     </tr>
638
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom">
638
                     <tr>
639
                           <img src="images/lbox_bl_cnr_b.gif" width="13" height="13">
639
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom">
640
                        </td>
640
                           <img src="images/lbox_bl_cnr_b.gif" width="13" height="13">
641
                        <td background="images/lbox_bg_blue.gif"></td>
641
                        </td>
642
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right">
642
                        <td background="images/lbox_bg_blue.gif"></td>
643
                           <img src="images/lbox_br_cnr_b.gif" width="13" height="13">
643
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right">
644
                        </td>
644
                           <img src="images/lbox_br_cnr_b.gif" width="13" height="13">
645
                     </tr>
645
                        </td>
646
                  </table>
646
                     </tr>
647
               </td>
647
                  </table>
648
            </tr>
648
               </td>
649
         </table>
649
            </tr>
650
         <!-------------------------------------------------->
650
         </table>
651
      </td>
651
         <!-------------------------------------------------->
652
   </tr>
652
      </td>
653
   <tr>
653
   </tr>
654
      <td valign="bottom" background="images/bg_lght_gray.gif">
654
   <tr>
655
         <!-- FOOTER -->
655
      <td valign="bottom" background="images/bg_lght_gray.gif">
656
         <!--#include file="_footer.asp"-->
656
         <!-- FOOTER -->
657
      </td>
657
         <!--#include file="_footer.asp"-->
658
   </tr>
658
      </td>
659
</table>
659
   </tr>
660
</body>
660
</table>
661
</html>
661
</body>
662
<%
662
</html>
663
Call Destroy_All_Objects
663
<%
664
%>
664
Call Destroy_All_Objects
-
 
665
%>