Subversion Repositories DevTools

Rev

Rev 5642 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5355 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|				    	Change Password			     |
6
'|                                      			 |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0	' always load the page, dont store
13
%>
14
<!--#include file="common/config.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<!--#include file="sec/Crypt.asp"-->
20
<%
21
'------------ ACCESS CONTROL ------------------
22
%>
23
 
24
<!--#include file="_access_control_general.asp"-->
25
<%
26
'------------ Variable Definition -------------
27
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
29
'----------------------------------------------
30
%>
31
<%
32
Sub Change_Password ( NNuser_id, SSoldpassword, SSpassword )
33
	Dim rsTemp, Query_String
34
	Query_String = _
35
	"SELECT * FROM users WHERE user_id= "& NNuser_id
36
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
37
 
38
	If rsTemp.Fields("domain") <> "" Then
39
		' No need for password
40
		Session("AdditionalParams") = "$USERNAME$,"& objAccessControl.UserName
5958 dpurdie 41
        Call Destroy_All_Objects
5355 dpurdie 42
		Response.Redirect("message.asp?msg=202-15")
43
 
44
	Else
45
		If EnCrypt( SSoldpassword ) <> rsTemp.Fields("user_password") Then
46
			' Old Password Mismatch
5958 dpurdie 47
            Call Destroy_All_Objects
5355 dpurdie 48
			Response.Redirect("message.asp?msg=401-8")
49
		End If
50
 
51
	End If
52
 
53
	' All conditions mat. Change password
54
	'update fields
55
	rsTemp.Edit
56
	rsTemp.Fields("user_password").Value = EnCrypt( SSpassword )
57
	rsTemp.Update
58
 
59
	rsTemp.Close
60
	Set rsTemp = nothing
61
End Sub
62
%>
63
<%
64
'--- Process submition ---
65
If CBool(QStrPar("action")) Then
66
	' All mandatory parameters FOUND
67
	Call Change_Password ( objAccessControl.UserId, Request("FRoldpassword"), Request("FRpassword") )
5958 dpurdie 68
    Call Destroy_All_Objects
5355 dpurdie 69
	Response.Redirect("message.asp?msg=200-7")
70
End If
71
%>
72
<html>
73
<head>
74
<title>Release Manager</title>
75
<link rel="shortcut icon" href="<%=FavIcon%>"/>
76
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
77
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
78
<link rel="stylesheet" href="scripts/deployment_manager.css" type="text/css">
79
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
80
<link rel="stylesheet" href="images/navigation.css" type="text/css">
81
<script language="JavaScript" src="scripts/common.js"></script>
82
<!-- TIPS -->
83
<script language="JavaScript" src="images/tipster.js"></script>
84
<script language="JavaScript" src="images/_help_tips.js"></script>
85
</head>
86
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
87
<!-- TIPS LAYERS -------------------------------------->
88
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
89
<!----------------------------------------------------->
90
<!-- HEADER ++++++++++++++++ -->
91
<!--#include file="_header.asp"-->
92
<!-- +++++++++++++++++++++++ -->
93
<!-- BODY ---->
94
<table width="100%" border="0" cellspacing="0" cellpadding="0">
95
  <tr> 
96
    <td width="1%" background="images/bg_member_dark.gif" valign="top"> 
97
      <!-- MEMBERS MENU ---------------------------------------------->
98
	  <!--#include file="members_menu_def.asp"-->
99
	  <%Call Member_Menu( "my details" )%>
100
      <!--  MEMBERS MENU END ------------------------------------------>
101
    </td>
5642 dpurdie 102
    <td width="1%" valign="top" background="images/bg_member_light.gif"><a href="default.asp" class="form_txt_link"><img src="images/i_home.gif" width="13" height="12" border="0" align="absmiddle">Exit</a></td>
5355 dpurdie 103
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap> 
104
      <!------------------------------------------->
105
      <br>
106
      <span class="mmb_ttl">Change Password</span><br>
107
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
108
        <form name="chpass" method="post" action="members_change_password.asp">
109
          <tr> 
110
            <td width="1%">&nbsp;</td>
111
            <td><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
112
            <td width="1%">&nbsp;</td>
113
          </tr>
114
          <tr> 
115
            <td align="left" valign="top" width="1%" background="images/bg_member_dark.gif"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
116
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
117
            <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
118
          </tr>
119
          <tr> 
120
            <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
121
            <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
122
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
123
                <tr> 
124
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
125
                  <td width="1%" nowrap class="form_group" valign="bottom">&nbsp;</td>
126
                  <td nowrap width="100%" align="right" class="form_step"><img src="images/h_trsp_dot.gif" width="350" height="10"></td>
127
                </tr>
128
                <tr> 
129
                  <td width="1%">&nbsp;</td>
130
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">OLD Password</td>
131
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
132
                    <input type="password" name="FRoldpassword" class="form_item">
133
                  </td>
134
                </tr>
135
                <tr> 
136
                  <td width="1%">&nbsp;</td>
137
                  <td width="1%" nowrap class="form_field">&nbsp;</td>
138
                  <td nowrap width="100%">&nbsp;</td>
139
                </tr>
140
                <tr> 
141
                  <td width="1%">&nbsp;</td>
142
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">NEW Password</td>
143
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
144
                    <input type="password" name="FRpassword" class="form_item">
145
                  </td>
146
                </tr>
147
                <tr> 
148
                  <td width="1%">&nbsp;</td>
149
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">NEW Password Confirm </td>
150
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
151
                    <input type="password" name="FRpasswordc" class="form_item">
152
                  </td>
153
                </tr>
154
 
155
                <%If (objAccessControl.Domain <> "") Then %>
156
                  <td width="1%">&nbsp;</td>
157
                  <td width="1%" nowrap class="form_field err_alert" colspan=2>
158
                  The User Password cannot be managed from Release Manager<br>as the User is configured to use Domain Authentication</td>
159
                </tr>
160
                <% End If %>
161
 
162
                <tr> 
163
                  <td width="1%">&nbsp;</td>
164
                  <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
165
                  <td nowrap width="100%"> 
166
                    <input type="hidden" name="action" value="true">
167
                    <%If (objAccessControl.Domain <> "") Then %>
168
                        <input disabled type="submit" name="btn" value="Change" class="form_btn_disabled" >
169
                    <% Else %>
170
                        <input type="submit" name="btn" value="Change" class="form_btn" onClick="MM_validateForm('FRoldpassword','OLD Password','RisCleanStr','FRpassword','NEW Password','RisCleanStrisChangePasswordinLength6:');return document.MM_returnValue">
171
                    <% End If %>
172
                    <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
173
                    <br>
174
                    <br>
175
                  </td>
176
                </tr>
177
              </table>
178
              <br>
179
              <br>
180
            </td>
181
            <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
182
          </tr>
183
          <tr> 
184
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
185
            <td background="images/bg_member_dark.gif"></td>
186
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom" align="right"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
187
          </tr>
188
        </form>
189
      </table>
190
      <!-------------------------------------------------------->
191
      <br>
192
    </td>
193
    <td rowspan="2" valign="bottom" width="100%" background="images/bg_member_light.gif" align="right"><img src="images/bg_img_member.gif" width="160" height="230" vspace="10" hspace="10"></td>
194
  </tr>
195
  <tr> 
196
    <td valign="bottom" align="center" background="images/bg_member_dark.gif"><img src="images/img_members.gif" width="81" height="57" vspace="20" hspace="30"></td>
197
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
198
  </tr>
199
</table>
200
<!-- FOOTER -->
201
<!--#include file="_footer.asp"-->
202
</body>
203
</html>