| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
| 129 |
ghuddy |
4 |
' REMOVE Public View
|
| 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 |
' 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 )
|
| 129 |
ghuddy |
37 |
On Error Resume Next
|
|
|
38 |
' Remove view_setting
|
|
|
39 |
|
|
|
40 |
objEH.TryORA ( OraSession )
|
|
|
41 |
OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
|
|
|
42 |
|
|
|
43 |
If Err.Number = 0 Then
|
|
|
44 |
' Remove view definition
|
|
|
45 |
OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
|
|
|
46 |
|
|
|
47 |
If Err.Number = 0 Then
|
|
|
48 |
' Remove view
|
|
|
49 |
OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
|
|
|
50 |
End If
|
|
|
51 |
End If
|
|
|
52 |
|
|
|
53 |
objEH.CatchORA ( OraSession )
|
| 119 |
ghuddy |
54 |
End Function
|
|
|
55 |
%>
|
|
|
56 |
<%
|
|
|
57 |
'----------------------- MAIN LINE ---------------------------
|
|
|
58 |
|
|
|
59 |
'--- Process submition ---
|
|
|
60 |
If (parView_id <> "") Then
|
| 1376 |
dpurdie |
61 |
' All mandatory parameters FOUND
|
| 129 |
ghuddy |
62 |
|
|
|
63 |
Call Remove_View ( parView_id )
|
|
|
64 |
|
|
|
65 |
Response.Redirect("members_public_view.asp")
|
| 119 |
ghuddy |
66 |
Else
|
| 1376 |
dpurdie |
67 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
| 129 |
ghuddy |
68 |
Response.write QSTR_All
|
| 119 |
ghuddy |
69 |
End If
|
|
|
70 |
%>
|
|
|
71 |
|
|
|
72 |
<!-- DESTRUCTOR ------->
|
| 129 |
ghuddy |
73 |
<!--#include file="common/destructor.asp"-->
|