Subversion Repositories DevTools

Rev

Rev 187 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                        Patches                            |
'|                                                   |
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.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="_tabs.asp"-->
<!--#include file="_action_buttons.asp"-->
<!--#include file="common/_package_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim patchRecCount
Dim rsTemp
Dim dOptionsFilter
Dim     rsQry
'------------ Constants Declaration -----------
Const LIMG_FILTER_ON = "<img src='images/i_data_table.gif' border='0' align='absmiddle' hspace='0' title='Filter in use.'>"
Const LIMG_FILTER_OFF = "<img src='images/i_data_table_off.gif' border='0' align='absmiddle' hspace='0' title='Filter not in use.'>"
Const LIMG_DROP_DOWN_ARROW = "<img src='images/i_drop_down_arrow.gif' width='5' height='15' hspace='1' border='0' align='absmiddle'>"
Const LMAX_ROWS = 50
'------------ Variable Init -------------------
Set dOptionsFilter = CreateObject("Scripting.Dictionary")
'----------------------------------------------
%>
<%
'------------------------------------------------------------------------------------------------------------------------------------
Function PatchIcon ( cIsPatch, cIsPatchObsolete )
        If IsNull(cIsPatch) Then
                PatchIcon = "<img src='images/rex_images/ext_blank.gif' width='16' height='16' border='0' align='absmiddle'>"
        Else
                If IsNull(cIsPatchObsolete) Then
                        PatchIcon = "<img src='images/i_patch_small.gif' width='16' height='16' border='0' align='absmiddle' >"
                Else
                        PatchIcon = "<img src='images/i_patch_small_obsolete.gif' width='16' height='16' border='0' align='absmiddle' title='Patch is obsolete'>"
                End If
        End If
End Function
'-----------------------------------------------------------------------------------------------------------------
Sub GetOptionsFilterValues ( outOptionsFilter )
        Dim Val, aValues
        
        If (Request("btn") <> "") Then
                
                If (Request("optionsfilter") <> "") Then
                        ' Get values from query string
                        aValues = Split( Replace(Request("optionsfilter"), " ", ""), "," )
                        
                        For Each Val In aValues
                                
                                outOptionsFilter.Item (CStr( Val )) = Val
                                
                        Next
                        
                        ' Store current setting in cookie
                        Response.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_PATCH_OPTIONS_FILTER) = Replace(Request("optionsfilter"), " ", "")
                Else
                        ' Empty cookie
                        Response.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_PATCH_OPTIONS_FILTER) = ""
                End If
                
                
        ElseIf Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_PATCH_OPTIONS_FILTER) <> "" Then
                
                ' Get values from cookie
                aValues = Split( Replace( Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_PATCH_OPTIONS_FILTER), " ", ""), ",") 
                
                For Each Val In aValues
                        
                        outOptionsFilter.Item (CStr( Val )) = Val
                        
                Next
                
        End If
        
End Sub
'-----------------------------------------------------------------------------------------------------------------
Function GetIsOptionsFilterInUseIcon()
        GetIsOptionsFilterInUseIcon = LIMG_FILTER_OFF & LIMG_DROP_DOWN_ARROW
        
        If dOptionsFilter.Count > 0 Then
                GetIsOptionsFilterInUseIcon = LIMG_FILTER_ON & LIMG_DROP_DOWN_ARROW
        End If
        
End Function
'-----------------------------------------------------------------------------------------------------------------
Function GetIsOptionsFilterChecked( nFilterId )
        
        If dOptionsFilter.Exists ( CStr(nFilterId)  ) Then
                GetIsOptionsFilterChecked = "checked"
        End If
        
End Function
'------------------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------------------- MAIN LINE ---------------------------

Call GetOptionsFilterValues ( dOptionsFilter )

'---------------------------------------------------------------
%>
<html>
<title><%=Title(Request("rtag_id"))%></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>
<script language="JavaScript" src="scripts/remote_scripting.js"></script>

<!-- DROPDOWN MENUS -->
<!--#include file="_menu_def.asp"-->
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
<!-- MENU LAYERS -------------------------------------->
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
  <!----------------------------------------------------->
</div>
<!-- HEADER -->
<!--#include file="_header.asp"-->
<!-- BODY ---->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
                <td valign="top" width="1" background="images/bg_bage.gif">
                <!-- LEFT -->
                <!--#include file="_environment.asp"-->
                </td>
                <td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
                <td valign="top" width="100%">
                <!-- MIDDLE -->
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="1%" background="images/bg_action_norm.gif"><IMG height=35 src="images/spacer.gif" width=15></td>
                    <td width="100%" background="images/bg_action_norm.gif"><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
                    <td width="1%" background="images/bg_action_norm.gif"><IMG height=1 src="images/spacer.gif" width=15></td>
                  </tr>
          <tr>
            <td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
            <td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
            <td background="images/bg_lght_gray.gif">&nbsp;</td>
          </tr>
                  <tr>
                    <td background="images/bg_lght_gray.gif">&nbsp;</td>
                    <td valign="bottom" background="images/bg_lght_gray.gif">
                      <table width="100" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><IMG height=1 src="images/spacer.gif" width=50></td>
                          <td>
                                  <!-- TABS ------------------------------------->
                                  <%Call Generate_Tab_Menu ( TABarray1, "Patches", "orange" )%>
                                  </td>
                        </tr>
                      </table>
                    </td>
                    <td background="images/bg_lght_gray.gif">&nbsp;</td>
                  </tr>
                  <tr>
                    <td background="images/lbox_bg_orange.gif"><IMG height=35 src="images/spacer.gif" width=1></td>
                    <td background="images/lbox_bg_orange.gif">
                        <!-- TAB ACTION BUTTONS ------------------------------------->
                        <%Call Action_Buttons ( "Patches" )%> 
                        </td>
                    <td background="images/lbox_bg_orange.gif">&nbsp;</td>
                  </tr>
                  <tr>
                    <td></td>
                    <td valign="top">
                        <!-- DETAILS ------------------------------------------------->
                
                        
                        <br>
                        <%If CStr(pkgInfoHash.Item("pkg_state")) = CStr( enumPKG_STATE_NEW_PATCH ) Then%>
                        <%Call DisplayInfo ( "NEW_PATCH_AVAILABLE", "100%" )%>
                        <%End If%>
                        <%
                        OraDatabase.Parameters.Add "PV_ID",     parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER
                        
                        If (GetIsOptionsFilterChecked(enumPATCH_HIDE_OBSOLETE) <> "") Then
                                OraDatabase.Parameters.Add "HIDE_OBSOLETE",     "Y", ORAPARM_INPUT, ORATYPE_CHAR
                        Else
                                OraDatabase.Parameters.Add "HIDE_OBSOLETE",     "N", ORAPARM_INPUT, ORATYPE_CHAR
                        End If
                        
                        Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("Patches.sql"), cint(0))
                        
                        OraDatabase.Parameters.Remove "PV_ID"
                        OraDatabase.Parameters.Remove "HIDE_OBSOLETE"
                        
                        patchRecCount = rsTemp.RecordCount
                        %>
                        <!-- OPTIONS FILTER +++++++++++++++++++++++++++++++++++++++++++ -->             
                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <form name="FornName" method="get" action="<%=ScriptName%>">
                        <input type="hidden" name="pv_id" value="<%=parPv_Id%>">
                        <input type="hidden" name="rtag_id" value="<%=parRtag_Id%>">
                    <tr>
                                <td width="100%"></td>
                                <td width="1" align="right">
                                <fieldset>
                                <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divOptionsFilter');" ><%=GetIsOptionsFilterInUseIcon() %>&nbsp;Options...</a></legend>                 
                                    <div name="divOptionsFilter" id="divOptionsFilter" class="body_txt" style="display:none;">
                                        <br>
                                              <table width="100%"  border="0" cellspacing="1" cellpadding="3">
                                <tr>
                                  <td width="1" background="images/bg_action_norm.gif"><input name="optionsfilter" type="checkbox" value="<%=enumPATCH_SHOW_ALL%>" <%=GetIsOptionsFilterChecked(enumPATCH_SHOW_ALL)%>></td>
                                  <td width="100%" nowrap background="images/bg_action_norm.gif" class="form_field">Show All</td>
                                </tr>
                                <tr>
                                  <td background="images/bg_action_norm.gif"><input type="checkbox" name="optionsfilter" value="<%=enumPATCH_HIDE_OBSOLETE%>" <%=GetIsOptionsFilterChecked(enumPATCH_HIDE_OBSOLETE)%>></td>
                                  <td nowrap background="images/bg_action_norm.gif" class="form_field">Hide Obsolete</td>
                                </tr>
                                                        <tr>
                                  <td background="images/bg_action_norm.gif">&nbsp;</td>
                                  <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" id="btn" value="Apply"></td>
                                </tr>
                              </table>
                                                                                                                    
                                        </div>
                                </fieldset>
                                </td></tr>
                        </form>
            </table>
                        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                        <%
                        ' Shift Cursor Position
                        If (GetIsOptionsFilterChecked(enumPATCH_SHOW_ALL) = "") AND (patchRecCount > 0) Then
                                If patchRecCount > LMAX_ROWS Then
                                        rsTemp.MoveTo ( patchRecCount - LMAX_ROWS )
                                End If
                                
                        End If
                        %>
                        <span class="body_colb">Patches</span><br>
                        
                        <table width="100%" border="0" cellspacing="1" cellpadding="3">
                          <tr> 
                                                    <td align="center" background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Installation<br>Order</td>
                            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"></td>
                            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Patch Version&nbsp;</td>
                                        <td background="images/bg_form_lightbluedark.gif" nowrap width="100%" class="form_field">Reason for this version</td>
                                                        <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Release Date</td>
                            <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field"></td>
                          </tr>
                          
                          <%If patchRecCount < 1 Then%>
                          <tr> 
                                                        <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                            <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                                                        <td background="images/bg_form_lightgray.gif" class="form_item">&nbsp;</td>
                          </tr>
                          <%End If%>
                          <%
                                                  While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
                                                  %>
                                                  
                                                  <%
                                                  ' ---------- PATCH ---------- 
                                                  If Cstr(rsTemp("patch_id")) = "0" Then
                                                  %>
                          <tr>
                                                    <td align="center" nowrap background="images/bg_form_lightgray.gif" valign="top"><a href='javascript:;' onClick="MM_openBrWindow('_wform_patch_install_order.asp?patch_id=<%=rsTemp("ppatch_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','InstallOrder','resizable=yes,width=400,height=250')" class="txt_linked" title="Change Install Order"><%=rsTemp("install_order")%></a></td>
                                                        <td align="center" nowrap background="images/bg_form_lightgray.gif" valign="top"><%If rsTemp("dlocked") = "Y" Then%><%=imgLocked%><%End If%></td>
                            <td background="images/bg_form_lightgray.gif" nowrap valign="top"><a href="fixed_issues.asp?pv_id=<%=rsTemp("ppatch_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=PatchIcon ( rsTemp("is_patch"), rsTemp("is_obsolete") )%><%=rsTemp("pkg_version")%></a></td>
                            <td background="images/bg_form_lightgray.gif" class="form_item" valign="top"><%=NewLine_To_BR( To_HTML ( rsTemp("comments") ) )%><br><%=NewLine_To_BR( To_HTML ( rsTemp("obsolete_comments") ) )%></td>
                            <td background="images/bg_form_lightgray.gif" class="form_item" nowrap valign="top"><%=EuroDateTime(rsTemp("release_stamp"))%><%If NOT IsNull(rsTemp("release_stamp"))Then%> by <a href="mailto:<%=rsTemp("user_email")%>" class="txt_linked"><%=rsTemp("full_name")%></a><%End If%></td>
                                                        <%If rsTemp("dlocked") = "N" Then%>
                                <td align="center" background="images/bg_form_lightgray.gif" class="form_item" valign="top"><a href="_remove_patch.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&patch_id=<%=rsTemp("ppatch_id")%>" onClick="return confirmDelete('this patch');"><img src="images/i_delete.gif" alt="Remove from list." width="13" height="12" hspace="3" border="0"></a></td>
                                                        <%Else%>
                                                                <td align="center" background="images/bg_form_lightgray.gif" class="form_item" valign="top"><img src="images/i_delete_disable.gif" alt="Remove disabled." width="13" height="12" hspace="3" border="0"></td>
                                                        <%End If%>
                          </tr>
                                                  
                                                  <%
                                                  Else
                                                  ' ---------  DEPENDENCY ---------
                                                  %>
                                                  <tr>
                                                    <td align="center" nowrap background="images/bg_form_lightgray.gif"></td>
                                                        <td align="center" nowrap background="images/bg_form_lightgray.gif"><%If rsTemp("dlocked") = "Y" Then%><%=imgLocked%><%End If%></td>
                            <td background="images/bg_form_lightgray.gif" nowrap valign="top"><IMG src="images/spacer.gif" width="20" align="absmiddle"><a href="fixed_issues.asp?pv_id=<%=rsTemp("patch_id")%>&rtag_id=<%=parRtag_id%>" class="txt_linked"><%=PatchIcon ( rsTemp("is_patch"), rsTemp("is_obsolete") )%><%=rsTemp("pkg_name") &" "& rsTemp("pkg_version")%></a></td>
                            <td background="images/bg_form_lightgray.gif" class="form_item" valign="top"><%=NewLine_To_BR( To_HTML ( rsTemp("comments") ) )%><br><%=NewLine_To_BR( To_HTML ( rsTemp("obsolete_comments") ) )%></td>
                            <td background="images/bg_form_lightgray.gif" class="form_item" nowrap valign="top"><%=EuroDateTime(rsTemp("release_stamp"))%><%If NOT IsNull(rsTemp("release_stamp"))Then%> by <a href="mailto:<%=rsTemp("user_email")%>" class="txt_linked"><%=rsTemp("full_name")%></a><%End If%></td>
                            <td align="center" background="images/bg_form_lightgray.gif" class="form_item" valign="top"></td>
                          </tr>
                                                  
                                                  <%End If%>
                                                  
                                                  
                          <%rsTemp.MoveNext
                                                  WEnd
                                                  rsTemp.Close
                                                  Set rsTemp = nothing
                                                  
                                                  %>
                        </table>
                        <!------------------------------------------------------------>
           <br><br>
                        <!-- END DETAILS ------------------------------------------------->
                        </td>
                    <td>&nbsp;</td>
                  </tr>
                </table>
                <!-- END MIDDLE -------->
                </td>
        </tr>
</table>
<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>                 
<%
Call Destroy_All_Objects
%>