| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
| 129 |
ghuddy |
4 |
' MAKE UNOFFICIAL
|
| 119 |
ghuddy |
5 |
' --- PROCESS FORM ---
|
|
|
6 |
'=====================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
' Good idea to set when using redirect
|
| 129 |
ghuddy |
11 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
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 ()
|
| 129 |
ghuddy |
35 |
Dim objWSH
|
|
|
36 |
|
|
|
37 |
Call Get_Pkg_Info ( Request("pv_id"), Request("rtag_id") )
|
|
|
38 |
|
| 5061 |
dpurdie |
39 |
If pkgInfoHash.Item("can_unofficial") <> "true" AND NOT canActionControlInProject("EditCriticalInfoForLockedPackage") Then Exit Sub
|
| 129 |
ghuddy |
40 |
|
|
|
41 |
OraDatabase.Parameters.Add "PV_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
42 |
OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
43 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
44 |
|
|
|
45 |
objEH.TryORA ( OraSession )
|
|
|
46 |
On Error Resume Next
|
|
|
47 |
|
|
|
48 |
OraDatabase.ExecuteSQL _
|
|
|
49 |
"BEGIN "&_
|
|
|
50 |
" PK_ENVIRONMENT.MAKE_UNRELEASE ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
|
|
|
51 |
"END; "
|
|
|
52 |
|
|
|
53 |
objEH.CatchORA ( OraSession )
|
|
|
54 |
|
|
|
55 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
56 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
57 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
58 |
|
|
|
59 |
If objEH.LastOraFailed = FALSE Then
|
|
|
60 |
|
|
|
61 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
|
|
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 |
End If
|
| 119 |
ghuddy |
67 |
End Sub
|
|
|
68 |
%>
|
|
|
69 |
<%
|
|
|
70 |
'----------------------- MAIN LINE ---------------------------
|
|
|
71 |
|
|
|
72 |
'--- Process submition ---
|
|
|
73 |
If (Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
|
| 129 |
ghuddy |
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 |
|
| 119 |
ghuddy |
85 |
Else
|
| 1376 |
dpurdie |
86 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
| 4955 |
dpurdie |
87 |
Response.write QSTR_FullQuery
|
| 119 |
ghuddy |
88 |
End If
|
|
|
89 |
%>
|
|
|
90 |
|
|
|
91 |
<!-- DESTRUCTOR ------->
|
|
|
92 |
<!--#include file="common/destructor.asp"-->
|