Subversion Repositories DevTools

Rev

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

Rev 2 Rev 5354
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|			          wAddRole					 	 |
5
'|			          wAddRole					 	 |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
Response.Expires = 0
11
Response.Expires = 0
12
%>
12
%>
13
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<%
17
<%
18
'------------ ACCESS CONTROL ------------------
18
'------------ ACCESS CONTROL ------------------
19
%>
19
%>
20
<!--#include file="_access_control_general.asp"-->
20
<!--#include file="_access_control_general.asp"-->
21
<%
21
<%
22
'------------ VARIABLE DEFINITION -------------
22
'------------ VARIABLE DEFINITION -------------
23
Dim objFormCollector
23
Dim objFormCollector
24
'------------ CONSTANTS DECLARATION -----------
24
'------------ CONSTANTS DECLARATION -----------
25
'------------ VARIABLE INIT -------------------
25
'------------ VARIABLE INIT -------------------
26
Set objFormCollector = CreateObject("Scripting.Dictionary")
26
Set objFormCollector = CreateObject("Scripting.Dictionary")
27
'------------ CONDITIONS ----------------------
27
'------------ CONDITIONS ----------------------
28
'----------------------------------------------
28
'----------------------------------------------
29
%>
29
%>
30
<%
30
<%
31
'--------------------------------------------------------------------------------------------------------------------------
31
'--------------------------------------------------------------------------------------------------------------------------
32
Sub AddRole ()
32
Sub AddRole ()
33
	On Error Resume Next
33
	On Error Resume Next
34
	
34
	
35
	OraDatabase.Parameters.Add "ROLE_NAME", 	Request("role_name"), 		ORAPARM_INPUT, ORATYPE_STRING 
35
	OraDatabase.Parameters.Add "ROLE_NAME", 	Request("role_name"), 		ORAPARM_INPUT, ORATYPE_STRING 
36
	OraDatabase.Parameters.Add "ROLE_COMMENTS", Request("role_comments"), 	ORAPARM_INPUT, ORATYPE_STRING 
36
	OraDatabase.Parameters.Add "ROLE_COMMENTS", Request("role_comments"), 	ORAPARM_INPUT, ORATYPE_STRING 
37
	OraDatabase.Parameters.Add "APP_ID", 		Request("app_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER 
37
	OraDatabase.Parameters.Add "APP_ID", 		Request("app_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER 
38
	
38
	
39
	
39
	
40
	objEH.TryORA ( OraSession )
40
	objEH.TryORA ( OraSession )
41
	
41
	
42
	OraDatabase.ExecuteSQL _
42
	OraDatabase.ExecuteSQL _
43
	"BEGIN pk_Role.Add_Role ( :ROLE_NAME, :ROLE_COMMENTS, :APP_ID ); END;"	
43
	"BEGIN pk_Role.Add_Role ( :ROLE_NAME, :ROLE_COMMENTS, :APP_ID ); END;"	
44
	
44
	
45
	objEH.CatchORA ( OraSession )
45
	objEH.CatchORA ( OraSession )
46
	
46
	
47
	
47
	
48
	OraDatabase.Parameters.Remove "ROLE_NAME"
48
	OraDatabase.Parameters.Remove "ROLE_NAME"
49
	OraDatabase.Parameters.Remove "ROLE_COMMENTS"
49
	OraDatabase.Parameters.Remove "ROLE_COMMENTS"
50
	OraDatabase.Parameters.Remove "APP_ID"
50
	OraDatabase.Parameters.Remove "APP_ID"
51
	
51
	
52
End Sub
52
End Sub
53
'--------------------------------------------------------------------------------------------------------------------------
53
'--------------------------------------------------------------------------------------------------------------------------
54
%>
54
%>
55
<%
55
<%
56
'------------ RUN BEFORE PAGE RENDER ----------
56
'------------ RUN BEFORE PAGE RENDER ----------
57
' --- Get Form details from DB (for edit forms only) ---
57
' --- Get Form details from DB (for edit forms only) ---
58
'-------------------------------------------------------
58
'-------------------------------------------------------
59
 
59
 
60
' --- Load Validation Rules ---
60
' --- Load Validation Rules ---
61
Call objForm.LoadValidationRules ( Array("role_name", "role_comments"), OraDatabase )		' Load Validation Rules
61
Call objForm.LoadValidationRules ( Array("role_name", "role_comments"), OraDatabase )		' Load Validation Rules
62
 
62
 
63
 
63
 
64
' --- Enter Form Validation Rule Changes here... ----
64
' --- Enter Form Validation Rule Changes here... ----
65
'----------------------------------------------------
65
'----------------------------------------------------
66
 
66
 
67
If CBool(Request("action")) Then
67
If CBool(Request("action")) Then
68
	If objForm.IsValidOnPostBack Then
68
	If objForm.IsValidOnPostBack Then
69
		' --- Form is Valid ---
69
		' --- Form is Valid ---
70
		Call AddRole()
70
		Call AddRole()
71
		
71
		
72
		If objEH.Finally Then
72
		If objEH.Finally Then
73
			Call OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
73
			Call OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
74
			Call CloseWindow()
74
			Call CloseWindow()
75
		End If
75
		End If
76
		
76
		
77
	End If
77
	End If
78
End If
78
End If
79
'----------------------------------------------
79
'----------------------------------------------
80
%>
80
%>
81
<html>
81
<html>
82
<head>
82
<head>
83
<title>Access Manager</title>
83
<title>Access Manager</title>
84
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
84
<link rel="shortcut icon" href="<%=FavIcon%>"/>
85
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
85
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
86
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
86
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
87
<script language="JavaScript" src="scripts/common.js"></script>
87
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
88
</head>
88
<script language="JavaScript" src="scripts/common.js"></script>
89
 
89
</head>
90
<body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.role_name.focus();">
90
 
91
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
91
<body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.role_name.focus();">
92
  <tr>
92
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
93
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_role_lrg.gif" width="13" height="18" hspace="0" align="absmiddle">&nbsp;New Role </span> <br>
93
  <tr>
94
    Enter Role name and optional description. 
94
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_role_lrg.gif" width="13" height="18" hspace="0" align="absmiddle">&nbsp;New Role </span> <br>
95
    </td>
95
    Enter Role name and optional description. 
96
  </tr>
96
    </td>
97
  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
97
  </tr>
98
  <tr>
98
  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
99
    <td background="images/bg_drk_bage_pane.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
99
  <tr>
100
      <tr>
100
    <td background="images/bg_drk_bage_pane.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
101
        <td>&nbsp;</td>
101
      <tr>
102
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Create">
102
        <td>&nbsp;</td>
103
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
103
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Create">
104
      </tr>
104
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
105
    </table></td>
105
      </tr>
106
  </tr>
106
    </table></td>
107
  <tr>
107
  </tr>
108
    <td background="images/bg_form.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
108
  <tr>
109
      <tr>
109
    <td background="images/bg_form.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
110
        <td width="1%"><img src="images/spacer.gif" width="60" height="200"></td>
110
      <tr>
111
        <td width="100%"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
111
        <td width="1%"><img src="images/spacer.gif" width="60" height="200"></td>
112
          <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
112
        <td width="100%"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
113
          <%If NOT objEH.Finally Then%>
113
          <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
114
          <tr>
114
          <%If NOT objEH.Finally Then%>
115
            <td class="form_iname">&nbsp;</td>
115
          <tr>
116
            <td>
116
            <td class="form_iname">&nbsp;</td>
117
              <%objEH.DisplayMessage()%>
117
            <td>
118
            </td>
118
              <%objEH.DisplayMessage()%>
119
            <td class="val_err"></td>
119
            </td>
120
          </tr>
120
            <td class="val_err"></td>
121
          <%End If%>
121
          </tr>
122
          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
122
          <%End If%>
123
          <tr>
123
          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
124
            <td nowrap class="form_iname" valign="top">Role Name </td>
124
          <tr>
125
            <td valign="top"><input name="role_name" type="text" class="form_ivalue" size="60" value="<%=Request("role_name")%>"></td>
125
            <td nowrap class="form_iname" valign="top">Role Name </td>
126
            <td valign="top"> <%=objForm.Validate ("role_name")%> </td>
126
            <td valign="top"><input name="role_name" type="text" class="form_ivalue" size="60" value="<%=Request("role_name")%>"></td>
127
          </tr>
127
            <td valign="top"> <%=objForm.Validate ("role_name")%> </td>
128
          <tr>
128
          </tr>
129
            <td valign="top" nowrap class="form_iname">Description</td>
129
          <tr>
130
            <td valign="top"><textarea name="role_comments" cols="60" rows="10" class="form_ivalue"><%=Request("role_comments")%></textarea></td>
130
            <td valign="top" nowrap class="form_iname">Description</td>
131
            <td valign="top"> <%=objForm.Validate ("role_comments")%> </td>
131
            <td valign="top"><textarea name="role_comments" cols="60" rows="10" class="form_ivalue"><%=Request("role_comments")%></textarea></td>
132
          </tr>
132
            <td valign="top"> <%=objForm.Validate ("role_comments")%> </td>
133
          <tr>
133
          </tr>
134
            <td width="10%" class="form_iname">&nbsp;</td>
134
          <tr>
135
            <td width="1%">&nbsp;</td>
135
            <td width="10%" class="form_iname">&nbsp;</td>
136
            <td width="90%" class="val_err"></td>
136
            <td width="1%">&nbsp;</td>
137
          </tr>
137
            <td width="90%" class="val_err"></td>
138
        </table></td>
138
          </tr>
139
      </tr>
139
        </table></td>
140
    </table></td>
140
      </tr>
141
  </tr>
141
    </table></td>
142
  <%=objPMod.ComposeHiddenTags()%>
142
  </tr>
143
  <input type="hidden" name="action" value="true">
143
  <%=objPMod.ComposeHiddenTags()%>
144
  </form>
144
  <input type="hidden" name="action" value="true">
145
</table>
145
  </form>
146
</body>
146
</table>
147
</html>
147
</body>
148
<%
148
</html>
149
'------------ RUN AFTER PAGE RENDER -----------
149
<%
150
Set objFormCollector = Nothing
150
'------------ RUN AFTER PAGE RENDER -----------
151
'----------------------------------------------
151
Set objFormCollector = Nothing
152
%>
152
'----------------------------------------------
153
<!--#include file="common/globals_destructor.asp"-->
153
%>
-
 
154
<!--#include file="common/globals_destructor.asp"-->