20 lines
536 B
PHP
20 lines
536 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
return static function (AppContext $ctx): void {
|
|
if ($ctx->isPost()) {
|
|
if ($ctx->postString('form_action') === '') {
|
|
$_POST['form_action'] = 'create_database';
|
|
}
|
|
if ($ctx->postString('db_suffix') === '' && $ctx->postString('db_name') !== '') {
|
|
$_POST['db_suffix'] = $ctx->postString('db_name');
|
|
}
|
|
|
|
$handler = require __DIR__ . '/index.php';
|
|
$handler($ctx);
|
|
return;
|
|
}
|
|
|
|
Http::redirect($ctx->url('index.html'));
|
|
};
|