Subversion Repositories DevTools

Rev

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