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