| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' REMOVE Public View
|
|
|
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 |
' Set rfile parameter. This is a return page after Login
|
|
|
22 |
Call objPMod.StoreParameter ( "rfile", "members_public_view.asp" )
|
|
|
23 |
'------------ ACCESS CONTROL ------------------
|
|
|
24 |
%>
|
|
|
25 |
<!--#include file="_access_control_login.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim parView_id
|
|
|
30 |
'------------ Constants Declaration -----------
|
|
|
31 |
'------------ Variable Init -------------------
|
|
|
32 |
parView_id = QStrPar("FRview_id")
|
|
|
33 |
'----------------------------------------------
|
|
|
34 |
%>
|
|
|
35 |
<%
|
|
|
36 |
Function Remove_View ( NNview_id )
|
|
|
37 |
' Remove view_setting
|
|
|
38 |
OraSession.BeginTrans
|
|
|
39 |
OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
|
|
|
40 |
OraSession.CommitTrans
|
|
|
41 |
|
|
|
42 |
' Remove view definition
|
|
|
43 |
OraSession.BeginTrans
|
|
|
44 |
OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
|
|
|
45 |
OraSession.CommitTrans
|
|
|
46 |
|
|
|
47 |
' Remove view
|
|
|
48 |
OraSession.BeginTrans
|
|
|
49 |
OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
|
|
|
50 |
OraSession.CommitTrans
|
|
|
51 |
End Function
|
|
|
52 |
%>
|
|
|
53 |
<%
|
|
|
54 |
'----------------------- MAIN LINE ---------------------------
|
|
|
55 |
|
|
|
56 |
'--- Process submition ---
|
|
|
57 |
If (parView_id <> "") Then
|
|
|
58 |
' All mendatory parameters FOUND
|
|
|
59 |
|
|
|
60 |
Call Remove_View ( parView_id )
|
|
|
61 |
|
|
|
62 |
Response.Redirect("members_public_view.asp")
|
|
|
63 |
Else
|
|
|
64 |
Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
|
|
|
65 |
Response.write QSTR_All
|
|
|
66 |
End If
|
|
|
67 |
%>
|
|
|
68 |
|
|
|
69 |
<!-- DESTRUCTOR ------->
|
|
|
70 |
<!--#include file="common/destructor.asp"-->
|