
<?  
$title="My Auction";
$click="myauction";
require 'templates/'.$tfold.'/header.php';
?>

	<table width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
<tr class="tdhead_main"><td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_l.gif></td>
<td width="98%" height="24" valign="middle">&nbsp;<B>Change Password</b></td>
<td width="1%" height="24" valign="top"><img src=templates/<?=$tfold?>/img_files/t_header_r.gif></td></tr>
	</table>

<table width="980" align="center" cellpadding="0" cellspacing="0" border=0 class="ft_right"  style="padding-left : 10px; padding-right : 10px; padding-bottom : 10px; padding-top : 10px;" >
<tr>
<td valign="top" >
<table cellpadding="0" cellspacing="0">
<tr align="center" height=35>
<td width=2>
<? require'include/usermenu.php'; ?>
</td></tr></table></td><td valign="top" align="right">
<table width=730 align="center" border="0" cellpadding="0" cellspacing="0" class="ft2">
 <tr>
<?
$mode=$_POST['mode'];
if($mode==cansave)
{
$username=$_SESSION[username];
$Password=$_POST["txtPassword"];

$nPassword=$_POST["txtPasswordNew"];
$confirmPassword=$_POST['txtConfirmPassword'];
$Password=seccheck($Password);
$nPassword=seccheck($nPassword);
$confirmPassword=seccheck($confirmPassword);

if($Password=='')
{

$err = $err_49;
}
if($nPassword=='')
{
$err = $err_50;
}
if ($nPassword!=$confirmPassword)
{
$err = $err_51;
}

          
if($err) {
echo "<td  valign=top colspan=2 align=center><br>"; 
echo "<center><font color=red>".$err."</font><br><br></td></tr>";
}
else
{
$sql="select * from member_details where user_name='$username'";
$result=mysql_query($sql);
if(mysql_num_rows($result)>0) {
$row=mysql_fetch_array($result);
if($row['password']==$Password) {
$sq="update member_details set user_name='".$username."',password='".$nPassword."' where user_name='$username'";
$result2=mysql_query($sq);
}
else {
$err = $err_52;
}
}
else {
$err = $err_53;
}
?>
<?
echo "<td  valign=top colspan=2 align=center><br>";
if($err) {
echo "<center><font color=red>".$err."</font><br><br>";
}
else {
echo "<center><font color=red>$lang_121</font><br><br>";
}
echo "</td></tr>";
}
}
?>
<?
$sql="select user_name,Password from member_details where user_name='$username'";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
?>
    <tr><td>         
      <table align="center" border="0" cellpadding="0" cellspacing="0" width="75%" >
        <form name=form1 method=post action=changePassword.php >
                
                 <tr>
                  <td align="right"><?=$lang_745?></td>
                  <td><div class="h_text_cell_mid"><input type="Password" class="h_text_mid" name=txtPassword></div></td></tr>
				<tr>
                  <td align="right"><?=$lang_746?></td>
                  <td><div class="h_text_cell_mid"><input type="Password" class="h_text_mid" name=txtPasswordNew></div></td></tr>
                <tr>
                  <td align="right"><?=$lang_747?></td>
                  <td><div class="h_text_cell_mid"><input type="Password" class="h_text_mid" name=txtConfirmPassword></div></td></tr>
                <tr>
                  <td>
                  <td><input class="submit_button" type="submit" name="change" value="<?=$lang_748?>" class="searchbutton" ></tr>
				<input type="hidden" name="mode" value="cansave">
              </form>
            </table>
      	</td></tr>
		

	</table>

</td></tr>
<tr><td>
</td></tr>
</table>


	<table width="980" cellpadding="0" cellspacing="0"  align="center">
<tr>
<td width="98%" height="5" valign="middle"><img src=templates/<?=$tfold?>/img_files/t_bot.gif border="0"></b></td>
</tr>
	</table>