Rev 1281 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| SEARCH RESULT |'| PACKAGES |'| |'=====================================================%><%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"--><%' Make sure rtag_id is always presentIf Request("pv_id") = "" AND Request("rtag_id") = "" ThenResponse.Redirect("index.asp")End IfobjPMod.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_typeDim parPkgfindDim rsFindDim parPv_idDim 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) ThenPage_Title = "ADD package"ElseIf NNadd_type = Cstr(enum_ADD_DEPENDENCIES) ThenPage_Title = "ADD dependency"ElseIf NNadd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES) ThenPage_Title = "ADD Runtime Dependency"ElsePage_Title = ""End IfEnd FunctionFunction Search_For_Package_Names ( SSpkgfind )Dim pkg_name_like, SQLor, pkglistARRSQLor = ""If Len( Replace( SSpkgfind, " ", "" ) ) = 0 Then' Show all pkg namesSQLor = " OR pkg.pkg_name LIKE '%'"Else' Search for ...pkglistARR = Split( Trim( SSpkgfind ), " ")If Ubound( pkglistARR ) > 0 Then' Multiple pkg_name searchFor Each pkg_name_like In pkglistARRIf pkg_name_like <> "" ThenSQLor = SQLor &" OR UPPER(pkg.pkg_name) LIKE UPPER('%"& pkg_name_like &"%')"End IfNextElse' Single pkg_name searchSQLor = " OR UPPER(pkg.pkg_name) LIKE UPPER('%"& Trim( SSpkgfind ) &"%')"End IfEnd If' Search may be restricted to those packages that have versions in the specified release, so alter the' query accordingly.If ( (NOT IsNull(parAdd_type)) AND (NOT IsNull(parRtag_id)) AND (parAdd_type = Cstr(enum_ADD_DEPENDENCIES)) ) Then' find all packages matching wildcard, that have versions in the specified release, and that are not already' configured as a build dependency, and that is not the actual package we are configuring dependencies forSearch_For_Package_Names = _" SELECT pkg.*, pv.pv_id, pv.v_ext"&_" FROM packages pkg, release_content rc, package_versions pv"&_" WHERE pkg.pkg_id != 0"&_" AND pv.pkg_id = pkg.pkg_id"&_" AND pv.pv_id = rc.pv_id"&_" AND rc.pv_id NOT IN (SELECT pd.dpv_id FROM package_dependencies pd WHERE pd.pv_id = "& parPv_id & ")"&_" AND pkg.pkg_id NOT IN (SELECT pvv.pkg_id FROM package_versions pvv WHERE pvv.pv_id = "& parPv_id & ")"&_" AND rc.rtag_id = "& parRtag_id &_" AND ( pkg.pkg_name = ''"&_SQLor &_" )"&_"ORDER BY UPPER(pkg.pkg_name)"ElseIf ( (NOT IsNull(parAdd_type)) AND (NOT IsNull(parRtag_id)) AND (parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES)) ) Then' find all packages matching wildcard, that have versions in the specified release, and that are not already' configured as a runtime dependency, and that is not the actual package we are configuring dependencies forSearch_For_Package_Names = _" SELECT pkg.*, pv.pv_id, pv.v_ext"&_" FROM packages pkg, release_content rc, package_versions pv"&_" WHERE pkg.pkg_id != 0"&_" AND pv.pkg_id = pkg.pkg_id"&_" AND pv.pv_id = rc.pv_id"&_" AND pv.pv_id NOT IN (SELECT rtd.rtd_id FROM runtime_dependencies rtd WHERE rtd.pv_id = "& parPv_id & ")"&_" AND pkg.pkg_id NOT IN (SELECT pvv.pkg_id FROM package_versions pvv WHERE pvv.pv_id = "& parPv_id & ")"&_" AND rc.rtag_id = "& parRtag_id &_" AND ( pkg.pkg_name = ''"&_SQLor &_" )"&_"ORDER BY UPPER(pkg.pkg_name)"Else' simply find all packages matching wildcard, regardless of the specified release or any other constraint' This is needed when user is adding package versions to a release.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 IfEnd IfEnd 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"> </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_version.asp?rtag_id=<%=parRtag_id%>&pkgName=<%=parPkgfind%>" 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?add_type=<%=parAdd_type%>"><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"><%If ( (NOT IsNull(parAdd_type)) AND ((parAdd_type = Cstr(enum_ADD_DEPENDENCIES)) OR (parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES))) ) Then%><input name="pkg_list" id="pkg_list" type="checkbox" value="<%=rsFind("pv_id")%>" <%If RecCount = 1 Then%>checked<%End If%>><%Else%><input name="pkg_list" id="pkg_list" type="checkbox" value="<%=rsFind("pkg_id")%>" <%If RecCount = 1 Then%>checked<%End If%>><%End If%></td><td background="images/bg_form_lightgray.gif" class="form_txt"><%Dim ver_extver_ext = ""If ( (NOT IsNull(parAdd_type)) AND (NOT IsNull(parRtag_id)) AND ((parAdd_type = Cstr(enum_ADD_DEPENDENCIES)) OR (parAdd_type = Cstr(enum_ADD_RUNTIME_DEPENDENCIES))) ) Thenver_ext = rsFind("v_ext")If NOT IsNull(ver_ext) AND ver_ext <> "" Then' Remove leading dot character, if there is oneIf Left(ver_ext,1) = "." AND Len(ver_ext) > 1 Thenver_ext = Mid(ver_ext, 2, Len(ver_ext)-1)Elsever_ext = ""End IfEnd IfEnd If%><%If NOT IsNull(ver_ext) AND Len(ver_ext) > 0 Then%><%=Highlight_Substring ( rsFind("pkg_name"), parPkgfind )%>    (<%=ver_ext%>)<%Else%><%=Highlight_Substring ( rsFind("pkg_name"), parPkgfind )%><%End If%></td></tr><%rsFind.MoveNextWEndrsFind.CloseSet rsFind = nothing%><tr><td width="1%" nowrap class="form_field"> </td><td nowrap width="100%" class="form_txt"><%If Request("errmsg") <> "" Then Call DisplayInfo( "PKG_NAME_REQUIRED", 200 )%><input type="reset" name="btn" value="« Back" class="form_btn" onClick="history.back();"><input type="submit" name="btn" value="Next »" 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"> </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%>