Rev 129 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wAddLicence |'| |'=====================================================%><%Option explicitResponse.Expires = 0%><!--#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/_form_window_common.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><!--#include file="_access_control_login.asp"--><%'------------ VARIABLE DEFINITION -------------Dim rsQryDim sMessageDim LICENCE_NAMEDim Query_StringDim dualDim LICENCE_IDDim Query_Stringx'------------ CONSTANTS DECLARATION -----------Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"'------------ VARIABLE INIT -------------------sMessage = NULLSet objFormCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------%><%%><%'------------ RUN BEFORE PAGE RENDER ----------If CBool(Request("action")) ThenIf Request("LICENCE_NAME") = "" ThenCall RaiseMsg ( enum_MSG_ERROR, "Cannot add an empty string as a licence name" )ElseQuery_String = _" SELECT * FROM licences WHERE name = '"& Request("LICENCE_NAME") &"'"Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))If rsQry.RecordCount = 0 ThenQuery_Stringx = _" SELECT seq_gbe_id.NEXTVAL FROM DUAL"Set dual = OraDatabase.DbCreateDynaset(Query_Stringx,cint(0))LICENCE_ID = dual("NEXTVAL")dual.Close()Set dual = NothingOraDatabase.Parameters.Add "LICENCE", LICENCE_ID, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "NAME", Request("LICENCE_NAME"), ORAPARM_INPUT, ORATYPE_VARCHAR2objEH.TryORA ( OraSession )On Error Resume NextOraDatabase.ExecuteSQL ("begin INSERT INTO licences (licence, name) VALUES (:LICENCE, :NAME); end;")objEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "LICENCE"OraDatabase.Parameters.Remove "NAME"If objEH.Finally ThenCall OpenInParentWindow ("admin_licences.asp")Call CloseWindow()End IfElseCall RaiseMsg ( enum_MSG_LICENCE_EXISTS, Request("LICENCE_ID") )End IfrsQry.CloseSet rsQry = nothingEnd IfEnd If'----------------------------------------------%><html><head><title>Release Manager</title><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="images/release_manager_style.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script></head><body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.LICENCE_NAME.focus();"><table width="100%" border="0" cellspacing="0" cellpadding="10"><tr><td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Add Licence</span><br>Add a new licence.</td></tr><%'-- FROM START --------------------------------------------------------------------------------------------------------------objFormComponent.FormName = "FormName"objFormComponent.Action = ScriptNameobjFormComponent.OnSubmit = "ShowProgress();"Call objFormComponent.FormStart()%><tr><td background="images/bg_login.gif"><table width="50%" border="0" cellspacing="0" cellpadding="0"><tr><td><%=ProgressBar()%></td><td align="right"><input name="btn" type="submit" class="form_btn" value="Add"><input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td></tr></table></td></tr><tr><td><!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><%Call Messenger ( sMessage , 3, "100%" )%><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><table width="70%" border="0"><tr><td><span class="body_txt">Licence Name</span></td><td><input name="LICENCE_NAME" type="text" class="body_txt" value="<%=LICENCE_NAME%>" size=70 maxlength=50></td></tr><tr><td> </td><td> </td></tr></table></td></tr><%=objPMod.ComposeHiddenTags()%><input type="hidden" name="action" value="true"><%Call objFormComponent.FormEnd()'-- FROM END ----------------------------------------------------------------------------------------------------------------%></table></body></html><%'------------ RUN AFTER PAGE RENDER -----------Set objFormCollector = Nothing'----------------------------------------------Call Destroy_All_Objects%>