| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' Change Previous Version
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/qstr.asp"-->
|
|
|
14 |
<!--#include file="common/common_subs.asp"-->
|
|
|
15 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
| 3959 |
dpurdie |
17 |
<!--#include file="class/classSortHelper.asp"-->
|
| 119 |
ghuddy |
18 |
<%
|
|
|
19 |
'------------ ACCESS CONTROL ------------------
|
|
|
20 |
%>
|
|
|
21 |
<!--#include file="_access_control_login.asp"-->
|
|
|
22 |
<!--#include file="_access_control_general.asp"-->
|
|
|
23 |
<!--#include file="_access_control_project.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ Variable Definition -------------
|
|
|
26 |
Dim parPv_id
|
|
|
27 |
Dim parRfile
|
|
|
28 |
'------------ Constants Declaration -----------
|
|
|
29 |
'------------ Variable Init -------------------
|
|
|
30 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
31 |
parPv_id = QStrPar("pv_id")
|
|
|
32 |
parRfile = QStrPar("rfile")
|
|
|
33 |
'----------------------------------------------
|
|
|
34 |
%>
|
|
|
35 |
<%
|
|
|
36 |
Sub Short_Pkg_Info ( NNpv_id )
|
|
|
37 |
Dim rsTemp, Query_String
|
|
|
38 |
|
|
|
39 |
Query_String = _
|
|
|
40 |
" SELECT pkg.pkg_name, pv.pkg_version, pv.pkg_id, pv.last_pv_id"&_
|
|
|
41 |
" FROM packages pkg, package_versions pv"&_
|
|
|
42 |
" WHERE pkg.pkg_id = pv.pkg_id"&_
|
|
|
43 |
" AND pv.pv_id = "& NNpv_id
|
|
|
44 |
|
|
|
45 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
46 |
|
|
|
47 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
48 |
pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
|
|
|
49 |
pkgInfoHash.Add "pkg_id", (rsTemp.Fields("pkg_id"))
|
|
|
50 |
pkgInfoHash.Add "last_pv_id", (rsTemp.Fields("last_pv_id"))
|
|
|
51 |
End If
|
|
|
52 |
|
|
|
53 |
rsTemp.Close
|
|
|
54 |
Set rsTemp = nothing
|
|
|
55 |
End Sub
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
Function All_Versions_List ( nOldPv_id, nPkg_id )
|
|
|
59 |
If nOldPv_id = "" OR IsNull(nOldPv_id) Then nOldPv_id = "-1"
|
|
|
60 |
All_Versions_List = _
|
| 3959 |
dpurdie |
61 |
" SELECT pv.pv_id, pv.pkg_version, pv.dlocked,"&_
|
| 119 |
ghuddy |
62 |
" DECODE(pv.pv_id, "& nOldPv_id &", 'selected', NULL) AS selected "&_
|
|
|
63 |
" FROM PACKAGE_VERSIONS pv"&_
|
|
|
64 |
" WHERE pv.pkg_id = "& nPkg_id &_
|
| 3959 |
dpurdie |
65 |
" AND pv.is_patch IS NULL"
|
|
|
66 |
'Response.write All_Versions_List
|
| 119 |
ghuddy |
67 |
End Function
|
|
|
68 |
|
|
|
69 |
Sub Update_Previous_Version ( NNpv_id, nLast_pv_id )
|
|
|
70 |
Dim rsTemp, Query_String
|
|
|
71 |
If nLast_pv_id = "" Then nLast_pv_id = NULL
|
|
|
72 |
|
|
|
73 |
Query_String = _
|
|
|
74 |
" SELECT last_pv_id, release_notes_info"&_
|
|
|
75 |
" FROM package_versions"&_
|
|
|
76 |
" WHERE pv_id = "& NNpv_id
|
|
|
77 |
|
|
|
78 |
Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
|
|
|
79 |
'update fields
|
|
|
80 |
rsTemp.Edit
|
|
|
81 |
rsTemp.Fields("last_pv_id").Value = nLast_pv_id
|
|
|
82 |
rsTemp.Fields("release_notes_info").Value = NULL
|
|
|
83 |
rsTemp.Update
|
|
|
84 |
|
|
|
85 |
rsTemp.Close
|
|
|
86 |
Set rsTemp = nothing
|
|
|
87 |
End Sub
|
|
|
88 |
%>
|
|
|
89 |
<%
|
|
|
90 |
'Process submition
|
|
|
91 |
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
|
|
|
92 |
Call Update_Previous_Version ( parPv_id, Request("last_pv_id") )
|
|
|
93 |
|
|
|
94 |
Call OpenInParentWindow ( parRfile &"?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
|
|
|
95 |
Call CloseWindow
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
End If
|
|
|
99 |
%>
|
|
|
100 |
<%
|
|
|
101 |
Call Short_Pkg_Info ( parPv_id )
|
|
|
102 |
%>
|
|
|
103 |
<html>
|
|
|
104 |
<head>
|
|
|
105 |
<title>Release Manager</title>
|
|
|
106 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
107 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
108 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
109 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
110 |
<script language="JavaScript" src="images/tipster.js"></script>
|
|
|
111 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
|
|
112 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
113 |
</head>
|
|
|
114 |
|
|
|
115 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
|
|
116 |
<form name="preversion" method="post" action="<%=scriptName%>">
|
|
|
117 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
|
|
118 |
<tr>
|
|
|
119 |
<td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_new_off.gif" width="18" height="23" hspace="5"></td>
|
|
|
120 |
<td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl"> Previous
|
|
|
121 |
Version </td>
|
|
|
122 |
<td background="images/lbox_bg_blue.gif" align="right" width="50%">
|
|
|
123 |
<input type="submit" name="btn" value="Update" class="form_btn_comp">
|
|
|
124 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
|
|
|
125 |
</td>
|
|
|
126 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
|
|
|
127 |
<img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
|
|
|
128 |
</tr>
|
|
|
129 |
<tr>
|
|
|
130 |
<td height="100%" width="1%"> </td>
|
|
|
131 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
132 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
133 |
<tr>
|
|
|
134 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
|
|
135 |
<td width="1%" nowrap class="form_group" valign="bottom"></td>
|
|
|
136 |
<td nowrap width="100%"> </td>
|
|
|
137 |
</tr>
|
|
|
138 |
<tr>
|
|
|
139 |
<td width="1%"> </td>
|
|
|
140 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
|
|
|
141 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
142 |
<%=pkgInfoHash.Item ("pkg_name")%></td>
|
|
|
143 |
</tr>
|
|
|
144 |
<tr>
|
|
|
145 |
<td width="1%"> </td>
|
|
|
146 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Previous
|
|
|
147 |
Version </td>
|
|
|
148 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
|
|
|
149 |
<select name="last_pv_id" class="form_item">
|
|
|
150 |
<option></option>
|
| 3959 |
dpurdie |
151 |
<%
|
|
|
152 |
Dim rsQry,aVersions,lastRow,objSortHelper,i
|
|
|
153 |
Set rsQry = OraDatabase.DbCreateDynaset( All_Versions_List( pkgInfoHash.Item ("last_pv_id"), pkgInfoHash.Item ("pkg_id") ), cint(0))
|
|
|
154 |
|
|
|
155 |
If rsQry.RecordCount > 0 Then
|
|
|
156 |
aVersions = rsQry.GetRows()
|
|
|
157 |
lastRow = UBound( aVersions, 2 )
|
|
|
158 |
Set objSortHelper = New SortHelper
|
|
|
159 |
|
|
|
160 |
' Sort versions
|
|
|
161 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("pkg_version") )
|
|
|
162 |
|
|
|
163 |
' Descending order
|
|
|
164 |
For i = lastRow To 0 Step -1
|
|
|
165 |
%>
|
|
|
166 |
<option value="<%=aVersions(rsQry.FieldIndex("pv_id"),i)%>" <%=aVersions(rsQry.FieldIndex("selected"),i)%>>
|
|
|
167 |
|
|
|
168 |
<%
|
|
|
169 |
If aVersions( rsQry.FieldIndex("dlocked"), i ) = "Y" Then%>
|
|
|
170 |
R
|
|
|
171 |
<%Else%>
|
|
|
172 |
|
|
|
173 |
<%End If%>
|
|
|
174 |
<%=aVersions( rsQry.FieldIndex("pkg_version"), i )%>
|
|
|
175 |
</option>
|
|
|
176 |
<%
|
|
|
177 |
Next
|
|
|
178 |
Set objSortHelper = nothing
|
|
|
179 |
End If
|
| 119 |
ghuddy |
180 |
rsQry.Close
|
|
|
181 |
set rsQry = nothing
|
|
|
182 |
%>
|
|
|
183 |
</select>
|
|
|
184 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
185 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
186 |
<input type="hidden" name="rfile" value="<%=parRfile%>">
|
|
|
187 |
<input type="hidden" name="action" value="true">
|
|
|
188 |
</td>
|
|
|
189 |
</tr>
|
|
|
190 |
<tr>
|
|
|
191 |
<td width="1%"> </td>
|
|
|
192 |
<td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
|
|
|
193 |
<td nowrap width="100%">
|
|
|
194 |
<p> </p>
|
|
|
195 |
</td>
|
|
|
196 |
</tr>
|
|
|
197 |
</table>
|
|
|
198 |
</td>
|
|
|
199 |
</tr>
|
|
|
200 |
<tr>
|
|
|
201 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
|
|
202 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
|
|
203 |
</tr>
|
|
|
204 |
</table>
|
|
|
205 |
</form>
|
|
|
206 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
207 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
208 |
<!----------------------------------------------------->
|
|
|
209 |
</body>
|
|
|
210 |
</html>
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
<!-- DESTRUCTOR ------->
|
|
|
214 |
<!--#include file="common/destructor.asp"-->
|