Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 129
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
' 			 	   REMOVE Personal View
4
'                 REMOVE Personal View
5
'               --- PROCESS FORM ---
5
'               --- PROCESS FORM ---
6
'=====================================================
6
'=====================================================
7
%>
7
%>
8
<%
8
<%
9
Option explicit
9
Option explicit
10
' Good idea to set when using redirect
10
' Good idea to set when using redirect
11
Response.Expires = 0	' always load the page, dont store
11
Response.Expires = 0   ' always load the page, dont store
12
%>
12
%>
13
 
13
 
14
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/formating.asp"-->
Line 32... Line 32...
32
parView_id = QStrPar("FRview_id")
32
parView_id = QStrPar("FRview_id")
33
'----------------------------------------------
33
'----------------------------------------------
34
%>
34
%>
35
<%
35
<%
36
Function Remove_View ( NNview_id )
36
Function Remove_View ( NNview_id )
-
 
37
 
-
 
38
   On Error Resume Next
-
 
39
 
37
	' Remove view_setting
40
   ' Remove view_setting
38
	OraSession.BeginTrans
41
   objEH.TryORA ( OraSession )
39
	OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
42
   OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
40
  	OraSession.CommitTrans
-
 
41
	
43
 
42
	' Remove view definition
44
   If Err.Number = 0 Then
43
	OraSession.BeginTrans
45
      ' Remove view definition
44
	OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
46
      OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
45
  	OraSession.CommitTrans
-
 
46
	
47
 
47
	' Remove view
48
      If Err.Number = 0 Then
48
	OraSession.BeginTrans
49
         ' Remove view
49
	OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
50
         OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
-
 
51
      End If
-
 
52
   End If
-
 
53
 
50
  	OraSession.CommitTrans
54
   objEH.CatchORA ( OraSession )
-
 
55
 
51
End Function
56
End Function
52
%>
57
%>
53
<%
58
<%
54
'-----------------------  MAIN LINE  ---------------------------
59
'-----------------------  MAIN LINE  ---------------------------
55
 
60
 
56
'--- Process submition ---
61
'--- Process submition ---
57
If (parView_id <> "") Then
62
If (parView_id <> "") Then
58
	' All mendatory parameters FOUND
63
   ' All mendatory parameters FOUND
59
	
64
 
60
	' report errors if found
65
   ' report errors if found
61
	If NOT This_View_Owner( parView_id, objAccessControl.UserId ) Then 
66
   If NOT This_View_Owner( parView_id, objAccessControl.UserId ) Then
62
		Session("reqParam") = ""
67
      Session("reqParam") = ""
63
		Session("ERRlog") = ""
68
      Session("ERRlog") = ""
64
		Session("ERRlogFULL") = ""
69
      Session("ERRlogFULL") = ""
65
		Response.Redirect("message.asp?msg=401-5")
70
      Response.Redirect("message.asp?msg=401-5")
66
	End If
71
   End If
67
	
72
 
68
	Call Remove_View ( parView_id )
73
   Call Remove_View ( parView_id )
69
	
74
 
70
	Response.Redirect("members_personal_view.asp")
75
   Response.Redirect("members_personal_view.asp")
71
Else
76
Else
72
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
77
   Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
73
	Response.write QSTR_All 
78
   Response.write QSTR_All
74
End If
79
End If
75
%>
80
%>
76
 
81
 
77
<!-- DESTRUCTOR ------->
82
<!-- DESTRUCTOR ------->
78
<!--#include file="common/destructor.asp"-->
-
 
79
83
<!--#include file="common/destructor.asp"-->
-
 
84