503
Help for module \"$moduleTitle\"";
if (isset($helpConfig['description'])) {
echo "" . $helpConfig['description'] . "
";
}
echo " ";
foreach ($helpConfig['actions'] as $action) {
?>
- = $action['name'] ?> = $action['path'] ?>
\n
";
echo $helpConfig['append']() ?? '';
exit();
}
$modules = $config['modules'];
$selectedModule = null;
foreach ($modules as $moduleName => $module) {
foreach (array_merge([$moduleName], $module['alias'] ?? []) as $alias) {
if (strpos($_SERVER['HTTP_HOST'], $alias . '.') === 0) {
$selectedModule = $module;
$selectedModule['key'] = $moduleName;
break;
}
}
}
if ($selectedModule === null) {
http_response_code(404);
echo 'unknown module';
}
generateHelp($selectedModule['key']);
if (isset($selectedModule['auth']) && $selectedModule['auth']) {
askAuth($config['auth']);
}
require('./modules/' . $selectedModule['key'] . '/' . $selectedModule['key'] . '.php');