Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
129 ghuddy 4
'                 Destroy Package
119 ghuddy 5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
129 ghuddy 11
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 12
%>
13
 
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
153 ghuddy 20
<!--#include file="common/daemon_instructions.asp"-->
119 ghuddy 21
<%
22
'------------ ACCESS CONTROL ------------------
23
%>
24
<!--#include file="_access_control_login.asp"-->
25
<!--#include file="_access_control_general.asp"-->
26
<!--#include file="_access_control_project.asp"-->
27
<%
28
'------------ Variable Definition -------------
29
Dim ProblemsString
30
Dim OverideWarnings
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
ProblemsString = NULL
34
 
35
OverideWarnings = "N"
36
If InStr( 1, Request("btn"), "YES", 1 ) > 0 Then OverideWarnings = "Y"
37
 
38
'----------------------------------------------
39
%>
40
<%
41
Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )
129 ghuddy 42
 
43
   OraDatabase.Parameters.Add "PV_ID",             nPvId,             ORAPARM_INPUT,  ORATYPE_NUMBER
44
   OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT,  ORATYPE_CHAR
45
   OraDatabase.Parameters.Add "PROBLEM_STRING",    NULL,              ORAPARM_OUTPUT, ORATYPE_VARCHAR2
46
 
47
   'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")
48
 
49
   objEH.TryORA ( OraSession )
50
   On Error Resume Next
51
 
52
   OraDatabase.ExecuteSQL _
53
   "BEGIN "&_
54
   " PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_
55
   "END; "
56
 
57
   objEH.CatchORA ( OraSession )
58
 
59
   outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").Value
60
 
61
   OraDatabase.Parameters.Remove "PV_ID"
62
   OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS"
63
   OraDatabase.Parameters.Remove "PROBLEM_STRING"
119 ghuddy 64
End Sub
65
%>
66
<%
67
'-----------------------  MAIN LINE  ---------------------------
68
 
69
' Setup persistance object
70
Call objPMod.StoreParameter ( "bfile", Request("bfile") )
71
Call objPMod.StoreParameter ( "rfile", Request("rfile") )
72
Call objPMod.StoreParameter ( "rtag_id", Request("rtag_id") )
73
Call objPMod.StoreParameter ( "pv_id", Request("pv_id") )
74
Call objPMod.StoreParameter ( "pkg_id", Request("pkg_id") )
75
Call objPMod.StoreParameter ( "OLDpv_id", Request("OLDpv_id") )
76
Call objPMod.StoreParameter ( "FLuser_name", Request("FLuser_name") )
77
Call objPMod.StoreParameter ( "FLpkg_version", Request("FLpkg_version") )
78
Call objPMod.StoreParameter ( "FLpkg_version", Request("FLpkg_version") )
79
Call objPMod.StoreParameter ( "listby", Request("listby") )
80
 
81
If objPMod.GetParamValue("pv_id") Then
129 ghuddy 82
 
153 ghuddy 83
   If (DaemonInstructionPreventsEditing(Request("rtag_id"), Request("pv_id"))) Then
84
      Call RaiseMsg(enum_MSG_ERROR, "This package version has one or more daemon instructions present.<br><br>"&_
85
                                    "Please delete them or allow them to be consumed before attempting to delete the package version.")
86
   Else
87
      '--- Process submition ---
88
      Call DestroyPackage ( objPMod.GetParamValue("pv_id"), OverideWarnings, ProblemsString )
129 ghuddy 89
 
153 ghuddy 90
      If IsNull( ProblemsString ) Then
91
         Response.Redirect( objPMod.GetParamValue("bfile") &"?DESTROYED=OK"& objPMod.ComposeURLWithout("bfile,pv_id") )
92
      End If
129 ghuddy 93
   End If
94
 
119 ghuddy 95
Else
129 ghuddy 96
 
97
   Err.Raise 8, "This page requires more paramaters to run.<br>"& objPMod.ComposeURL()
98
 
119 ghuddy 99
End If
100
 
101
'----------------------------------------------------------------
102
%>
103
 
104
 
105
<html>
106
<head>
107
<title>Release Manager</title>
108
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
109
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
110
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
111
<link rel="stylesheet" href="images/navigation.css" type="text/css">
112
<script language="JavaScript" src="images/common.js"></script>
113
 
114
</head>
115
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
116
<!-- BODY ---->
117
 
118
 
119
<table width="100%" height="98%"  border="0" cellpadding="0" cellspacing="0">
129 ghuddy 120
   <tr>
121
      <td align="center" valign="middle" background="images/bg_form_lightgray.gif">
122
         <table width="650" border="0" cellspacing="0" cellpadding="0">
119 ghuddy 123
            <tr>
129 ghuddy 124
               <td>
125
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
126
                     <tr>
127
                        <td align="left" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
128
                        <td background="images/lbox_bg_blue.gif"><!-- Heading --><img src="images/h_trsp_dot.gif" width="1" height="20"><!-- END Heading --></td>
129
                        <td align="right" valign="top" width="1%" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
130
                     </tr>
131
                     <tr>
132
                        <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
133
                        <td bgcolor="#FFFFFF" valign="top">
134
                           <!-- Body -->
135
                           <table width="100%" border="0" cellspacing="1" cellpadding="2">
136
                              <form name="form" method="get" action="<%=ScriptName%>">
137
                                 <tr>
138
                                    <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="10"></td>
139
                                    <td width="1%" nowrap class="form_group" valign="bottom"></td>
140
                                    <td nowrap width="100%" align="right" class="form_step"></td>
141
                                 </tr>
142
                                 <tr>
143
                                    <td width="1%">&nbsp;</td>
144
                                    <td colspan="2" width="1%" nowrap class="form_field">
145
                                       <table width="100%"  border="0" cellspacing="0" cellpadding="10">
146
                                          <tr>
147
                                             <td background="images/bg_form_lightbluedark.gif"><p class="err_ttl">Please note:</p></td>
148
                                          </tr>
149
                                          <tr>
150
                                             <td background="images/bg_form_lightgray.gif" class="form_item">
151
                                                <%
152
                                                ' Format problem report string to html
153
                                                Response.write Replace( Server.HTMLEncode( ProblemsString ), VBNewLine, "<br>" )
154
                                                %>
155
                                             </td>
156
                                          </tr>
157
                                          <tr>
158
                                             <td background="images/bg_form_lightgray.gif" class="form_item">Do you still want to proceed ? </td>
159
                                          </tr>
160
                                       </table>
161
                                    </td>
162
                                 </tr>
163
                                 <tr>
164
                                    <td width="1%">&nbsp;</td>
165
                                    <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
166
                                    <td nowrap width="100%" class="body_scol">
167
                                       <br>
168
                                       <input type="submit" name="btn" value="  Yes  " class="form_btn">
169
                                       <input type="reset" name="btn" value="   No   " class="form_btn" onClick="history.back();">
170
                                       <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
171
                                       <br><br>
172
                                    </td>
173
                                 </tr>
174
                                 <%=objPMod.ComposeHiddenTags()%>
175
                              </form>
176
                           </table>
177
                           <!-- END Body-->
178
                        </td>
179
                        <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
180
                     </tr>
181
                     <tr>
182
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
183
                        <td background="images/lbox_bg_blue.gif"></td>
184
                        <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
185
                     </tr>
186
                  </table>
187
               </td>
119 ghuddy 188
            </tr>
129 ghuddy 189
         </table>
190
      </td>
191
   </tr>
119 ghuddy 192
</table>
193
</body>
194
</html>
195
 
196
 
197
<!-- DESTRUCTOR ------->
129 ghuddy 198
<!--#include file="common/destructor.asp"-->