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
If CBool(Request("action")) Then
95
 
96
	If Len(Request("repeat_combo")) > 1 Then
97
 
98
		Call DisplayInfo ( "REPEAT_SCHEDULE_NOT_SELECTED", "100%" )
99
 
100
	Else
101
		On Error Resume Next
5096 dpurdie 102
		OraDatabase.Parameters.Add "SCHEDULED_PAUSE",	Request("scheduled_pause"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
103
		OraDatabase.Parameters.Add "SCHEDULED_RESUME", 	Request("scheduled_resume"), 	ORAPARM_INPUT, ORATYPE_VARCHAR2
104
		OraDatabase.Parameters.Add "REPEAT", 			Request("repeat_combo"), 	    ORAPARM_INPUT, ORATYPE_CHAR
119 ghuddy 105
		OraDatabase.Parameters.Add "INDEFINITE_PAUSE",	Request("indefinite_pause"), 	ORAPARM_INPUT, ORATYPE_CHAR
106
 
107
		objEH.TryORA ( OraSession )
108
 
109
		OraDatabase.ExecuteSQL _
5096 dpurdie 110
           "BEGIN PK_BUILDAPI.Insert_Schedule_Info ( " &_
111
                "TO_DATE(:SCHEDULED_PAUSE,'DD-MM-YYYY HH24:MI:SS'), " &_
112
                "TO_DATE(:SCHEDULED_RESUME,'DD-MM-YYYY HH24:MI:SS'), " &_
113
                ":REPEAT, " &_
114
                ":INDEFINITE_PAUSE );" &_
115
            "END;"
119 ghuddy 116
 
117
		objEH.CatchORA ( OraSession )
118
 
119
		OraDatabase.Parameters.Remove "SCHEDULED_PAUSE"
120
		OraDatabase.Parameters.Remove "SCHEDULED_RESUME"
121
		OraDatabase.Parameters.Remove "REPEAT"
122
		OraDatabase.Parameters.Remove "INDEFINITE_PAUSE"
123
 
124
		If objEH.Finally Then
125
			Call OpenInParentWindow ("admin_build_service.asp")
5096 dpurdie 126
'			Call CloseWindow()
119 ghuddy 127
		End If
128
 
129
		rsQry.Close()
130
		Set rsQry = nothing
131
	End If
132
 
133
End If
134
 
135
 
136
'----------------------------------------------
137
%>
138
<html>
139
	<head>
140
		<title>Release Manager</title>
141
		<meta http-equiv="Pragma" content="no-cache">
142
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
143
		<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
144
			<script language="JavaScript" src="scripts/common.js"></script>
145
			<script language="JavaScript" src="images/ts_picker.js"></script>
146
	</head>
147
	<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();">
148
		<table width="100%" border="0" cellspacing="0" cellpadding="10">
149
			<tr>
150
				<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>
151
					<br>
152
					Add a new SCHEDULE.
153
				</td>
154
			</tr>
155
			<%
156
'-- FROM START --------------------------------------------------------------------------------------------------------------
157
objFormComponent.FormName = "run_level_schedule"
158
objFormComponent.Action = ScriptName
159
objFormComponent.OnSubmit = "ShowProgress();"
160
Call objFormComponent.FormStart()
161
 
162
%>
163
			<tr>
164
				<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
165
						<tr>
166
							<td><%=ProgressBar()%></td>
167
							<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>
168
						</tr>
169
					</table>
170
				</td>
171
			</tr>
172
			<tr>
173
				<td>
174
					<!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
175
					<%Call Messenger ( sMessage , 3, "100%" )%>
176
					<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
177
					<!--#include file="messages/_msg_inline.asp"-->
178
					<br>
179
					<table width="50%" border="0">
180
						<tr>
181
							<td nowrap class="form_iname">SCHEDULED PAUSE</td>
182
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
183
							<td class="form_item" width="1">
184
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
185
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
186
								</a>
187
							</td>
188
						</tr>
189
						<tr>
190
							<td nowrap class="form_iname">SCHEDULED RESUME</td>
191
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
192
							<td class="form_item">
193
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
194
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
195
								</a>
196
							</td>
197
						</tr>
198
						<tr>
199
							<td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
200
							<td colspan="2"><% Call RenderRepeatCombo("")%></td>
201
						</tr>
202
						<tr>
203
							<td>&nbsp;</td>
204
							<td>&nbsp;</td>
205
							<td>&nbsp;</td>
206
						</tr>
207
					</table>
208
				</td>
209
			</tr>
210
			<%=objPMod.ComposeHiddenTags()%>
211
			<input type="hidden" name="action" value="true">
212
			<%
213
Call objFormComponent.FormEnd()
214
'-- FROM END ----------------------------------------------------------------------------------------------------------------
215
%>
216
		</table>
217
	</body>
218
</html>
219
<%
220
'------------ RUN AFTER PAGE RENDER -----------
221
Set objFormCollector = Nothing
222
'----------------------------------------------
223
Call Destroy_All_Objects
224
%>