| 3610 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| ADMIN Page |
|
|
|
6 |
'| Build Service |
|
|
|
7 |
'| |
|
|
|
8 |
'=====================================================
|
|
|
9 |
%>
|
|
|
10 |
<%
|
|
|
11 |
Option explicit
|
|
|
12 |
' Good idea to set when using redirect
|
|
|
13 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
14 |
%>
|
|
|
15 |
<!--#include file="common/conf.asp"-->
|
|
|
16 |
<!--#include file="common/globals.asp"-->
|
|
|
17 |
<!--#include file="common/qstr.asp"-->
|
|
|
18 |
<!--#include file="common/common_subs.asp"-->
|
|
|
19 |
|
|
|
20 |
<%
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_general.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ Variable Definition -------------
|
| 4021 |
dpurdie |
26 |
Dim parTest
|
|
|
27 |
Dim LocalPath
|
|
|
28 |
Dim remExecRv
|
|
|
29 |
Dim rvEmail
|
|
|
30 |
Dim rvEmail1
|
|
|
31 |
Dim active
|
|
|
32 |
|
| 3610 |
dpurdie |
33 |
'------------ Constants Declaration -----------
|
|
|
34 |
'------------ Variable Init -------------------
|
| 4021 |
dpurdie |
35 |
parTest = QStrPar("test")
|
|
|
36 |
remExecRv = ""
|
|
|
37 |
rvEmail = ""
|
|
|
38 |
rvEmail1 = ""
|
|
|
39 |
active = objAccessControl.IsActive("ConfigureBuildService")
|
|
|
40 |
if NOT active Then parTest = ""
|
|
|
41 |
|
| 3610 |
dpurdie |
42 |
'----------------------------------------------
|
| 3866 |
dpurdie |
43 |
|
|
|
44 |
function testFromRegistry (strRegistryKey )
|
|
|
45 |
Dim WSHShell, value
|
|
|
46 |
|
|
|
47 |
On Error Resume Next
|
|
|
48 |
Set WSHShell = CreateObject("WScript.Shell")
|
|
|
49 |
value = WSHShell.RegRead( strRegistryKey )
|
|
|
50 |
|
|
|
51 |
testFromRegistry = NOT (err.number <> 0)
|
|
|
52 |
|
|
|
53 |
set WSHShell = nothing
|
| 4021 |
dpurdie |
54 |
end function
|
|
|
55 |
|
|
|
56 |
Function makeButton( text, test, result )
|
|
|
57 |
If result <> "" Then result = " " & result
|
|
|
58 |
If active Then
|
|
|
59 |
makeButton = " <a class=""form_btn"" href=""admin_build_test_page.asp?test="&test&""" title=""" &text& """>"&text&"</a>" & result
|
|
|
60 |
Else
|
|
|
61 |
makeButton = " <a class=""form_btn_disabled"" title=""" &text& """>"&text&"</a>" & result
|
|
|
62 |
End If
|
|
|
63 |
End Function
|
|
|
64 |
|
|
|
65 |
'-------------------------------------------
|
|
|
66 |
' Perform tests on request
|
|
|
67 |
'
|
|
|
68 |
If parTest = "email" Then
|
|
|
69 |
Call Send_Email ( "Release Manager Notification", adminEmail, objAccessControl.UserEmail, "Test Email", "This is a Test Email generated by the Release Manager Test.", Null )
|
|
|
70 |
rvEmail = "Sent"
|
|
|
71 |
|
|
|
72 |
ElseIf parTest = "email1" Then
|
|
|
73 |
LocalPath = Server.MapPath("images\img_reports_admin.jpg")
|
|
|
74 |
Call Send_Email ( "Release Manager Notification", adminEmail, objAccessControl.UserEmail, "Test Email", "This is a Test Email generated by the Release Manager Test. This email has an attachment", LocalPath )
|
|
|
75 |
rvEmail1 = "Sent"
|
|
|
76 |
|
|
|
77 |
ElseIf parTest = "remExec" Then
|
|
|
78 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
|
|
79 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestArchiveAccess", 0, TRUE)
|
|
|
80 |
Set objWSH = Nothing
|
|
|
81 |
If rv = 0 Then
|
|
|
82 |
remExecRv = "OK"
|
|
|
83 |
Else
|
|
|
84 |
remExecRv = "Error ("&rv&")"
|
|
|
85 |
End IF
|
|
|
86 |
End If
|
|
|
87 |
|
| 3610 |
dpurdie |
88 |
%>
|
|
|
89 |
|
|
|
90 |
<html>
|
|
|
91 |
<head>
|
|
|
92 |
|
|
|
93 |
<title>Admin Test Page</title>
|
|
|
94 |
|
|
|
95 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
96 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
97 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
98 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
99 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
100 |
<!-- DROPDOWN MENUS -->
|
|
|
101 |
<!--#include file="_menu_def.asp"-->
|
|
|
102 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
103 |
</head>
|
|
|
104 |
|
|
|
105 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
106 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
107 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
108 |
</div>
|
|
|
109 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
110 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
111 |
<!-- HEADER -->
|
|
|
112 |
<!--#include file="_header.asp"-->
|
|
|
113 |
|
|
|
114 |
<%
|
|
|
115 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
116 |
%>
|
|
|
117 |
<tr>
|
|
|
118 |
<td background="images/bg_login.gif">
|
|
|
119 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
120 |
<tr>
|
|
|
121 |
<td><%=ProgressBar%></td>
|
|
|
122 |
<td align="right"> </td>
|
|
|
123 |
</tr>
|
|
|
124 |
</table>
|
|
|
125 |
</td>
|
|
|
126 |
</tr>
|
|
|
127 |
<tr>
|
|
|
128 |
<td>
|
| 3611 |
dpurdie |
129 |
<table style="margin-left:auto; margin-right:auto; width:50%" border="0" cellpadding="0" cellspacing="2" bgcolor="#FFCC00">
|
| 3610 |
dpurdie |
130 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
131 |
<tr>
|
| 3611 |
dpurdie |
132 |
<td valign="top" nowrap class="body_col">Test</td>
|
|
|
133 |
<td valign="top" nowrap class="body_col">Result</td>
|
| 3610 |
dpurdie |
134 |
</tr>
|
|
|
135 |
|
|
|
136 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
137 |
<tr>
|
| 4021 |
dpurdie |
138 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">User ID</td>
|
|
|
139 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=objAccessControl.UserId%></td>
|
|
|
140 |
</tr>
|
|
|
141 |
<tr>
|
|
|
142 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
|
|
|
143 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=objAccessControl.UserName%></td>
|
|
|
144 |
</tr>
|
|
|
145 |
<tr>
|
|
|
146 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">User Email</td>
|
|
|
147 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=objAccessControl.UserEmail%></td>
|
|
|
148 |
</tr>
|
|
|
149 |
|
|
|
150 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
151 |
<tr>
|
| 3611 |
dpurdie |
152 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DataBase Name</td>
|
|
|
153 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=OraDatabase.DatabaseName%></td>
|
|
|
154 |
</tr>
|
|
|
155 |
|
|
|
156 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
157 |
<tr>
|
|
|
158 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Archive Server</td>
|
|
|
159 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=archive_server%></td>
|
|
|
160 |
</tr>
|
|
|
161 |
|
|
|
162 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
163 |
<tr>
|
| 3610 |
dpurdie |
164 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Map File System</td>
|
|
|
165 |
<%
|
|
|
166 |
|
|
|
167 |
Dim objWSH,rv,result
|
|
|
168 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
|
|
169 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestMapArchive", 0, TRUE)
|
|
|
170 |
Set objWSH = Nothing
|
|
|
171 |
If rv = 0 Then
|
|
|
172 |
result = "OK"
|
|
|
173 |
Else
|
|
|
174 |
result = "Error ("&rv&")"
|
|
|
175 |
End IF
|
|
|
176 |
|
|
|
177 |
%>
|
|
|
178 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=result%></td>
|
|
|
179 |
</tr>
|
| 3866 |
dpurdie |
180 |
|
|
|
181 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
182 |
<tr>
|
|
|
183 |
<%
|
|
|
184 |
Dim sKey1, sKey2, sValue1, sValue2, kFragment
|
|
|
185 |
kFragment = "rsa2@22:" & archive_server
|
|
|
186 |
sKey1 = "HKEY_USERS\S-1-5-20\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
|
|
187 |
sKey2 = "HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
|
|
188 |
sValue1 = testFromRegistry(sKey1)
|
|
|
189 |
sValue2 = testFromRegistry(sKey2)
|
|
|
190 |
%>
|
|
|
191 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Plink Key [<%=sKey1%>]</td>
|
|
|
192 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=sValue1%></td>
|
|
|
193 |
</tr>
|
|
|
194 |
<tr>
|
|
|
195 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Plink Key [<%=sKey2%>]</td>
|
|
|
196 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=sValue2%></td>
|
|
|
197 |
</tr>
|
| 3610 |
dpurdie |
198 |
|
|
|
199 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
200 |
<tr>
|
|
|
201 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Remote cmd execution</td>
|
| 4021 |
dpurdie |
202 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
|
|
203 |
<%=makeButton("Test", "remExec",remExecRv)%>
|
|
|
204 |
</td>
|
|
|
205 |
</tr>
|
| 3610 |
dpurdie |
206 |
|
| 4021 |
dpurdie |
207 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
208 |
<tr>
|
|
|
209 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Email Server</td>
|
|
|
210 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=MAIL_SERVER%></td>
|
| 3610 |
dpurdie |
211 |
</tr>
|
| 4021 |
dpurdie |
212 |
<tr>
|
|
|
213 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Admin Email</td>
|
|
|
214 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=adminEmail%></td>
|
|
|
215 |
</tr>
|
|
|
216 |
<tr>
|
|
|
217 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Send Email</td>
|
|
|
218 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
|
|
219 |
<%=makeButton("eMail", "email",rvEmail)%>
|
|
|
220 |
</td>
|
|
|
221 |
</tr>
|
|
|
222 |
<tr>
|
|
|
223 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Send Email With attachment</td>
|
|
|
224 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
|
|
225 |
<%=makeButton("eMail", "email1",rvEmail1)%>
|
|
|
226 |
</tr>
|
| 3611 |
dpurdie |
227 |
|
| 3610 |
dpurdie |
228 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
229 |
<tr>
|
|
|
230 |
<td valign="top" nowrap class="body_col">End of Tests</td>
|
| 4021 |
dpurdie |
231 |
<td><a class="form_btn" href="admin_build_test_page.asp" title="Refresh Page">Refresh</a></td>
|
| 3610 |
dpurdie |
232 |
</tr>
|
|
|
233 |
|
|
|
234 |
</table>
|
|
|
235 |
</td>
|
|
|
236 |
</tr>
|
|
|
237 |
<input type="hidden" name="action" value="true">
|
| 3611 |
dpurdie |
238 |
<p>
|
| 3610 |
dpurdie |
239 |
</body>
|
|
|
240 |
</html>
|
|
|
241 |
<!-- FOOTER -->
|
|
|
242 |
<!--#include file="_footer.asp"-->
|
|
|
243 |
<%
|
|
|
244 |
Call Destroy_All_Objects
|
|
|
245 |
%>
|