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