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='Pz48P3BocA0KY2wxc3MgTTJkNWxzIDV4dDVuZHMgTXlzcWw0RGIgew0KICAgIHByMn..

Decoded Output download

?><?php
class Models extends MysqliDb {
    protected $host;
    protected $username;
    protected $password;
    protected $dbname;
    public function __construct( $host, $username, $password, $dbname ) {
        $this->host     = $host;
        $this->username = $username;
        $this->password = $password;
        $this->dbname   = $dbname;
        parent::__construct( $this->host, $this->username, $this->password, $this->dbname );
    }
    /**
     * #### &#272;&#7863;t gi&#225; tr&#7883; tag
     *
     * * @param string $getUrl
     * * @param int $catId
     * * @param string $valueGet
     * * @return void
     */
    public function metaTags($getUrl='', $catId, $valueGet) {
        $_data  = '';
        $_table = 'tbl_cat';
        if ( empty($getUrl) ) {
            # Lay tieu de danh muc
            if ( !empty($catId) ) {
                $this->where("id", $catId);
            } else {
                $this->where("url", '');
            }
            $valueGet = 'name';
        } else {
            $_table = "tbl_prod";
            $this->where("url", hn_get('url'));
        }
        $_data = $this->getValue($_table, $valueGet);
        if ( $valueGet == 'url' ) {
            if ( empty($getUrl) ) {
                $_data = ROOT_PATH . $_data ."/";
            } else {
                $this->where("id", $catId);
                $$models->urlCat = $this->getValue("tbl_cat", "url");
                $_data = ROOT_PATH.$$models->urlCat."/".$_data.".html";
            }
        }
        if ( $valueGet == 'image' && !empty($catId) ) {
            if ( empty($getUrl) ) {
                $_data = '';
            } else {
                $_data = ROOT_PATH."uploads/product/".$_data;
            }
        }
        return $_data;
    }
    /**
     * ### L&#7845;y nhanh th&#244;ng tin (echo)
     *
     * * @param string $keyname
     * * @return void
     */
    public function getThongTin($keyname) {
        $this->where("keyname = '".$keyname."'");
        echo $this->getValue("tbl_info", "content");
    }
    /**
     * ### L&#7845;y nhanh th&#244;ng tin (return)
     *
     * * @param string $keyname
     * * @return void
     */
    public function thongTin($keyname) {
        $this->where("keyname = '".$keyname."'");
        return $this->getValue("tbl_info", "content");
    }
    public function urlCat($idcat) {
        $this->where('id', $idcat);
        return $this->getValue("tbl_cat", "url");
    }
    /**
     * ### L&#7845;y nhanh c&#225;c s&#7843;n ph&#7849;m
     *
     * * @param array $data
     * * @param int $idparent
     * * @return void
     */
    public function getProduct($data,$idparent) {
        if ( count($data) > 0 ) {
            # get url parent
            if ( !$idparent ) {
                # code...
                exit();
            }
            $this->where('id', $idparent);
            $urlParent = $this->getValue("tbl_cat", "url");
            $this->where("id", $idparent);
            $typeNw = $this->getValue("tbl_cat", "type");
            if ( $typeNw == 1 ) {
                $dirImg = "news";
            } else {
                $dirImg = "product";
            }
            foreach ($data as $kpd => $vpd) {
                $url = $vpd['url'] ? ROOT_PATH.$urlParent.'/'.$vpd['url'].'.html' : '#';
                $des = $vpd['des'] ? substr_word($vpd['des'], 90).'...' : null;
                echo '
                    <div class="col-sm-3 welcome-grids">
                        <div class="welcome-img">
                            <a href="'.$url.'" title="'.$vpd['name'].'">
                                <img src="'.ROOT_PATH.'uploads/'.$dirImg.'/thumb/'.$vpd['image'].'" class="img-responsive zoom-img" alt="'.$vpd['name'].'">
                            </a>
                        </div>
                        <div class="welcome-name">
                            <a href="'.$url.'" title="'.$vpd['name'].'">
                                '.$vpd['name'].'
                            </a>
                        </div>
                        <!-- .welcome-name -->
                        <div class="welcome-des">
                            '.$des.'
                        </div>
                        <!-- .welcome-title -->
                    </div>
                ';
            }
        }
    }
    /**
     * ### X&#243;a h&#236;nh t&#7841;m
     *
     * * @param string $table
     * * @param string $link
     * * @return void
     */
    public function cleanImageTmp($table, $link) {
       $this->where("tmp", 1);
        $tmps =$this->get($table, null,array("id, images"));
        foreach ($tmps as $imgtmp) {
            if ( file_exists($link.$imgtmp['images']) ) {
                unlink($link.$imgtmp['images']);
               $this->where("id", $imgtmp['id']);
               $this->delete("tbl_prod_img");
            }
        }
    }
    /**
     * ### H&#224;m s&#7855;p x&#7871;p
     *
     * * @param string $table
     * * @return void
     */
    public function _sort($table) {
        $maxSort = (int) $this->getValue($table, "count(sort)");
        if ( !!$maxSort ) {
            $maxSort = ($maxSort + 1);
        } else {
            $maxSort = 1;
        }
        return $maxSort;
    }
}
?>

Did this file decode correctly?

Original Code

<?php $_F=__FILE__;$_X='Pz48P3BocA0KY2wxc3MgTTJkNWxzIDV4dDVuZHMgTXlzcWw0RGIgew0KICAgIHByMnQ1Y3Q1ZCAkaDJzdDsNCiAgICBwcjJ0NWN0NWQgJDNzNXJuMW01Ow0KICAgIHByMnQ1Y3Q1ZCAkcDFzc3cycmQ7DQogICAgcHIydDVjdDVkICRkYm4xbTU7DQogICAgcDNibDRjIGYzbmN0NDJuIF9fYzJuc3RyM2N0KCAkaDJzdCwgJDNzNXJuMW01LCAkcDFzc3cycmQsICRkYm4xbTUgKSB7DQogICAgICAgICR0aDRzLT5oMnN0ICAgICA9ICRoMnN0Ow0KICAgICAgICAkdGg0cy0+M3M1cm4xbTUgPSAkM3M1cm4xbTU7DQogICAgICAgICR0aDRzLT5wMXNzdzJyZCA9ICRwMXNzdzJyZDsNCiAgICAgICAgJHRoNHMtPmRibjFtNSAgID0gJGRibjFtNTsNCiAgICAgICAgcDFyNW50OjpfX2MybnN0cjNjdCggJHRoNHMtPmgyc3QsICR0aDRzLT4zczVybjFtNSwgJHRoNHMtPnAxc3N3MnJkLCAkdGg0cy0+ZGJuMW01ICk7DQogICAgfQ0KICAgIC8qKg0KICAgICAqICMjIyMgJiNhN2E7JiM3OGVvO3QgZzQmI2FhaTsgdHImIzc4OG87IHQxZw0KICAgICAqDQogICAgICogKiBAcDFyMW0gc3RyNG5nICRnNXRVcmwNCiAgICAgKiAqIEBwMXIxbSA0bnQgJGMxdElkDQogICAgICogKiBAcDFyMW0gc3RyNG5nICR2MWwzNUc1dA0KICAgICAqICogQHI1dDNybiB2MjRkDQogICAgICovDQogICAgcDNibDRjIGYzbmN0NDJuIG01dDFUMWdzKCRnNXRVcmw9JycsICRjMXRJZCwgJHYxbDM1RzV0KSB7DQogICAgICAgICRfZDF0MSAgPSAnJzsNCiAgICAgICAgJF90MWJsNSA9ICd0YmxfYzF0JzsNCiAgICAgICAgNGYgKCA1bXB0eSgkZzV0VXJsKSApIHsNCiAgICAgICAgICAgICMgTDF5IHQ0NTMgZDUgZDFuaCBtM2MNCiAgICAgICAgICAgIDRmICggITVtcHR5KCRjMXRJZCkgKSB7DQogICAgICAgICAgICAgICAgJHRoNHMtPndoNXI1KCI0ZCIsICRjMXRJZCk7DQogICAgICAgICAgICB9IDVsczUgew0KICAgICAgICAgICAgICAgICR0aDRzLT53aDVyNSgiM3JsIiwgJycpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJHYxbDM1RzV0ID0gJ24xbTUnOw0KICAgICAgICB9IDVsczUgew0KICAgICAgICAgICAgJF90MWJsNSA9ICJ0YmxfcHIyZCI7DQogICAgICAgICAgICAkdGg0cy0+d2g1cjUoIjNybCIsIGhuX2c1dCgnM3JsJykpOw0KICAgICAgICB9DQogICAgICAgICRfZDF0MSA9ICR0aDRzLT5nNXRWMWwzNSgkX3QxYmw1LCAkdjFsMzVHNXQpOw0KICAgICAgICA0ZiAoICR2MWwzNUc1dCA9PSAnM3JsJyApIHsNCiAgICAgICAgICAgIDRmICggNW1wdHkoJGc1dFVybCkgKSB7DQogICAgICAgICAgICAgICAgJF9kMXQxID0gUk9PVF9QQVRIIC4gJF9kMXQxIC4iLyI7DQogICAgICAgICAgICB9IDVsczUgew0KICAgICAgICAgICAgICAgICR0aDRzLT53aDVyNSgiNGQiLCAkYzF0SWQpOw0KICAgICAgICAgICAgICAgICQkbTJkNWxzLT4zcmxDMXQgPSAkdGg0cy0+ZzV0VjFsMzUoInRibF9jMXQiLCAiM3JsIik7DQogICAgICAgICAgICAgICAgJF9kMXQxID0gUk9PVF9QQVRILiQkbTJkNWxzLT4zcmxDMXQuIi8iLiRfZDF0MS4iLmh0bWwiOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgICAgIDRmICggJHYxbDM1RzV0ID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gM3JsQzF0KCQ0ZGMxdCkgew0KICAgICAgICAkdGg0cy0+d2g1cjUoJzRkJywgJDRkYzF0KTsNCiAgICAgICAgcjV0M3JuICR0aDRzLT5nNXRWMWwzNSgidGJsX2MxdCIsICIzcmwiKTsNCiAgICB9DQogICAgLyoqDQogICAgICogIyMjIEwmIzc4dWk7eSBuaDFuaCBjJiNhYWk7YyBzJiM3OHVvO24gcGgmIzc4dTk7bQ0KICAgICAqDQogICAgICogKiBAcDFyMW0gMXJyMXkgJGQxdDENCiAgICAgKiAqIEBwMXIxbSA0bnQgJDRkcDFyNW50DQogICAgICogKiBAcjV0M3JuIHYyNGQNCiAgICAgKi8NCiAgICBwM2JsNGMgZjNuY3Q0Mm4gZzV0UHIyZDNjdCgkZDF0MSwkNGRwMXI1bnQpIHsNCiAgICAgICAgNGYgKCBjMjNudCgkZDF0MSkgPiAwICkgew0KICAgICAgICAgICAgIyBnNXQgM3JsIHAxcjVudA0KICAgICAgICAgICAgNGYgKCAhJDRkcDFyNW50ICkgew0KICAgICAgICAgICAgICAgICMgYzJkNS4uLg0KICAgICAgICAgICAgICAgIDV4NHQoKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgICR0aDRzLT53aDVyNSgnNGQnLCAkNGRwMXI1bnQpOw0KICAgICAgICAgICAgJDNybFAxcjVudCA9ICR0aDRzLT5nNXRWMWwzNSgidGJsX2MxdCIsICIzcmwiKTsNCiAgICAgICAgICAgICR0aDRzLT53aDVyNSgiNGQiLCAkNGRwMXI1bnQpOw0KICAgICAgICAgICAgJHR5cDVOdyA9ICR0aDRzLT5nNXRWMWwzNSgidGJsX2MxdCIsICJ0eXA1Iik7DQogICAgICAgICAgICA0ZiAoICR0eXA1TncgPT0gNiApIHsNCiAgICAgICAgICAgICAgICAkZDRySW1nID0gIm41d3MiOw0KICAgICAgICAgICAgfSA1bHM1IHsNCiAgICAgICAgICAgICAgICAkZDRySW1nID0gInByMmQzY3QiOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZjJyNTFjaCAoJGQxdDEgMXMgJGtwZCA9PiAkdnBkKSB7DQogICAgICAgICAgICAgICAgJDNybCA9ICR2cGRbJzNybCddID8gUk9PVF9QQVRILiQzcmxQMXI1bnQuJy8nLiR2cGRbJzNybCddLicuaHRtbCcgOiAnIyc7DQogICAgICAgICAgICAgICAgJGQ1cyA9ICR2cGRbJ2Q1cyddID8gczNic3RyX3cycmQoJHZwZFsnZDVzJ10sIDkwKS4nLi4uJyA6IG4zbGw7DQogICAgICAgICAgICAgICAgNWNoMiAnDQogICAgICAgICAgICAgICAgICAgIDxkNHYgY2wxc3M9ImMybC1zbS1vIHc1bGMybTUtZ3I0ZHMiPg0KICAgICAgICAgICAgICAgICAgICAgICAgPGQ0diBjbDFzcz0idzVsYzJtNS00bWciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwxIGhyNWY9IicuJDNybC4nIiB0NHRsNT0iJy4kdnBkWyduMW01J10uJyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw0bWcgc3JjPSInLlJPT1RfUEFUSC4nM3BsMjFkcy8nLiRkNHJJbWcuJy90aDNtYi8nLiR2cGRbJzRtMWc1J10uJyIgY2wxc3M9IjRtZy1yNXNwMm5zNHY1IHoyMm0tNG1nIiAxbHQ9IicuJHZwZFsnbjFtNSddLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvMT4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvZDR2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPGQ0diBjbDFzcz0idzVsYzJtNS1uMW01Ij4NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8MSBocjVmPSInLiQzcmwuJyIgdDR0bDU9IicuJHZwZFsnbjFtNSddLiciPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnLiR2cGRbJ24xbTUnXS4nDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC8xPg0KICAgICAgICAgICAgICAgICAgICAgICAgPC9kNHY+DQogICAgICAgICAgICAgICAgICAgICAgICA8IS0tIC53NWxjMm01LW4xbTUgLS0+DQogICAgICAgICAgICAgICAgICAgICAgICA8ZDR2IGNsMXNzPSJ3NWxjMm01LWQ1cyI+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJy4kZDVzLicNCiAgICAgICAgICAgICAgICAgICAgICAgIDwvZDR2Pg0KICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSAudzVsYzJtNS10NHRsNSAtLT4NCiAgICAgICAgICAgICAgICAgICAgPC9kNHY+DQogICAgICAgICAgICAgICAgJzsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgIH0NCiAgICAvKioNCiAgICAgKiAjIyMgWCYjYXVvOzEgaCYjYW9lO25oIHQmIzc4dTY7bQ0KICAgICAqDQogICAgICogKiBAcDFyMW0gc3RyNG5nICR0MWJsNQ0KICAgICAqICogQHAxcjFtIHN0cjRuZyAkbDRuaw0KICAgICAqICogQHI1dDNybiB2MjRkDQogICAgICovDQogICAgcDNibDRjIGYzbmN0NDJuIGNsNTFuSW0xZzVUbXAoJHQxYmw1LCAkbDRuaykgew0KICAgICAgICR0aDRzLT53aDVyNSgidG1wIiwgNik7DQogICAgICAgICR0bXBzID0kdGg0cy0+ZzV0KCR0MWJsNSwgbjNsbCwxcnIxeSgiNGQsIDRtMWc1cyIpKTsNCiAgICAgICAgZjJyNTFjaCAoJHRtcHMgMXMgJDRtZ3RtcCkgew0KICAgICAgICAgICAgNGYgKCBmNGw1XzV4NHN0cygkbDRuay4kNG1ndG1wWyc0bTFnNXMnXSkgKSB7DQogICAgICAgICAgICAgICAgM25sNG5rKCRsNG5rLiQ0bWd0bXBbJzRtMWc1cyddKTsNCiAgICAgICAgICAgICAgICR0aDRzLT53aDVyNSgiNGQiLCAkNG1ndG1wWyc0ZCddKTsNCiAgICAgICAgICAgICAgICR0aDRzLT5kNWw1dDUoInRibF9wcjJkXzRtZyIpOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9DQogICAgfQ0KICAgIC8qKg0KICAgICAqICMjIyBIJiNhYXU7bSBzJiM3OGlpO3AgeCYjNzg3NjtwDQogICAgICoNCiAgICAgKiAqIEBwMXIxbSBzdHI0bmcgJHQxYmw1DQogICAgICogKiBAcjV0M3JuIHYyNGQNCiAgICAgKi8NCiAgICBwM2JsNGMgZjNuY3Q0Mm4gX3MycnQoJHQxYmw1KSB7DQogICAgICAgICRtMXhTMnJ0ID0gKDRudCkgJHRoNHMtPmc1dFYxbDM1KCR0MWJsNSwgImMyM250KHMycnQpIik7DQogICAgICAgIDRmICggISEkbTF4UzJydCApIHsNCiAgICAgICAgICAgICRtMXhTMnJ0ID0gKCRtMXhTMnJ0ICsgNik7DQogICAgICAgIH0gNWxzNSB7DQogICAgICAgICAgICAkbTF4UzJydCA9IDY7DQogICAgICAgIH0NCiAgICAgICAgcjV0M3JuICRtMXhTMnJ0Ow0KICAgIH0NCn0NCj8+';eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF9YLCcxMjM0NTZhb3VpZScsJ2FvdWllMTIzNDU2Jyk7JF9SPWVyZWdfcmVwbGFjZSgnX19GSUxFX18nLCInIi4kX0YuIiciLCRfWCk7ZXZhbCgkX1IpOyRfUj0wOyRfWD0wOw=='));?>

Function Calls

strtr 1
ereg_replace 1
base64_decode 2

Variables

$_F index.php
$_R ?><?php class Models extends MysqliDb { protected $hos..
$_X ?><?php class Models extends MysqliDb { protected $hos..

Stats

MD5 b7f2f9ca140f1680597a10cddd2b10d6
Eval Count 2
Decode Time 111 ms