Location: PHPKode > scripts > Report Manger > report-manger/ChangePass2.php
<?php
	require('config.php');
	require_once('Auth.php');
	require_once('classMySql.php');
	session_start();
	$Uid = $_SESSION["uid"] ;
	if ( !empty($_GET["Id"]) ) {
		$uid = $_GET["Id"] ;
		$mydb = new db_mysql($locaaal,$useeer,$paaass,$dataaabase);
		$mydb->select("`UserId`,`PaWord`,`Permission`","`logins`","1 and `Userid` like '$Uid'");
		$myar = $mydb->fetch_row();
		$old = $myar[1] ;
		}
	else {		
		$mydb = new db_mysql($locaaal,$useeer,$paaass,$dataaabase);
		$mydb->select("`UserId`,`PaWord`,`Permission`","`logins`","1 and `UserId` like '$Uid'");
		$myar = $mydb->fetch_row();
		}
if ( empty($myar[0]) )
{
	header("location: index.htm");
}
$mydb = new db_mysql($locaaal,$useeer,$paaass,$dataaabase);
print "<p align=\"right\" dir=\"rtl\">شما با نام کاربری " . "<b>" . $Uid . "</b> وارد شده اید<br>";
$value=$Uid;
$sql = "select PN,Permission from logins where (UserId = '$value');";
$result2=mysql_query($sql);
$show=mysql_fetch_row($result2);
print "گروهی که شما در فعالیت می کنید :" . "<b>" . $show[0] . "<B><br><br></p>";
?>
<html>
<head>
<title></title>
<LINK rel="stylesheet" href="style/style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Athur" content="Ali Hosseini" Email="hide@address.com">
<title>تفییر کلمه عبور</title>
</head>
<BODY>
<?php		
if ( empty($old) )
{
	$old = md5($_POST["OldPass"]) ;
}
	if ( $old != $myar[1] )
	{
?>
<p align="center" dir="rtl"></p>
<BR>
<BR>
<center>
<TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
  
    <tr>
            <TD background="images/top_01_1.gif" height="41" align="right">
	    <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center">کلمات عبور ارسال شده اشتباه می باشند</TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  
</TABLE><br>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?>
</center>
<?php
	die('</body></html>') ; 
	}
if ( $_POST["NewPass1"] != $_POST["NewPass2"] )
	{
?>
<p align="center" dir="rtl"></p>
<BR>
<BR>
<center>
<TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
  
    <tr>
            <TD background="images/top_01_1.gif" height="41" align="right">
	    <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center">کلمات عبوری ورودی یکسان نمی باشند</TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  
</TABLE>
<br>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?>
</center>
<?php
	die('</body></html>') ;
	}
else
	{
	$hash = md5($_POST["NewPass2"]) ;
	$mydb->update("`logins`","`PaWord` = '$hash'","1 and `UserId` like '$uid'");
?><BR>
<BR>
<center>
<TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
  
    <tr>
            <TD background="images/top_01_1.gif" height="41" align="right">
	    <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center">عملیات با موفقیت به پایان رسید</TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  
</TABLE><BR>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?>
</center>
<?php	
	die('</body></html>') ;
	}
?></BODY>
</HTML>
Return current item: Report Manger