Subversion Repositories DevTools

Rev

Rev 29 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 5355
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|			          wFTP						 	 |
5
'|			          wFTP						 	 |
6
'|                                                   |
6
'|                                                   |
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
Response.Expires = 0
11
Response.Expires = 0
12
%>
12
%>
13
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/globals.asp"-->
14
<!--#include file="common/config.asp"-->
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
16
<!--#include file="common/_popup_window_common.asp"-->
17
<!--#include file="class/classTabControl.asp"-->
17
<!--#include file="class/classTabControl.asp"-->
18
<!--#include file="class/classTemplateManager.asp"-->
18
<!--#include file="class/classTemplateManager.asp"-->
19
<%
19
<%
20
'------------ ACCESS CONTROL ------------------
20
'------------ ACCESS CONTROL ------------------
21
%>
21
%>
22
<!--#include file="_access_control_general.asp"-->
22
<!--#include file="_access_control_general.asp"-->
23
<%
23
<%
24
'------------ VARIABLE DEFINITION -------------
24
'------------ VARIABLE DEFINITION -------------
25
Dim objTabControl
25
Dim objTabControl
26
Dim objTemplateManager
26
Dim objTemplateManager
27
Dim rsQry
27
Dim rsQry
28
Dim OsTab
28
Dim OsTab
29
'------------ CONSTANTS DECLARATION -----------
29
'------------ CONSTANTS DECLARATION -----------
30
'------------ VARIABLE INIT -------------------
30
'------------ VARIABLE INIT -------------------
31
 
31
 
32
Call GetMainDBParameters ( dbPARproj_id, dbPARbranch_id, dbPARbom_id, dbPARnode_id, dbPARos_id, dbPARprod_id )
32
Call GetMainDBParameters ( dbPARproj_id, dbPARbranch_id, dbPARbom_id, dbPARnode_id, dbPARos_id, dbPARprod_id )
33
parNode_id = dbPARnode_id
33
parNode_id = dbPARnode_id
34
parOs_id = dbPARos_id
34
parOs_id = dbPARos_id
35
'------------ CONDITIONS ----------------------
35
'------------ CONDITIONS ----------------------
36
'----------------------------------------------
36
'----------------------------------------------
37
%>
37
%>
38
<%
38
<%
39
'--------------------------------------------------------------------------------------------------------------------------
39
'--------------------------------------------------------------------------------------------------------------------------
40
Function GenerateFTPscript ( nOsId )
40
Function GenerateFTPscript ( nOsId )
41
	Dim rsQry, query, returnString
41
	Dim rsQry, query, returnString
42
	Dim	projName, branchName, osName
42
	Dim	projName, branchName, osName
43
	Dim PkgName, PkgVersion, Ext, Description, PkgHealthTag, CmdInterface, Owner, IsInterface, PkgFlag, VersionFlag
43
	Dim PkgName, PkgVersion, Ext, Description, PkgHealthTag, CmdInterface, Owner, IsInterface, PkgFlag, VersionFlag
44
	
44
	
45
	OraDatabase.Parameters.Add "OS_ID", nOsId,	ORAPARM_INPUT, ORATYPE_NUMBER 
45
	OraDatabase.Parameters.Add "OS_ID", nOsId,	ORAPARM_INPUT, ORATYPE_NUMBER 
46
		
46
		
47
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("NodeSpecDetails.sql"), ORADYN_DEFAULT )		
47
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("NodeSpecDetails.sql"), ORADYN_DEFAULT )		
48
	
48
	
49
	'returnString = NULL
49
	'returnString = NULL
50
	
50
	
51
	projName	=	rsQry("proj_name")
51
	projName	=	rsQry("proj_name")
52
	branchName	=	rsQry("branch_name")
52
	branchName	=	rsQry("branch_name")
53
	osName	=	rsQry("os_name")
53
	osName	=	rsQry("os_name")
54
	
54
	
55
 
55
 
56
	If osName = "Solaris" Then
56
	If osName = "Solaris" Then
57
		osName = "sparc"
57
		osName = "sparc"
58
	Else
58
	Else
59
		osName = "win32"
59
		osName = "win32"
60
	End If
60
	End If
61
 
61
 
62
	OraDatabase.Parameters.Remove "OS_ID"	
62
	OraDatabase.Parameters.Remove "OS_ID"	
63
	
63
	
64
	rsQry.Close
64
	rsQry.Close
65
	Set rsQry = Nothing
65
	Set rsQry = Nothing
66
	
66
	
67
	OraDatabase.Parameters.Add "OS_ID", nOsId,	ORAPARM_INPUT, ORATYPE_NUMBER 
67
	OraDatabase.Parameters.Add "OS_ID", nOsId,	ORAPARM_INPUT, ORATYPE_NUMBER 
68
	
68
	
69
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )
69
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )
70
	
70
	
71
 
71
 
72
	returnString	=	returnString	+	"#FTP Script for WIN32" + VBNewLine
72
	returnString	=	returnString	+	"#FTP Script for WIN32" + VBNewLine
73
	returnString	=	returnString	+	"#ftp -s:<SCRIPT_FILE>" + VBNewLine
73
	returnString	=	returnString	+	"#ftp -s:<SCRIPT_FILE>" + VBNewLine
74
	returnString	=	returnString	+	"open auperaunx26" + VBNewLine
74
	returnString	=	returnString	+	"open auperaunx26" + VBNewLine
75
	returnString	=	returnString	+	"<USERNAME>" + VBNewLine
75
	returnString	=	returnString	+	"<USERNAME>" + VBNewLine
76
	returnString	=	returnString	+	"<PASSWORD>" + VBNewLine
76
	returnString	=	returnString	+	"<PASSWORD>" + VBNewLine
77
	returnString	=	returnString	+	"binary" + VBNewLine
77
	returnString	=	returnString	+	"binary" + VBNewLine
78
	returnString	=	returnString	+	"prompt" + VBNewLine
78
	returnString	=	returnString	+	"prompt" + VBNewLine
79
	returnString	=	returnString	+	"cd /export" + VBNewLine
79
	returnString	=	returnString	+	"cd /export" + VBNewLine
80
	returnString	=	returnString	+	"cd deploy" + VBNewLine
80
	returnString	=	returnString	+	"cd deploy" + VBNewLine
81
	returnString	=	returnString	+	"cd releases" + VBNewLine
81
	returnString	=	returnString	+	"cd releases" + VBNewLine
82
	returnString	=	returnString	+	"cd "&chr(34)&projName&chr(34) + VBNewLine
82
	returnString	=	returnString	+	"cd "&chr(34)&projName&chr(34) + VBNewLine
83
	returnString	=	returnString	+	"cd "&chr(34)&branchName&chr(34) + VBNewLine
83
	returnString	=	returnString	+	"cd "&chr(34)&branchName&chr(34) + VBNewLine
84
 
84
 
85
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
85
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
86
		
86
		
87
		If osName = "win32" Then
87
		If osName = "win32" Then
88
			returnString = returnString	+	"mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe"&chr(34)&""& VbNewLine
88
			returnString = returnString	+	"mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe"&chr(34)&""& VbNewLine
89
		Else
89
		Else
90
			returnString = returnString	+	"mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz"&chr(34)&""& VbNewLine
90
			returnString = returnString	+	"mget "&chr(34)&rsQry("pkg_name")&"/"&osName&"/"&rsQry("pkg_version")&"/release/"&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz"&chr(34)&""& VbNewLine
91
		End If
91
		End If
92
		
92
		
93
		rsQry.MoveNext()
93
		rsQry.MoveNext()
94
	WEnd
94
	WEnd
95
	
95
	
96
	returnString	=	returnString	+	"bye" + VBNewLine
96
	returnString	=	returnString	+	"bye" + VBNewLine
97
	
97
	
98
	rsQry.Close
98
	rsQry.Close
99
	Set rsQry = Nothing
99
	Set rsQry = Nothing
100
	
100
	
101
 
101
 
102
 
102
 
103
 
103
 
104
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )
104
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ProductsList.sql"), ORADYN_DEFAULT )
105
 
105
 
106
	
106
	
107
	projName = Replace(projName, " ", "\ ")
107
	projName = Replace(projName, " ", "\ ")
108
	projName = Replace(projName, "(", "\(")
108
	projName = Replace(projName, "(", "\(")
109
	projName = Replace(projName, ")", "\)")
109
	projName = Replace(projName, ")", "\)")
110
 
110
 
111
	branchName = Replace(branchName, " ", "\ ")
111
	branchName = Replace(branchName, " ", "\ ")
112
 
112
 
113
	returnString = returnString + VBNewLine + VBNewLine + VBNewLine
113
	returnString = returnString + VBNewLine + VBNewLine + VBNewLine
114
	returnString	=	returnString	+	"#FTP script for SPARC" + VBNewLine
114
	returnString	=	returnString	+	"#FTP script for SPARC" + VBNewLine
115
	returnString	=	returnString	+	"#ftp -n -v auperaunx26 < <SCRIPT_FILE>" + VBNewLine
115
	returnString	=	returnString	+	"#ftp -n -v auperaunx26 < <SCRIPT_FILE>" + VBNewLine
116
	returnString	=	returnString	+	"user" + VBNewLine
116
	returnString	=	returnString	+	"user" + VBNewLine
117
	returnString	=	returnString	+	"<USERNAME>" + VBNewLine
117
	returnString	=	returnString	+	"<USERNAME>" + VBNewLine
118
	returnString	=	returnString	+	"binary" + VBNewLine
118
	returnString	=	returnString	+	"binary" + VBNewLine
119
	returnString	=	returnString	+	"prompt" + VBNewLine
119
	returnString	=	returnString	+	"prompt" + VBNewLine
120
	returnString	=	returnString	+	"cd /export" + VBNewLine
120
	returnString	=	returnString	+	"cd /export" + VBNewLine
121
	returnString	=	returnString	+	"cd deploy" + VBNewLine
121
	returnString	=	returnString	+	"cd deploy" + VBNewLine
122
	returnString	=	returnString	+	"cd releases" + VBNewLine
122
	returnString	=	returnString	+	"cd releases" + VBNewLine
123
	returnString	=	returnString	+	"cd "&projName + VBNewLine
123
	returnString	=	returnString	+	"cd "&projName + VBNewLine
124
	returnString	=	returnString	+	"cd "&branchName + VBNewLine
124
	returnString	=	returnString	+	"cd "&branchName + VBNewLine
125
 
125
 
126
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
126
	While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
127
		returnString	=	returnString	+	"cd "&rsQry("pkg_name") + VBNewLine	
127
		returnString	=	returnString	+	"cd "&rsQry("pkg_name") + VBNewLine	
128
		returnString	=	returnString	+	"cd "&osName + VBNewLine	
128
		returnString	=	returnString	+	"cd "&osName + VBNewLine	
129
		returnString	=	returnString	+	"cd "&rsQry("pkg_version") + VBNewLine
129
		returnString	=	returnString	+	"cd "&rsQry("pkg_version") + VBNewLine
130
		returnString	=	returnString	+	"cd release" + VBNewLine
130
		returnString	=	returnString	+	"cd release" + VBNewLine
131
		
131
		
132
		If osName = "win32" Then
132
		If osName = "win32" Then
133
			returnString	=	returnString	+	"get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe" + VBNewLine
133
			returnString	=	returnString	+	"get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".exe" + VBNewLine
134
		Else
134
		Else
135
			returnString	=	returnString	+	"get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz" + VBNewLine
135
			returnString	=	returnString	+	"get "&rsQry("pkg_name")&"-"&rsQry("pkg_version")&".pkg.gz" + VBNewLine
136
		End If
136
		End If
137
		
137
		
138
		returnString	=	returnString	+	"cd .." + VBNewLine	
138
		returnString	=	returnString	+	"cd .." + VBNewLine	
139
		returnString	=	returnString	+	"cd .." + VBNewLine
139
		returnString	=	returnString	+	"cd .." + VBNewLine
140
		returnString	=	returnString	+	"cd .." + VBNewLine
140
		returnString	=	returnString	+	"cd .." + VBNewLine
141
		returnString	=	returnString	+	"cd .." + VBNewLine
141
		returnString	=	returnString	+	"cd .." + VBNewLine
142
 
142
 
143
		rsQry.MoveNext()
143
		rsQry.MoveNext()
144
	WEnd
144
	WEnd
145
	OraDatabase.Parameters.Remove "OS_ID"
145
	OraDatabase.Parameters.Remove "OS_ID"
146
	returnString	=	returnString	+	"bye" + VBNewLine
146
	returnString	=	returnString	+	"bye" + VBNewLine
147
	
147
	
148
	rsQry.Close
148
	rsQry.Close
149
	Set rsQry = Nothing
149
	Set rsQry = Nothing
150
	
150
	
151
	' Return string 
151
	' Return string 
152
	GenerateFTPscript = returnString
152
	GenerateFTPscript = returnString
153
	
153
	
154
End Function
154
End Function
155
'--------------------------------------------------------------------------------------------------------------------------
155
'--------------------------------------------------------------------------------------------------------------------------
156
%>
156
%>
157
<%
157
<%
158
'------------ RUN BEFORE PAGE RENDER ----------
158
'------------ RUN BEFORE PAGE RENDER ----------
159
 
159
 
160
 
160
 
161
'----------------------------------------------
161
'----------------------------------------------
162
%>
162
%>
163
<html>
163
<html>
164
<head>
164
<head>
165
<title>Deployment Manager</title>
165
<title>Deployment Manager</title>
166
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
166
<link rel="shortcut icon" href="<%=FavIcon%>"/>
167
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
167
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
168
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
168
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
169
<script language="JavaScript" src="scripts/common.js"></script>
169
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
170
</head>
170
<script language="JavaScript" src="scripts/common.js"></script>
171
 
171
</head>
172
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
172
 
173
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
173
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();">
174
  <tr>
174
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
175
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;FTP Script Export </span> <br>
175
  <tr>
176
    Click on the text to select.</td>
176
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;FTP Script Export </span> <br>
177
  </tr>
177
    Click on the text to select.</td>
178
</table>
178
  </tr>
179
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
179
</table>
180
  <tr>
180
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
181
    <td width="1" background="images/bg_blue.gif"><img src="images/spacer.gif" width="10" height="35"></td>
181
  <tr>
182
    <td width="100%" background="images/bg_blue.gif" valign="bottom">
182
    <td width="1" background="images/bg_blue.gif"><img src="images/spacer.gif" width="10" height="35"></td>
183
	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
183
    <td width="100%" background="images/bg_blue.gif" valign="bottom">
184
		<%
184
	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
185
		'[1] Tab Name
185
		<%
186
		'[2] Tab Link
186
		'[1] Tab Name
187
		'[3] JavaScript Event e.g. "onClick='...'"
187
		'[2] Tab Link
188
		'[4] Tab Image Selected
188
		'[3] JavaScript Event e.g. "onClick='...'"
189
		'[5] Tab Image Diselected
189
		'[4] Tab Image Selected
190
		'[6] Tab Image Disabled
190
		'[5] Tab Image Diselected
191
		'[7] Tab Hint
191
		'[6] Tab Image Disabled
192
		'[8] Force Disable. Values: Y, N(default)
192
		'[7] Tab Hint
193
		
193
		'[8] Force Disable. Values: Y, N(default)
194
		
194
		
195
		OraDatabase.Parameters.Add "NODE_ID", parNode_id, ORAPARM_INPUT, ORATYPE_NUMBER 
195
		
196
		
196
		OraDatabase.Parameters.Add "NODE_ID", parNode_id, ORAPARM_INPUT, ORATYPE_NUMBER 
197
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("OsList.sql"), ORADYN_DEFAULT )
197
		
198
		
198
		Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("OsList.sql"), ORADYN_DEFAULT )
199
		OraDatabase.Parameters.Remove "NODE_ID"
199
		
200
		
200
		OraDatabase.Parameters.Remove "NODE_ID"
201
		
201
		
202
		Set objTabControl = New TabControl
202
		
203
		objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
203
		Set objTabControl = New TabControl
204
		objTabControl.TabStyle = "StyleWinXP"
204
		objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
205
		
205
		objTabControl.TabStyle = "StyleWinXP"
206
		If Request("ostab") <> "" Then
206
		
207
			OsTab = CDbl( Request("ostab") )
207
		If Request("ostab") <> "" Then
208
		Else
208
			OsTab = CDbl( Request("ostab") )
209
			OsTab = 0
209
		Else
210
		End If
210
			OsTab = 0
211
		
211
		End If
212
		
212
		
213
		While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
213
		
214
			
214
		While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
215
			objTabControl.Add ( Array( rsQry("os_name"), SCRIPT_NAME &"?ostab="& rsQry("os_id") &"&"& objPMod.ComposeURL() , "", "", "", "", "", "" ) )
215
			
216
			
216
			objTabControl.Add ( Array( rsQry("os_name"), SCRIPT_NAME &"?ostab="& rsQry("os_id") &"&"& objPMod.ComposeURL() , "", "", "", "", "", "" ) )
217
			If OsTab = 0 Then
217
			
218
				OsTab = CDbl( rsQry("os_id"))
218
			If OsTab = 0 Then
219
				objTabControl.SelectByName rsQry("os_name")
219
				OsTab = CDbl( rsQry("os_id"))
220
				
220
				objTabControl.SelectByName rsQry("os_name")
221
			ElseIf OsTab = CDbl(rsQry("os_id")) Then
221
				
222
				OsTab = rsQry("os_id")
222
			ElseIf OsTab = CDbl(rsQry("os_id")) Then
223
				objTabControl.SelectByName rsQry("os_name")
223
				OsTab = rsQry("os_id")
224
				
224
				objTabControl.SelectByName rsQry("os_name")
225
			End If
225
				
226
			
226
			End If
227
			
227
			
228
			rsQry.MoveNext()
228
			
229
		WEnd
229
			rsQry.MoveNext()
230
		
230
		WEnd
231
		rsQry.Close()
231
		
232
		Set rsQry = nothing
232
		rsQry.Close()
233
		
233
		Set rsQry = nothing
234
		
234
		
235
		objTabControl.Render ()
235
		
236
		%>
236
		objTabControl.Render ()
237
		<!-- END OF TAB CONTROLS +++++++++++++++ -->
237
		%>
238
	</td>
238
		<!-- END OF TAB CONTROLS +++++++++++++++ -->
239
    <td width="1" background="images/bg_blue.gif"></td>
239
	</td>
240
  </tr>
240
    <td width="1" background="images/bg_blue.gif"></td>
241
  <tr>
241
  </tr>
242
    <td>&nbsp;</td>
242
  <tr>
243
    <td><br><textarea name="textfield" cols="70" rows="20" wrap="OFF" class="body_cmd" onFocus="this.select()"><%=GenerateFTPscript( OsTab )%></textarea></td>
243
    <td>&nbsp;</td>
244
    <td>&nbsp;</td>
244
    <td><br><textarea name="textfield" cols="70" rows="20" wrap="OFF" class="body_cmd" onFocus="this.select()"><%=GenerateFTPscript( OsTab )%></textarea></td>
245
  </tr>
245
    <td>&nbsp;</td>
246
</table>
246
  </tr>
247
</body>
247
</table>
248
</html>
248
</body>
249
<%
249
</html>
250
'------------ RUN AFTER PAGE RENDER -----------
250
<%
251
'----------------------------------------------
251
'------------ RUN AFTER PAGE RENDER -----------
252
%><!--#include file="common/globals_destructor.asp"-->
252
'----------------------------------------------
-
 
253
%><!--#include file="common/globals_destructor.asp"-->