Subversion Repositories DevTools

Rev

Rev 119 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                wAddSchedule
'|                                                   |
'=====================================================
%>
<%
Option explicit
Response.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 rsQry
Dim rsTemp
Dim sMessage
Dim Query_String
'------------ 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 = NULL

Set objFormCollector = CreateObject("Scripting.Dictionary")
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Function GetMachType ( ngbe_id )
        Dim rsQry, query
        
        OraDatabase.Parameters.Add "gbe_id",   ngbe_id, ORAPARM_INPUT, ORATYPE_NUMBER 
        
        query = GetQuery ("GBE_MACHTYPECombo.sql")
        
        
        Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
        If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
                GetMachType = rsQry.GetRows()
        Else
                GetMachType = NULL
                
        End If
        
        rsQry.Close()
        Set rsQry = Nothing
        
        OraDatabase.Parameters.Remove "gbe_id"
End Function
'--------------------------------------------------------------------------------------------------------------------------
Sub RenderRepeatCombo( cRepeat )
        
        Query_String = "select * from repeat_schedule"

        Response.Write "<select name='repeat_combo' class='form_item'>" 
        
        Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
        
        Response.Write "<option>Select Repeat Schedule</option>"        
        While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
        
        If cRepeat = rsTemp.Fields("repeat") Then
                Response.write "<option value='"& rsTemp.Fields("repeat") &"' selected>"& rsTemp.Fields("repeat") &"</option>"
        Else
                Response.write "<option value='"& rsTemp.Fields("repeat") &"'>"& rsTemp.Fields("repeat") &"</option>"
        End If
        rsTemp.MoveNext
        WEnd
                                
        rsTemp.Close()
        Set rsTemp = nothing    


        Response.Write "</select>"
End Sub
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------


If CBool(Request("action")) Then

        If Len(Request("repeat_combo")) > 1 Then
        
                Call DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )
        
        Else
                On Error Resume Next
                OraDatabase.Parameters.Add "SCHEDULED_PAUSE",   Request("scheduled_pause"),     ORAPARM_INPUT, ORATYPE_DATE
                OraDatabase.Parameters.Add "SCHEDULED_RESUME",  Request("scheduled_resume"),    ORAPARM_INPUT, ORATYPE_DATE
                OraDatabase.Parameters.Add "REPEAT",                    Request("repeat_combo"),        ORAPARM_INPUT, ORATYPE_CHAR
                OraDatabase.Parameters.Add "INDEFINITE_PAUSE",  Request("indefinite_pause"),    ORAPARM_INPUT, ORATYPE_CHAR
                
                objEH.TryORA ( OraSession )
                
                OraDatabase.ExecuteSQL _
                "BEGIN PK_BUILDAPI.Insert_Schedule_Info ( :SCHEDULED_PAUSE, :SCHEDULED_RESUME, :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 Then
                        Call OpenInParentWindow ("admin_build_service.asp")
                        Call CloseWindow()
                End If

                rsQry.Close()
                Set rsQry = nothing
        End If
                
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>
                        <script language="JavaScript" src="images/ts_picker.js"></script>
        </head>
        <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.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">&nbsp;Add SCHEDULE</span>
                                        <br>
                                        Add a new SCHEDULE.
                                </td>
                        </tr>
                        <%
'-- FROM START --------------------------------------------------------------------------------------------------------------
objFormComponent.FormName = "run_level_schedule"
objFormComponent.Action = ScriptName
objFormComponent.OnSubmit = "ShowProgress();"
Call objFormComponent.FormStart()

%>
                        <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"> <input name="btn" type="reset" class="form_btn" value="Cancel" onclick="self.close();"></td>
                                                </tr>
                                        </table>
                                </td>
                        </tr>
                        <tr>
                                <td>
                                        <!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
                                        <%Call Messenger ( sMessage , 3, "100%" )%>
                                        <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                                        <!--#include file="messages/_msg_inline.asp"-->
                                        <br>
                                        <table width="50%" border="0">
                                                <tr>
                                                        <td nowrap class="form_iname">SCHEDULED PAUSE</td>
                                                        <td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
                                                        <td class="form_item" width="1">
                                                                <a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
                                                                        <img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
                                                                </a>
                                                        </td>
                                                </tr>
                                                <tr>
                                                        <td nowrap class="form_iname">SCHEDULED RESUME</td>
                                                        <td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
                                                        <td class="form_item">
                                                                <a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
                                                                        <img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
                                                                </a>
                                                        </td>
                                                </tr>
                                                <tr>
                                                        <td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
                                                        <td colspan="2"><% Call RenderRepeatCombo("")%></td>
                                                </tr>
                                                <tr>
                                                        <td>&nbsp;</td>
                                                        <td>&nbsp;</td>
                                                        <td>&nbsp;</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
%>