home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
202.53.64.216
/
202.53.64.216.tar
/
202.53.64.216
/
janahitha
/
AdsChangePwd.asp
< prev
next >
Wrap
Text File
|
2004-11-26
|
3KB
|
95 lines
<!-- #include file="AdsOpenConn.asp" -->
<%
if session("ClientId")="" then Response.Redirect "AdsLogin.asp"
if Request.Form.Count>0 then
set rs = server.createobject("adodb.recordset")
rs.open "select ClientPassword from ClientMaster where ClientLoginId='" + session("ClientLoginId") + "'", con, 3, 3
prevpassword = rs("ClientPassword")
set rs = nothing
curpassword = Request.Form("curpassword")
newpassword = Request.Form("newpassword")
if curpassword<>prevpassword then
msg = "Current Password Does Not Match"
else
con.execute "update ClientMaster set ClientPassword='" + replace(trim(newpassword), "'", "''")+ "' where ClientLoginId='" + session("ClientLoginId") + "'"
Response.Redirect "AdsMyPage.asp?msg=cpw"
end if
end if
TblBorderColor = "#f2D197"
%>
<html>
<head>
<title> Janahitha Ads - Welcome </title>
<meta name="author" content="Jagadish,Gopi">
<script language="javascript" src="func.js"></script>
<script language="javascript">
function check()
{
validateform = document.changepwdform;
if(isempty(validateform.curpassword))
validateform.curpassword.focus();
else
if(isempty(validateform.newpassword))
validateform.newpassword.focus();
else
if(isempty(validateform.conpassword))
validateform.conpassword.focus();
else
if(validateform.newpassword.value!=validateform.conpassword.value)
{
alert("Password Does Not Match ! Enter Again !!");
validateform.conpassword.focus();
}
else
validateform.submit();
}
</script>
</head>
<body bottommargin=0 topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>
<!-- #include file="AdsTop.asp" -->
<center>
<table width=100% cellpadding=0 cellspacing=0 border=0 height=100%>
<tr>
<td width=150 align=center valign=top bgcolor="#FFFFFF">
<!-- #include file="AdsLeft.asp" -->
</td>
<td width=630 align=center valign=top bgcolor="#ffffff">
<br>
<form name="changepwdform" method=post action="<%=Request.ServerVariables("script_name")%>">
<font face="verdana" color="#846648"> <b> Change Password </b> </font> <br> <br>
<%
if msg<>"" then
%>
<font face=verdana size=2 color=red> <b> <%=msg%> </b> </font> <br> <br>
<%
end if
%>
<table cellpadding=0 cellspacing=0 border=0>
<tr> <td bgcolor="<%=TblBorderColor%>">
<table cellspacing=1 cellpadding=5 border=0>
<tr bgcolor="#ffffff">
<td> <font face="verdana" size=2> Current Password </font> </td>
<td> <input type=text name="curpassword" size="15"> </td>
</tr>
<tr bgcolor="#ffffff">
<td> <font face="verdana" size=2> New Password </font> </td>
<td> <input type=password name="newpassword" size="15"> </td>
</tr>
<tr bgcolor="#ffffff">
<td> <font face="verdana" size=2> Confirm Password </font> </td>
<td> <input type=password name="conpassword" size="15"> </td>
</tr>
</table>
</td> </tr>
</table>
<br>
<input type=button value=" Change Now " onclick="javascript:check()" id=button1 name=button1>
</form>
</td>
</tr>
</table>
</center>
<!-- #include file="AdsBottom.asp" -->
</body>
</html>
<!-- #include file="AdsCloseConn.asp" -->