Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
4
Response.Expires = 0	' always load the page, dont store
5
%>
6
<%
7
'=====================================================
8
'					Gey Version
9
'=====================================================
10
%>
11
<!--#include file="common/conf.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/qstr.asp"-->
14
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
16
<!--#include file="class/classSortHelper.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_general.asp"-->
21
<%
22
'------------ Variable Definition -------------
23
Dim parPkg_id
24
Dim parPkg_name
25
Dim parRfield
26
Dim parPv_id
27
Dim rsLatest
28
Dim parHidePatches
29
Dim aVersions
30
Dim lastRow, i
31
Dim objSortHelper
32
'------------ Constants Declaration -----------
33
'------------ Variable Init -------------------
34
parPkg_id = QStrPar("pkg_id")
35
parPkg_name = QStrPar("pkg_name")
36
parRfield = QStrPar("rfield")
37
If Request("pv_id") <> "" Then
38
	parPv_id = Request("pv_id")
39
Else
40
	parPv_id = -1 
41
End If	
42
parHidePatches = Request("hidepatches")
43
'----------------------------------------------
44
%>
45
<%
46
Sub Get_Pkg_Info_From_Rel ( SSrtag_id, SSpv_id )
47
	Dim rsTemp, Query_String
48
 
49
	Query_String = _
50
	" SELECT pkg.pkg_name, pv.pkg_version, gr.group_id"&_
51
	"  FROM PACKAGES pkg, package_versions pv, release_content rc, GROUPS gr"&_
52
	" WHERE     pkg.pkg_id = pv.pkg_id"&_
53
	"        AND pv.pv_id = rc.pv_id"&_
54
	"        AND gr.group_id = rc.group_id"&_
55
	"        AND rc.rtag_id = "& SSrtag_id &_
56
	"        AND rc.pv_id = "& SSpv_id
57
 
58
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
59
 
60
	If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
61
		pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
62
		pkgInfoHash.Add "pkg_version", (rsTemp.Fields("pkg_version"))
63
		pkgInfoHash.Add "group_id", (rsTemp.Fields("group_id"))
64
	End If
65
 
66
	rsTemp.Close
67
	Set rsTemp = nothing
68
End Sub
69
 
70
 
71
Function Get_Latest_All_Ext ( NNpkg_id, nPv_id )
72
	Get_Latest_All_Ext = _
73
	" SELECT pv.pkg_version, pv.dlocked,"&_
74
	"        DECODE ( pv.pv_id, "& nPv_id &", 'selected', NULL ) AS selected"&_
75
	"    FROM PACKAGES pkg, package_versions pv"&_
76
	"   WHERE pkg.pkg_id = pv.pkg_id  AND  pkg.pkg_id = "& NNpkg_id
77
 
78
	If parHidePatches <> "" Then Get_Latest_All_Ext = Get_Latest_All_Ext &" AND pv.is_patch IS NULL"
79
 
80
	'Get_Latest_All_Ext = Get_Latest_All_Ext &"   ORDER BY pv.v_ext ASC, pv.pkg_version ASC"
81
	'Response.write Get_Latest_All_Ext
82
End Function
83
 
84
'------------------------------------------------------------------------------------------------------------------
85
Sub PrintArray(vec,lo,hi,mark)
86
  '==-----------------------------------------==
87
  '== Print out an array from the lo bound    ==
88
  '==  to the hi bound.  Highlight the column ==
89
  '==  whose number matches parm mark         ==
90
  '==-----------------------------------------==
91
 
92
  Dim i,j
93
  Response.Write "<table border=""1"" cellspacing=""0"">"
94
  For i = lo to hi
95
    Response.Write "<tr>"
96
    For j = 0 to Ubound(vec,1)
97
      If j = mark then 
98
        Response.Write "<td bgcolor=""FFFFCC"">"
99
      Else 
100
        Response.Write "<td>"
101
      End If
102
      Response.Write vec(j,i) &  "</td>"
103
    Next
104
    Response.Write "</tr>"
105
  Next
106
  Response.Write "</table>"
107
End Sub  'PrintArray
108
%>
109
<html>
110
<head>
111
<title>Release Manager</title>
112
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
113
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
114
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
115
<link rel="stylesheet" href="images/navigation.css" type="text/css">
116
<script language="JavaScript" src="images/tipster.js"></script>
117
<script language="JavaScript" src="images/_help_tips.js"></script>
118
<script language="JavaScript">
119
<!--
120
function updateParent( ) {
121
	var cv;
122
	cv = document.NewVersion.FRpkgver.value;
123
    window.opener.document.<%=parRfield%>.value = cv;
124
	window.opener.document.<%=parRfield%>.focus();
125
    self.close();
126
    return false;
127
}
128
// -->
129
</script>
130
 
131
</head>
132
 
133
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
134
<form name="NewVersion" >
135
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
136
    <tr> 
137
      <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_new_pkg_off.gif" width="22" height="25" hspace="5"></td>
138
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Get Package Version</td>
139
      <td background="images/lbox_bg_blue.gif" align="right" width="50%"> 
140
        <input type="reset" name="btn" value=" Get " class="form_btn_comp" onClick="return updateParent();">
141
        <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onClick="self.close()">
142
      </td>
143
      <td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap> 
144
        <img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
145
    </tr>
146
    <tr> 
147
      <td height="100%" width="1%">&nbsp;</td>
148
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif"> 
149
        <table width="100%" border="0" cellspacing="1" cellpadding="2">
150
          <tr> 
151
            <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
152
            <td width="1%" nowrap class="form_group" valign="bottom"></td>
153
            <td nowrap width="100%">&nbsp; </td>
154
          </tr>
155
          <tr> 
156
            <td width="1%">&nbsp;</td>
157
            <td width="1%" nowrap class="form_item" background="images/bg_form_lightbluedark.gif"><%=parPkg_name%></td>
158
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
159
			<select name="FRpkgver" class="form_item">
160
				<option value=""></option>
161
			<%Set rsLatest = OraDatabase.DbCreateDynaset( Get_Latest_All_Ext( parPkg_id, parPv_id ), cint(0))
162
 
163
			If rsLatest.RecordCount > 0 Then
164
 
165
				aVersions = rsLatest.GetRows()
166
				lastRow = UBound( aVersions, 2 )
167
 
168
				Set objSortHelper = New SortHelper
169
 
170
				' Sort versions
171
				Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsLatest.FieldIndex("pkg_version") )
172
 
173
				' Descending order
174
				For i = lastRow To 0 Step -1
175
				%>
176
					<option value="<%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%>" <%=aVersions( rsLatest.FieldIndex("selected"), i )%>><%If aVersions( rsLatest.FieldIndex("dlocked"), i ) = "Y" Then%>R&nbsp;<%Else%>&nbsp;&nbsp;&nbsp;&nbsp;<%End If%><%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%></option>
177
				<%
178
				Next
179
 
180
				Set objSortHelper = nothing
181
 
182
			End If
183
			%>
184
			</select>
185
			</td>
186
          </tr>
187
          <tr> 
188
            <td width="1%">&nbsp;</td>
189
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
190
            <td nowrap width="100%"></td>
191
          </tr>
192
		  <tr> 
193
            <td width="1%">&nbsp;</td>
194
            <td width="1%" nowrap class="form_field" colspan="2">R = Released</td>
195
          </tr>
196
        </table>
197
      </td>
198
    </tr>
199
    <tr>
200
      <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
201
      <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
202
    </tr>
203
  </table>
204
</form>
205
<!-- TIPS LAYERS -------------------------------------->
206
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
207
<!----------------------------------------------------->
208
</body>
209
</html>
210
 
211
 
212
<!-- DESTRUCTOR ------->
213
<!--#include file="common/destructor.asp"-->