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 UNOFFICIAL
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
'------------ Constants Declaration -----------
29
'------------ Variable Init -------------------
30
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
31
'----------------------------------------------
32
%>
33
<%
34
Sub MakeUnreleased ()
35
	Dim objWSH
36
	Set objWSH = Server.CreateObject("WScript.Shell")
37
 
38
	Call Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )
39
 
40
	If pkgInfoHash.Item("can_unofficial") <> "true" AND NOT objAccessControl.IsActive("EditCriticalInfoForLockedPackage") Then Exit Sub
41
 
42
 
43
	OraDatabase.Parameters.Add "PV_ID", 		Request("pv_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
44
	OraDatabase.Parameters.Add "RTAG_ID", 		Request("rtag_id"),	ORAPARM_INPUT, ORATYPE_NUMBER 
45
	OraDatabase.Parameters.Add "USER_ID", 		objAccessControl.UserId,	ORAPARM_INPUT, ORATYPE_NUMBER 
46
 
47
 
48
	OraSession.BeginTrans
49
 
50
	OraDatabase.ExecuteSQL _
51
	"BEGIN "&_
52
	" PK_ENVIRONMENT.MAKE_UNRELEASE ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
53
	"END; "
54
 
55
	OraSession.CommitTrans
56
 
57
 
58
	OraDatabase.Parameters.Remove "PV_ID"
59
	OraDatabase.Parameters.Remove "RTAG_ID"
60
	OraDatabase.Parameters.Remove "USER_ID"
61
 
62
 
63
	objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\Admin_Tools.wsf //job:onMakeUnofficial "&_
64
                 "/pv_id:"& Request("pv_id") , _
65
                 0, FALSE 
66
 
67
End Sub
68
%>
69
<%
70
'-----------------------  MAIN LINE  ---------------------------
71
 
72
'--- Process submition ---
73
If (Request("rtag_id") <> "") AND (Request("pv_id") <> "")  Then
74
 
75
	'COMPLETE THE REQUEST...
76
	Call MakeUnreleased ( )
77
 
78
 
79
	If Request("rfile") <> "" Then
80
		Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
81
	Else
82
		Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
83
	End If
84
 
85
Else
86
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
87
	Response.write QSTR_All 
88
End If
89
%>
90
 
91
<!-- DESTRUCTOR ------->
92
<!--#include file="common/destructor.asp"-->