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
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
	If Request("FRpatch_id") <> "" Then
59
		OraDatabase.ExecuteSQL _
60
		"	UPDATE PACKAGE_PATCHES SET"&_
61
		" 	PATCH_OBSOLETED_BY =" & Request("FRpatch_id")&_
62
		"	WHERE PATCH_ID = "& Request("pv_id") 
63
	Else
64
 
65
		OraDatabase.ExecuteSQL _
66
		"	UPDATE PACKAGE_PATCHES SET"&_
67
		" 	PATCH_OBSOLETED_BY = NULL"&_
68
		"	WHERE PATCH_ID = "& Request("pv_id") 	
69
 
70
 
71
	End If
72
 
73
	OraDatabase.Parameters.Add "PATCH_ID", 			Request("pv_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
74
	OraDatabase.Parameters.Add "IS_OBSOLETE", 		isPatchObsolete, 	ORAPARM_INPUT, ORATYPE_CHAR
75
	OraDatabase.Parameters.Add "OBSOLETE_COMMENTS", Request("obsolete_comments"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
76
	OraDatabase.Parameters.Add "USER_ID", 			objAccessControl.UserId, 	ORAPARM_INPUT, ORATYPE_NUMBER 
77
 
78
	'OraDatabase.ExecuteSQL _
79
	'" UPDATE PACKAGE_VERSIONS pv SET"&_
80
	'" 	pv.IS_OBSOLETE = :IS_OBSOLETE,"&_
81
	'" 	pv.OBSOLETE_COMMENTS = :OBSOLETE_COMMENTS"&_
82
	'" WHERE pv.PV_ID = :PV_ID"
83
	OraSession.BeginTrans
84
 
85
	OraDatabase.ExecuteSQL _
86
	" BEGIN  PK_PACKAGE.OBSOLETE_PATCH ( :PATCH_ID, :IS_OBSOLETE, :OBSOLETE_COMMENTS, :USER_ID );   END;"
87
 
88
	OraSession.CommitTrans
89
 
90
	OraDatabase.Parameters.Remove "PATCH_ID"
91
	OraDatabase.Parameters.Remove "USER_ID"
92
	OraDatabase.Parameters.Remove "IS_OBSOLETE"
93
	OraDatabase.Parameters.Remove "OBSOLETE_COMMENTS"
94
 
95
End Sub
96
%>
97
<%
98
'Process submition
99
'------------ Action Requirements -------------------
100
If CBool(QStrPar("action"))   AND  objAccessControl.UserLogedIn  Then
101
	Call SubmitObsoleteComments ( Request("pv_id") )
102
	Call OpenInParentWindow ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
103
	Call CloseWindow
104
 
105
End If
106
%>
107
<html>
108
<head>
109
<title>Release Manager</title>
110
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
111
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
112
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
113
<link rel="stylesheet" href="images/navigation.css" type="text/css">
114
<script language="JavaScript" src="images/common.js"></script>
115
</head>
116
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();document.FormSearch.obsolete_comments.focus();">
117
<%
118
'-- FROM START ---------------------------------------------------------------------------------------------------------------
119
objFormComponent.FormName = "FormSearch"
120
objFormComponent.Action = scriptName
121
Call objFormComponent.FormStart()
122
%>  
123
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
124
    <tr> 
125
      <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>
126
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Make Patch Obsolete</td>
127
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
128
        <input type="submit" name="btn" value="Submit" class="form_btn_comp">
129
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
130
      </td>
131
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
132
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
133
    </tr>
134
    <tr> 
135
      <td height="100%" width="1%">&nbsp;</td>
136
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
137
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
138
          <tr> 
139
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
140
            <td nowrap width="100%">&nbsp; </td>
141
          </tr>
142
          <tr> 
143
            <td width="1%">&nbsp;</td>
144
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
145
              <textarea name="obsolete_comments" class="form_item" cols="60" rows="10"><%=Format4HTML(Get_Comments( parPv_id ))%></textarea>
146
 
147
			  <input type="hidden" name="pv_id" value="<%=parPv_id%>">
148
			  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
149
			  <input type="hidden" name="rfile" value="<%=Request("rfile")%>">
150
              <input type="hidden" name="action" value="true">
151
            </td>
152
          </tr>
153
		  <tr>
154
		  	<td width="1%"></td>
155
			<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
156
			Patch Obsoleted By: 
157
			<%
158
 
159
			Dim rsQry
160
 
161
			OraDatabase.Parameters.Add "PV_ID", 			Request("pv_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 	  
162
			Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ObsoletedBy.sql") , cint(0) )
163
 
164
 
165
			Response.write "<select name='FRpatch_id' class='form_item'>"
166
			Response.write "<option value='' selected>--NONE--</option>"
167
			  %>
168
 
169
				<%While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
170
 
171
			If CDbl(Request("patch_id")) = CDbl(rsQry.Fields("patch_id")) Then
172
	        	Response.write "<option value='"& rsQry.Fields("patch_id") &"' selected>"& (rsQry.Fields("pkg_name")) & (rsQry.Fields("pkg_version")) &"</option>"
173
	        Else
174
 
175
				Response.write "<option value='"& rsQry.Fields("patch_id") &"'>"& (rsQry.Fields("pkg_name")) & " " & (rsQry.Fields("pkg_version")) &"</option>"
176
			End If		
177
					rsQry.MoveNext
178
				WEnd
179
				OraDatabase.Parameters.Remove "PV_ID"
180
				rsQry.Close()
181
				Set rsQry = nothing
182
				%>
183
				</select>			
184
			</td>
185
 
186
		  </tr>
187
          <tr> 
188
            <td width="1%">&nbsp;</td>
189
            <td nowrap width="100%"> 
190
              <p>&nbsp;</p>
191
            </td>
192
          </tr>
193
        </table>
194
      </td>
195
    </tr>
196
    <tr>
197
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
198
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
199
    </tr>
200
  </table>
201
<%
202
Call objFormComponent.FormEnd()
203
'-- FROM END ----------------------------------------------------------------------------------------------------------------
204
%>
205
</body>
206
</html>
207
 
208
 
209
<!-- DESTRUCTOR ------->
210
<!--#include file="common/destructor.asp"-->