Subversion Repositories DevTools

Rev

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

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