Subversion Repositories DevTools

Rev

Rev 5957 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Change Previous Version
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim parRfile
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
parPv_id = QStrPar("pv_id")
parRfile = QStrPar("rfile")
'----------------------------------------------
%>
<%
Sub Short_Pkg_Info ( NNpv_id )
   Dim rsTemp, Query_String

   Query_String = _
   " SELECT pkg.pkg_name, pv.pkg_version, pv.pkg_id, pv.last_pv_id"&_
   "   FROM packages pkg, package_versions pv"&_
   "  WHERE pkg.pkg_id = pv.pkg_id"&_
   "    AND pv.pv_id = "& NNpv_id

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
      pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
      pkgInfoHash.Add "pkg_id", (rsTemp.Fields("pkg_id"))
      pkgInfoHash.Add "last_pv_id", (rsTemp.Fields("last_pv_id"))
   End If

   rsTemp.Close
   Set rsTemp = nothing
End Sub


Sub Deprecate_Package ( NNpv_id)

   Dim rsTemp, Query_String
   'If nLast_pv_id = "" Then nLast_pv_id = NULL
   Set rsTemp = OraDatabase.DbCreateDynaset("SELECT PKG.PKG_ID, PKG.pkg_name FROM PACKAGE_VERSIONS PV, PACKAGES PKG WHERE PKG.PKG_ID = PV.PKG_ID AND PV.PV_ID = "&NNpv_id, cint(0))

   OraDatabase.Parameters.Add "RTAG_ID",       Request("rtag_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PKG_ID",       rsTemp("pkg_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "COMMENTS",       Request("pv_overview"),    ORAPARM_INPUT, ORATYPE_VARCHAR2
   OraDatabase.Parameters.Add "USER_ID",       objAccessControl.UserId,    ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PV_ID",       Request("pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER

   On Error Resume Next
   objEH.TryORA ( OraSession )

   OraDatabase.ExecuteSQL _
   "BEGIN   Deprecate_Package ( :PV_ID, :RTAG_ID, :PKG_ID, :COMMENTS, :USER_ID );   END;"

   If Err.Number = 0 Then
      OraDatabase.ExecuteSQL _
      "BEGIN   Log_Action ( :PV_ID, 'deprecate_package', :USER_ID );   END;"
   End If

   objEH.CatchORA ( OraSession )

   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "PKG_ID"
   OraDatabase.Parameters.Remove "COMMENTS"
   OraDatabase.Parameters.Remove "USER_ID"
   OraDatabase.Parameters.Remove "PV_ID"

   rsTemp.Close
   Set rsTemp = nothing
End Sub
%>
<%
'Process submition
If CBool(QStrPar("action")) AND  objAccessControl.UserLogedIn AND Request("pv_overview") <> "" Then
   Call Deprecate_Package ( parPv_id)
   Call OpenInParentWindow ( parRfile &"?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
   Call CloseWindow


End If
%>
<%
Call Short_Pkg_Info ( parPv_id )
%>
<html>
<head>
<title>Release Manager</title>
<link rel="shortcut icon" href="<%=FavIcon%>"/>
<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/tipster.js"></script>
<script language="JavaScript" src="images/_help_tips.js"></script>
<script language="JavaScript" src="images/common.js"></script>
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<form class="form_tight" name="deprecatepackage" method="post" action="<%=scriptName%>">
  <table border="0" cellspacing="0" cellpadding="2">
    <tr>
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
          <tr>
            <td nowrap class="form_group" colspan="2">Enter instructions to assist in migrating this package.</td>
          </tr>
          <tr>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
              <%=pkgInfoHash.Item ("pkg_name")%></td>
          </tr>
          <tr>
             <%
             Dim rsTemp
             Set rsTemp = OraDatabase.DbCreateDynaset("SELECT COMMENTS FROM DEPRECATED_PACKAGES WHERE RTAG_ID ="& Request("rtag_id") &" AND V_EXT ='"& pkgInfoHash.Item ("v_ext") &"' AND PKG_ID ="& pkgInfoHash.Item ("pkg_id") &"", cint(0))
             %>
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">
              Migration Instructions
                <%If IsNull(rsTemp("comments")) Then%>
                <div class="form_field style1">Required!</div>
                <%End If%>
            </td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
                <textarea name="pv_overview" cols="60" rows="10" class="form_item" id="pv_overview"><%=rsTemp("comments")%></textarea>
                <input type="hidden" name="pv_id" value="<%=parPv_id%>">
                <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
                <input type="hidden" name="rfile" value="<%=parRfile%>">
                <input type="hidden" name="action" value="true">
            </td>
         <%
         rsTemp.Close()
         Set rsTemp = nothing
         %>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td align="right">
        <input type="submit" name="btn" value="Submit" class="form_btn_comp">
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->