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