public function users() { Load::manager(__DIR__ . '/users/UsersManager.php'); }
} else { $com = Request::get('com'); if (!is_dir(ADMIN_ROOT . '/components/' . $com)) { Router::set404(); } if (is_file(ADMIN_ROOT . '/components/' . $com . '/config.php')) { require_once ADMIN_ROOT . '/components/' . $com . '/config.php'; } if (is_file(ADMIN_ROOT . '/components/' . $com . '/SectionController.php')) { Load::controller(ADMIN_ROOT . '/components/' . $com . '/SectionController.php', Request::get('section', false)); } else { $com_dirs = FileSys::getDirs(ADMIN_ROOT . '/components/' . $com); $forbidden_dir = ['client']; $section = Request::get('section'); if (in_array($section, $com_dirs) && !in_array($section, $forbidden_dir)) { Load::manager(ADMIN_ROOT . '/components/' . $com . '/' . $section . '/' . toCamelCase($section) . 'Manager.php'); } else { Router::set404(); } } } } catch (SystemException $e) { header('HTTP/1.0 500 Internal Server Error'); echo $e->getError(); } catch (ValidatorException $e) { header('HTTP/1.0 400 Bad Request'); echo $e->getError(); } catch (AccessException $e) { header('HTTP/1.0 403 Forbidden'); echo $e->getError(); }