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
'|				        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 -->
2365 dpurdie 90
<!--#include file="_header.asp"-->
119 ghuddy 91
<!-- BODY ---->
92
<table width="100%" border="0" cellspacing="0" cellpadding="0">
93
  <tr> 
94
    <td width="1%" background="images/bg_home_orange.gif" valign="top">
95
      <!--#include file="_front_explorer.asp"-->
96
    </td>
97
    <td rowspan="2" valign="top"> 
98
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
99
        <tr> 
100
          <td >
101
 
102
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
103
			<tr> 
104
			  <td width="1%"></td>
105
			  <td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
106
			  <td width="1%"></td>
107
			</tr>
108
			<tr> 
109
			  <td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
110
			  <td bgcolor="#FFFFFF" valign="top"> 
111
				<!-- PACKAGE SEARCH ------------------------------------------------>
112
				<%
113
 
114
				Dim aVersions
115
				Dim lastRow
116
				Dim objSortHelper
117
				Dim i
118
 
119
				OraDatabase.Parameters.Add "PKG_VERSION", 	Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
120
				OraDatabase.Parameters.Add "PKG_ID", 	parPkgId, ORAPARM_INPUT, ORATYPE_NUMBER
121
 
122
			  	Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindPackageVersion.sql"), 0 )
123
 
124
				OraDatabase.Parameters.Remove "PKG_ID"
125
				OraDatabase.Parameters.Remove "PKG_VERSION"
126
 
127
 
128
				%>
129
 
130
				<table width="100%"  border="0" cellspacing="0" cellpadding="5">
131
				  <tr>
132
                    <td class="body_sect">Package Versions</td>
133
                  </tr>
134
                  <tr>
135
                    <td nowrap bgcolor="#E4E9EC" class="body_txt">
136
						Results for <b><%=PackageName%></b>
137
					</td>
138
                  </tr>
139
                </table>
140
 
141
 
142
 
143
				<table width="100%" border="0" cellspacing="1" cellpadding="5">
144
				<form name="versions" method="get" action="<%=ScriptName%>">
145
				  <input type="hidden" name="pkg_id" value="<%=parPkgId%>">
146
				  <input type="hidden" name="listby" value="<%=parListBy%>">
147
				 <tr>
148
                    <td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
149
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Version</td>
150
					<td width="60%" nowrap class="body_col" bgcolor="#E4E9EC">Reason for Release</td>
151
					<td width="20%" nowrap class="body_col" bgcolor="#E4E9EC">Last Modified</td>
152
					<td width="1" nowrap class="body_col" bgcolor="#E4E9EC"></td>
153
                  </tr>
154
				  <tr>
155
                    <td nowrap bgcolor="#E4E9EC"></td>
156
					<td nowrap bgcolor="#E4E9EC"><input name="fpkgversion" type="text" class="form_item" size="15" value="<%=parFPkgVersion%>"></td>
157
					<td nowrap bgcolor="#E4E9EC"></td>
158
					<td nowrap bgcolor="#E4E9EC"></td>
159
					<td nowrap bgcolor="#E4E9EC"></td>
160
                  </tr>
161
				  <%
162
				  ' Descending order
163
				If rsRep.RecordCount = 0 Then
164
 
165
					With Response
166
						.write "<tr>"
167
						.write "<td colspan='5' class='body_row'>Found 0 records.</td>"
168
						.write "</tr>"
169
					End With
170
 
171
				Else
172
 
173
					aVersions = rsRep.GetRows()
174
					lastRow = UBound( aVersions, 2 )
175
 
176
					Set objSortHelper = New SortHelper
177
 
178
 
179
					' Sort versions
180
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
181
 
182
 
183
					DestroyPackage = ""
184
					CanDestroyPackage = objAccessControl.IsVisible ( "DestroyPackage" )
185
 
186
 
187
				  ' Descending order
188
				  For i = lastRow To 0 Step -1
189
				  	imgLock = IMG_NOT_OFFICIAL
190
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
191
						imgLock = IMG_OFFICIAL
192
					End If
193
 
194
				  	sLink = "dependencies.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )
195
 
196
					' Set destroy package action
197
					If CanDestroyPackage Then
198
						DestroyPackage = "<a href='_destroy_package.asp?pv_id="& aVersions( rsRep.FieldIndex("pv_id"), i )  &"&bfile="& ScriptName &"&pkg_id="& parPkgId &"&listby="& parListBy &"' "&_
199
										 " title='Destroy this package from the database.' "&_
200
										 " 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>"
201
					End If
202
				  %>
203
					  <tr> 
204
					    <td valign="top" bgcolor="#F5F5F5"><%=imgLock%></td>
205
						<td nowrap class="body_row" valign="top" bgcolor="#F5F5F5"><a href="<%=sLink%>" class="body_link"><%=aVersions( rsRep.FieldIndex("pkg_version"), i )%></a></td>
206
						<td class="body_txt_gray" valign="top"  bgcolor="#F5F5F5"><%=NewLine_To_BR ( To_HTML( aVersions( rsRep.FieldIndex("comments"), i ) ) )%></td>
207
						<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 ) &" &lt;"& aVersions( rsRep.FieldIndex("user_email"), i ) &"&gt;'>"& aVersions( rsRep.FieldIndex("full_name"), i ) &"</a> "& EuroDateTime ( aVersions( rsRep.FieldIndex("modified_stamp"), i ) )%></td>
208
						<td valign="top" bgcolor="#F5F5F5"><%=DestroyPackage%></td>
209
					  </tr>
210
				  <%  
211
 
212
				  Next
213
 
214
				  rsRep.Close()
215
 
216
				End If
217
				  %>
218
				  <tr> 
219
					<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
220
				  </tr>
221
 
222
				  </form>
223
				</table>
224
				<br>
225
				<!------------------------------------------------------------>			
226
 
227
 
228
				</td>
229
			  <td background="images/lbox_bgside_white.gif">&nbsp;</td>
230
			</tr>
231
		  </table>
232
 
233
		  </td>
234
        </tr>
235
      </table>
236
    </td>
237
    <td width="11%">&nbsp;</td>
238
  </tr>
239
  <tr> 
240
    <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>
241
    <td>&nbsp;</td>
242
  </tr>
243
</table>
244
<!-- FOOTER -->
245
<!--#include file="_footer.asp"-->
246
</body>
247
</html>