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
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'>"	
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>"	
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
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
87
		OraDatabase.Parameters.Add "INDEFINITE_PAUSE",	Request("indefinite_pause"), 	ORAPARM_INPUT, ORATYPE_CHAR
88
 
89
		objEH.TryORA ( OraSession )
90
 
91
		OraDatabase.ExecuteSQL _
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;"
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")
108
			Call CloseWindow()
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
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
124
		<meta http-equiv="Pragma" content="no-cache">
125
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
126
		<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
127
			<script language="JavaScript" src="scripts/common.js"></script>
128
			<script language="JavaScript" src="images/ts_picker.js"></script>
129
	</head>
130
	<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onload="self.focus();">
131
		<table width="100%" border="0" cellspacing="0" cellpadding="10">
132
			<tr>
133
				<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>
134
					<br>
135
					Add a new SCHEDULE.
136
				</td>
137
			</tr>
138
			<%
139
'-- FROM START --------------------------------------------------------------------------------------------------------------
140
objFormComponent.FormName = "run_level_schedule"
141
objFormComponent.Action = ScriptName
142
objFormComponent.OnSubmit = "ShowProgress();"
143
Call objFormComponent.FormStart()
144
 
145
%>
146
			<tr>
147
				<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
148
						<tr>
149
							<td><%=ProgressBar()%></td>
150
							<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>
151
						</tr>
152
					</table>
153
				</td>
154
			</tr>
155
			<tr>
156
				<td>
157
					<!-- NEW SCHEDULE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
158
					<%Call Messenger ( sMessage , 3, "100%" )%>
159
					<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
160
					<!--#include file="messages/_msg_inline.asp"-->
161
					<br>
162
					<table width="50%" border="0">
163
						<tr>
164
							<td nowrap class="form_iname">SCHEDULED PAUSE</td>
165
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_pause", "", "size='20' class='form_ivalue'" )%></td>
166
							<td class="form_item" width="1">
167
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_pause', document.run_level_schedule.scheduled_pause.value);">
168
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click here to select the time to pause">
169
								</a>
170
							</td>
171
						</tr>
172
						<tr>
173
							<td nowrap class="form_iname">SCHEDULED RESUME</td>
174
							<td class="form_item"><%=objFormComponent.TextBox ("scheduled_resume", "", "size='20' class='form_ivalue'" )%></td>
175
							<td class="form_item">
176
								<a href="javascript:show_calendar('document.run_level_schedule.scheduled_resume', document.run_level_schedule.scheduled_resume.value);">
177
									<img src="images/cal.gif" width="16" height="16" border="0" alt="Click Here to select the time to resume">
178
								</a>
179
							</td>
180
						</tr>
181
						<tr>
182
							<td nowrap class="form_iname">REPEAT SCHEDULED DOWNTIME</td>
183
							<td colspan="2"><% Call RenderRepeatCombo("")%></td>
184
						</tr>
185
						<tr>
186
							<td>&nbsp;</td>
187
							<td>&nbsp;</td>
188
							<td>&nbsp;</td>
189
						</tr>
190
					</table>
191
				</td>
192
			</tr>
193
			<%=objPMod.ComposeHiddenTags()%>
194
			<input type="hidden" name="action" value="true">
195
			<%
196
Call objFormComponent.FormEnd()
197
'-- FROM END ----------------------------------------------------------------------------------------------------------------
198
%>
199
		</table>
200
	</body>
201
</html>
202
<%
203
'------------ RUN AFTER PAGE RENDER -----------
204
Set objFormCollector = Nothing
205
'----------------------------------------------
206
Call Destroy_All_Objects
207
%>