Subversion Repositories DevTools

Rev

Rev 5506 | Rev 5636 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5590 dpurdie 5
'|                    wAddSchedule
5357 dpurdie 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
Response.Expires = 0
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_login.asp"-->
24
<%
25
'------------ VARIABLE DEFINITION -------------
26
Dim rsQry
27
Dim rsTemp
28
Dim sMessage
29
Dim Query_String
30
'------------ CONSTANTS DECLARATION -----------
31
'------------ VARIABLE INIT -------------------
32
sMessage = NULL
33
 
34
Set objFormCollector = CreateObject("Scripting.Dictionary")
35
'------------ CONDITIONS ----------------------
36
'----------------------------------------------
37
%>
38
<%
39
'--------------------------------------------------------------------------------------------------------------------------
40
Function GetMachType ( ngbe_id )
5590 dpurdie 41
    Dim rsQry, query
42
 
43
    OraDatabase.Parameters.Add "gbe_id",   ngbe_id, ORAPARM_INPUT, ORATYPE_NUMBER 
44
 
45
    query = GetQuery ("GBE_MACHTYPECombo.sql")
46
 
47
    Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
48
    If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
49
        GetMachType = rsQry.GetRows()
50
    Else
51
        GetMachType = NULL
52
 
53
    End If
54
 
55
    rsQry.Close()
56
    Set rsQry = Nothing
57
 
58
    OraDatabase.Parameters.Remove "gbe_id"
5357 dpurdie 59
End Function
60
'--------------------------------------------------------------------------------------------------------------------------
61
Sub RenderRepeatCombo( cRepeat )
5590 dpurdie 62
    Response.Write "<select name='repeat_combo' class='form_item'>" 
5357 dpurdie 63
    Response.write "<option value='0'>Once Only</option>"
64
    Response.write "<option value='1'>Daily</option>"
65
    Response.write "<option value='7'>Weekly</option>"
5590 dpurdie 66
    Response.Write "</select>"  
5357 dpurdie 67
End Sub
68
'--------------------------------------------------------------------------------------------------------------------------
69
%>
70
<%
71
'------------ RUN BEFORE PAGE RENDER ----------
72
If CBool(Request("action")) Then
73
 
5590 dpurdie 74
    If Len(Request("repeat_combo")) > 1 Then
75
 
76
        Call DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )
77
 
78
    Else
79
        On Error Resume Next
80
        OraDatabase.Parameters.Add "SCHEDULED_PAUSE",   Request("scheduled_pause"),     ORAPARM_INPUT, ORATYPE_VARCHAR2
81
        OraDatabase.Parameters.Add "SCHEDULED_RESUME",  Request("scheduled_resume"),    ORAPARM_INPUT, ORATYPE_VARCHAR2
82
        OraDatabase.Parameters.Add "REPEAT",            Request("repeat_combo"),        ORAPARM_INPUT, ORATYPE_CHAR
83
        OraDatabase.Parameters.Add "INDEFINITE_PAUSE",  Request("indefinite_pause"),    ORAPARM_INPUT, ORATYPE_CHAR
84
 
85
        objEH.TryORA ( OraSession )
86
 
87
        OraDatabase.ExecuteSQL _
5357 dpurdie 88
           "BEGIN PK_BUILDAPI.Insert_Schedule_Info ( " &_
89
                "TO_DATE(:SCHEDULED_PAUSE,'DD-MM-YYYY HH24:MI:SS'), " &_
90
                "TO_DATE(:SCHEDULED_RESUME,'DD-MM-YYYY HH24:MI:SS'), " &_
91
                ":REPEAT, " &_
92
                ":INDEFINITE_PAUSE );" &_
93
            "END;"
5590 dpurdie 94
 
95
        objEH.CatchORA ( OraSession )
5357 dpurdie 96
 
5590 dpurdie 97
        OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"
98
        OraDatabase.Parameters.Remove "SCHEDULED_RESUME"
99
        OraDatabase.Parameters.Remove "REPEAT"
100
        OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"
5357 dpurdie 101
 
5590 dpurdie 102
        If objEH.Finally Then
103
            Call OpenInParentWindow ("admin_build_service.asp")
104
            Call CloseWindow()
105
        End If
5357 dpurdie 106
 
5590 dpurdie 107
        rsQry.Close()
108
        Set rsQry = nothing
109
    End If
110
 
5357 dpurdie 111
End If
112
 
113
 
114
'----------------------------------------------
115
%>
116
<html>
5590 dpurdie 117
    <head>
118
        <title>Release Manager</title>
5357 dpurdie 119
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
5590 dpurdie 120
        <meta http-equiv="Pragma" content="no-cache">
121
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
122
        <link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
123
        <script language="JavaScript" src="scripts/common.js"></script>
124
        <script language="JavaScript" src="images/ts_picker.js"></script>
125
    </head>
126
    <body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();">
127
        <table width="100%" border="0" cellspacing="0" cellpadding="10">
128
            <%
129
            '-- FROM START --------------------------------------------------------------------------------------------------------------
130
            objFormComponent.FormName = "run_level_schedule"
131
            objFormComponent.FormClass = "form_tight"
132
            objFormComponent.Action = ScriptName
133
            objFormComponent.OnSubmit = "ShowProgress();"
134
            Call objFormComponent.FormStart()
135
            %>
136
            <tr>
137
                <td>
138
                    <!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
139
                    <%Call Messenger ( sMessage , 3, "100%" )%>
140
                    <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
141
                    <!--#include file="messages/_msg_inline.asp"-->
142
                    <br>
143
                    <table width="50%" border="0">
144
                        <tr>
145
                            <td nowrap class="form_iname">SCHEDULED PAUSE</td>
146
                            <td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
147
                            <td class="form_item" width="1">
148
                                <a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
149
                                    <img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
150
                                </a>
151
                            </td>
152
                        </tr>
153
                        <tr>
154
                            <td nowrap class="form_iname">SCHEDULED RESUME</td>
155
                            <td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
156
                            <td class="form_item">
157
                                <a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
158
                                    <img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
159
                                </a>
160
                            </td>
161
                        </tr>
162
                        <tr>
163
                            <td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
164
                            <td colspan="2"><% Call RenderRepeatCombo("")%></td>
165
                        </tr>
166
                    </table>
167
                </td>
168
            </tr>
169
            <%=objPMod.ComposeHiddenTags()%>
170
            <input type="hidden" name="action" value="true">
171
            <%
172
            Call objFormComponent.FormEnd()
173
            '-- FROM END ----------------------------------------------------------------------------------------------------------------
174
            %>
175
            <tr>
176
                <td background="images/bg_login.gif">
177
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
178
                        <tr>
179
                            <td><%=ProgressBar()%></td>
180
                            <td align="right">
181
                                <input name="btn" type="submit" class="form_btn" value="Add">
182
                                <input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();"></td>
183
                        </tr>
184
                    </table>
185
                </td>
186
            </tr>
187
        </table>
188
    </body>
5357 dpurdie 189
</html>
190
<%
191
'------------ RUN AFTER PAGE RENDER -----------
192
Set objFormCollector = Nothing
193
'----------------------------------------------
194
Call Destroy_All_Objects
195
%>