Subversion Repositories DevTools

Rev

Rev 5981 | Rev 6579 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'           Update a Licence Text
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "admin_licences.asp" )
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim sMessage
Dim parLic_id
Dim LicenceName
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parLic_id = Request("lic_id")
sMessage = NULL
'----------------------------------------------
%>
<%
'-----------------------------------------------------------------------------------------------------------------------------
Sub Get_Licence_Config ( NNLic_id, out_name )
   Dim rsTemp, Query_String

   Query_String = _
   " SELECT licence, name "&_
   "   FROM licences l "&_
   "  WHERE l.licence = "& NNLic_id

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))

   out_name = rsTemp("name")

   rsTemp.Close()
   Set rsTemp = nothing
End Sub
'-----------------------------------------------------------------------------------------------------------------------------------
Sub Update_Licence_Config ( NNLic_id, sLicenceName)

   OraDatabase.Parameters.Add "LIC_ID",        NNLic_id,          ORAPARM_INPUT,    ORATYPE_NUMBER
   OraDatabase.Parameters.Add "LIC_TEXT",     sLicenceName,          ORAPARM_INPUT,    ORATYPE_VARCHAR2

   objEH.ErrorRedirect = FALSE
   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL "UPDATE licences set NAME = :LIC_TEXT WHERE LICENCE = :LIC_ID"

   objEH.CatchORA ( OraSession )
   If objEH.Finally Then
      Call OpenInParentWindow ("admin_licences.asp" )
      Call CloseWindow
   End If

   OraDatabase.Parameters.Remove "LIC_ID"
   OraDatabase.Parameters.Remove "LIC_TEXT"

End Sub
'-----------------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ Action Requirements -------------------
'Process submition
If CBool(Request("action")) AND objAccessControl.UserLogedIn AND parLic_id <> "" Then
    Call Update_Licence_Config ( parLic_id, Request("licName") )
End If

Call Get_Licence_Config ( parLic_id, LicenceName )

%>
<html>
   <head>
      <title>Release Manager</title>
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
      <meta http-equiv="Pragma" content="no-cache">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
      <link rel="stylesheet" href="images/navigation.css" type="text/css">
      <script language="JavaScript" src="images/common.js"></script>
      <!-- TIPS -->
      <script language="JavaScript" src="images/tipster.js"></script>
      <script language="JavaScript" src="images/_help_tips.js"></script>
   </head>
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
      <!-- TIPS LAYERS -------------------------------------->
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
      <!----------------------------------------------------->
      <form class="form_tight" action="<%=scriptName%>" method="post" name="LicenceName" onsubmit="MM_validateForm('licName','Licence Name','RminLength:3');return document.MM_returnValue;">
         <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
            <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
               <!-- LOCAL ERROR +++++++++++++++++++++++++++++++++++++++++++++++ -->
               <%Call Messenger ( sMessage , 3, "100%" )%>
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
               <!--#include file="messages/_msg_inline.asp"-->
               <table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr>
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
                  <td width="100%">
                     <table width="100%" border="0" cellspacing="1" cellpadding="4">
                     <tr>
                        <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Licence Name</td>
                        <td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
                           <input name="licName" type="text" size="78" maxlength="200" class="form_item" value='<%=LicenceName%>'>
                        </td>
                     </tr>
                     </table>
                  </td>
               </tr>
               </table>
               <input type="hidden" name="action" value="true">
               <input type="hidden" name="lic_id" value="<%=parLic_id%>">
            </td>
         </tr>
         <tr>
            <td><%=ProgressBar()%></td>
            <td align="right" nowrap class="wform_ttl">
               <input type="submit" name="btn" value="Save" class="form_btn">
               <input type="reset" name="btn" value="Close" class="form_btn" onclick="parent.closeIFrame();">
            </td>
         </tr>
         </table>
      </form>
   </body>
</html>
<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->