Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
5357 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/conf.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
<!--#include file="_access_control_login.asp"-->
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
5957 dpurdie 41
        Call Destroy_All_Objects
5357 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
5957 dpurdie 47
            Call Destroy_All_Objects
5357 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") )
5957 dpurdie 68
    Call Destroy_All_Objects
5357 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="images/release_manager_style.css" type="text/css">
79
<link rel="stylesheet" href="images/navigation.css" type="text/css">
80
<script language="JavaScript" src="images/common.js"></script>
5984 dpurdie 81
<!--#include file="_menu_def.asp"-->
82
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
5357 dpurdie 83
<!-- TIPS -->
84
<script language="JavaScript" src="images/tipster.js"></script>
85
<script language="JavaScript" src="images/_help_tips.js"></script>
86
</head>
87
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
5984 dpurdie 88
<!-- MENU LAYERS -------------------------------------->
89
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)"></div>
5357 dpurdie 90
<!-- TIPS LAYERS -------------------------------------->
91
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
92
<!----------------------------------------------------->
93
<!-- HEADER -->
94
<!--#include file="_header.asp"-->
95
<!-- BODY ---->
96
<table width="100%" border="0" cellspacing="0" cellpadding="0">
97
  <tr> 
98
    <td width="1%" background="images/bg_member_dark.gif" valign="top"> 
99
      <!-- MEMBERS MENU ---------------------------------------------->
100
	  <!--#include file="members_menu_def.asp"-->
101
	  <%Call Member_Menu( "my details" )%>
102
      <!--  MEMBERS MENU END ------------------------------------------>
103
    </td>
5984 dpurdie 104
    <td width="1%" valign="top" background="images/bg_member_light.gif"></td>
5357 dpurdie 105
    <td rowspan="2" valign="top" width="1%" background="images/bg_member_light.gif" nowrap> 
106
      <!------------------------------------------->
107
      <br>
108
      <span class="mmb_ttl">Change Password</span><br>
109
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
110
        <form name="chpass" method="post" action="members_change_password.asp">
111
          <tr> 
112
            <td width="1%">&nbsp;</td>
113
            <td><img src="images/h_trsp_dot.gif" width="500" height="30"></td>
114
            <td width="1%">&nbsp;</td>
115
          </tr>
116
          <tr> 
117
            <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>
118
            <td background="images/bg_member_dark.gif" align="left" class="wform_ttl">&nbsp;</td>
119
            <td align="right" valign="top" width="1%" background="images/bg_member_dark.gif">&nbsp;</td>
120
          </tr>
121
          <tr> 
122
            <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
123
            <td bgcolor="#FFFFFF" valign="top" class="form_item"> <br>
124
              <table width="100%" border="0" cellspacing="1" cellpadding="2">
125
                <tr> 
126
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
127
                  <td width="1%" nowrap class="form_group" valign="bottom">&nbsp;</td>
128
                  <td nowrap width="100%" align="right" class="form_step"><img src="images/h_trsp_dot.gif" width="350" height="10"></td>
129
                </tr>
130
                <tr> 
131
                  <td width="1%">&nbsp;</td>
132
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">OLD Password</td>
133
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
134
                    <input type="password" name="FRoldpassword" class="form_item">
135
                  </td>
136
                </tr>
137
                <tr> 
138
                  <td width="1%">&nbsp;</td>
139
                  <td width="1%" nowrap class="form_field">&nbsp;</td>
140
                  <td nowrap width="100%">&nbsp;</td>
141
                </tr>
142
                <tr> 
143
                  <td width="1%">&nbsp;</td>
144
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">NEW Password</td>
145
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
146
                    <input type="password" name="FRpassword" class="form_item">
147
                  </td>
148
                </tr>
149
                <tr> 
150
                  <td width="1%">&nbsp;</td>
151
                  <td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">NEW Password Confirm </td>
152
                  <td nowrap width="100%" background="images/bg_form_lightbluedark.gif"> 
153
                    <input type="password" name="FRpasswordc" class="form_item">
154
                  </td>
155
                </tr>
156
 
157
                <%If (objAccessControl.Domain <> "") Then %>
158
                  <td width="1%">&nbsp;</td>
159
                  <td width="1%" nowrap class="form_field err_alert" colspan=2>
160
                  The User Password cannot be managed from Release Manager<br>as the User is configured to use Domain Authentication</td>
161
                </tr>
162
                <% End If %>
163
 
164
                <tr> 
165
                  <td width="1%">&nbsp;</td>
166
                  <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
167
                  <td nowrap width="100%"> 
168
                    <input type="hidden" name="action" value="true">
169
                    <%If (objAccessControl.Domain <> "") Then %>
170
                        <input disabled type="submit" name="btn" value="Change" class="form_btn_disabled" >
171
                    <% Else %>
172
                        <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">
173
                    <% End If %>
174
                    <input type="reset" name="btn" value="Cancel" class="form_btn" onClick="history.back();">
175
                    <br>
176
                    <br>
177
                  </td>
178
                </tr>
179
              </table>
180
              <br>
181
              <br>
182
            </td>
183
            <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
184
          </tr>
185
          <tr> 
186
            <td width="1%" background="images/bg_member_dark.gif" valign="bottom"><img src="images/h_trsp_dot.gif" width="13" height="13"></td>
187
            <td background="images/bg_member_dark.gif"></td>
188
            <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>
189
          </tr>
190
        </form>
191
      </table>
192
      <!-------------------------------------------------------->
193
      <br>
194
    </td>
195
    <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>
196
  </tr>
197
  <tr> 
198
    <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>
199
    <td background="images/bg_member_light.gif" valign="top"><img src="images/h_trsp_dot.gif" width="100" height="400"></td>
200
  </tr>
201
</table>
202
<!-- FOOTER -->
203
<!--#include file="_footer.asp"-->
204
</body>
205
</html>