Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddSchedule
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 )
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"
59
End Function
60
'--------------------------------------------------------------------------------------------------------------------------
61
Sub RenderRepeatCombo( cRepeat )
62
	Response.Write "<select name='repeat_combo' class='form_item'>"	
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>"
66
	Response.Write "</select>"	
67
End Sub
68
'--------------------------------------------------------------------------------------------------------------------------
69
%>
70
<%
71
'------------ RUN BEFORE PAGE RENDER ----------
72
If CBool(Request("action")) Then
73
 
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 _
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;"
94
 
95
		objEH.CatchORA ( OraSession )
96
 
97
		OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"
98
		OraDatabase.Parameters.Remove "SCHEDULED_RESUME"
99
		OraDatabase.Parameters.Remove "REPEAT"
100
		OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"
101
 
102
		If objEH.Finally Then
103
			Call OpenInParentWindow ("admin_build_service.asp")
104
			Call CloseWindow()
105
		End If
106
 
107
		rsQry.Close()
108
		Set rsQry = nothing
109
	End If
110
 
111
End If
112
 
113
 
114
'----------------------------------------------
115
%>
116
<html>
117
	<head>
118
		<title>Release Manager</title>
119
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
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
			<tr>
129
				<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>
130
					<br>
131
					Add a new SCHEDULE.
132
				</td>
133
			</tr>
134
			<%
135
'-- FROM START --------------------------------------------------------------------------------------------------------------
136
objFormComponent.FormName = "run_level_schedule"
137
objFormComponent.Action = ScriptName
138
objFormComponent.OnSubmit = "ShowProgress();"
139
Call objFormComponent.FormStart()
140
 
141
%>
142
			<tr>
143
				<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
144
						<tr>
145
							<td><%=ProgressBar()%></td>
146
							<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>
147
						</tr>
148
					</table>
149
				</td>
150
			</tr>
151
			<tr>
152
				<td>
153
					<!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
154
					<%Call Messenger ( sMessage , 3, "100%" )%>
155
					<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
156
					<!--#include file="messages/_msg_inline.asp"-->
157
					<br>
158
					<table width="50%" border="0">
159
						<tr>
160
							<td nowrap class="form_iname">SCHEDULED PAUSE</td>
161
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
162
							<td class="form_item" width="1">
163
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
164
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
165
								</a>
166
							</td>
167
						</tr>
168
						<tr>
169
							<td nowrap class="form_iname">SCHEDULED RESUME</td>
170
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
171
							<td class="form_item">
172
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
173
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
174
								</a>
175
							</td>
176
						</tr>
177
						<tr>
178
							<td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
179
							<td colspan="2"><% Call RenderRepeatCombo("")%></td>
180
						</tr>
181
						<tr>
182
							<td>&nbsp;</td>
183
							<td>&nbsp;</td>
184
							<td>&nbsp;</td>
185
						</tr>
186
					</table>
187
				</td>
188
			</tr>
189
			<%=objPMod.ComposeHiddenTags()%>
190
			<input type="hidden" name="action" value="true">
191
			<%
192
Call objFormComponent.FormEnd()
193
'-- FROM END ----------------------------------------------------------------------------------------------------------------
194
%>
195
		</table>
196
	</body>
197
</html>
198
<%
199
'------------ RUN AFTER PAGE RENDER -----------
200
Set objFormCollector = Nothing
201
'----------------------------------------------
202
Call Destroy_All_Objects
203
%>