| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
| 129 |
ghuddy |
4 |
' REMOVE Personal 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_personal_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 |
|
|
|
38 |
On Error Resume Next
|
|
|
39 |
|
|
|
40 |
' Remove view_setting
|
|
|
41 |
objEH.TryORA ( OraSession )
|
|
|
42 |
OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
|
|
|
43 |
|
|
|
44 |
If Err.Number = 0 Then
|
|
|
45 |
' Remove view definition
|
|
|
46 |
OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
|
|
|
47 |
|
|
|
48 |
If Err.Number = 0 Then
|
|
|
49 |
' Remove view
|
|
|
50 |
OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
|
|
|
51 |
End If
|
|
|
52 |
End If
|
|
|
53 |
|
|
|
54 |
objEH.CatchORA ( OraSession )
|
|
|
55 |
|
| 119 |
ghuddy |
56 |
End Function
|
|
|
57 |
%>
|
|
|
58 |
<%
|
|
|
59 |
'----------------------- MAIN LINE ---------------------------
|
|
|
60 |
|
|
|
61 |
'--- Process submition ---
|
|
|
62 |
If (parView_id <> "") Then
|
| 1376 |
dpurdie |
63 |
' All mandatory parameters FOUND
|
| 129 |
ghuddy |
64 |
|
|
|
65 |
' report errors if found
|
|
|
66 |
If NOT This_View_Owner( parView_id, objAccessControl.UserId ) Then
|
|
|
67 |
Session("reqParam") = ""
|
|
|
68 |
Session("ERRlog") = ""
|
|
|
69 |
Session("ERRlogFULL") = ""
|
|
|
70 |
Response.Redirect("message.asp?msg=401-5")
|
|
|
71 |
End If
|
|
|
72 |
|
|
|
73 |
Call Remove_View ( parView_id )
|
|
|
74 |
|
|
|
75 |
Response.Redirect("members_personal_view.asp")
|
| 119 |
ghuddy |
76 |
Else
|
| 1376 |
dpurdie |
77 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
| 4955 |
dpurdie |
78 |
Response.write QSTR_FullQuery
|
| 119 |
ghuddy |
79 |
End If
|
|
|
80 |
%>
|
|
|
81 |
|
|
|
82 |
<!-- DESTRUCTOR ------->
|
| 129 |
ghuddy |
83 |
<!--#include file="common/destructor.asp"-->
|