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 define('ROOT_PATH', dirname(__FILE__).'/'); date_default_timezone_set('Asia/Kual..

Decoded Output download

<?php 
 
define('ROOT_PATH', dirname(__FILE__).'/'); 
date_default_timezone_set('Asia/Kuala_Lumpur'); 
 
require_once 'DB.php'; 
require_once ROOT_PATH . 'src/lib/CGI.php'; 
require_once ROOT_PATH . 'src/lib/CGIOut.php'; 
require_once ROOT_PATH . 'src/lib/Lang.php'; 
require_once ROOT_PATH . 'src/lib/SmartyWrap.php'; 
require_once ROOT_PATH . 'src/lib/Calendar.php'; 
require_once ROOT_PATH . 'src/lib/Calendar2.php'; 
require_once ROOT_PATH . 'src/functions.php'; 
require_once ROOT_PATH . 'src/config.php'; 
require_once ROOT_PATH . 'src/code.php'; 
require_once ROOT_PATH . 'src/handler.php'; 
require_once ROOT_PATH . 'src/Base.php'; 
 
 
 
 
set_error_handler('handler_cgi_error'); 
 
// 
// For debugging on development 
// 
//DBSH::$debug                 = true; 
SmartyWrap::$w_force_compile = true; 
 
 
 
 
 
//----------------------------------------------- 
// NO USER EDITABLE SECTIONS BELOW 
//----------------------------------------------- 
global $CONF, $Q, $OUT, $DB, $CODE, $LANG; 
 
// 
// Setting up path for Smarty 
// 
SmartyWrap::$w_template_dir  = ROOT_PATH . 'skin/' . $CONF['skin'] . '/tpl/cgi/'; 
SmartyWrap::$w_compile_dir   = ROOT_PATH . 'tpl_c/'; 
 
// 
// Setting up language path 
// 
LANG::$lang_dir = ROOT_PATH . 'skin/' . $CONF['skin'] . '/lang/'; 
 
// 
// Initializing global object for the framework 
// 
$Q    = new CGI(); 
$OUT  = new CGIOut(); 
$DB   =& DB::connect($CONF['db_dsn']); 
 
$LANG = new Lang(); 
 
 
// Populate Menu Header 
 
// 
// Setting up default mode if not defined 
// 
if(empty($Q->req['mode'])){ 
    $Q->req['mode'] = 'main'; 
} 
 
// 
// Require the class and execute 
// 
if(file_exists(ROOT_PATH . 'src/cgi/mode/' . $Q->req['mode']. '.php')){ 
    require_once(ROOT_PATH . 'src/cgi/mode/' . $Q->req['mode']. '.php'); 
 
    $obj_name = 'cgi_mode_' . $Q->req['mode']; 
 
    $obj = new $obj_name; 
    $obj->_run(); 
} 
else{ 
    die('Mode[' . $Q->req['mode'] . '] not defined.'); 
} 
 
?>

Did this file decode correctly?

Original Code

<?php

define('ROOT_PATH', dirname(__FILE__).'/');
date_default_timezone_set('Asia/Kuala_Lumpur');

require_once 'DB.php';
require_once ROOT_PATH . 'src/lib/CGI.php';
require_once ROOT_PATH . 'src/lib/CGIOut.php';
require_once ROOT_PATH . 'src/lib/Lang.php';
require_once ROOT_PATH . 'src/lib/SmartyWrap.php';
require_once ROOT_PATH . 'src/lib/Calendar.php';
require_once ROOT_PATH . 'src/lib/Calendar2.php';
require_once ROOT_PATH . 'src/functions.php';
require_once ROOT_PATH . 'src/config.php';
require_once ROOT_PATH . 'src/code.php';
require_once ROOT_PATH . 'src/handler.php';
require_once ROOT_PATH . 'src/Base.php';




set_error_handler('handler_cgi_error');

//
// For debugging on development
//
//DBSH::$debug                 = true;
SmartyWrap::$w_force_compile = true;





//-----------------------------------------------
// NO USER EDITABLE SECTIONS BELOW
//-----------------------------------------------
global $CONF, $Q, $OUT, $DB, $CODE, $LANG;

//
// Setting up path for Smarty
//
SmartyWrap::$w_template_dir  = ROOT_PATH . 'skin/' . $CONF['skin'] . '/tpl/cgi/';
SmartyWrap::$w_compile_dir   = ROOT_PATH . 'tpl_c/';

//
// Setting up language path
//
LANG::$lang_dir = ROOT_PATH . 'skin/' . $CONF['skin'] . '/lang/';

//
// Initializing global object for the framework
//
$Q    = new CGI();
$OUT  = new CGIOut();
$DB   =& DB::connect($CONF['db_dsn']);

$LANG = new Lang();


// Populate Menu Header

//
// Setting up default mode if not defined
//
if(empty($Q->req['mode'])){
    $Q->req['mode'] = 'main';
}

//
// Require the class and execute
//
if(file_exists(ROOT_PATH . 'src/cgi/mode/' . $Q->req['mode']. '.php')){
    require_once(ROOT_PATH . 'src/cgi/mode/' . $Q->req['mode']. '.php');

    $obj_name = 'cgi_mode_' . $Q->req['mode'];

    $obj = new $obj_name;
    $obj->_run();
}
else{
    die('Mode[' . $Q->req['mode'] . '] not defined.');
}

?>

Function Calls

define 1
dirname 1

Variables

None

Stats

MD5 d6ca15c76fe022e95100ef2f7d2de80a
Eval Count 0
Decode Time 122 ms