Subversion Repositories DevTools

Rev

Rev 1281 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1281 Rev 3916
Line 12... Line 12...
12
<!--#include file="common/globals.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/qstr.asp"-->
13
<!--#include file="common/qstr.asp"-->
14
<!--#include file="common/common_subs.asp"-->
14
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
15
<!--#include file="common/common_dbedit.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
-
 
17
<!--#include file="class/classSortHelper.asp"-->
17
<%
18
<%
18
'------------ ACCESS CONTROL ------------------
19
'------------ ACCESS CONTROL ------------------
19
%>
20
%>
20
<!--#include file="_access_control_login.asp"-->
21
<!--#include file="_access_control_login.asp"-->
21
<!--#include file="_access_control_general.asp"-->
22
<!--#include file="_access_control_general.asp"-->
Line 55... Line 56...
55
 
56
 
56
 
57
 
57
Function All_Versions_List ( nOldPv_id, nPkg_id  )
58
Function All_Versions_List ( nOldPv_id, nPkg_id  )
58
	If nOldPv_id = "" OR IsNull(nOldPv_id) Then nOldPv_id = "-1"
59
	If nOldPv_id = "" OR IsNull(nOldPv_id) Then nOldPv_id = "-1"
59
	All_Versions_List = _
60
	All_Versions_List = _
60
	" SELECT pv.pv_id, pv.pkg_version,"&_
61
	" SELECT pv.pv_id, pv.pkg_version, pv.dlocked,"&_
61
	"	   DECODE(pv.pv_id, "& nOldPv_id &", 'selected', NULL) AS selected  "&_
62
	"	   DECODE(pv.pv_id, "& nOldPv_id &", 'selected', NULL) AS selected  "&_
62
	"  FROM PACKAGE_VERSIONS pv"&_
63
	"  FROM PACKAGE_VERSIONS pv"&_
63
	" WHERE pv.pkg_id = "& nPkg_id &_
64
	" WHERE pv.pkg_id = "& nPkg_id &_
64
	"   AND pv.is_patch IS NULL"&_
65
	"   AND pv.is_patch IS NULL"
65
	" ORDER BY UPPER(pv.pkg_version) "
-
 
66
	Response.write All_Versions_List
66
	'Response.write All_Versions_List
67
End Function
67
End Function
68
 
68
 
69
Sub Update_Previous_Version ( NNpv_id, nLast_pv_id )
69
Sub Update_Previous_Version ( NNpv_id, nLast_pv_id )
70
	Dim rsTemp, Query_String
70
	Dim rsTemp, Query_String
71
	If nLast_pv_id = "" Then nLast_pv_id = NULL
71
	If nLast_pv_id = "" Then nLast_pv_id = NULL
Line 146... Line 146...
146
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Previous 
146
            <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Previous 
147
              Version </td>
147
              Version </td>
148
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
148
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
149
			<select name="last_pv_id" class="form_item">
149
			<select name="last_pv_id" class="form_item">
150
				<option></option>
150
				<option></option>
151
<%
151
                <%
152
			Dim rsQry
152
			    Dim rsQry,aVersions,lastRow,objSortHelper,i
153
			Set rsQry = OraDatabase.DbCreateDynaset( All_Versions_List( pkgInfoHash.Item ("last_pv_id"), pkgInfoHash.Item ("pkg_id") ), cint(0))
153
			    Set rsQry = OraDatabase.DbCreateDynaset( All_Versions_List( pkgInfoHash.Item ("last_pv_id"), pkgInfoHash.Item ("pkg_id") ), cint(0))
-
 
154
 
-
 
155
                If rsQry.RecordCount > 0 Then
154
			While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
156
                    aVersions = rsQry.GetRows()
-
 
157
                    lastRow = UBound( aVersions, 2 )
-
 
158
                    Set objSortHelper = New SortHelper
-
 
159
 
-
 
160
                    ' Sort versions
-
 
161
                    Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsQry.FieldIndex("pkg_version") )
-
 
162
 
-
 
163
                    ' Descending order
-
 
164
                    For i = lastRow To 0 Step -1
-
 
165
                %>
155
                <option value="<%=rsQry.Fields("pv_id")%>" <%=rsQry.Fields("selected")%>><%=rsQry.Fields("pkg_version")%></option>
166
                    <option value="<%=aVersions(rsQry.FieldIndex("pv_id"),i)%>" <%=aVersions(rsQry.FieldIndex("selected"),i)%>>
-
 
167
 
-
 
168
                <%
-
 
169
                    If aVersions( rsQry.FieldIndex("dlocked"), i ) = "Y" Then%>
-
 
170
                     R&nbsp;
-
 
171
                  <%Else%>
-
 
172
                     &nbsp;&nbsp;&nbsp;&nbsp;
-
 
173
                  <%End If%>
-
 
174
                  <%=aVersions( rsQry.FieldIndex("pkg_version"), i )%>
-
 
175
               </option>
-
 
176
            <%
156
<%				rsQry.MoveNext
177
                Next
-
 
178
                Set objSortHelper = nothing
157
			WEnd
179
                End If
158
			rsQry.Close
180
			rsQry.Close
159
			set rsQry = nothing
181
			set rsQry = nothing
160
			%>
182
			%>
161
			</select>
183
			</select>
162
            <input type="hidden" name="pv_id" value="<%=parPv_id%>">
184
            <input type="hidden" name="pv_id" value="<%=parPv_id%>">