Rev 153 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'=====================================================' Destroy Package' --- PROCESS FORM ---'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/common_dbedit.asp"--><!--#include file="common/daemon_instructions.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login.asp"--><!--#include file="_access_control_general.asp"--><!--#include file="_access_control_project.asp"--><%'------------ Variable Definition -------------Dim ProblemsStringDim OverideWarnings'------------ Constants Declaration -----------'------------ Variable Init -------------------ProblemsString = NULLOverideWarnings = "N"If InStr( 1, Request("btn"), "YES", 1 ) > 0 Then OverideWarnings = "Y"'----------------------------------------------%><%Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString )OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT, ORATYPE_CHAROraDatabase.Parameters.Add "PROBLEM_STRING", NULL, ORAPARM_OUTPUT, ORATYPE_VARCHAR2'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn")objEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL _"BEGIN "&_" PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_"END; "objEH.CatchORA ( OraSession )outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").ValueOraDatabase.Parameters.Remove "PV_ID"OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS"OraDatabase.Parameters.Remove "PROBLEM_STRING"End Sub%><%'----------------------- MAIN LINE ---------------------------' Setup persistance objectCall objPMod.StoreParameter ( "bfile", Request("bfile") )Call objPMod.StoreParameter ( "rfile", Request("rfile") )Call objPMod.StoreParameter ( "rtag_id", Request("rtag_id") )Call objPMod.StoreParameter ( "pv_id", Request("pv_id") )Call objPMod.StoreParameter ( "pkg_id", Request("pkg_id") )Call objPMod.StoreParameter ( "OLDpv_id", Request("OLDpv_id") )Call objPMod.StoreParameter ( "FLuser_name", Request("FLuser_name") )Call objPMod.StoreParameter ( "FLpkg_version", Request("FLpkg_version") )Call objPMod.StoreParameter ( "FLpkg_version", Request("FLpkg_version") )Call objPMod.StoreParameter ( "listby", Request("listby") )If objPMod.GetParamValue("pv_id") ThenIf (DaemonInstructionPreventsEditing(Request("rtag_id"), Request("pv_id"))) ThenCall RaiseMsg(enum_MSG_ERROR, "This package version has one or more daemon instructions present.<br><br>"&_"Please delete them or allow them to be consumed before attempting to delete the package version.")Else'--- Process submition ---Call DestroyPackage ( objPMod.GetParamValue("pv_id"), OverideWarnings, ProblemsString )If IsNull( ProblemsString ) ThenResponse.Redirect( objPMod.GetParamValue("bfile") &"?DESTROYED=OK"& objPMod.ComposeURLWithout("bfile,pv_id") )End IfEnd IfElseErr.Raise 8, "This page requires more paramaters to run.<br>"& objPMod.ComposeURL()End If'----------------------------------------------------------------%><html><head><title>Release Manager</title><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="images/release_manager_style.css" type="text/css"><link rel="stylesheet" href="images/navigation.css" type="text/css"><script language="JavaScript" src="images/common.js"></script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" ><!-- BODY ----><table width="100%" height="98%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle" background="images/bg_form_lightgray.gif"><table width="650" border="0" cellspacing="0" cellpadding="0"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><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><td background="images/lbox_bg_blue.gif"><!-- Heading --><img src="images/h_trsp_dot.gif" width="1" height="20"><!-- END Heading --></td><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></tr><tr><td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td><td bgcolor="#FFFFFF" valign="top"><!-- Body --><table width="100%" border="0" cellspacing="1" cellpadding="2"><form name="form" method="get" action="<%=ScriptName%>"><tr><td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="10"></td><td width="1%" nowrap class="form_group" valign="bottom"></td><td nowrap width="100%" align="right" class="form_step"></td></tr><tr><td width="1%"> </td><td colspan="2" width="1%" nowrap class="form_field"><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td background="images/bg_form_lightbluedark.gif"><p class="err_ttl">Please note:</p></td></tr><tr><td background="images/bg_form_lightgray.gif" class="form_item"><%' Format problem report string to htmlResponse.write Replace( Server.HTMLEncode( ProblemsString ), VBNewLine, "<br>" )%></td></tr><tr><td background="images/bg_form_lightgray.gif" class="form_item">Do you still want to proceed ? </td></tr></table></td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td><td nowrap width="100%" class="body_scol"><br><input type="submit" name="btn" value=" Yes " class="form_btn"><input type="reset" name="btn" value=" No " class="form_btn" onClick="history.back();"><input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();"><br><br></td></tr><%=objPMod.ComposeHiddenTags()%></form></table><!-- END Body--></td><td width="1%" background="images/lbox_bgside_white.gif"> </td></tr><tr><td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td><td background="images/lbox_bg_blue.gif"></td><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></tr></table></td></tr></table></td></tr></table></body></html><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->