Subversion Repositories DevTools

Rev

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

Rev 119 Rev 5082
Line 10... Line 10...
10
Dim parOLDpv_id
10
Dim parOLDpv_id
11
Dim parRfile
11
Dim parRfile
12
Dim sPkg_Name
12
Dim sPkg_Name
13
Dim sPkg_Version
13
Dim sPkg_Version
14
Dim bIsPatch
14
Dim bIsPatch
15
Dim outIsPatch
15
Dim bCanInsertPkg
-
 
16
 
16
'------------ Constants Declaration -----------
17
'------------ Constants Declaration -----------
17
'------------ Variable Init -------------------
18
'------------ Variable Init -------------------
18
parPkg_id = Request ( "pkg_id" )
19
parPkg_id = Request ( "pkg_id" )
19
parPv_id = Request ( "pv_id" )
20
parPv_id = Request ( "pv_id" )
20
parOLDpv_id = Request ( "OLDpv_id" ) 
21
parOLDpv_id = Request ( "OLDpv_id" ) 
21
parRfile = Request ( "rfile" )
22
parRfile = Request ( "rfile" )
22
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
23
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
-
 
24
bCanInsertPkg = FALSE
-
 
25
bIsPatch = FALSE
23
'----------------------------------------------
26
'----------------------------------------------
24
%>
27
%>
25
<%
28
<%
26
'-----------------------------------------------------------------------------------------------------------------------------------
29
'-----------------------------------------------------------------------------------------------------------------------------------
27
Function DBGet_Pkg_Name ( nPkg_id )
-
 
28
	Dim rsTemp, Query_String
-
 
29
	If IsEmpty( nPkg_id ) Then Exit Function
-
 
30
	
-
 
31
	Query_String = _
-
 
32
	" SELECT pkg.pkg_name"&_
-
 
33
	"   FROM packages pkg"&_
-
 
34
	"  WHERE pkg.pkg_id = "& nPkg_id
-
 
35
	
-
 
36
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
37
	
-
 
38
	If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
-
 
39
		DBGet_Pkg_Name = rsTemp.Fields("pkg_name")
-
 
40
	End If
-
 
41
	
-
 
42
	rsTemp.Close
-
 
43
	Set rsTemp = nothing
-
 
44
End Function
-
 
45
'-----------------------------------------------------------------------------------------------------------------------------------
-
 
46
Sub DBGet_Pkg_Name_And_Version ( nPv_id, nPkg_id, outPkg_Name, outPkg_Version, outIsPatch )
-
 
47
	Dim rsTemp, Query_String
-
 
48
	outIsPatch = FALSE
-
 
49
	
-
 
50
	If IsEmpty( nPv_id ) Then 
-
 
51
		outPkg_Name = DBGet_Pkg_Name ( nPkg_id )
-
 
52
		Exit Sub
-
 
53
	End If
-
 
54
	
-
 
55
	Query_String = _
-
 
56
	" SELECT pkg.pkg_name, pv.pkg_version, pv.is_patch"&_
-
 
57
	"   FROM PACKAGES pkg, PACKAGE_VERSIONS pv"&_
-
 
58
	"  WHERE pv.pkg_id = pkg.pkg_id"&_
-
 
59
	"    AND pv.pv_id = "& nPv_id
-
 
60
	
-
 
61
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
62
	
-
 
63
	If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
-
 
64
		outPkg_Name = rsTemp.Fields("pkg_name")
-
 
65
		outPkg_Version = rsTemp.Fields("pkg_version")
-
 
66
		If rsTemp("is_patch") = "Y" Then outIsPatch = TRUE
-
 
67
	End If
-
 
68
	
-
 
69
	rsTemp.Close
-
 
70
	Set rsTemp = nothing
-
 
71
End Sub
-
 
72
'-----------------------------------------------------------------------------------------------------------------------------------
-
 
73
Function Set_Row_Style ( sLink )
30
Function Set_Row_Style ( sLink )
74
	Set_Row_Style = "onMouseOver='this.style.cursor=""pointer""' onClick='location.href="""& sLink &"""' "
31
	Set_Row_Style = "onMouseOver='this.style.cursor=""pointer""' onClick='location.href="""& sLink &"""' "
75
End Function
32
End Function
76
'-----------------------------------------------------------------------------------------------------------------------------------
33
'-----------------------------------------------------------------------------------------------------------------------------------
77
%>
34
%>
Line 86... Line 43...
86
		Call RaiseMsg ( enum_WMSG_ERROR, "This page requires more parameters to run!<br>"& Request.ServerVariables("QUERY_STRING") )
43
		Call RaiseMsg ( enum_WMSG_ERROR, "This page requires more parameters to run!<br>"& Request.ServerVariables("QUERY_STRING") )
87
	End If
44
	End If
88
	
45
	
89
End If
46
End If
90
 
47
 
-
 
48
'----------------------------------------------------------------
-
 
49
'   Get some details of the base page
-
 
50
'   In particular, can it be replaced/edited. The calculation needs to be based on
-
 
51
'   The original pv_id, not the pv_id being selected
-
 
52
'
-
 
53
If parOLDpv_id <> "" Then
91
'Call DBGet_Pkg_Name_And_Version ( parPv_id, parPkg_id, sPkg_Name, sPkg_Version, bIsPatch )
54
    Call Get_Pkg_Info ( parOLDpv_id, Request("rtag_id") )
-
 
55
    If pkgInfoHash.Item("can_edit_in_project") Then
-
 
56
        bCanInsertPkg = TRUE
-
 
57
    End If
-
 
58
 
-
 
59
    If pkgInfoHash.Item("is_patch") = "Y" Then bIsPatch = TRUE
-
 
60
 
-
 
61
    pkgInfoHash.RemoveAll
-
 
62
End If
-
 
63
 
92
'------------------------------------------------------------------------------------------
64
'------------------------------------------------------------------------------------------
-
 
65
'   Get details of the selected package version
93
Call Get_Pkg_Info ( parPv_id, Request("rtag_id") )
66
Call Get_Pkg_Info ( parPv_id, Request("rtag_id") )
94
 
67
 
95
sPkg_Name = pkgInfoHash.Item("pkg_name")
68
sPkg_Name = pkgInfoHash.Item("pkg_name")
96
sPkg_Version = pkgInfoHash.Item("pkg_version")
69
sPkg_Version = pkgInfoHash.Item("pkg_version")
97
 
-
 
98
bIsPatch = FALSE
-
 
99
If pkgInfoHash.Item("is_patch") = "Y" Then outIsPatch = TRUE
-
 
100
 
-
 
101
%>
70
%>
102
 
71