admin themes
This commit is contained in:
@ -8,6 +8,31 @@ include_once __DIR__ . "/bootstrap/db.php";
|
||||
include_once __DIR__ . "/bootstrap/header.php";
|
||||
const ROOT_DIR = __DIR__;
|
||||
const KERNEL_DIR = __DIR__ . "/kernel";
|
||||
const KERNEL_MODULES_DIR = __DIR__ . "/kernel/modules";
|
||||
const KERNEL_ADMIN_THEMES_DIR = __DIR__ . "/kernel/admin_themes";
|
||||
const CONSOLE_DIR = __DIR__ . "/kernel/console";
|
||||
const RESOURCES_DIR = __DIR__ . "/resources";
|
||||
|
||||
|
||||
|
||||
function getConst($text): array|false|string
|
||||
{
|
||||
$constStr = [
|
||||
"{ROOT}" => ROOT_DIR,
|
||||
"{RESOURCES}" => RESOURCES_DIR,
|
||||
"{KERNEL_ADMIN_THEMES}" => KERNEL_ADMIN_THEMES_DIR,
|
||||
"{KERNEL}" => KERNEL_DIR,
|
||||
"{KERNEL_MODULES}" => KERNEL_MODULES_DIR,
|
||||
"{CONSOLE}" => CONSOLE_DIR,
|
||||
];
|
||||
|
||||
$str = $text;
|
||||
foreach($constStr as $key => $value)
|
||||
{
|
||||
$str = str_replace($key, $value, $str);
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user