Subversion Repositories DevTools

Rev

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