Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 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
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
32
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
33
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
34
'------------ VARIABLE INIT -------------------
35
sMessage = NULL
36
 
37
Set objFormCollector = CreateObject("Scripting.Dictionary")
38
'------------ CONDITIONS ----------------------
39
'----------------------------------------------
40
%>
41
<%
42
'--------------------------------------------------------------------------------------------------------------------------
43
Function GetMachType ( ngbe_id )
44
	Dim rsQry, query
45
 
46
	OraDatabase.Parameters.Add "gbe_id",   ngbe_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
47
 
48
	query = GetQuery ("GBE_MACHTYPECombo.sql")
49
 
50
 
51
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
52
	If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
53
		GetMachType = rsQry.GetRows()
54
	Else
55
		GetMachType = NULL
56
 
57
	End If
58
 
59
	rsQry.Close()
60
	Set rsQry = Nothing
61
 
62
	OraDatabase.Parameters.Remove "gbe_id"
63
End Function
64
'--------------------------------------------------------------------------------------------------------------------------
65
Sub RenderRepeatCombo( cRepeat )
66
 
67
	Query_String = "select * from repeat_schedule"
68
 
69
	Response.Write "<select name='repeat_combo' class='form_item'>"	
70
 
71
	Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
72
 
73
	Response.Write "<option>Select Repeat Schedule</option>"	
74
	While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
75
 
76
	If cRepeat = rsTemp.Fields("repeat") Then
77
		Response.write "<option value='"& rsTemp.Fields("repeat") &"' selected>"& rsTemp.Fields("repeat") &"</option>"
78
	Else
79
		Response.write "<option value='"& rsTemp.Fields("repeat") &"'>"& rsTemp.Fields("repeat") &"</option>"
80
	End If
81
	rsTemp.MoveNext
82
	WEnd
83
 
84
	rsTemp.Close()
85
	Set rsTemp = nothing	
86
 
87
 
88
	Response.Write "</select>"
89
End Sub
90
'--------------------------------------------------------------------------------------------------------------------------
91
%>
92
<%
93
'------------ RUN BEFORE PAGE RENDER ----------
94
 
95
 
96
If CBool(Request("action")) Then
97
 
98
	If Len(Request("repeat_combo")) > 1 Then
99
 
100
		Call DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )
101
 
102
	Else
103
		On Error Resume Next
104
		OraDatabase.Parameters.Add "SCHEDULED_PAUSE",	Request("scheduled_pause"), 	ORAPARM_INPUT, ORATYPE_DATE
105
		OraDatabase.Parameters.Add "SCHEDULED_RESUME", 	Request("scheduled_resume"), 	ORAPARM_INPUT, ORATYPE_DATE
106
		OraDatabase.Parameters.Add "REPEAT", 			Request("repeat_combo"), 	ORAPARM_INPUT, ORATYPE_CHAR
107
		OraDatabase.Parameters.Add "INDEFINITE_PAUSE",	Request("indefinite_pause"), 	ORAPARM_INPUT, ORATYPE_CHAR
108
 
109
		objEH.TryORA ( OraSession )
110
 
111
		OraDatabase.ExecuteSQL _
112
		"BEGIN PK_BUILDAPI.Insert_Schedule_Info ( :SCHEDULED_PAUSE, :SCHEDULED_RESUME, :REPEAT, :INDEFINITE_PAUSE ); END;"	
113
 
114
		objEH.CatchORA ( OraSession )
115
 
116
		OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"
117
		OraDatabase.Parameters.Remove "SCHEDULED_RESUME"
118
		OraDatabase.Parameters.Remove "REPEAT"
119
		OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"
120
 
121
		If objEH.Finally Then
122
			Call OpenInParentWindow ("admin_build_service.asp")
123
			Call CloseWindow()
124
		End If
125
 
126
		rsQry.Close()
127
		Set rsQry = nothing
128
	End If
129
 
130
End If
131
 
132
 
133
'----------------------------------------------
134
%>
135
<html>
136
	<head>
137
		<title>Release Manager</title>
138
		<meta http-equiv="Pragma" content="no-cache">
139
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
140
		<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
141
			<script language="JavaScript" src="scripts/common.js"></script>
142
			<script language="JavaScript" src="images/ts_picker.js"></script>
143
	</head>
144
	<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();">
145
		<table width="100%" border="0" cellspacing="0" cellpadding="10">
146
			<tr>
147
				<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>
148
					<br>
149
					Add a new SCHEDULE.
150
				</td>
151
			</tr>
152
			<%
153
'-- FROM START --------------------------------------------------------------------------------------------------------------
154
objFormComponent.FormName = "run_level_schedule"
155
objFormComponent.Action = ScriptName
156
objFormComponent.OnSubmit = "ShowProgress();"
157
Call objFormComponent.FormStart()
158
 
159
%>
160
			<tr>
161
				<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
162
						<tr>
163
							<td><%=ProgressBar()%></td>
164
							<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>
165
						</tr>
166
					</table>
167
				</td>
168
			</tr>
169
			<tr>
170
				<td>
171
					<!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
172
					<%Call Messenger ( sMessage , 3, "100%" )%>
173
					<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
174
					<!--#include file="messages/_msg_inline.asp"-->
175
					<br>
176
					<table width="50%" border="0">
177
						<tr>
178
							<td nowrap class="form_iname">SCHEDULED PAUSE</td>
179
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
180
							<td class="form_item" width="1">
181
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
182
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
183
								</a>
184
							</td>
185
						</tr>
186
						<tr>
187
							<td nowrap class="form_iname">SCHEDULED RESUME</td>
188
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
189
							<td class="form_item">
190
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
191
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
192
								</a>
193
							</td>
194
						</tr>
195
						<tr>
196
							<td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
197
							<td colspan="2"><% Call RenderRepeatCombo("")%></td>
198
						</tr>
199
						<tr>
200
							<td>&nbsp;</td>
201
							<td>&nbsp;</td>
202
							<td>&nbsp;</td>
203
						</tr>
204
					</table>
205
				</td>
206
			</tr>
207
			<%=objPMod.ComposeHiddenTags()%>
208
			<input type="hidden" name="action" value="true">
209
			<%
210
Call objFormComponent.FormEnd()
211
'-- FROM END ----------------------------------------------------------------------------------------------------------------
212
%>
213
		</table>
214
	</body>
215
</html>
216
<%
217
'------------ RUN AFTER PAGE RENDER -----------
218
Set objFormCollector = Nothing
219
'----------------------------------------------
220
Call Destroy_All_Objects
221
%>