%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| ADMIN Page | '| Build Service | '| | '===================================================== %> <% Option explicit ' Good idea to set when using redirect Response.Expires = 0 ' always load the page, dont store %> <% '------------ ACCESS CONTROL ------------------ %> <% '------------ Variable Definition ------------- Dim parTest Dim LocalPath Dim remExecRv Dim rvEmail Dim rvEmail1 Dim active '------------ Constants Declaration ----------- '------------ Variable Init ------------------- parTest = QStrPar("test") remExecRv = "" rvEmail = "" rvEmail1 = "" active = objAccessControl.IsActive("ConfigureBuildService") if NOT active Then parTest = "" '---------------------------------------------- function testFromRegistry (strRegistryKey ) Dim WSHShell, value On Error Resume Next Set WSHShell = CreateObject("WScript.Shell") value = WSHShell.RegRead( strRegistryKey ) testFromRegistry = NOT (err.number <> 0) set WSHShell = nothing end function Function makeButton( text, test, result ) If result <> "" Then result = " " & result If active Then makeButton = " "&text&"" & result Else makeButton = " "&text&"" & result End If End Function '------------------------------------------- ' Perform tests on request ' If parTest = "email" Then Call Send_Email ( "Release Manager Notification", adminEmail, objAccessControl.UserEmail, "Test Email", "This is a Test Email generated by the Release Manager Test.", Null ) rvEmail = "Sent" ElseIf parTest = "email1" Then LocalPath = Server.MapPath("images\img_reports_admin.jpg") 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 ) rvEmail1 = "Sent" ElseIf parTest = "remExec" Then Set objWSH = Server.CreateObject("WScript.Shell") rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestArchiveAccess", 0, TRUE) Set objWSH = Nothing If rv = 0 Then remExecRv = "OK" Else remExecRv = "Error ("&rv&")" End IF End If %>
| <%=ProgressBar%> |
| Test | Result |
| User ID | <%=objAccessControl.UserId%> |
| User Name | <%=objAccessControl.UserName%> |
| User Email | <%=objAccessControl.UserEmail%> |
| DataBase Name | <%=OraDatabase.DatabaseName%> |
| Archive Server | <%=archive_server%> |
| Package Archive Access - Map File System | <% Dim objWSH,rv,result Set objWSH = Server.CreateObject("WScript.Shell") rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestMapArchive", 0, TRUE) Set objWSH = Nothing If rv = 0 Then result = "OK" Else result = "Error ("&rv&")" End IF %><%=result%> |
| Plink Key [<%=sKey1%>] | <%=sValue1%> |
| Plink Key [<%=sKey2%>] | <%=sValue2%> |
| Package Archive Access - Remote cmd execution | <%=makeButton("Test", "remExec",remExecRv)%> |
| Email Server | <%=MAIL_SERVER%> |
| Admin Email | <%=adminEmail%> |
| Send Email | <%=makeButton("eMail", "email",rvEmail)%> |
| Send Email With attachment | <%=makeButton("eMail", "email1",rvEmail1)%> |
| End of Tests | Refresh |
<% Call Destroy_All_Objects %>