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
'|			          wAddControl				 	 |
5
'|			          wAddControl				 	 |
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 AddControl ()
32
Sub AddControl ()
33
	On Error Resume Next
33
	On Error Resume Next
34
	
34
	
35
	OraDatabase.Parameters.Add "OBJ_NAME", 	Request("obj_name"), 				ORAPARM_INPUT, ORATYPE_STRING 
35
	OraDatabase.Parameters.Add "OBJ_NAME", 	Request("obj_name"), 				ORAPARM_INPUT, ORATYPE_STRING 
36
	OraDatabase.Parameters.Add "OBJ_DESCRIPTION", Request("obj_description"), 	ORAPARM_INPUT, ORATYPE_STRING 
36
	OraDatabase.Parameters.Add "OBJ_DESCRIPTION", Request("obj_description"), 	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_Control.Add_Control ( :OBJ_NAME, :OBJ_DESCRIPTION, :APP_ID ); END;"	
43
	"BEGIN pk_Control.Add_Control ( :OBJ_NAME, :OBJ_DESCRIPTION, :APP_ID ); END;"	
44
	
44
	
45
	objEH.CatchORA ( OraSession )
45
	objEH.CatchORA ( OraSession )
46
	
46
	
47
	
47
	
48
	OraDatabase.Parameters.Remove "OBJ_NAME"
48
	OraDatabase.Parameters.Remove "OBJ_NAME"
49
	OraDatabase.Parameters.Remove "OBJ_DESCRIPTION"
49
	OraDatabase.Parameters.Remove "OBJ_DESCRIPTION"
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("obj_name", "obj_description") , OraDatabase )		' Load Validation Rules
61
Call objForm.LoadValidationRules ( Array("obj_name", "obj_description") , OraDatabase )		' Load Validation Rules
62
 
62
 
63
' --- Enter Form Validation Rule Changes here... ----
63
' --- Enter Form Validation Rule Changes here... ----
64
'----------------------------------------------------
64
'----------------------------------------------------
65
 
65
 
66
If CBool(Request("action")) Then
66
If CBool(Request("action")) Then
67
	If objForm.IsValidOnPostBack Then
67
	If objForm.IsValidOnPostBack Then
68
		' --- Form is Valid ---
68
		' --- Form is Valid ---
69
		Call AddControl()
69
		Call AddControl()
70
		
70
		
71
		If objEH.Finally Then
71
		If objEH.Finally Then
72
			Call OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
72
			Call OpenInParentWindow ( Request("rfile") &"?"& objPMod.ComposeURL() )
73
			Call CloseWindow()
73
			Call CloseWindow()
74
		End If
74
		End If
75
		
75
		
76
	End If
76
	End If
77
End If
77
End If
78
'----------------------------------------------
78
'----------------------------------------------
79
%>
79
%>
80
<html>
80
<html>
81
<head>
81
<head>
82
<title>Access Manager</title>
82
<title>Access Manager</title>
83
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
83
<link rel="shortcut icon" href="<%=FavIcon%>"/>
84
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
84
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
85
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
85
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
86
<script language="JavaScript" src="scripts/common.js"></script>
86
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
87
</head>
87
<script language="JavaScript" src="scripts/common.js"></script>
88
 
88
</head>
89
<body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.obj_name.focus();">
89
 
90
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
90
<body background="images/bg_bage_pane.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.obj_name.focus();">
91
  <tr>
91
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
92
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_control_lrg.gif" width="13" height="18" hspace="0" align="absmiddle">&nbsp;New Control </span> <br>
92
  <tr>
93
    Enter Control name and optional description. 
93
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="images/i_control_lrg.gif" width="13" height="18" hspace="0" align="absmiddle">&nbsp;New Control </span> <br>
94
      </td>
94
    Enter Control name and optional description. 
95
  </tr>
95
      </td>
96
  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
96
  </tr>
97
  <tr>
97
  <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
98
    <td background="images/bg_drk_bage_pane.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
98
  <tr>
99
      <tr>
99
    <td background="images/bg_drk_bage_pane.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
100
        <td>&nbsp;</td>
100
      <tr>
101
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Create">
101
        <td>&nbsp;</td>
102
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
102
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Create">
103
      </tr>
103
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
104
    </table></td>
104
      </tr>
105
  </tr>
105
    </table></td>
106
  <tr>
106
  </tr>
107
    <td background="images/bg_form.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
107
  <tr>
108
      <tr>
108
    <td background="images/bg_form.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
109
        <td width="1%"><img src="images/spacer.gif" width="60" height="200"></td>
109
      <tr>
110
        <td width="100%"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
110
        <td width="1%"><img src="images/spacer.gif" width="60" height="200"></td>
111
          <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
111
        <td width="100%"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
112
          <%If NOT objEH.Finally Then%>
112
          <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
113
          <tr>
113
          <%If NOT objEH.Finally Then%>
114
            <td class="form_iname">&nbsp;</td>
114
          <tr>
115
            <td>
115
            <td class="form_iname">&nbsp;</td>
116
              <%objEH.DisplayMessage()%>
116
            <td>
117
            </td>
117
              <%objEH.DisplayMessage()%>
118
            <td class="val_err"></td>
118
            </td>
119
          </tr>
119
            <td class="val_err"></td>
120
          <%End If%>
120
          </tr>
121
          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
121
          <%End If%>
122
          <tr>
122
          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123
            <td nowrap class="form_iname" valign="top">Control Name </td>
123
          <tr>
124
            <td valign="top"><input name="obj_name" type="text" class="form_ivalue" size="60" value="<%=Request("obj_name")%>"></td>
124
            <td nowrap class="form_iname" valign="top">Control Name </td>
125
            <td valign="top"> <%=objForm.Validate ("obj_name")%> </td>
125
            <td valign="top"><input name="obj_name" type="text" class="form_ivalue" size="60" value="<%=Request("obj_name")%>"></td>
126
          </tr>
126
            <td valign="top"> <%=objForm.Validate ("obj_name")%> </td>
127
          <tr>
127
          </tr>
128
            <td valign="top" nowrap class="form_iname">Description</td>
128
          <tr>
129
            <td valign="top"><textarea name="obj_description" cols="60" rows="10" class="form_ivalue"><%=Request("obj_description")%></textarea></td>
129
            <td valign="top" nowrap class="form_iname">Description</td>
130
            <td valign="top"> <%=objForm.Validate ("obj_description")%> </td>
130
            <td valign="top"><textarea name="obj_description" cols="60" rows="10" class="form_ivalue"><%=Request("obj_description")%></textarea></td>
131
          </tr>
131
            <td valign="top"> <%=objForm.Validate ("obj_description")%> </td>
132
          <tr>
132
          </tr>
133
            <td width="10%" class="form_iname">&nbsp;</td>
133
          <tr>
134
            <td width="1%">&nbsp;</td>
134
            <td width="10%" class="form_iname">&nbsp;</td>
135
            <td width="90%" class="val_err"></td>
135
            <td width="1%">&nbsp;</td>
136
          </tr>
136
            <td width="90%" class="val_err"></td>
137
        </table></td>
137
          </tr>
138
      </tr>
138
        </table></td>
139
    </table></td>
139
      </tr>
140
  </tr>
140
    </table></td>
141
  <%=objPMod.ComposeHiddenTags()%>
141
  </tr>
142
  <input type="hidden" name="action" value="true">
142
  <%=objPMod.ComposeHiddenTags()%>
143
  </form>
143
  <input type="hidden" name="action" value="true">
144
</table>
144
  </form>
145
</body>
145
</table>
146
</html>
146
</body>
147
<%
147
</html>
148
'------------ RUN AFTER PAGE RENDER -----------
148
<%
149
Set objFormCollector = Nothing
149
'------------ RUN AFTER PAGE RENDER -----------
150
'----------------------------------------------
150
Set objFormCollector = Nothing
151
%>
151
'----------------------------------------------
152
<!--#include file="common/globals_destructor.asp"-->
152
%>
-
 
153
<!--#include file="common/globals_destructor.asp"-->