Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 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
%>
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
35
Dim	rsQry
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
52
	Response.Redirect ("dependencies.asp?rtag_id="& Request("rtag_id"))
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 -------------------------------------->
70
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"> 
71
  <!----------------------------------------------------->
72
</div>
73
<!-- HEADER -->
74
<!--#include file="_header.asp"-->
75
<!-- BODY ---->
76
<table width="100%" border="0" cellspacing="0" cellpadding="0">
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 -->
85
 
86
 
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
				<%
98
				  If InStr( parKeyword, "*") > 0 Then
99
				  	KeyWord = Replace( parKeyword, "*", "%" )
100
				  Else
101
				  	KeyWord = "%"& parKeyword &"%"
102
				  End If
103
 
104
				  OraDatabase.Parameters.Add "KEYWORD", 	KeyWord, ORAPARM_INPUT, ORATYPE_VARCHAR2
105
				  OraDatabase.Parameters.Add "RTAG_ID", 	parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
106
				  OraDatabase.Parameters.Add "SEARCH_AREA", nEnvTab, ORAPARM_INPUT, ORATYPE_NUMBER
107
				  OraDatabase.Parameters.Add "RECORD_SET",	NULL, 	ORAPARM_OUTPUT, 	ORATYPE_CURSOR
108
				  OraDatabase.Parameters.Add "PAGE_SIZE", 	MaxRows, ORAPARM_INPUT, ORATYPE_NUMBER
109
 
110
				  If parSearchType = "1" Then
111
				  	' Package Search
112
				  	OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_PACKAGE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :RECORD_SET );  END;"
113
 
114
				  ElseIf parSearchType = "2" Then
115
 
116
				  	' File Search
117
				  	OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.FIND_FILE ( :KEYWORD, :RTAG_ID, :SEARCH_AREA, :PAGE_SIZE, :RECORD_SET );  END;"
118
 
119
				  End If
120
 
121
 
122
				  Set rsRep = OraDatabase.Parameters("RECORD_SET").Value
123
 
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
 
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><%=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
				  <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;"><a href="javascript:;" onClick="ExpandAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Show All Reasons for Release."><img src="icons/b_expand_all.gif" border="0" align="absmiddle" hspace="3"></a>Reason&nbsp;for&nbsp;Release</SPAN>
162
					<SPAN id="IMG_COLLAPSE_ALL_REASONS" name="IMG_COLLAPSE_ALL_REASONS" style="display:none;"><a href="javascript:;" onClick="CollapseAll(); ToggleDisplay('IMG_EXPAND_ALL_REASONS','IMG_COLLAPSE_ALL_REASONS');" title="Hide All Reasons for Release."><img src="icons/b_collapse_all.gif" border="0" align="absmiddle" hspace="3"></a>Reason&nbsp;for&nbsp;Release</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
 
182
				  %>
183
					  <tr> 
184
					    <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
185
						<td class="body_txt" valign="top" bgcolor="#F5F5F5"><%=Highlight_Substring( rsRep("pkg_name"), parKeyword )%></td>
186
						<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>
187
						<td class="body_txt" valign="top" bgcolor="#F5F5F5"><%= GetEnvName(rsRep("env_area")) &"&nbsp;/&nbsp;"& rsRep("view_name")%></td>
188
						<td valign="top"  bgcolor="#F5F5F5" >
189
						<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")%>');">
190
							<a href="#" class="row_txt_area" title="Click to see more...">Click to see more...</a>
191
						</DIV>
192
						<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")%>');">
193
							<a href="#" class="body_txt" title="Click to hide."><%=NewLine_To_BR ( To_HTML( rsRep("comments") ) )%></a>
194
						</DIV>
195
						</td>
196
						<td nowrap class="body_txt" valign="top" bgcolor="#F5F5F5"><%= "<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") )%></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
 
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
 
233
				  	If IsNull(rsRep("file_path")) Then
234
						Call Get_Pkg_Short_Info(  rsRep("patch_id"), NULL, NULL, sPkgVersion, NULL, NULL, NULL )
235
						sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& sPkgVersion &"/"& rsRep("file_name")
236
					Else
237
						sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_path") & rsRep("file_name"), "\", "/" )
238
					End If
239
				  %>
240
					  <tr> 
241
						<td class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=Highlight_Substring( rsRep("file_name"), parKeyword )%></td>
242
						<td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("file_path")%></td>
243
						<td nowrap class="body_row"  bgcolor="#F5F5F5"><%=rsRep("pkg_name")%></td>
244
						<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>
245
						<td nowrap class="body_txt_gray"  bgcolor="#F5F5F5"><%=rsRep("crc_cksum")%></td>
246
					  </tr>
247
				  <%  rsRep.MoveNext
248
				  WEnd
249
 
250
				  rsRep.Close()
251
				  %>
252
				  <tr> 
253
					<td colspan='6' background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
254
				  </tr>
255
				</table>
256
				<br>				
257
				<!-- END OF SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->			
258
 
259
		<%End If%>				
260
 
261
				</td>
262
			  <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
263
			</tr>
264
		  </table>
265
 
266
 
267
 
268
 
269
		<!-- END MIDDLE --------></td>
270
	</tr>
271
</table>
272
<!-- FOOTER -->
273
<!--#include file="_footer.asp"-->
274
</body>
275
</html>
276
<%
277
Call Destroy_All_Objects
278
%>