Subversion Repositories DevTools

Rev

Rev 129 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'                                  REMOVE Personal View
'               --- PROCESS FORM ---
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0    ' always load the page, dont store
%>

<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<%
' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "members_personal_view.asp" )
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim parView_id
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parView_id = QStrPar("FRview_id")
'----------------------------------------------
%>
<%
Function Remove_View ( NNview_id )
        ' Remove view_setting
        OraSession.BeginTrans
        OraDatabase.ExecuteSQL " DELETE FROM view_settings WHERE view_id = "& NNview_id
        OraSession.CommitTrans
        
        ' Remove view definition
        OraSession.BeginTrans
        OraDatabase.ExecuteSQL " DELETE FROM view_def WHERE view_id = "& NNview_id
        OraSession.CommitTrans
        
        ' Remove view
        OraSession.BeginTrans
        OraDatabase.ExecuteSQL " DELETE FROM views WHERE view_id = "& NNview_id
        OraSession.CommitTrans
End Function
%>
<%
'-----------------------  MAIN LINE  ---------------------------

'--- Process submition ---
If (parView_id <> "") Then
        ' All mendatory parameters FOUND
        
        ' report errors if found
        If NOT This_View_Owner( parView_id, objAccessControl.UserId ) Then 
                Session("reqParam") = ""
                Session("ERRlog") = ""
                Session("ERRlogFULL") = ""
                Response.Redirect("message.asp?msg=401-5")
        End If
        
        Call Remove_View ( parView_id )
        
        Response.Redirect("members_personal_view.asp")
Else
        Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
        Response.write QSTR_All 
End If
%>

<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->