| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| view by version |
|
|
|
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="class/classSortHelper.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_general.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ Variable Definition -------------
|
|
|
26 |
Dim rsRep
|
|
|
27 |
Dim parFPkgVersion
|
|
|
28 |
Dim sLink
|
|
|
29 |
Dim parPkgId
|
|
|
30 |
Dim PackageName
|
|
|
31 |
Dim imgLock
|
|
|
32 |
Dim DestroyPackage
|
|
|
33 |
Dim CanDestroyPackage
|
|
|
34 |
'------------ Constants Declaration -----------
|
|
|
35 |
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
|
|
|
36 |
Const IMG_NOT_OFFICIAL = "<img src='images/spacer.gif' width='7' height='10' hspace='5' vspace='2'>"
|
|
|
37 |
'------------ Variable Init -------------------
|
|
|
38 |
parFPkgVersion = Request("fpkgversion")
|
|
|
39 |
If parFPkgVersion = "" Then parFPkgVersion = "*"
|
|
|
40 |
|
|
|
41 |
parPkgId = Request("pkg_id")
|
|
|
42 |
|
|
|
43 |
'----------------------------------------------
|
|
|
44 |
%>
|
|
|
45 |
<%
|
|
|
46 |
'-----------------------------------------------------------------------------------------------------------------------
|
|
|
47 |
Function GetPackageName ( nPkgId )
|
|
|
48 |
Dim rsQry, query
|
|
|
49 |
|
|
|
50 |
query = _
|
|
|
51 |
" SELECT PKG_NAME FROM PACKAGES WHERE PKG_ID = :PKG_ID"
|
|
|
52 |
|
|
|
53 |
OraDatabase.Parameters.Add "PKG_ID", nPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
54 |
|
|
|
55 |
Set rsQry = OraDatabase.DbCreateDynaset( query, 0 )
|
|
|
56 |
|
|
|
57 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
58 |
|
|
|
59 |
GetPackageName = rsQry("pkg_name")
|
|
|
60 |
|
|
|
61 |
rsQry.Close()
|
|
|
62 |
Set rsQry = nothing
|
|
|
63 |
End Function
|
|
|
64 |
'-----------------------------------------------------------------------------------------------------------------------
|
|
|
65 |
%>
|
|
|
66 |
<%
|
|
|
67 |
'==================== MAIN LINE ===============================
|
|
|
68 |
If (parPkgId = "") Then Response.Redirect ("index.asp")
|
|
|
69 |
|
|
|
70 |
PackageName = GetPackageName ( parPkgId )
|
|
|
71 |
'==============================================================
|
|
|
72 |
%>
|
|
|
73 |
<html>
|
|
|
74 |
<head>
|
|
|
75 |
<title>Release Manager</title>
|
|
|
76 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
77 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
78 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
79 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
80 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
81 |
<!-- DROPDOWN MENUS -->
|
|
|
82 |
<!--#include file="_menu_def.asp"-->
|
|
|
83 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
84 |
</head>
|
|
|
85 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
86 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
87 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
88 |
</div>
|
|
|
89 |
<!-- HEADER -->
|
|
|
90 |
<%If objAccessControl.UserLogedIn Then%>
|
|
|
91 |
<div id="Layer1" style="position:absolute; left:2; top:2; width:1px; height:1px; z-index:1"><a href="_Logout.asp"><img src="images/i_logout.gif" width="14" height="14" border="0" alt="Logout from <%=objAccessControl.UserName%>" title="Logout from <%=objAccessControl.UserName%>"></a></div>
|
|
|
92 |
<%End If%>
|
|
|
93 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
94 |
<tr>
|
|
|
95 |
<td><a href="index.asp"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
|
|
|
96 |
<td valign="bottom" align="right"><%Call Print_TopRight_Menu_ROW1 ()%></td>
|
|
|
97 |
</tr>
|
|
|
98 |
<tr>
|
|
|
99 |
<td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
|
|
|
100 |
<td background="images/h_dot.gif" height="1"></td>
|
|
|
101 |
</tr>
|
|
|
102 |
</table>
|
|
|
103 |
<!-- BODY ---->
|
|
|
104 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
105 |
<tr>
|
|
|
106 |
<td width="1%" background="images/bg_home_orange.gif" valign="top">
|
|
|
107 |
<!--#include file="_front_explorer.asp"-->
|
|
|
108 |
</td>
|
|
|
109 |
<td rowspan="2" valign="top">
|
|
|
110 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
111 |
<tr>
|
|
|
112 |
<td >
|
|
|
113 |
|
|
|
114 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
115 |
<tr>
|
|
|
116 |
<td width="1%"></td>
|
|
|
117 |
<td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
|
|
|
118 |
<td width="1%"></td>
|
|
|
119 |
</tr>
|
|
|
120 |
<tr>
|
|
|
121 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
|
|
|
122 |
<td bgcolor="#FFFFFF" valign="top">
|
|
|
123 |
<!-- PACKAGE SEARCH ------------------------------------------------>
|
|
|
124 |
<%
|
|
|
125 |
|
|
|
126 |
Dim aVersions
|
|
|
127 |
Dim lastRow
|
|
|
128 |
Dim objSortHelper
|
|
|
129 |
Dim i
|
|
|
130 |
|
|
|
131 |
OraDatabase.Parameters.Add "PKG_VERSION", Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
132 |
OraDatabase.Parameters.Add "PKG_ID", parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
133 |
|
|
|
134 |
Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql"), 0 )
|
|
|
135 |
|
|
|
136 |
OraDatabase.Parameters.Remove "PKG_ID"
|
|
|
137 |
OraDatabase.Parameters.Remove "PKG_VERSION"
|
|
|
138 |
|
|
|
139 |
|
|
|
140 |
%>
|
|
|
141 |
|
|
|
142 |
<table width="100%" border="0" cellspacing="0" cellpadding="5">
|
|
|
143 |
<tr>
|
|
|
144 |
<td class="body_sect">Package Versions</td>
|
|
|
145 |
</tr>
|
|
|
146 |
<tr>
|
|
|
147 |
<td nowrap bgcolor="#E4E9EC" class="body_txt">
|
|
|
148 |
Results for <b><%=PackageName%></b>
|
|
|
149 |
</td>
|
|
|
150 |
</tr>
|
|
|
151 |
</table>
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
<table width="100%" border="0" cellspacing="1" cellpadding="5">
|
|
|
156 |
<form name="versions" method="get" action="<%=ScriptName%>">
|
|
|
157 |
<input type="hidden" name="pkg_id" value="<%=parPkgId%>">
|
|
|
158 |
<input type="hidden" name="listby" value="<%=parListBy%>">
|
|
|
159 |
<tr>
|
|
|
160 |
<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
|
|
|
161 |
<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
|
|
|
162 |
<td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td>
|
|
|
163 |
<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Last Modified</td>
|
|
|
164 |
<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
|
|
|
165 |
</tr>
|
|
|
166 |
<tr>
|
|
|
167 |
<td nowrap bgcolor="#E4E9EC"></td>
|
|
|
168 |
<td nowrap bgcolor="#E4E9EC"><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
|
|
|
169 |
<td nowrap bgcolor="#E4E9EC"></td>
|
|
|
170 |
<td nowrap bgcolor="#E4E9EC"></td>
|
|
|
171 |
<td nowrap bgcolor="#E4E9EC"></td>
|
|
|
172 |
</tr>
|
|
|
173 |
<%
|
|
|
174 |
' Descending order
|
|
|
175 |
If rsRep.RecordCount = 0 Then
|
|
|
176 |
|
|
|
177 |
With Response
|
|
|
178 |
.write "<tr>"
|
|
|
179 |
.write "<td colspan='5' class='body_row'>Found 0 records.</td>"
|
|
|
180 |
.write "</tr>"
|
|
|
181 |
End With
|
|
|
182 |
|
|
|
183 |
Else
|
|
|
184 |
|
|
|
185 |
aVersions = rsRep.GetRows()
|
|
|
186 |
lastRow = UBound( aVersions, 2 )
|
|
|
187 |
|
|
|
188 |
Set objSortHelper = New SortHelper
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
' Sort versions
|
|
|
192 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
|
|
|
193 |
|
|
|
194 |
|
|
|
195 |
DestroyPackage = ""
|
|
|
196 |
CanDestroyPackage = objAccessControl.IsVisible ( "DestroyPackage" )
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
' Descending order
|
|
|
200 |
For i = lastRow To 0 Step -1
|
|
|
201 |
imgLock = IMG_NOT_OFFICIAL
|
|
|
202 |
If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y") OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
|
|
|
203 |
imgLock = IMG_OFFICIAL
|
|
|
204 |
End If
|
|
|
205 |
|
|
|
206 |
sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
|
|
|
207 |
|
|
|
208 |
' Set destroy package action
|
|
|
209 |
If CanDestroyPackage Then
|
|
|
210 |
DestroyPackage = "<a href='_destroy_package.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i ) &"&bfile="& ScriptName &"&pkg_id="& parPkgId &"&listby="& parListBy &"' "&_
|
|
|
211 |
" title='Destroy this package from the database.' "&_
|
|
|
212 |
" onClick='return confirmAction(""You are about to destroy ["& PackageName &" "& aVersions( rsRep.FieldIndex("pkg_version"), i ) &"]. You cannot undo this operation.\nDo you want to proceed?"");' ><img src='icons/i_destroy_package_sml.gif' width='15' height='15' border='0' ><a>"
|
|
|
213 |
End If
|
|
|
214 |
%>
|
|
|
215 |
<tr>
|
|
|
216 |
<td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
|
|
|
217 |
<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
|
|
|
218 |
<td class="body_txt_gray" valign="top" bgcolor="#F5F5F5"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
|
|
|
219 |
<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><%= "<a href='mailto:"& aVersions( rsRep.FieldIndex("user_email"), i ) &"' class='txt_linked'><img src='images/i_user.gif' width='10' height='13' hspace='2' border='0' align='absmiddle' alt='"& aVersions( rsRep.FieldIndex("full_name"), i ) &" <"& aVersions( rsRep.FieldIndex("user_email"), i ) &">'>"& aVersions( rsRep.FieldIndex("full_name"), i ) &"</a> "& EuroDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td>
|
|
|
220 |
<td valign="top" bgcolor="#F5F5F5"><%=DestroyPackage%></td>
|
|
|
221 |
</tr>
|
|
|
222 |
<%
|
|
|
223 |
|
|
|
224 |
Next
|
|
|
225 |
|
|
|
226 |
rsRep.Close()
|
|
|
227 |
|
|
|
228 |
End If
|
|
|
229 |
%>
|
|
|
230 |
<tr>
|
|
|
231 |
<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
232 |
</tr>
|
|
|
233 |
|
|
|
234 |
</form>
|
|
|
235 |
</table>
|
|
|
236 |
<br>
|
|
|
237 |
<!------------------------------------------------------------>
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
</td>
|
|
|
241 |
<td background="images/lbox_bgside_white.gif"> </td>
|
|
|
242 |
</tr>
|
|
|
243 |
</table>
|
|
|
244 |
|
|
|
245 |
</td>
|
|
|
246 |
</tr>
|
|
|
247 |
</table>
|
|
|
248 |
</td>
|
|
|
249 |
<td width="11%"> </td>
|
|
|
250 |
</tr>
|
|
|
251 |
<tr>
|
|
|
252 |
<td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td>
|
|
|
253 |
<td> </td>
|
|
|
254 |
</tr>
|
|
|
255 |
</table>
|
|
|
256 |
<!-- FOOTER -->
|
|
|
257 |
<!--#include file="_footer.asp"-->
|
|
|
258 |
</body>
|
|
|
259 |
</html>
|