load proc and admin menu gen fix

This commit is contained in:
Amberstone 2024-09-29 09:51:50 +09:00
parent a1bc96cf1d
commit 6a34711e5d
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
2 changed files with 8 additions and 4 deletions

View file

@ -52,7 +52,7 @@ class MenuCategory extends Menu
global $g5, $is_admin, $auth, $menu, $auth_menu;
$sub_menu = preg_replace('/^.*\/([^\/]+\.php)$/', '/$1', str_replace([G5_ADMIN_URL, "/adm"], ["", ""], $_SERVER["SCRIPT_NAME"]));
$str = "<ul class=\"gnb_2dul\">";
$str = "";
foreach ($this->childmenu as $key => $menu) {
if ($is_admin != 'super')
continue;
@ -85,6 +85,12 @@ class MenuCategory extends Menu
}
$str .= "</ul>";
if ($this->selected) {
$str = "<ul class=\"gnb_2dul\" style=\"display: block\">{$str}";
} else {
$str = "<ul class=\"gnb_2dul\">{$str}";
}
return $str;
}
}

View file

@ -10,6 +10,7 @@ header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV
if (!defined('G5_SET_TIME_LIMIT')) {
define('G5_SET_TIME_LIMIT', 0);
}
define("__ADVDIR__", __DIR__);
@set_time_limit(G5_SET_TIME_LIMIT);
@ -249,9 +250,6 @@ include_once $g5_path['path'] . '/config.php';
$_system = new stdClass;
$_system->g5_path = $g5_path;
$_system->classes = load_libs(__DIR__ . "/classes", "class");
define("__ADVDIR__", __DIR__);
$_system->addons = load_libs(__DIR__ . "/addons", "addon");
// future update... maybe
// $_system->modules = load_libs(__DIR__ . "/modules", "model");