Subversion Repositories DevTools

Rev

Rev 6371 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5981 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
4
Response.Expires = 0   ' always load the page, dont store
5
%>
6
<%
7
'=====================================================
8
'           Update a Licence Text
9
'=====================================================
10
%>
11
<!--#include file="common/conf.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/formating.asp"-->
14
<!--#include file="common/qstr.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/common_dbedit.asp"-->
17
<!--#include file="common/_popup_window_common.asp"-->
18
<%
19
' Set rfile parameter. This is a return page after Login
20
Call objPMod.StoreParameter ( "rfile", "admin_licences.asp" )
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim sMessage
29
Dim parLic_id
30
Dim LicenceName
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parLic_id = Request("lic_id")
34
sMessage = NULL
35
'----------------------------------------------
36
%>
37
<%
38
'-----------------------------------------------------------------------------------------------------------------------------
39
Sub Get_Licence_Config ( NNLic_id, out_name )
40
   Dim rsTemp, Query_String
41
 
42
   Query_String = _
43
   " SELECT licence, name "&_
44
   "   FROM licences l "&_
45
   "  WHERE l.licence = "& NNLic_id
46
 
47
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
48
 
49
   out_name = rsTemp("name")
50
 
51
   rsTemp.Close()
52
   Set rsTemp = nothing
53
End Sub
54
'-----------------------------------------------------------------------------------------------------------------------------------
55
Sub Update_Licence_Config ( NNLic_id, sLicenceName)
56
 
57
   OraDatabase.Parameters.Add "LIC_ID",        NNLic_id,          ORAPARM_INPUT,    ORATYPE_NUMBER
58
   OraDatabase.Parameters.Add "LIC_TEXT",     sLicenceName,          ORAPARM_INPUT,    ORATYPE_VARCHAR2
59
 
60
   objEH.ErrorRedirect = FALSE
61
   objEH.TryORA ( OraSession )
62
   On Error Resume Next
63
 
64
   OraDatabase.ExecuteSQL "UPDATE licences set NAME = :LIC_TEXT WHERE LICENCE = :LIC_ID"
65
 
66
   objEH.CatchORA ( OraSession )
67
   If objEH.Finally Then
68
      Call OpenInParentWindow ("admin_licences.asp" )
69
      Call CloseWindow
70
   End If
71
 
72
   OraDatabase.Parameters.Remove "LIC_ID"
73
   OraDatabase.Parameters.Remove "LIC_TEXT"
74
 
75
End Sub
76
'-----------------------------------------------------------------------------------------------------------------------------------
77
%>
78
<%
79
'------------ Action Requirements -------------------
80
'Process submition
81
If CBool(Request("action")) AND objAccessControl.UserLogedIn AND parLic_id <> "" Then
82
    Call Update_Licence_Config ( parLic_id, Request("licName") )
83
End If
84
 
85
Call Get_Licence_Config ( parLic_id, LicenceName )
86
 
87
%>
88
<html>
89
   <head>
90
      <title>Release Manager</title>
91
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
92
      <meta http-equiv="Pragma" content="no-cache">
93
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 94
      <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
95
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
96
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5981 dpurdie 97
      <!-- TIPS -->
6579 dpurdie 98
      <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
99
      <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
5981 dpurdie 100
   </head>
101
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
5982 dpurdie 102
      <form class="form_tight" action="<%=scriptName%>" method="post" name="LicenceName" onsubmit="MM_validateForm('licName','Licence Name','RminLength:3');return document.MM_returnValue;">
5981 dpurdie 103
         <table width="100%" border="0" cellspacing="0" cellpadding="2">
104
         <tr>
105
            <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
106
               <!-- LOCAL ERROR +++++++++++++++++++++++++++++++++++++++++++++++ -->
107
               <%Call Messenger ( sMessage , 3, "100%" )%>
108
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
109
               <!--#include file="messages/_msg_inline.asp"-->
110
               <table width="100%" border="0" cellspacing="0" cellpadding="0">
111
               <tr>
112
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
113
                  <td width="100%">
114
                     <table width="100%" border="0" cellspacing="1" cellpadding="4">
115
                     <tr>
116
                        <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Licence Name</td>
117
                        <td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
118
                           <input name="licName" type="text" size="78" maxlength="200" class="form_item" value='<%=LicenceName%>'>
119
                        </td>
120
                     </tr>
121
                     </table>
122
                  </td>
123
               </tr>
124
               </table>
125
               <input type="hidden" name="action" value="true">
126
               <input type="hidden" name="lic_id" value="<%=parLic_id%>">
127
            </td>
128
         </tr>
129
         <tr>
130
            <td><%=ProgressBar()%></td>
131
            <td align="right" nowrap class="wform_ttl">
132
               <input type="submit" name="btn" value="Save" class="form_btn">
133
               <input type="reset" name="btn" value="Close" class="form_btn" onclick="parent.closeIFrame();">
134
            </td>
135
         </tr>
136
         </table>
137
      </form>
138
   </body>
139
</html>
140
<!-- DESTRUCTOR ------->
141
<!--#include file="common/destructor.asp"-->