Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<!-- For more projects: Muhamad Surchy (0780 446 75 29) --> <?php error_reporting(1); ..

Decoded Output download

<!-- For more projects: Muhamad Surchy (0780 446 75 29)  --> 
<?php 
error_reporting(1); 
session_start(); 
include("dbcon.php"); 
if(isset($_SESSION['user_session'])){ 
   
  $invoice_number='KC-'.invoice_number(); 
	header("location:home.php?full_name=$full_name&invoice_number=$invoice_number"); 
} 
 
$full_name = ""; 
 
   if(isset($_POST['submit'])){  //******Login Form******* 
  $username =$_POST['username']; 
 
  $password = $_POST['password']; 
 
  $password = sha1($password); 
 
 
  $select_sql = "SELECT * FROM myusers where user_name = '$username' "; 
 
  $select_query = mysqli_query($con,$select_sql); 
 
  if($select_query){ 
 
  	while ($row =mysqli_fetch_assoc($select_query)) { 
  		$s_username = $row['user_name']; 
      $full_name = $row['full_name']; 
  		$s_password = $row['password']; 
      $s_role = $row['role']; 
 
  	} 
  } 
   
 
 if($s_username == $username && $s_password == $password){ 
           
         $_SESSION['user_session'] = $s_username; 
         if( $s_role == 'admin'){ 
           
          $_SESSION['role'] = $s_role; 
           
        } 
         $invoice_number='KC-'.invoice_number(); 
 	       header("location:home.php?full_name=$full_name&invoice_number=$invoice_number"); 
 
 
 }else{ 
 	  	    $error_msg = "<center><font color='red'>  </font></center>"; 
 } 
 
}                  //******Login Form******* 
 
  function invoice_number(){   //********Outputting Random Number For Invoice Number******** 
 
    $chars = "09302909209300923"; 
 
    srand((double)microtime()*1000000); 
 
    $i = 1; 
 
    $pass = ''; 
 
    while($i <=7){ 
 
      $num  = rand()%10; 
      $tmp  = substr($chars, $num,1); 
      $pass = $pass.$tmp; 
      $i++; 
    } 
    return $pass; 
                        //********Outputting Random Number For Invoice Number******** 
  }                        
?> 
 
<!DOCTYPE html> 
<html> 
<!DOCTYPE html> 
<html> 
<head> 
<!-- For more projects: Muhamad Surchy (0780 446 75 29)  --> 
<title>Skin Health</title> 
  <link rel="icon" type="image/x-icon" href="icon2.ico"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> 
  <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.css"> 
    <link rel="stylesheet" type="text/css" href="css/style.css"> 
    <!-- <link rel="stylesheet" type="text/css" href="css/font-awesome.css"> --> 
    <link rel="stylesheet" type="text/css" href="MyFont/stylesheet.css"> 
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> 
    <script type="text/javascript" src="js/bootstrap.min.js"></script> 
 
    <style> 
      body{ 
        background-color:#343A40 !important; 
        color:#fff !important; 
      } 
 
    </style> 
     
     
</head> 
<body dir="rtl" style="font-family:Rabar_027; font-size:20px; text-align:center;"> 
 
	<center> 
		<h1>  </h1> 
	</center> 
 
	<div class="content" style="width: 400px;"> 
 
  <img src="thelogo.JPG" alt="Muhamad Surchy"> 
 
		<form method="POST"> 
 
		<table class="table table-responsive" style="border-radius:50px;text-align:right;background-color:#FFFFFF !important;"> 
			<tr style="text-align:center; border-color:#FFFFFF;"> 
			  <td style="text-align:center;border-color:#FFFFFF; background-color:#FFFFFF !important;"><label for="username" style="font-size:20px;color:#343A40 !important;"> </label> 
			  <input autofocus style=" width: 340px; text-align:center;" type="text" autocomplete="off" name="username" class="form-group" class="form-control" required></td> 
			</tr> 
			<tr> 
				<td style="text-align:center; border-color:#FFFFFF;"><label for="password" style="font-size:20px;color:#343A40 !important;"> </label> 
				<input style=" width: 340px; text-align:center;" type="password" name="password" required></td> 
			</tr> 
      <input type="hidden" aucomplete="off" name="invoice_number" value="<?php echo 'KC-'.invoice_number()?>"> 
 
      <tr> 
      <td style="border-color:#FFFFFF;"> 
        <center> 
      <button type="submit" name="submit" id="customertwo" style="color:#FFFFFF; border-radius:5px; border-color: #343A40; background-color: #343A40 !important;width: 155px; height:40px; font-family:Rabar_027; font-size:25px;"> 
    </button> 
    </center> 
      </td> 
      </tr> 
 
		</table> 
     
 
		<!-- <input style="font-family:Rabar_027; font-size:20px; text-align:center;" type="submit" name="submit" class="btn btn-primary btn-large" value=""> --> 
 
    <?php echo $error_msg;?> 
 
	</form> 
 
		 
  </div> 
   
   
  
</body> 
</html> 
<!-- For more projects: Muhamad Surchy (0780 446 75 29)  -->

Did this file decode correctly?

Original Code

<!-- For more projects: Muhamad Surchy (0780 446 75 29)  -->
<?php
error_reporting(1);
session_start();
include("dbcon.php");
if(isset($_SESSION['user_session'])){
  
  $invoice_number='KC-'.invoice_number();
	header("location:home.php?full_name=$full_name&invoice_number=$invoice_number");
}

$full_name = "";

   if(isset($_POST['submit'])){  //******Login Form*******
  $username =$_POST['username'];

  $password = $_POST['password'];

  $password = sha1($password);


  $select_sql = "SELECT * FROM myusers where user_name = '$username' ";

  $select_query = mysqli_query($con,$select_sql);

  if($select_query){

  	while ($row =mysqli_fetch_assoc($select_query)) {
  		$s_username = $row['user_name'];
      $full_name = $row['full_name'];
  		$s_password = $row['password'];
      $s_role = $row['role'];

  	}
  }
  

 if($s_username == $username && $s_password == $password){
          
         $_SESSION['user_session'] = $s_username;
         if( $s_role == 'admin'){
          
          $_SESSION['role'] = $s_role;
          
        }
         $invoice_number='KC-'.invoice_number();
 	       header("location:home.php?full_name=$full_name&invoice_number=$invoice_number");


 }else{
 	  	    $error_msg = "<center><font color='red'>  </font></center>";
 }

}                  //******Login Form*******

  function invoice_number(){   //********Outputting Random Number For Invoice Number********

    $chars = "09302909209300923";

    srand((double)microtime()*1000000);

    $i = 1;

    $pass = '';

    while($i <=7){

      $num  = rand()%10;
      $tmp  = substr($chars, $num,1);
      $pass = $pass.$tmp;
      $i++;
    }
    return $pass;
                        //********Outputting Random Number For Invoice Number********
  }                       
?>

<!DOCTYPE html>
<html>
<!DOCTYPE html>
<html>
<head>
<!-- For more projects: Muhamad Surchy (0780 446 75 29)  -->
<title>Skin Health</title>
  <link rel="icon" type="image/x-icon" href="icon2.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
  <link rel="stylesheet" type="text/css" href="css/bootstrap-responsive.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <!-- <link rel="stylesheet" type="text/css" href="css/font-awesome.css"> -->
    <link rel="stylesheet" type="text/css" href="MyFont/stylesheet.css">
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>

    <style>
      body{
        background-color:#343A40 !important;
        color:#fff !important;
      }

    </style>
    
    
</head>
<body dir="rtl" style="font-family:Rabar_027; font-size:20px; text-align:center;">

	<center>
		<h1>  </h1>
	</center>

	<div class="content" style="width: 400px;">

  <img src="thelogo.JPG" alt="Muhamad Surchy">

		<form method="POST">

		<table class="table table-responsive" style="border-radius:50px;text-align:right;background-color:#FFFFFF !important;">
			<tr style="text-align:center; border-color:#FFFFFF;">
			  <td style="text-align:center;border-color:#FFFFFF; background-color:#FFFFFF !important;"><label for="username" style="font-size:20px;color:#343A40 !important;"> </label>
			  <input autofocus style=" width: 340px; text-align:center;" type="text" autocomplete="off" name="username" class="form-group" class="form-control" required></td>
			</tr>
			<tr>
				<td style="text-align:center; border-color:#FFFFFF;"><label for="password" style="font-size:20px;color:#343A40 !important;"> </label>
				<input style=" width: 340px; text-align:center;" type="password" name="password" required></td>
			</tr>
      <input type="hidden" aucomplete="off" name="invoice_number" value="<?php echo 'KC-'.invoice_number()?>">

      <tr>
      <td style="border-color:#FFFFFF;">
        <center>
      <button type="submit" name="submit" id="customertwo" style="color:#FFFFFF; border-radius:5px; border-color: #343A40; background-color: #343A40 !important;width: 155px; height:40px; font-family:Rabar_027; font-size:25px;">
    </button>
    </center>
      </td>
      </tr>

		</table>
    

		<!-- <input style="font-family:Rabar_027; font-size:20px; text-align:center;" type="submit" name="submit" class="btn btn-primary btn-large" value=""> -->

    <?php echo $error_msg;?>

	</form>

		
  </div>
  
  
 
</body>
</html>
<!-- For more projects: Muhamad Surchy (0780 446 75 29)  -->

Function Calls

session_start 1
error_reporting 1

Variables

None

Stats

MD5 f683854a2e50be5f1af4d1920c72d7e5
Eval Count 0
Decode Time 51 ms