Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                     SEARCH RESULT                         |
'|                                        PACKAGES                                           |
'|                                                   |
'=====================================================
%>
<%
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"-->
<%
' Make sure rtag_id is always present
If Request("pv_id") = "" AND Request("rtag_id") = "" Then
        Response.Redirect("index.asp")
End If

objPMod.PersistInQryString ( aPersistList(enumPAR_ADD_TYPE) )
objPMod.PersistInCookie("pkgfind")
%>
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim parAdd_type
Dim parPkgfind
Dim rsFind
Dim parPv_id
Dim RecCount
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parAdd_type = Request("add_type")
parPkgfind = Request("pkgfind")
parPv_id = Request("pv_id")
'----------------------------------------------
%>
<%
Function Page_Title ( NNadd_type )
        If NNadd_type = Cstr(enum_ADD_PACKAGES) Then
                Page_Title = "ADD package"
                
        ElseIf NNadd_type = Cstr(enum_ADD_DEPENDENCIES) Then
                Page_Title = "ADD dependency"
                
        ElseIf NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) Then
                Page_Title = "ADD Runtime Dependency"
                
        Else
                Page_Title = ""
                
        End If
End Function

Function Search_For_Package_Names ( SSpkgfind )
        Dim pkg_name_like, SQLor, pkglistARR
        
        SQLor = ""
        If Len( Replace( SSpkgfind, " ", "" ) ) = 0 Then
                ' Show all pkg names
                SQLor = " OR pkg.pkg_name LIKE '%'"
                
        Else
                ' Search for ...
                pkglistARR = Split( Trim( SSpkgfind ), " ")
                
                If Ubound( pkglistARR ) > 0 Then
                        ' Multiple pkg_name search
                        For Each pkg_name_like In pkglistARR
                                If pkg_name_like <> "" Then
                                        SQLor = SQLor &" OR UPPER(pkg.pkg_name) LIKE UPPER('%"& pkg_name_like &"%')"
                                End If
                        Next
                        
                Else
                        ' Single pkg_name search
                        SQLor = " OR UPPER(pkg.pkg_name) LIKE UPPER('%"& Trim( SSpkgfind ) &"%')"
                End If
                
        End If
        
        Search_For_Package_Names = _
        " SELECT pkg.*"&_
        "  FROM packages pkg"&_
        " WHERE pkg.pkg_id != 0"&_
        "   AND ( pkg.pkg_name = ''"&_
        SQLor &_
        "       )"&_
        "ORDER BY UPPER(pkg.pkg_name)"
        
End Function
%>
<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>
<!-- 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" onload="self.focus();document.pkgnames.btnnext.focus();">
<!-- MENU LAYERS -------------------------------------->
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
</div>
<!-- TIPS LAYERS -------------------------------------->
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
<!----------------------------------------------------->
<!-- HEADER -->
<!--#include file="_header.asp"-->
<!-- BODY ---->
<table width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top" background="images/bg_lght_gray.gif">
        <!-- MIDDLE ---------------------------------------->
        <table width="650" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="1%"></td>
                  <td align="right"><img src="images/h_trsp_dot.gif" width="30" height="30"></td>
                  <td width="1%"></td>
                </tr>
                <tr> 
                  <td width="1%"></td>
                  <td> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                          <td nowrap class="form_ttl"><%=Page_Title ( parAdd_type )%></td>
                        <td align="right" valign="bottom"></td>
                      </tr>
                    </table>
                  </td>
                  <td width="1%"></td>
                </tr>
                <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" align="right"><!-- 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 -->
                  <br>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td valign="bottom" nowrap><span class="form_txt">Search result 
                        for <strong><%=parPkgfind%></strong></span></td>
                      <td align="right" valign="top" nowrap><a href="form_new_pkg_name.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&add_type=<%=parAdd_type%>" class="body_txt_drk"><strong>Not 
                        found what you looking for?</strong><br>
                        <img src="images/i_new_pkg.gif" width="20" height="21" hspace="3" border="0" align="absmiddle">Create 
                        new package name.</a></td>
                    </tr>
                  </table><br>
                  <table width="100%" border="0" cellspacing="1" cellpadding="2">
                                        <form name="pkgnames" method="post" action="form_add_pkg_versions.asp">
                      <tr> 
                        <td colspan="2" valign="bottom" nowrap class="form_txt">Select desired packages and click Next.</td>
                      </tr>
                                          <tr> 
                        <td background="images/bg_form_lightbluedark.gif"></td>
                        <td background="images/bg_form_lightbluedark.gif" class="form_txt"><b>Package Name</b></td>
                      </tr>
                                          <%Set rsFind = OraDatabase.DbCreateDynaset( Search_For_Package_Names ( parPkgfind ), cint(0))%>
                                          <%RecCount = CInt(rsFind.RecordCount)%>
                                          <%While ((NOT rsFind.BOF) AND (NOT rsFind.EOF)) %>
                      <tr> 
                        <td background="images/bg_form_lightgray.gif"><input name="pkg_list" id="pkg_list" type="checkbox" value="<%=rsFind("pkg_id")%>" <%If RecCount = 1 Then%>checked<%End If%>></td>
                        <td background="images/bg_form_lightgray.gif" class="form_txt"><%=Highlight_Substring ( rsFind("pkg_name"), parPkgfind )%></td>
                      </tr>
                                          <%rsFind.MoveNext
                                          WEnd
                                          
                                          rsFind.Close
                                          Set rsFind = nothing
                                          %>
                      <tr> 
                        <td width="1%" nowrap class="form_field">&nbsp; </td>
                        <td nowrap width="100%" class="form_txt">
                                                  <%If Request("errmsg") <> "" Then Call DisplayInfo( "PKG_NAME_REQUIRED", 200 )%>
                                                  <input type="reset" name="btn" value="&laquo; Back" class="form_btn" onClick="history.back();"> 
                          <input type="submit" name="btn" value="Next &raquo;" class="form_btn" id="btnnext"> 
                          <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.go(-2);">
                          <br>
                          <br>
                        </td>
                      </tr>
                                          <input type="hidden" name="pv_id" value="<%=parPv_id%>">
                      <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
                      <input type="hidden" name="add_type" value="<%=parAdd_type%>">
                                          <input type="hidden" name="pkgfind" value="<%=parPkgfind%>">
                    </form>
                  </table>
                    <!-- END Body-->
                  </td>
                  <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</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>
  <tr>
    <td valign="bottom" background="images/bg_lght_gray.gif">
        <!-- FOOTER -->
        <!--#include file="_footer.asp"-->
        </td>
  </tr>
</table>
</body>
</html>
<%
Call Destroy_All_Objects
%>