| 5357 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' Obsolete Patch
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/formating.asp"-->
|
|
|
14 |
<!--#include file="common/qstr.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
17 |
<!--#include file="controls/ERGFormComponent/classFormComponent.asp"-->
|
|
|
18 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
19 |
<%
|
|
|
20 |
'------------ ACCESS CONTROL ------------------
|
|
|
21 |
%>
|
|
|
22 |
<!--#include file="_access_control_login.asp"-->
|
|
|
23 |
<!--#include file="_access_control_general.asp"-->
|
|
|
24 |
<!--#include file="_access_control_project.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ Variable Definition -------------
|
|
|
27 |
Dim parPv_id
|
|
|
28 |
Dim objFormComponent
|
|
|
29 |
'------------ Constants Declaration -----------
|
|
|
30 |
'------------ Variable Init -------------------
|
|
|
31 |
parPv_id = QStrPar("pv_id")
|
|
|
32 |
Set objFormComponent = New FormComponent
|
|
|
33 |
'----------------------------------------------
|
|
|
34 |
%>
|
|
|
35 |
<%
|
|
|
36 |
Function Get_Comments( NNPv_id )
|
|
|
37 |
Dim rsTemp, Query_String
|
|
|
38 |
Query_String = _
|
|
|
39 |
" SELECT obsolete_comments"&_
|
|
|
40 |
" FROM package_versions"&_
|
|
|
41 |
" WHERE pv_id = "& NNPv_id
|
|
|
42 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
43 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
44 |
Get_Comments = rsTemp.Fields("obsolete_comments")
|
|
|
45 |
End If
|
|
|
46 |
rsTemp.Close
|
|
|
47 |
Set rsTemp = nothing
|
|
|
48 |
End Function
|
|
|
49 |
|
|
|
50 |
Sub SubmitObsoleteComments ( NNPv_id )
|
|
|
51 |
Dim isPatchObsolete
|
|
|
52 |
|
|
|
53 |
isPatchObsolete = "Y"
|
|
|
54 |
If Request("unobsolete") <> "" Then
|
|
|
55 |
isPatchObsolete = NULL
|
|
|
56 |
End If
|
|
|
57 |
|
|
|
58 |
objEH.TryORA ( OraSession )
|
|
|
59 |
On Error Resume Next
|
|
|
60 |
|
|
|
61 |
If Request("FRpatch_id") <> "" Then
|
|
|
62 |
OraDatabase.ExecuteSQL _
|
|
|
63 |
" UPDATE PACKAGE_PATCHES SET"&_
|
|
|
64 |
" PATCH_OBSOLETED_BY =" & Request("FRpatch_id")&_
|
|
|
65 |
" WHERE PATCH_ID = "& Request("pv_id")
|
|
|
66 |
Else
|
|
|
67 |
|
|
|
68 |
OraDatabase.ExecuteSQL _
|
|
|
69 |
" UPDATE PACKAGE_PATCHES SET"&_
|
|
|
70 |
" PATCH_OBSOLETED_BY = NULL"&_
|
|
|
71 |
" WHERE PATCH_ID = "& Request("pv_id")
|
|
|
72 |
End If
|
|
|
73 |
|
|
|
74 |
OraDatabase.Parameters.Add "PATCH_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
75 |
OraDatabase.Parameters.Add "IS_OBSOLETE", isPatchObsolete, ORAPARM_INPUT, ORATYPE_CHAR
|
|
|
76 |
OraDatabase.Parameters.Add "OBSOLETE_COMMENTS", Request("obsolete_comments"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
77 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
78 |
|
|
|
79 |
If Err.Number = 0 Then
|
|
|
80 |
OraDatabase.ExecuteSQL _
|
|
|
81 |
" BEGIN PK_PACKAGE.OBSOLETE_PATCH ( :PATCH_ID, :IS_OBSOLETE, :OBSOLETE_COMMENTS, :USER_ID ); END;"
|
|
|
82 |
End If
|
|
|
83 |
|
|
|
84 |
objEH.CatchORA ( OraSession )
|
|
|
85 |
|
|
|
86 |
OraDatabase.Parameters.Remove "PATCH_ID"
|
|
|
87 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
88 |
OraDatabase.Parameters.Remove "IS_OBSOLETE"
|
|
|
89 |
OraDatabase.Parameters.Remove "OBSOLETE_COMMENTS"
|
|
|
90 |
|
|
|
91 |
End Sub
|
|
|
92 |
%>
|
|
|
93 |
<%
|
|
|
94 |
'Process submition
|
|
|
95 |
'------------ Action Requirements -------------------
|
|
|
96 |
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
|
|
|
97 |
Call SubmitObsoleteComments ( Request("pv_id") )
|
|
|
98 |
Call OpenInParentWindow ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
|
|
|
99 |
Call CloseWindow
|
|
|
100 |
|
|
|
101 |
End If
|
|
|
102 |
%>
|
|
|
103 |
<html>
|
|
|
104 |
<head>
|
|
|
105 |
<title>Release Manager</title>
|
|
|
106 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
107 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
108 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
109 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
110 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
111 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
112 |
</head>
|
|
|
113 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.FormSearch.obsolete_comments.focus();">
|
|
|
114 |
<%
|
|
|
115 |
'-- FROM START ---------------------------------------------------------------------------------------------------------------
|
|
|
116 |
objFormComponent.FormName = "FormSearch"
|
|
|
117 |
objFormComponent.Action = scriptName
|
|
|
118 |
Call objFormComponent.FormStart()
|
|
|
119 |
%>
|
|
|
120 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
|
|
121 |
<tr>
|
|
|
122 |
<td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_new_pkg_off.gif" width="21" height="23" hspace="5" border="0"></td>
|
|
|
123 |
<td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl"> Make Patch Obsolete</td>
|
|
|
124 |
<td background="images/lbox_bg_blue.gif" align="right" width="50%">
|
|
|
125 |
<input type="submit" name="btn" value="Submit" class="form_btn_comp">
|
|
|
126 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
|
|
|
127 |
</td>
|
|
|
128 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
|
|
|
129 |
<img src="images/h_trsp_dot.gif" width="5" height="22">
|
|
|
130 |
</td>
|
|
|
131 |
</tr>
|
|
|
132 |
<tr>
|
|
|
133 |
<td height="100%" width="1%"> </td>
|
|
|
134 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
135 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
136 |
<tr>
|
|
|
137 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
|
|
138 |
<td nowrap width="100%"> </td>
|
|
|
139 |
</tr>
|
|
|
140 |
<tr>
|
|
|
141 |
<td width="1%"> </td>
|
|
|
142 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
143 |
<textarea name="obsolete_comments" class="form_item" cols="60" rows="10"><%=Format4HTML(Get_Comments( parPv_id ))%></textarea>
|
|
|
144 |
|
|
|
145 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
146 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
147 |
<input type="hidden" name="rfile" value="<%=Request("rfile")%>">
|
|
|
148 |
<input type="hidden" name="action" value="true">
|
|
|
149 |
</td>
|
|
|
150 |
</tr>
|
|
|
151 |
<tr>
|
|
|
152 |
<td width="1%"></td>
|
|
|
153 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
154 |
Patch Obsoleted By:
|
|
|
155 |
<%
|
|
|
156 |
Dim rsQry
|
|
|
157 |
|
|
|
158 |
OraDatabase.Parameters.Add "PV_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
159 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ObsoletedBy.sql") , cint(0) )
|
|
|
160 |
|
|
|
161 |
Response.write "<select name='FRpatch_id' class='form_item'>"
|
|
|
162 |
Response.write "<option value='' selected>--NONE--</option>"
|
|
|
163 |
%>
|
|
|
164 |
|
|
|
165 |
<%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
|
|
166 |
|
|
|
167 |
If CDbl(Request("patch_id")) = CDbl(rsQry.Fields("patch_id")) Then
|
|
|
168 |
Response.write "<option value='"& rsQry.Fields("patch_id") &"' selected>"& (rsQry.Fields("pkg_name")) & (rsQry.Fields("pkg_version")) &"</option>"
|
|
|
169 |
Else
|
|
|
170 |
Response.write "<option value='"& rsQry.Fields("patch_id") &"'>"& (rsQry.Fields("pkg_name")) & " " & (rsQry.Fields("pkg_version")) &"</option>"
|
|
|
171 |
End If
|
|
|
172 |
rsQry.MoveNext
|
|
|
173 |
WEnd
|
|
|
174 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
175 |
rsQry.Close()
|
|
|
176 |
Set rsQry = nothing
|
|
|
177 |
%>
|
|
|
178 |
</select>
|
|
|
179 |
</td>
|
|
|
180 |
</tr>
|
|
|
181 |
<tr>
|
|
|
182 |
<td width="1%"> </td>
|
|
|
183 |
<td nowrap width="100%">
|
|
|
184 |
<p> </p>
|
|
|
185 |
</td>
|
|
|
186 |
</tr>
|
|
|
187 |
</table>
|
|
|
188 |
</td>
|
|
|
189 |
</tr>
|
|
|
190 |
<tr>
|
|
|
191 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
|
|
192 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
|
|
193 |
</tr>
|
|
|
194 |
</table>
|
|
|
195 |
<%
|
|
|
196 |
Call objFormComponent.FormEnd()
|
|
|
197 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
198 |
%>
|
|
|
199 |
</body>
|
|
|
200 |
</html>
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
<!-- DESTRUCTOR ------->
|
|
|
204 |
<!--#include file="common/destructor.asp"-->
|