Blame | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wAddProjectExtension |'| |'=====================================================%><%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"--><!-- #INCLUDE FILE="common/adovbs.inc" --><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_general.asp"--><!--#include file="_access_control_login.asp"--><%'------------ VARIABLE DEFINITION -------------Dim rsQryDim sMessageDim Query_String'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------sMessage = NULLSet objFormCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------function showCheck (val)if val = "Y" ThenshowCheck = "checked"ElseshowCheck = ""End IfEnd Functionfunction niceBool (val)if val = "Y" ThenniceBool = "Y"ElseniceBool = "N"End IfEnd FunctionSub checkExt (val)Dim objRegExprSet objRegExpr = New regexpobjRegExpr.Pattern = "^\.[a-z]{2,4}$"objRegExpr.IgnoreCase = FalseIf NOT objRegExpr.Test(val) ThensMessage = "New project extension is not suitable. Must start with a 'dot' and must be between 2 and 4 lowercase characters"End IfEnd SubSub performActionDim rowCountrowCount = -1'' Determine if the named project suffix exists' Count the rows in the query'If Request("newext") <> "" ThencheckExt(Request("newext"))If not isNull (sMessage) then Exit SubQuery_String = "SELECT EXT_NAME from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("newext") & "'"Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )rowCount = rsQry.RecordCountrsQry.Close()Set rsQry = nothingElsesMessage = "No Project Extension specified"Exit SubEnd IfIf Request("ext") <> "" Then'' Update an existing entry'If (rowCount > 0) AND ( Request("ext") <> Request("newext")) ThensMessage = "Cannot rename the project extension to an existing value"ElseQuery_String = "SELECT * from PROJECT_EXTENTIONS WHERE EXT_NAME = '" & Request("ext") & "'"Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )rsQry.EditrsQry.Fields("EXT_NAME").Value = Request("newext")rsQry.Fields("UCOMMENT").Value = Request("comment")rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))rsQry.UpdatersQry.CloseSet rsQry = NothingCall OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))Call CloseWindow()End IfElse'' Insert a new entry into the table'If rowCount > 0 ThensMessage = "Project extension already exists"ElseIf rowCount < 0 ThensMessage = "No Project Extension specified"ElseQuery_String = "SELECT * from PROJECT_EXTENTIONS"Set rsQry = OraDatabase.DbCreateDynaset( Query_String, ORADYN_DEFAULT )rsQry.AddNewrsQry.Fields("EXT_NAME").Value = Request("newext")rsQry.Fields("UCOMMENT").Value = Request("comment")rsQry.Fields("IS_COTS").Value = niceBool(Request("isCots"))rsQry.Fields("IS_VISIBLE").Value = niceBool(Request("isVis"))rsQry.UpdatersQry.CloseSet rsQry = NothingCall OpenInParentWindow ("admin_project_suffix.asp?ext="&Request("newext"))Call CloseWindow()End IfEnd IfEnd Sub%><%'------------ RUN BEFORE PAGE RENDER ----------If CBool(Request("action")) ThenperformAction()End 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.display_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/Update Project Extension</span> <br>Add a new Project Extension or edit an existing Project Extension.</td></tr><%'-- FORM 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/Update"><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 , 1, "100%" )%><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><br><%Dim extNameDim commentDim isaCotsDim isVisIf Request("ext") <> "" Then%><input type="hidden" name="ext" value="<%=Request("ext")%>"><%Dim rsTempQuery_String = "select * FROM PROJECT_EXTENTIONS " &_" where ext_name = '"& Request("ext") & "'"Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))extName = rsTemp("EXT_NAME")comment = rsTemp("UCOMMENT")isaCots = niceBool(rsTemp("IS_COTS"))isVis = niceBool(rsTemp("IS_VISIBLE"))rsTemp.Close()Set rsTemp = NothingElseisaCots = "N"isVis = "Y"End If%><table width="50%" border="0" class="body_txt"><tr><td>Project Extension</td><td><input name="newext" type="text" class="body_txt" value="<%=extName%>" size=7 maxlength=5></td></tr><tr><td></td><td>The project suffix must start with a '.' and contain 2 to 4 lower case characters.</td></tr><tr><td>Comment</td><td><input name="comment" type="text" class="body_txt" value="<%=comment%>" size=80 maxlength=80></td></tr><tr><td></td><td>The comment field will be displayed during the project suffix selection process</td></tr><tr><td>Enable Selection</td><td><input name="isVis" type="checkbox" value="Y" <%=showCheck(isVis)%>></td></tr><tr><td></td><td>If selection is not enabled then the Suffix will not be shown and cannot be selected.This is useful for legacy projects where multiple extensions have been used. </td></tr><tr><td>Free Form Version</td><td><input name="isCots" type="checkbox" value="Y" <%=showCheck(isaCots)%>></td></tr><tr><td></td><td>Free Form Versioning flags packages are allowed to have non-standard version numbers.If the version number is in the standard major.minor.patch-build form then the package can be auto-versioned.If the version number has only a patch-build field then it can rippled.</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%>