Subversion Repositories DevTools

Rev

Rev 5632 | Rev 6048 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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