Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
123 ghuddy 5
'|                    FIND                           |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
123 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="common/common_dbedit.asp"-->
20
<!--#include file="_tabs.asp"-->
21
<!--#include file="common/_package_common.asp"-->
22
<%
23
'------------ ACCESS CONTROL ------------------
24
%>
25
<!--#include file="_access_control_general.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim KeyWord
29
Dim parKeyword
30
Dim parRtagId
31
Dim rsRep
32
Dim imgLock
33
Dim parSearchType
34
Dim sLink
123 ghuddy 35
Dim   rsQry
119 ghuddy 36
Dim sPkgVersion
37
'------------ Constants Declaration -----------
38
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
39
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
40
Const MaxRows = 100
41
'------------ Variable Init -------------------
42
parKeyword = Request("keyword")
43
parRtagId = Request("rtag_id")
44
parSearchType = Request("searchtype")
45
'----------------------------------------------
46
%>
47
<%
48
'==================== MAIN LINE ===============================
49
 
50
' Check for Required parameters
51
If (parSearchType = "")  OR  (nEnvTab = "") Then
123 ghuddy 52
   Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
119 ghuddy 53
End If
54
'==============================================================
55
%>
56
<html>
57
<head>
58
<title><%=Title(parRtagId)%></title>
59
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
60
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
61
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
62
<link rel="stylesheet" href="images/navigation.css" type="text/css">
63
<script language="JavaScript" src="images/common.js"></script>
5085 dpurdie 64
<!--#include file="_jquery_includes.asp"-->
119 ghuddy 65
<!-- DROPDOWN MENUS -->
66
<!--#include file="_menu_def.asp"-->
67
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
68
</head>
69
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
70
<!-- MENU LAYERS -------------------------------------->
123 ghuddy 71
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
119 ghuddy 72
  <!----------------------------------------------------->
73
</div>
74
<!-- HEADER -->
75
<!--#include file="_header.asp"-->
76
<!-- BODY ---->
77
<table width="100%" border="0" cellspacing="0" cellpadding="0">
123 ghuddy 78
   <tr>
79
      <td valign="top" width="1" background="images/bg_bage.gif">
80
         <!-- LEFT -->
81
         <!--#include file="_environment.asp"-->
82
      </td>
83
      <td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
84
      <td valign="top" width="100%">
85
         <!-- MIDDLE -->
119 ghuddy 86
 
123 ghuddy 87
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
88
            <tr>
89
               <td width="1%"></td>
90
               <td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
91
               <td width="1%"></td>
92
            </tr>
93
            <tr>
94
               <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="480"></td>
95
               <td bgcolor="#FFFFFF" valign="top">
96
                  <%
97
                  If InStr( Trim(parKeyword), "*") > 0 Then
98
                     KeyWord = Replace( Trim(parKeyword), "*", "%" )
99
                  Else
100
                     KeyWord = "%"& Trim(parKeyword) &"%"
101
                  End If
119 ghuddy 102
 
123 ghuddy 103
                  OraDatabase.Parameters.Add "KEYWORD",    KeyWord, ORAPARM_INPUT, ORATYPE_VARCHAR2
104
                  OraDatabase.Parameters.Add "RTAG_ID",    parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
105
                  OraDatabase.Parameters.Add "SEARCH_AREA", nEnvTab, ORAPARM_INPUT, ORATYPE_NUMBER
106
                  OraDatabase.Parameters.Add "RECORD_SET",   NULL,    ORAPARM_OUTPUT,    ORATYPE_CURSOR
107
                  OraDatabase.Parameters.Add "PAGE_SIZE",    MaxRows, ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 108
 
123 ghuddy 109
                  If parSearchType = "1" Then
110
                     ' Package Search
111
                     OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_PACKAGE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :RECORD_SET );  END;"
112
                  ElseIf parSearchType = "2" Then
113
                     ' File Search
114
                     OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_FILE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :PAGE_SIZE, :RECORD_SET );  END;"
115
                  End If
119 ghuddy 116
 
123 ghuddy 117
                  Set rsRep = OraDatabase.Parameters("RECORD_SET").Value
118
 
119
                  OraDatabase.Parameters.Remove "KEYWORD"
120
                  OraDatabase.Parameters.Remove "RTAG_ID"
121
                  OraDatabase.Parameters.Remove "SEARCH_AREA"
122
                  OraDatabase.Parameters.Remove "PAGE_SIZE"
123
                  OraDatabase.Parameters.Remove "RECORD_SET"
124
                  %>
125
 
126
                  <table width="100%"  border="0" cellspacing="0" cellpadding="5">
127
                     <tr>
128
                        <td>
129
                           <%If parSearchType = "1" Then%>
130
                              <span class="body_sect">Find Package</span>
131
                           <%ElseIf parSearchType = "2" Then%>
132
                              <span class="body_sect">Find File</span>
133
                           <%End If%>
134
                        </td>
135
                     </tr>
136
                     <tr>
137
                        <td nowrap bgcolor="#E4E9EC" class="body_txt">
138
                           Results for <b><%=Trim(parKeyword)%></b><%If parSearchType = "2" Then%>. Showing max. <%=MaxRows%> results.<%End If%>
139
                        </td>
140
                     </tr>
141
                  </table>
142
 
143
 
144
                  <%If parSearchType = "1" Then%>
145
                     <!-- PACKAGE SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
146
                     <table width="100%" border="0" cellspacing="1" cellpadding="5">
147
                        <form name="frm" method="get" action="<%=ScriptName%>">
148
                           <tr>
149
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
150
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Package&nbsp;Name</td>
151
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
152
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Location</td>
153
                              <td width="100%" nowrap class="body_col" bgcolor="#E4E9EC">
154
                                 <SPAN id="IMG_EXPAND_ALL_REASONS" name="IMG_EXPAND_ALL_REASONS" style="display:block;">
155
                                    <a href="javascript:;" onClick="ExpandAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Show All Reasons for Release.">
156
                                       <img src="icons/b_expand_all.gif" border="0" align="absmiddle" hspace="3">
157
                                    </a>Reason&nbsp;for&nbsp;Release
158
                                 </SPAN>
159
                                 <SPAN id="IMG_COLLAPSE_ALL_REASONS" name="IMG_COLLAPSE_ALL_REASONS" style="display:none;">
160
                                    <a href="javascript:;" onClick="CollapseAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Hide All Reasons for Release.">
161
                                       <img src="icons/b_collapse_all.gif" border="0" align="absmiddle" hspace="3">
162
                                    </a>Reason&nbsp;for&nbsp;Release
163
                                 </SPAN>
164
                              </td>
165
                              <td width="1" nowrap class="body_col" bgcolor="#E4E9EC">Last&nbsp;Modified</td>
166
                           </tr>
167
                           <%
168
                           If rsRep.RecordCount = 0 Then
169
                              With Response
170
                                 .write "<tr>"
171
                                 .write "<td colspan='6' class='body_row'>Found 0 records.</td>"
172
                                 .write "</tr>"
173
                              End With
174
                           End If
175
 
176
                           While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
177
 
178
                              imgLock = IMG_NOT_OFFICIAL
179
                              If (rsRep("dlocked") = "Y") OR (rsRep("dlocked") = "A") Then
180
                                 imgLock = IMG_OFFICIAL
181
                              End If%>
182
                              <tr>
183
                                 <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
184
                                 <td class="body_txt" valign="top" bgcolor="#F5F5F5"><%=Highlight_Substring( rsRep("pkg_name"), Trim(parKeyword) )%></td>
185
                                 <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>
186
                                 <td class="body_txt" valign="top" bgcolor="#F5F5F5"><%= GetEnvName(rsRep("env_area")) &"&nbsp;/&nbsp;"& rsRep("view_name")%></td>
187
                                 <td valign="top"  bgcolor="#F5F5F5" >
188
                                    <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")%>');">
189
                                       <a href="#" class="row_txt_area" title="Click to see more...">Click to see more...</a>
190
                                    </DIV>
191
                                    <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")%>');">
192
                                       <a href="#" class="body_txt" title="Click to hide."><%=NewLine_To_BR ( To_HTML( rsRep("comments") ) )%></a>
193
                                    </DIV>
194
                                 </td>
195
                                 <td nowrap class="body_txt" valign="top" bgcolor="#F5F5F5">
196
                                    <%= "<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") )%>
197
                                 </td>
198
                              </tr>
199
                           <%  rsRep.MoveNext
200
                           WEnd
201
 
202
                           rsRep.Close()
203
                           %>
204
                           <tr>
205
                              <td colspan='6' background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
206
                           </tr>
207
                        </form>
208
                     </table>
209
                     <br>
210
 
211
                  <%ElseIf parSearchType = "2" Then%>
212
                     <!-- FILE SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
213
                     <table width="100%" border="0" cellspacing="1" cellpadding="5">
214
                        <tr>
215
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">File Name</td>
216
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Path</td>
217
                           <td width="20" nowrap class="body_col" bgcolor="#E4E9EC">Package&nbsp;Name</td>
218
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
219
                           <td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">CheckSum&nbsp;(CKSUM)</td>
220
                        </tr>
221
                        <%
222
                        If rsRep.RecordCount = 0 Then
223
                           With Response
224
                              .write "<tr>"
225
                              .write "<td colspan='5' class='body_row'>Found 0 records.</td>"
226
                              .write "</tr>"
227
                           End With
228
                        End If
229
 
230
                        While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
231
 
232
                           If IsNull(rsRep("file_path")) Then
233
                              ' DEVI-050252 - must not call Get_Pkg_Short_Info() with a null or empty string, so check the patch_id before doing so.
234
                              If IsNull(rsRep("patch_id")) OR rsRep("patch_id") = "" Then
235
                                 sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_name"), "\", "/" )
236
                              Else
237
                                 Call Get_Pkg_Short_Info(  rsRep("patch_id"), NULL, NULL, sPkgVersion, NULL, NULL, NULL )
238
                                 sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& sPkgVersion &"/"& rsRep("file_name")
239
                              End If
240
                           Else
241
                              sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_path") & rsRep("file_name"), "\", "/" )
242
                           End If
243
                           %>
244
                           <tr>
245
                              <td class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=Highlight_Substring( rsRep("file_name"), Trim(parKeyword) )%></td>
246
                              <td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("file_path")%></td>
247
                              <td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("pkg_name")%></td>
248
                              <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>
249
                              <td nowrap class="body_txt_gray"  bgcolor="#F5F5F5"><%=rsRep("crc_cksum")%></td>
250
                           </tr>
251
                           <%  rsRep.MoveNext
252
                        WEnd
253
 
254
                        rsRep.Close()
255
                        %>
256
                        <tr>
257
                           <td colspan='6' background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
258
                        </tr>
259
                     </table>
260
                     <br>
261
                     <!-- END OF SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
262
                  <%End If%>
263
               </td>
264
           <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
265
         </tr>
266
      </table>
267
      <!-- END MIDDLE --------></td>
268
   </tr>
119 ghuddy 269
</table>
270
<!-- FOOTER -->
271
<!--#include file="_footer.asp"-->
272
</body>
273
</html>
274
<%
275
Call Destroy_All_Objects
276
%>