Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.0
- * @ Author : DeZender
- * @ Release on : 15.05.2020
- * @ Official site : http://DeZender.Net
- *
- */
- function get_base_url()
- {
- static $url = null;
- if ($url) {
- return $url;
- }
- if ($url = get_config('app', 'base', 'url')) {
- return $url = rtrim($url, '/');
- }
- return $url = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . ($_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_ADDR']) . rtrim('/' . ltrim(str_replace('\\', '/', dirname(str_replace($_SERVER['DOCUMENT_ROOT'], '', __INDEX__))), '/'), '/');
- }
- function get_config($name = NULL, $group = NULL, $key = NULL, $default = NULL)
- {
- static $config = null;
- if (function_exists('custom_get_config')) {
- $get = custom_get_config($name, $group, $key);
- if (!is_null($get)) {
- return $get;
- }
- }
- if ($name) {
- if ($config[$name]) {
- if ($group) {
- if ($config[$name][$group]) {
- if ($key) {
- if (is_array($key)) {
- $values = [];
- foreach ($key as $k) {
- if (array_key_exists($k, $config[$name][$group])) {
- $values[$k] = $config[$name][$group][$k];
- }
- }
- if (!empty($values)) {
- return $values;
- }
- }
- else if (array_key_exists($key, $config[$name][$group])) {
- return $config[$name][$group][$key];
- }
- return $default;
- }
- else {
- return $config[$name][$group];
- }
- }
- return $default;
- }
- else {
- return $config[$name];
- }
- }
- else {
- if (($config[$name] = parse_ini_file(get_ini_file($name), true)) === false) {
- echo 'Invalid ' . $name . ' config file';
- exit();
- }
- else {
- foreach ($config[$name] as $k => $v) {
- if (is_array($v) && empty($v)) {
- if ($section = get_ini_file($name, $k)) {
- if (($config[$name][$k] = parse_ini_file($section, true)) === false) {
- echo 'Invalid ' . $name . ' ' . $k . ' config file';
- exit();
- }
- }
- }
- }
- }
- return get_config($name, $group, $key, $default);
- }
- }
- else {
- return $config;
- }
- }
- function get_config_enables($name)
- {
- if ($config = get_config($name)) {
- $enables = [];
- foreach ($config as $k => $v) {
- if (array_key_exists('enabled', $v)) {
- $enables[$k] = (is_array($v['enabled']) ? $v['enabled'] : ($v['enabled'] == 1 ? true : ($v['enabled'] == 0 ? false : $v['enabled'])));
- }
- }
- return $enables;
- }
- }
- function get_platform_options($config, $platform)
- {
- return get_config($config, 'platform.' . $platform);
- }
- function get_ini_file($name, $group = NULL)
- {
- if (function_exists('get_custom_ini_file')) {
- if ($ini = get_custom_ini_file($name, $group)) {
- ............................................................
- ..................................
- .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement