Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
129 ghuddy 4
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 5
%>
6
<%
7
'=====================================================
129 ghuddy 8
'               Obsolete Patch
119 ghuddy 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 )
129 ghuddy 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
119 ghuddy 48
End Function
49
 
50
Sub SubmitObsoleteComments ( NNPv_id )
129 ghuddy 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
 
119 ghuddy 91
End Sub
92
%>
93
<%
94
'Process submition
95
'------------ Action Requirements -------------------
96
If CBool(QStrPar("action"))   AND  objAccessControl.UserLogedIn  Then
129 ghuddy 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
 
119 ghuddy 101
End If
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/common.js"></script>
111
</head>
112
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.FormSearch.obsolete_comments.focus();">
113
<%
114
'-- FROM START ---------------------------------------------------------------------------------------------------------------
115
objFormComponent.FormName = "FormSearch"
116
objFormComponent.Action = scriptName
117
Call objFormComponent.FormStart()
129 ghuddy 118
%>
119
   <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
120
      <tr>
121
         <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>
122
         <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Make Patch Obsolete</td>
123
         <td background="images/lbox_bg_blue.gif" align="right" width="50%">
124
            <input type="submit" name="btn" value="Submit" class="form_btn_comp">
125
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
126
         </td>
127
         <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
128
            <img src="images/h_trsp_dot.gif" width="5" height="22">
129
         </td>
130
      </tr>
131
      <tr>
132
         <td height="100%" width="1%">&nbsp;</td>
133
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
134
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
135
               <tr>
136
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
137
                  <td nowrap width="100%">&nbsp; </td>
138
               </tr>
139
               <tr>
140
                  <td width="1%">&nbsp;</td>
141
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
142
                     <textarea name="obsolete_comments" class="form_item" cols="60" rows="10"><%=Format4HTML(Get_Comments( parPv_id ))%></textarea>
143
 
144
                     <input type="hidden" name="pv_id" value="<%=parPv_id%>">
145
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
146
                     <input type="hidden" name="rfile" value="<%=Request("rfile")%>">
147
                     <input type="hidden" name="action" value="true">
148
                  </td>
149
               </tr>
150
               <tr>
151
                  <td width="1%"></td>
152
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
153
                     Patch Obsoleted By:
154
                     <%
155
                     Dim rsQry
156
 
157
                     OraDatabase.Parameters.Add "PV_ID",          Request("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
158
                     Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ObsoletedBy.sql") , cint(0) )
159
 
160
                     Response.write "<select name='FRpatch_id' class='form_item'>"
161
                     Response.write "<option value='' selected>--NONE--</option>"
162
                     %>
163
 
164
                     <%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
165
 
166
                        If CDbl(Request("patch_id")) = CDbl(rsQry.Fields("patch_id")) Then
167
                           Response.write "<option value='"& rsQry.Fields("patch_id") &"' selected>"& (rsQry.Fields("pkg_name")) & (rsQry.Fields("pkg_version")) &"</option>"
168
                        Else
169
                           Response.write "<option value='"& rsQry.Fields("patch_id") &"'>"& (rsQry.Fields("pkg_name")) & " " & (rsQry.Fields("pkg_version")) &"</option>"
170
                        End If
171
                        rsQry.MoveNext
172
                     WEnd
173
                     OraDatabase.Parameters.Remove "PV_ID"
174
                     rsQry.Close()
175
                     Set rsQry = nothing
176
                     %>
177
                     </select>
178
                  </td>
179
               </tr>
180
               <tr>
181
                  <td width="1%">&nbsp;</td>
182
                  <td nowrap width="100%">
183
                     <p>&nbsp;</p>
184
                  </td>
185
               </tr>
186
            </table>
187
         </td>
188
      </tr>
189
      <tr>
190
         <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
191
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
192
      </tr>
193
   </table>
119 ghuddy 194
<%
195
Call objFormComponent.FormEnd()
196
'-- FROM END ----------------------------------------------------------------------------------------------------------------
197
%>
198
</body>
199
</html>
200
 
201
 
202
<!-- DESTRUCTOR ------->
129 ghuddy 203
<!--#include file="common/destructor.asp"-->