Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	   REMOVE Personal 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_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 )
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
	' report errors if found
61
	If NOT This_View_Owner( parView_id, objAccessControl.UserId ) Then 
62
		Session("reqParam") = ""
63
		Session("ERRlog") = ""
64
		Session("ERRlogFULL") = ""
65
		Response.Redirect("message.asp?msg=401-5")
66
	End If
67
 
68
	Call Remove_View ( parView_id )
69
 
70
	Response.Redirect("members_personal_view.asp")
71
Else
72
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
73
	Response.write QSTR_All 
74
End If
75
%>
76
 
77
<!-- DESTRUCTOR ------->
78
<!--#include file="common/destructor.asp"-->