| 127 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| wAddLicence |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
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/_form_window_common.asp"-->
|
|
|
19 |
<%
|
|
|
20 |
'------------ ACCESS CONTROL ------------------
|
|
|
21 |
%>
|
|
|
22 |
<!--#include file="_access_control_general.asp"-->
|
|
|
23 |
<!--#include file="_access_control_login.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ VARIABLE DEFINITION -------------
|
|
|
26 |
Dim rsQry
|
|
|
27 |
Dim sMessage
|
|
|
28 |
Dim LICENCE_NAME
|
|
|
29 |
Dim Query_String
|
|
|
30 |
Dim dual
|
|
|
31 |
Dim LICENCE_ID
|
|
|
32 |
Dim Query_Stringx
|
|
|
33 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
34 |
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
|
|
|
35 |
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
|
|
|
36 |
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
|
|
|
37 |
'------------ VARIABLE INIT -------------------
|
|
|
38 |
sMessage = NULL
|
|
|
39 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
40 |
'------------ CONDITIONS ----------------------
|
|
|
41 |
'----------------------------------------------
|
|
|
42 |
%>
|
|
|
43 |
<%
|
|
|
44 |
|
|
|
45 |
%>
|
|
|
46 |
<%
|
|
|
47 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
48 |
|
|
|
49 |
If CBool(Request("action")) Then
|
|
|
50 |
|
|
|
51 |
If Request("LICENCE_NAME") = "" Then
|
|
|
52 |
|
|
|
53 |
Call RaiseMsg ( enum_MSG_ERROR, "Cannot add an empty string as a licence name" )
|
|
|
54 |
|
|
|
55 |
Else
|
|
|
56 |
Query_String = _
|
|
|
57 |
" SELECT * FROM licences WHERE name = '"& Request("LICENCE_NAME") &"'"
|
|
|
58 |
|
|
|
59 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
60 |
|
|
|
61 |
If rsQry.RecordCount = 0 Then
|
|
|
62 |
|
|
|
63 |
Query_Stringx = _
|
|
|
64 |
" SELECT seq_gbe_id.NEXTVAL FROM DUAL"
|
|
|
65 |
|
|
|
66 |
Set dual = OraDatabase.DbCreateDynaset(Query_Stringx,cint(0))
|
|
|
67 |
LICENCE_ID = dual("NEXTVAL")
|
|
|
68 |
dual.Close()
|
|
|
69 |
Set dual = Nothing
|
| 129 |
ghuddy |
70 |
|
| 127 |
ghuddy |
71 |
OraDatabase.Parameters.Add "LICENCE", LICENCE_ID, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
72 |
OraDatabase.Parameters.Add "NAME", Request("LICENCE_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
73 |
|
| 129 |
ghuddy |
74 |
objEH.TryORA ( OraSession )
|
|
|
75 |
On Error Resume Next
|
| 127 |
ghuddy |
76 |
OraDatabase.ExecuteSQL ("begin INSERT INTO licences (licence, name) VALUES (:LICENCE, :NAME); end;")
|
| 129 |
ghuddy |
77 |
objEH.CatchORA ( OraSession )
|
| 127 |
ghuddy |
78 |
|
|
|
79 |
OraDatabase.Parameters.Remove "LICENCE"
|
|
|
80 |
OraDatabase.Parameters.Remove "NAME"
|
|
|
81 |
|
|
|
82 |
If objEH.Finally Then
|
|
|
83 |
Call OpenInParentWindow ("admin_licences.asp")
|
|
|
84 |
Call CloseWindow()
|
|
|
85 |
End If
|
|
|
86 |
|
|
|
87 |
Else
|
|
|
88 |
Call RaiseMsg ( enum_MSG_LICENCE_EXISTS, Request("LICENCE_ID") )
|
|
|
89 |
End If
|
|
|
90 |
|
|
|
91 |
rsQry.Close
|
|
|
92 |
Set rsQry = nothing
|
|
|
93 |
End If
|
|
|
94 |
|
|
|
95 |
End If
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
'----------------------------------------------
|
|
|
99 |
%>
|
|
|
100 |
<html>
|
|
|
101 |
<head>
|
|
|
102 |
<title>Release Manager</title>
|
|
|
103 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
104 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
105 |
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
|
|
|
106 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
107 |
</head>
|
|
|
108 |
|
|
|
109 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.LICENCE_NAME.focus();">
|
|
|
110 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
111 |
<tr>
|
|
|
112 |
<td bgcolor="#FFFFFF" class="body_txt">
|
|
|
113 |
<span class="body_h1">
|
|
|
114 |
<img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Add Licence
|
|
|
115 |
</span>
|
|
|
116 |
<br>
|
|
|
117 |
Add a new licence.
|
|
|
118 |
</td>
|
|
|
119 |
</tr>
|
|
|
120 |
|
|
|
121 |
<%
|
|
|
122 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
123 |
objFormComponent.FormName = "FormName"
|
|
|
124 |
objFormComponent.Action = ScriptName
|
|
|
125 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
126 |
Call objFormComponent.FormStart()
|
|
|
127 |
|
|
|
128 |
%>
|
|
|
129 |
<tr>
|
|
|
130 |
<td background="images/bg_login.gif">
|
|
|
131 |
<table width="50%" border="0" cellspacing="0" cellpadding="0">
|
|
|
132 |
<tr>
|
|
|
133 |
<td><%=ProgressBar()%></td>
|
|
|
134 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Add">
|
|
|
135 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
|
|
|
136 |
</td>
|
|
|
137 |
</tr>
|
|
|
138 |
</table>
|
|
|
139 |
</td>
|
|
|
140 |
</tr>
|
|
|
141 |
<tr>
|
|
|
142 |
<td>
|
|
|
143 |
<!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
144 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
|
|
145 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
146 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
147 |
<table width="70%" border="0">
|
|
|
148 |
<tr>
|
|
|
149 |
<td><span class="body_txt">Licence Name</span></td>
|
|
|
150 |
<td><input name="LICENCE_NAME" type="text" class="body_txt" value="<%=LICENCE_NAME%>" size=70 maxlength=50></td>
|
|
|
151 |
</tr>
|
|
|
152 |
<tr>
|
|
|
153 |
<td> </td>
|
|
|
154 |
<td> </td>
|
|
|
155 |
</tr>
|
|
|
156 |
</table>
|
|
|
157 |
</td>
|
|
|
158 |
</tr>
|
|
|
159 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
160 |
<input type="hidden" name="action" value="true">
|
|
|
161 |
|
|
|
162 |
<%
|
|
|
163 |
Call objFormComponent.FormEnd()
|
|
|
164 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
165 |
%>
|
|
|
166 |
</table>
|
|
|
167 |
</body>
|
|
|
168 |
</html>
|
|
|
169 |
<%
|
|
|
170 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
171 |
Set objFormCollector = Nothing
|
|
|
172 |
'----------------------------------------------
|
|
|
173 |
Call Destroy_All_Objects
|
|
|
174 |
%>
|
|
|
175 |
|
|
|
176 |
|