Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                    FIND                           |
'|                                                   |
'=====================================================
%>
<%
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="common/_package_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim KeyWord
Dim parKeyword
Dim parRtagId
Dim rsRep
Dim imgLock
Dim parSearchType
Dim sLink
Dim   rsQry
Dim sPkgVersion
'------------ Constants Declaration -----------
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
Const MaxRows = 100
'------------ Variable Init -------------------
parKeyword = Request("keyword")
parRtagId = Request("rtag_id")
parSearchType = Request("searchtype")
'----------------------------------------------
%>
<%
'==================== MAIN LINE ===============================

' Check for Required parameters
If (parSearchType = "")  OR  (nEnvTab = "") Then
   Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
End If
'==============================================================
%>
<html>
<head>
<title><%=Title(parRtagId)%></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>
<!-- 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%"></td>
               <td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
               <td width="1%"></td>
            </tr>
            <tr>
               <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="480"></td>
               <td bgcolor="#FFFFFF" valign="top">
                  <%
                  If InStr( Trim(parKeyword), "*") > 0 Then
                     KeyWord = Replace( Trim(parKeyword), "*", "%" )
                  Else
                     KeyWord = "%"& Trim(parKeyword) &"%"
                  End If

                  OraDatabase.Parameters.Add "KEYWORD",    KeyWord, ORAPARM_INPUT, ORATYPE_VARCHAR2
                  OraDatabase.Parameters.Add "RTAG_ID",    parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
                  OraDatabase.Parameters.Add "SEARCH_AREA", nEnvTab, ORAPARM_INPUT, ORATYPE_NUMBER
                  OraDatabase.Parameters.Add "RECORD_SET",   NULL,    ORAPARM_OUTPUT,    ORATYPE_CURSOR
                  OraDatabase.Parameters.Add "PAGE_SIZE",    MaxRows, ORAPARM_INPUT, ORATYPE_NUMBER

                  If parSearchType = "1" Then
                     ' Package Search
                     OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_PACKAGE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :RECORD_SET );  END;"
                  ElseIf parSearchType = "2" Then
                     ' File Search
                     OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_FILE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :PAGE_SIZE, :RECORD_SET );  END;"
                  End If

                  Set rsRep = OraDatabase.Parameters("RECORD_SET").Value

                  OraDatabase.Parameters.Remove "KEYWORD"
                  OraDatabase.Parameters.Remove "RTAG_ID"
                  OraDatabase.Parameters.Remove "SEARCH_AREA"
                  OraDatabase.Parameters.Remove "PAGE_SIZE"
                  OraDatabase.Parameters.Remove "RECORD_SET"
                  %>

                  <table width="100%"  border="0" cellspacing="0" cellpadding="5">
                     <tr>
                        <td>
                           <%If parSearchType = "1" Then%>
                              <span class="body_sect">Find Package</span>
                           <%ElseIf parSearchType = "2" Then%>
                              <span class="body_sect">Find File</span>
                           <%End If%>
                        </td>
                     </tr>
                     <tr>
                        <td nowrap bgcolor="#E4E9EC" class="body_txt">
                           Results for <b><%=Trim(parKeyword)%></b><%If parSearchType = "2" Then%>. Showing max. <%=MaxRows%> results.<%End If%>
                        </td>
                     </tr>
                  </table>


                  <%If parSearchType = "1" Then%>
                     <!-- PACKAGE SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                     <table width="100%" border="0" cellspacing="1" cellpadding="5">
                        <form name="frm" method="get" action="<%=ScriptName%>">
                           <tr>
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Package&nbsp;Name</td>
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Location</td>
                              <td width="100%" nowrap class="body_col" bgcolor="#E4E9EC">
                                 <SPAN id="IMG_EXPAND_ALL_REASONS" name="IMG_EXPAND_ALL_REASONS" style="display:block;">
                                    <a href="javascript:;" onClick="ExpandAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Show All Reasons for Release.">
                                       <img src="icons/b_expand_all.gif" border="0" align="absmiddle" hspace="3">
                                    </a>Reason&nbsp;for&nbsp;Release
                                 </SPAN>
                                 <SPAN id="IMG_COLLAPSE_ALL_REASONS" name="IMG_COLLAPSE_ALL_REASONS" style="display:none;">
                                    <a href="javascript:;" onClick="CollapseAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Hide All Reasons for Release.">
                                       <img src="icons/b_collapse_all.gif" border="0" align="absmiddle" hspace="3">
                                    </a>Reason&nbsp;for&nbsp;Release
                                 </SPAN>
                              </td>
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Last&nbsp;Modified</td>
                           </tr>
                           <%
                           If rsRep.RecordCount = 0 Then
                              With Response
                                 .write "<tr>"
                                 .write "<td colspan='6' class='body_row'>Found 0 records.</td>"
                                 .write "</tr>"
                              End With
                           End If

                           While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))

                              imgLock = IMG_NOT_OFFICIAL
                              If (rsRep("dlocked") = "Y") OR (rsRep("dlocked") = "A") Then
                                 imgLock = IMG_OFFICIAL
                              End If%>
                              <tr>
                                 <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
                                 <td class="body_txt" valign="top" bgcolor="#F5F5F5"><%=Highlight_Substring( rsRep("pkg_name"), Trim(parKeyword) )%></td>
                                 <td nowrap valign="top" bgcolor="#F5F5F5"><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=parRtagId%>" class="body_link"><%=rsRep("pkg_version")%></a></td>
                                 <td class="body_txt" valign="top" bgcolor="#F5F5F5"><%= GetEnvName(rsRep("env_area")) &"&nbsp;/&nbsp;"& rsRep("view_name")%></td>
                                 <td valign="top"  bgcolor="#F5F5F5" >
                                    <DIV style="display:block;" id="SHORT_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>" name="SHORT_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>"  onclick="ToggleDisplay('SHORT_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>','FULL_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>');">
                                       <a href="#" class="row_txt_area" title="Click to see more...">Click to see more...</a>
                                    </DIV>
                                    <DIV id="FULL_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>" name="FULL_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>" style="display:none;" onclick="ToggleDisplay('SHORT_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>','FULL_RFO<%= rsRep("env_area") &"_"& rsRep("pv_id")%>');">
                                       <a href="#" class="body_txt" title="Click to hide."><%=NewLine_To_BR ( To_HTML( rsRep("comments") ) )%></a>
                                    </DIV>
                                 </td>
                                 <td nowrap class="body_txt" valign="top" bgcolor="#F5F5F5">
                                    <%= "<a href='mailto:"& rsRep("user_email") &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& rsRep("full_name") &" &lt;"& rsRep("user_email") &"&gt;'>"& rsRep("full_name") &"</a> "& EuroDateTime ( rsRep("modified_stamp") )%>
                                 </td>
                              </tr>
                           <%  rsRep.MoveNext
                           WEnd

                           rsRep.Close()
                           %>
                           <tr>
                              <td colspan='6' background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                           </tr>
                        </form>
                     </table>
                     <br>

                  <%ElseIf parSearchType = "2" Then%>
                     <!-- FILE SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                     <table width="100%" border="0" cellspacing="1" cellpadding="5">
                        <tr>
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">File Name</td>
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Path</td>
                           <td width="20" nowrap class="body_col" bgcolor="#E4E9EC">Package&nbsp;Name</td>
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">CheckSum&nbsp;(CKSUM)</td>
                        </tr>
                        <%
                        If rsRep.RecordCount = 0 Then
                           With Response
                              .write "<tr>"
                              .write "<td colspan='5' class='body_row'>Found 0 records.</td>"
                              .write "</tr>"
                           End With
                        End If

                        While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))

                           If IsNull(rsRep("file_path")) Then
                              ' DEVI-050252 - must not call Get_Pkg_Short_Info() with a null or empty string, so check the patch_id before doing so.
                              If IsNull(rsRep("patch_id")) OR rsRep("patch_id") = "" Then
                                 sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_name"), "\", "/" )
                              Else
                                 Call Get_Pkg_Short_Info(  rsRep("patch_id"), NULL, NULL, sPkgVersion, NULL, NULL, NULL )
                                 sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& sPkgVersion &"/"& rsRep("file_name")
                              End If
                           Else
                              sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_path") & rsRep("file_name"), "\", "/" )
                           End If
                           %>
                           <tr>
                              <td class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=Highlight_Substring( rsRep("file_name"), Trim(parKeyword) )%></td>
                              <td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("file_path")%></td>
                              <td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("pkg_name")%></td>
                              <td nowrap class="body_row"  bgcolor="#F5F5F5"><a href="dependencies.asp?rtag_id=<%=parRtagId%>&pv_id=<%=rsRep("pv_id")%>" class="body_link"><%=rsRep("pkg_version")%></a></td>
                              <td nowrap class="body_txt_gray"  bgcolor="#F5F5F5"><%=rsRep("crc_cksum")%></td>
                           </tr>
                           <%  rsRep.MoveNext
                        WEnd

                        rsRep.Close()
                        %>
                        <tr>
                           <td colspan='6' background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                        </tr>
                     </table>
                     <br>
                     <!-- END OF SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                  <%End If%>
               </td>
           <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
         </tr>
      </table>
      <!-- END MIDDLE --------></td>
   </tr>
</table>
<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>
<%
Call Destroy_All_Objects
%>