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

Signing you up...

Thank you for signing up!

PHP Decode

<?php $_F=__FILE__;$_X='P2lCP1ouWg1Wc0hzX25NPSgnOXNuWldlcV9NenpPem4nLD4nN0FBJyk7Pg1WLk1lOU..

Decoded Output download

?><?php
ini_set('display_errors', 'Off'); 
header( 'content-type: text/html; charset=utf-8' );
setlocale(LC_TIME,"french");
if( !isset($_SESSION) ) session_start();

if (file_exists('../utilities/fonction.inc.php')) require_once '../utilities/fonction.inc.php';

function __autoload($class)
{
    if (file_exists("../utilities/{$class}.php")) include_once("../utilities/{$class}.php");    
}

$obj = new database;
extract($_REQUEST);

$requete = "select debut, fin, Periode from sr_periode where statut = 'Ouvert'";

$resultat = $obj->showData($requete);
foreach ($resultat as $key ) {
	extract($key);
	$debut = date_create(str_replace("/", "-", $debut));
	$fin   = date_create(str_replace("/", "-", $fin));

	$dDebut = date_format($debut,"d/m/Y");
	$dFin = date_format($fin,"d/m/Y");

	$debut = date_format($debut, "m/d/Y");
	    //echo "datedebut = ".$dateDebut;
	$fin  = date_format($fin, "m/d/Y");

	////var_dump($debut);
	$date1 = strtotime($debut);
	$date2 = strtotime($fin);
	$nbr = 1;

	for ($j=$date1  ; $j <= $date2  ; $j += 3600 * 24) {
	$d1  = date("d/m/Y",$j);
	$k = $j + 3600 * 24;
	$d2 = date("d/m/Y", $k);
	$num_sem = date("W",$j);
	//var_dump($d1,$d2);

	//foreach ($result as $key) {
		//extract($key);
		$jourDebut = ToTime($jourDebut);
		$jourFin = ToTime($jourFin);
		if($jourDebut == "00:00:00"){
			$Ddebut = $d1 . " " . $jourDebut;
			$Dfin = $d1 . " " . $jourFin;
		}else{
			$Ddebut = $d1 . " " . $jourDebut;
			$Dfin = $d2 . " " . $jourFin;

		}
		$req = "select num_sem as deb,exercice from tblsemaine where '{$Ddebut}' between datedebutsem and datefinsem";
		$res = $obj->getData($req);
		extract($res);

		$req = "select num_sem as fn,exercice from tblsemaine where '{$Dfin}' between datedebutsem and datefinsem";
		$res = $obj->getData($req);
		extract($res);

		$We = WeekEnd($Ddebut,$Dfin,$key);

		$codes = "J". $nbr;
		$toCal = array(
			'periode' => $Periode,
			'Ddebut' => $Ddebut,
			'Dfin' => $Dfin,
			'debut' => $Ddebut,
			'fin' => $Dfin,
			'code' => $codes,
			'codeCalendrier' => $Code,
			'sdebut' => $deb,
			'sfin' => $fn,
			'exercice' => $exercice,
			'weekEnd' => $We,
		);
		
		$obj->executeQuery("sr_calendrier",$toCal);
	//}
	$nbr++;
}

}







$message = "1";
$jsonResponse = array ();
$jsonResponse['message'] = $message;
echo json_encode($jsonResponse);

function ToTime($time){
    if(empty($time))
        return "00:00:00";
    else
        return substr($time, 0,8);
}
function WeekEnd($Jdeb,$Jfin,$arr){
	extract($arr);
	var_dump($Jdeb,$Jfin);
	$Jdeb = date_create(str_replace("/", "-", $Jdeb));
	$Jfin   = date_create(str_replace("/", "-", $Jfin));

	$dJdeb = date_format($Jdeb,"d/m/Y");
	$dJfin = date_format($Jfin,"d/m/Y");

	$Jdeb = date_format($Jdeb, "m/d/Y");
	    //echo "dateJdeb = ".$dateJdeb;
	$Jfin  = date_format($Jfin, "m/d/Y");

	////var_dump($Jdeb);
	$date1 = strtotime($Jdeb);
	$date2 = strtotime($Jfin);

	$Jd = date("w",$date1);
	$Jf = date("w",$date2);
	$ensemble = ToCode($Jd,$Jf);
	var_dump($ensemble);
	$retour = 0;
	if($LM == 1 && ($ensemble == '11' || $ensemble == '12')){
		$retour = 1;
	}
	if($MM == 1 && ($ensemble == '22' || $ensemble == '23')){
		$retour = 1;
	}
	if($MJ == 1 && ($ensemble == '33' || $ensemble == '34')){
		$retour = 1;
	}
	if($JV == 1 && ($ensemble == '44' || $ensemble == '45')){
		$retour = 1;
	}
	if($VS == 1 && ($ensemble == '55' || $ensemble == '56')){
		$retour = 1;
	}
	if($SD == 1 && ($ensemble == '66' || $ensemble == '60')){
		$retour = 1;
	}
	if($DL == 1 && ($ensemble == '00' || $ensemble == '01')){
		$retour = 1;
	}

	//var_dump($arr,$Jd,$Jf,$ensemble,$retour);
	return $retour;
}
function ToCode($v1,$v2){
	$ensemble = "";
    $ensemble = $v1 .$v2;
    return $ensemble;
}

Did this file decode correctly?

Original Code

<?php $_F=__FILE__;$_X='P2lCP1ouWg1Wc0hzX25NPSgnOXNuWldlcV9NenpPem4nLD4nN0FBJyk7Pg1WLk1lOU16KD4nMk9IPU1IPS09cVpNOj49TVI9aC49WVc7PjIuZXpuTT1TUT1BLWYnPik7DVZuTT1XTzJlV00oSS9fVDN1SywiQXpNSDIuIik7DVZzQSg+IXNubk09KCRfcEtwcDM3RSk+KT5uTW5uc09IX249ZXo9KCk7DVYNVnNBPihBc1dNX01Sc249bignWFhoUT1zV3M9c01uaEFPSDI9c09IWHNIMlhaLlonKSk+ek12UXN6TV9PSDJNPidYWGhRPXNXcz1zTW5oQU9IMj1zT0hYc0gyWFouWic7DVYNVkFRSDI9c09IPl9fZVE9T1dPZTkoJDJXZW5uKQ1WXQ1WPj4+PnNBPihBc1dNX01Sc249bigiWFhoUT1zV3M9c01uaF0kMldlbm5sWFouWiIpKT5zSDJXUTlNX09IMk0oIlhYaFE9c1dzPXNNbmhdJDJXZW5ubFhaLloiKTs+Pj4+DVZsDVYNViRPPAo+Uz5ITX0+OWU9ZTxlbk07DVZNUj16ZTI9KCRfZ0t3IEtwVCk7DVYNViR6TXZRTT1NPlM+Im5NV00yPT45TTxRPSw+QXNILD5tTXpzTzlNPkF6T1k+bnpfWk16c085TT59Lk16TT5uPWU9UT0+Uz4nN1FjTXo9JyI7DVYNViR6TW5RVz1lPT5TPiRPPAotaW4uT300ZT1lKCR6TXZRTT1NKTsNVkFPek1lMi4+KCR6TW5RVz1lPT5lbj4keU1xPik+XQ1WCU1SPXplMj0oJHlNcSk7DVYJJDlNPFE9PlM+OWU9TV8yek1lPU0obj16X3pNWldlMk0oImgiLD4iLSIsPiQ5TTxRPSkpOw1WCSRBc0g+Pj5TPjllPU1fMnpNZT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TT1Rekg+JE1Ibk1ZPFdNOw1WbA=';$_D=strrev('edoced_46esab');eval($_D('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCdTZ1BPOVlaV0ZLbXF5ZnhjakxKUnp1TTV2TnRzMWIue0I0bkNdaS8yRGwwRWhlQQpbZDg9UXA+VlhvIEh9NkdJdzdrYTNUclU8JywnPVI5b2RtcGxBRVB5azhndls1M3hyTWV6cVpIaTdZaFc8RHNHez5DY1h9MU4vYWZqNl1KdHVTIAouQlVud1ZLTFFPMjBJVEY0YicpOyRfUj1zdHJfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw='));?>

Function Calls

strtr 1
strrev 1
str_replace 1
base64_decode 2

Variables

$_D base64_decode
$_F index.php
$_R 0
$_X 0

Stats

MD5 311d7bd3527c25fb9f2aafa65944a79e
Eval Count 2
Decode Time 74 ms