Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
' 			 	   EDIT Public 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
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_dbedit.asp"-->
19
<%
20
' Set rfile parameter. This is a return page after Login
21
Call objPMod.StoreParameter ( "rfile", "members_public_view.asp" )
22
'------------ ACCESS CONTROL ------------------
23
%>
24
<!--#include file="_access_control_login.asp"-->
25
<!--#include file="_access_control_general.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parView_id
29
Dim parViewName
30
Dim parPkgInc
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parView_id = QStrPar("FRview_id")
34
parViewName = QStrPar("FRviewname")
35
parPkgInc = QStrPar("FRpkginc")
36
'----------------------------------------------
37
%>
38
<%
39
Sub Update_View ( NNview_id, SSViewName )
40
	Dim rsTemp, Query_String
41
	Query_String = _
42
	" SELECT *"&_
43
	" FROM views"&_
44
	" WHERE view_id = "& NNview_id 
45
 
46
	Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
47
 
48
	'update fields
49
	rsTemp.Edit
50
	rsTemp.Fields("view_name").Value = SSViewName
51
	rsTemp.Update
52
 
53
	rsTemp.Close
54
	Set rsTemp = nothing
55
End Sub
56
 
57
Sub Update_View_Definition ( NNview_id, SSPkgInc )
58
	' Remove current view definition
59
	OraSession.BeginTrans
60
	OraDatabase.ExecuteSQL "DELETE FROM view_def WHERE view_id = "& NNview_id
61
  	OraSession.CommitTrans
62
 
63
	' Set view definition
64
	If SSPkgInc <> "" Then
65
		OraSession.BeginTrans
66
		OraDatabase.ExecuteSQL _
67
			" INSERT INTO view_def"&_
68
			" SELECT TO_NUMBER('"& NNview_id &"') AS view_id, pkg_id FROM packages WHERE pkg_id IN ("& SSPkgInc &")"
69
	  	OraSession.CommitTrans
70
	End If
71
End Sub
72
%>
73
<%
74
'-----------------------  MAIN LINE  ---------------------------
75
 
76
'--- Process submition ---
77
If (parView_id <> "") AND (parViewName <> "") Then
78
	' All mendatory parameters FOUND
79
 
80
	'COMPLETE THE REQUEST...
81
	Call Update_View ( parView_id, parViewName )
82
	Call Update_View_Definition ( parView_id, parPkgInc )
83
 
84
	Response.Redirect("members_public_view.asp")
85
Else
86
	Response.write "Some mendatory parameters are missing!" & "<br>" 'TODO
87
	Response.write QSTR_All 
88
End If
89
%>
90
 
91
<!-- DESTRUCTOR ------->
92
<!--#include file="common/destructor.asp"-->