Rev 5638 | Rev 6579 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| wAddSchedule'| |'=====================================================%><%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 rsTempDim sMessageDim Query_String'------------ CONSTANTS DECLARATION -----------'------------ VARIABLE INIT -------------------sMessage = NULLSet objFormCollector = CreateObject("Scripting.Dictionary")'------------ CONDITIONS ----------------------'----------------------------------------------%><%'--------------------------------------------------------------------------------------------------------------------------Function GetMachType ( ngbe_id )Dim rsQry, queryOraDatabase.Parameters.Add "gbe_id", ngbe_id, ORAPARM_INPUT, ORATYPE_NUMBERquery = GetQuery ("GBE_MACHTYPECombo.sql")Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )If (NOT rsQry.BOF) AND (NOT rsQry.EOF) ThenGetMachType = rsQry.GetRows()ElseGetMachType = NULLEnd IfrsQry.Close()Set rsQry = NothingOraDatabase.Parameters.Remove "gbe_id"End Function'--------------------------------------------------------------------------------------------------------------------------Sub RenderRepeatCombo( cRepeat )Response.Write "<select name='repeat_combo' class='form_item'>"Response.write "<option value='0'>Once Only</option>"Response.write "<option value='1'>Daily</option>"Response.write "<option value='7'>Weekly</option>"Response.Write "</select>"End Sub'--------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------If CBool(Request("action")) ThenIf Len(Request("repeat_combo")) > 1 ThenCall DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )ElseOn Error Resume NextOraDatabase.Parameters.Add "SCHEDULED_PAUSE", Request("scheduled_pause"), ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "SCHEDULED_RESUME", Request("scheduled_resume"), ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "REPEAT", Request("repeat_combo"), ORAPARM_INPUT, ORATYPE_CHAROraDatabase.Parameters.Add "INDEFINITE_PAUSE", Request("indefinite_pause"), ORAPARM_INPUT, ORATYPE_CHARobjEH.TryORA ( OraSession )OraDatabase.ExecuteSQL _"BEGIN PK_BUILDAPI.Insert_Schedule_Info ( " &_"TO_DATE(:SCHEDULED_PAUSE,'DY DD-MON-YYYY HH24:MI'), " &_"TO_DATE(:SCHEDULED_RESUME,'DY DD-MON-YYYY HH24:MI'), " &_":REPEAT, " &_":INDEFINITE_PAUSE );" &_"END;"objEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"OraDatabase.Parameters.Remove "SCHEDULED_RESUME"OraDatabase.Parameters.Remove "REPEAT"OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"If objEH.Finally ThenCall OpenInParentWindow ("admin_build_service.asp")Call CloseWindow()Call Destroy_All_ObjectsResponse.EndEnd IfrsQry.Close()Set rsQry = nothingEnd IfEnd If'----------------------------------------------%><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 href="images/release_manager_style.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="scripts/common.js"></script><%bJqueryTimePicker = TRUE%><!--#include file="_jquery_includes.asp"--><script>$(document).ready(function(){// Set common defaults$.timepicker.setDefaults({timeFormat: "HH:mm",dateFormat: "D dd-M-yy",controlType: 'select',oneLine: true,timeInput: true,constrainInput: true,showOn: 'both',buttonImageOnly : true,buttonImage: "images/cal.gif",buttonText: "Select Date and Time",minDate : 0,changeYear : true,yearRange : "0000:2099",changeMonth: true});// Set up two linked pickersvar startTime = $('#scheduled_pause');var endTime = $('#scheduled_resume');$.timepicker.datetimeRange(startTime,endTime,{start: { // start picker optionsonClose : function(p1,p2){checkForm();}},end: { // end picker optionsonClose : function(p1,p2){checkForm();}}});// Update form controls before displaycheckForm();});// Enable / Disable the forms submit button// Enable when both dates are not emptyfunction checkForm() {var resume = $('#scheduled_resume').val().length;var pause = $('#scheduled_pause').val().length;var ok = ( resume > 0 && pause > 0);var but = $("#formSubmit");but.toggleClass("form_btn", ok);but.toggleClass("form_btn_disabled", !ok);but.prop("disabled", !ok );}</script><style>#ui-datepicker-div {position: absolute !important;top: 0px !important;left: 0px !important;}</style></head><body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();"><table width="100%" border="0" cellspacing="0" cellpadding="10"><%'-- FROM START --------------------------------------------------------------------------------------------------------------objFormComponent.FormName = "run_level_schedule"objFormComponent.FormClass = "form_tight"objFormComponent.Action = ScriptNameobjFormComponent.OnSubmit = "ShowProgress();"Call objFormComponent.FormStart()%><tr><td><!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><%Call Messenger ( sMessage , 3, "100%" )%><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><br><table border="0"><tr><td nowrap class="form_iname">Scheduled Pause</td><td nowrap class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue' id='scheduled_pause'" )%></td></tr><tr><td nowrap class="form_iname">Scheduled Resume</td><td nowrap class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue' id='scheduled_resume'" )%></td></td></tr><tr><td nowrap class="form_iname">Repeat</td><td nowrap class="form_item"><% Call RenderRepeatCombo("")%></td></tr></table></td></tr><tr><td style="height:100px"></td></tr><tr><td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><%=ProgressBar()%></td><td align="right"><input name="btn" type="submit" class="form_btn" value="Add" id="formSubmit"><input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();"></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%>