Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	    MAKE PENDING
5
'               --- PROCESS FORM ---
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0	' always load the page, dont store
12
%>
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="common/common_dbedit.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parPv_id
29
Dim parRfile
30
Dim retERRmsg
31
Dim retALRTmsg
32
Dim retParameters
33
Dim pkgType
34
'------------ Constants Declaration -----------
35
'------------ Variable Init -------------------
36
parPv_id = Request("pv_id")
37
parRfile = Request("rfile")
38
'------------ Constants Declaration -----------
39
'------------ Variable Init -------------------
40
'----------------------------------------------
41
%>
42
<%
43
Sub MakePending ()
44
	Dim objWSH
45
	Set objWSH = Server.CreateObject("WScript.Shell")
46
 
47
 
48
	OraDatabase.Parameters.Add "PV_ID", 		Request("pv_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
49
	OraDatabase.Parameters.Add "RTAG_ID", 		Request("rtag_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
50
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId,	ORAPARM_INPUT, ORATYPE_NUMBER 
51
 
52
 
53
	OraSession.BeginTrans
54
 
121 hknight 55
	OraDatabase.ExecuteSQL " UPDATE package_versions "&_
56
						   " SET owner_id = :USER_ID"&_
57
						   " WHERE pv_id = :PV_ID"
58
 
119 ghuddy 59
	OraDatabase.ExecuteSQL _
60
	"BEGIN "&_
61
	" PK_ENVIRONMENT.MAKE_PENDING ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
62
	"END; "
63
 
64
	OraSession.CommitTrans
65
 
66
 
67
	OraDatabase.Parameters.Remove "PV_ID"
68
	OraDatabase.Parameters.Remove "RTAG_ID"
69
	OraDatabase.Parameters.Remove "USER_ID"
70
 
71
	objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:PostRun "&_
72
                 "/pv_id:"& Request("pv_id") , _
73
                 0, False 
74
 
75
 
76
End Sub
77
%>
78
<%
79
'-----------------------  MAIN LINE  ---------------------------
80
 
81
'--- Process submition ---
82
If ( Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
83
 
84
	Call CheckRequirementsForMakePending ( parPv_id, parRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
85
 
86
	If IsNull(retERRmsg) Then
87
		' All Requirements OK
88
		'COMPLETE THE REQUEST...
89
		Call MakePending ( )
90
 
91
		If Request("rfile") <> "" Then
92
			Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
93
		Else
94
			Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
95
		End If
96
 
97
	Else
98
		Call RaiseMsg ( Eval(retERRmsg), parRtag_id &"|"& parPv_id 	&"|"& retParameters &"|"& "N" )
99
 
100
	End If
101
 
102
Else
103
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
104
	Response.write QSTR_All 
105
End If
106
%>
107
 
108
<!-- DESTRUCTOR ------->
109
<!--#include file="common/destructor.asp"-->