Subversion Repositories DevTools

Rev

Rev 6579 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6240 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   Masquerade Screen
5
'   Masquerade as another user
6
'   Aquire the permission of another user
7
'   An Administration type of function useful for proving the capabilities of a user
8
'=====================================================
9
%>
10
<%
11
Option explicit
12
Response.Expires = 0
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="_access_control_general.asp"-->
19
<%
20
'------------ VARIABLE DEFINITION -------------
21
Dim canMasquerade
22
'------------ CONSTANTS DECLARATION -----------
23
'------------ VARIABLE INIT -------------------
24
canMasquerade = canActionControl("Masquerade")
25
'------------ CONDITIONS ----------------------
26
'----------------------------------------------
27
%>
28
<%
29
'----------------------------------------------------------------------------------------------------------------------------------------------
30
Sub Logon ()
31
	On Error Resume Next
32
 
33
	objEH.Try()
34
 
35
	Call objAccessControl.MasqueradeAsUser ( Request("user_name"), objAccessControl.UserName )
36
 
37
	objEH.Catch()
38
 
39
End Sub
40
'----------------------------------------------------------------------------------------------------------------------------------------------
41
Sub AccessManagerMessage ( nMessage )
42
	Dim sMessage
43
	On Error Resume Next
44
 
45
	objEH.Try()
46
		Select Case CInt( nMessage )
47
			Case 1
48
				Err.Raise 8, _
49
					"Application Access Denied !", "Please contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> to gain access to this application."
50
			Case 2
51
				Err.Raise 8, _
52
					"Page Access Denied !", "Please contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> to gain access to this page."
53
			Case 3
54
				Err.Raise 8, _
55
					"Application is Off-Line !", "This application is currently off-line for maintenance. <br>Contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> for further details."
56
 
57
			Case 4
58
				Err.Raise 8, _
59
					"You are Not Authorised !", "You are not authorised to perform this action. <br>Contact the <a href='mailto:"& ADMIN_EMAIL &"' class='body_link'>Administrator</a> for further details."
60
 
61
		End Select
62
	objEH.Catch()
63
 
64
End Sub
65
'----------------------------------------------------------------------------------------------------------------------------------------------
66
%>
67
<%
68
'------------ RUN BEFORE PAGE RENDER ----------
69
objPMod.PersistInQryString ( aPersistList )
70
 
71
If NOT canActionControl("Masquerade") Then
72
    Call RaiseMsg(enum_WMSG_ERROR, "Access Denied to this function.<p>One a user has switched roles the Masquerading function may not be available.")
73
End If
74
 
75
' --- RUN onPostBack ---
76
If CBool(Request("action")) Then
77
 
78
	Call Logon ()
79
 
80
	If objEH.Finally Then
81
		If Request("rfile") <> "" Then
82
			Call OpenInWindow ( Request("rfile") &"?LOGIN=ok"& objPMod.ComposeURLWithout("rfile") )
83
		Else
84
			Call OpenInWindow ( "index.asp" )
85
		End If
86
 
87
	End If
88
End If
89
 
90
' Display Access Manager messages 
91
'
92
Call AccessManagerMessage( Request("message") )
93
 
94
'----------------------------------------------
95
%>
96
<html>
97
<head>
98
<title>Release Manager</title>
99
<link rel="shortcut icon" href="<%=FavIcon%>"/>
100
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
101
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 102
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
103
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
104
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
6240 dpurdie 105
<!--#include file="_jquery_includes.asp"-->
106
</head>
107
<body leftmargin="0" topmargin="0" onLoad="FormName.user_name.focus();">
108
<!-- HEADER ++++++++++++++++ -->
109
<!--#include file="_header.asp"-->
110
<!-- +++++++++++++++++++++++ -->
111
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
112
<form name="FormName" method="post" action="<%=ScriptName%>" >
113
  <tr>
114
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="42"></td>
115
  </tr>
116
  <tr>
117
    <td align="center" valign="middle" bgcolor="#FFFFFF">
118
	<!-- LOGIN FROM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
119
    <table width="570" border="0" cellspacing="0" cellpadding="0">
120
      <tr>
121
        <td align="right">
122
            <a href="<%=ACCESS_MANAGER_URL%>" title="Access Manager Home">
123
                <img src="icons/img_auth_by_access_manager.gif" width="103" height="26" hspace="2" vspace="3" border="0">
124
            </a>
125
        </td>
126
      </tr>
127
    </table>
128
      <table width="570" border="0" cellspacing="0" cellpadding="1">
129
        <tr>
7288 dpurdie 130
          <td background="images/bg_bage_2.gif">
131
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0" style="position:relative;">
6240 dpurdie 132
            <tr>
133
              <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="10">
7288 dpurdie 134
				<div id='divProgressBar' class='vixSpinner' style='visibility:hidden;'></div>
6240 dpurdie 135
                <tr>
136
                  <td class="body_txt"><span class="body_h1">
137
                    <img src="icons/i_user_lrg.gif" width="13" height="17" align="absmiddle">
138
                    &nbsp;Masquerade as another user</span> <br>
139
                    Please enter a Username <br>
140
                    <hr width="100%" size="1" noshade color="#ACA899">
141
                </tr>
142
                <tr>
143
                  <td align="center" valign="top">
144
				  <table width="100"  border="0" cellspacing="2" cellpadding="0">
145
                      <tr>
146
                        <td width="10%" nowrap class="form_iname">Username</td>
147
                        <td width="1%"><input name="user_name" type="text" class="form_item" size="20"></td>
148
                      </tr>
149
                      <tr>
150
                        <td nowrap class="form_iname" valign="top">&nbsp;</td>
151
                        <td valign="top">&nbsp;</td>
152
                      </tr>
153
                  </table></td>
154
                </tr>
155
                <tr>
156
                  <td background="images/bg_login.gif">
157
				  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
158
                      <tr>
159
                        <td align="right">
160
                            <input name="btn" type="submit" class="form_btn" value="Login" onclick="MM_validateForm('user_name','Username','R');return document.MM_returnValue"></td>
161
                      </tr>
162
                  </table></td>
163
                </tr>
164
              </table>
165
			  </td>
166
            </tr>
167
          </table></td>
168
        </tr>
169
      </table>
170
	  <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
171
	  </td>
172
  </tr>
173
  <tr>
174
    <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="42"></td>
175
  </tr>
176
<%=objPMod.ComposeHiddenTags()%>
177
<input type="hidden" name="action" value="true">
178
</form>  
179
</table>
180
<!-- FOOTER -->
181
<!--#include file="_footer.asp"-->
182
</body>
183
</html>