Subversion Repositories DevTools

Rev

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

Rev 3866 Rev 4021
Line 12... Line 12...
12
' Good idea to set when using redirect
12
' Good idea to set when using redirect
13
Response.Expires = 0   ' always load the page, dont store
13
Response.Expires = 0   ' always load the page, dont store
14
%>
14
%>
15
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/formating.asp"-->
-
 
18
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
19
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_subs.asp"-->
20
<!--#include file="sec/Crypt.asp"-->
-
 
21
<!--#include file="common/_form_window_common.asp"-->
-
 
22
<!--#include file="_action_buttons.asp"-->
-
 
23
 
-
 
24
<!--#include file="class/classActionButtonControl.asp"-->
-
 
25
 
19
 
26
<%
20
<%
27
'------------ ACCESS CONTROL ------------------
21
'------------ ACCESS CONTROL ------------------
28
%>
22
%>
29
<!--#include file="_access_control_general.asp"-->
23
<!--#include file="_access_control_general.asp"-->
30
<%
24
<%
31
'------------ Variable Definition -------------
25
'------------ Variable Definition -------------
-
 
26
Dim parTest
32
Dim objBtnControl
27
Dim LocalPath
33
Dim Query_String
28
Dim remExecRv
34
Dim rsTemp
29
Dim rvEmail
-
 
30
Dim rvEmail1
35
Dim scheduled_id
31
Dim active
-
 
32
 
36
'------------ Constants Declaration -----------
33
'------------ Constants Declaration -----------
37
'------------ Variable Init -------------------
34
'------------ Variable Init -------------------
-
 
35
parTest = QStrPar("test")
-
 
36
remExecRv = ""
-
 
37
rvEmail = ""
-
 
38
rvEmail1 = ""
38
Set objBtnControl = New ActionButtonControl
39
active = objAccessControl.IsActive("ConfigureBuildService")
-
 
40
if NOT active Then parTest = ""
-
 
41
 
39
'----------------------------------------------
42
'----------------------------------------------
40
 
43
 
41
function testFromRegistry (strRegistryKey )
44
function testFromRegistry (strRegistryKey )
42
    Dim WSHShell, value
45
    Dim WSHShell, value
43
 
46
 
Line 46... Line 49...
46
    value = WSHShell.RegRead( strRegistryKey )
49
    value = WSHShell.RegRead( strRegistryKey )
47
 
50
 
48
    testFromRegistry = NOT (err.number <> 0)
51
    testFromRegistry = NOT (err.number <> 0)
49
 
52
 
50
    set WSHShell = nothing
53
    set WSHShell = nothing
51
end function                
54
end function
-
 
55
 
-
 
56
Function makeButton( text, test, result )
-
 
57
    If result <> "" Then result = "&nbsp;" & result
-
 
58
    If active Then
-
 
59
        makeButton = "&nbsp;&nbsp;<a class=""form_btn"" href=""admin_build_test_page.asp?test="&test&""" title=""" &text& """>"&text&"</a>" & result
-
 
60
    Else
-
 
61
        makeButton = "&nbsp;&nbsp;<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
 
52
%>
88
%>
53
 
89
 
54
<html>
90
<html>
55
<head>
91
<head>
56
 
92
 
Line 97... Line 133...
97
               <td valign="top" nowrap class="body_col">Result</td>
133
               <td valign="top" nowrap class="body_col">Result</td>
98
            </tr>
134
            </tr>
99
 
135
 
100
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
136
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
101
            <tr>
137
            <tr>
-
 
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>
102
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DataBase Name</td>
152
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">DataBase Name</td>
103
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=OraDatabase.DatabaseName%></td>
153
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=OraDatabase.DatabaseName%></td>
104
            </tr>
154
            </tr>
105
 
155
 
106
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
156
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
Line 147... Line 197...
147
            </tr>
197
            </tr>
148
            
198
            
149
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
199
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
150
            <tr>
200
            <tr>
151
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Remote cmd execution</td>
201
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Remote cmd execution</td>
152
            <%
-
 
153
 
-
 
154
            Set objWSH = Server.CreateObject("WScript.Shell")
202
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
155
            rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestArchiveAccess", 0, TRUE)
-
 
156
            Set objWSH = Nothing
-
 
157
            If rv = 0 Then
-
 
158
                result = "OK"
203
                    <%=makeButton("Test", "remExec",remExecRv)%>
159
            Else
204
                </td>
160
                result = "Error ("&rv&")"
-
 
161
            End IF
205
            </tr>
162
 
206
 
-
 
207
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
163
            %>
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>
-
 
211
            </tr>
-
 
212
            <tr>
-
 
213
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Admin Email</td>
164
               <td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=result%></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)%>
165
            </tr>
226
            </tr>
166
 
227
 
167
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
228
            <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
168
            <tr>
229
            <tr>
169
               <td valign="top" nowrap class="body_col">End of Tests</td>
230
               <td valign="top" nowrap class="body_col">End of Tests</td>
170
               <td><a class="form_btn" href="admin_build_test_page.asp?rtag_id" title="Refresh Page">Refresh</a></td>
231
               <td><a class="form_btn" href="admin_build_test_page.asp" title="Refresh Page">Refresh</a></td>
171
            </tr>
232
            </tr>
172
            
233
            
173
         </table>
234
         </table>
174
      </td>
235
      </td>
175
  </tr>
236
  </tr>