* @license https://files.froxlor.org/misc/COPYING.txt GPLv2 */ use Froxlor\Http\RateLimiter; use Froxlor\UI\Panel\UI; use Froxlor\Install\Install; require dirname(__DIR__) . '/lib/functions.php'; // define default theme for configurehint, etc. $_deftheme = 'Froxlor'; // validate correct php version if (version_compare("7.4.0", PHP_VERSION, ">=")) { die(view($_deftheme . '/misc/phprequirementfailed.html.twig', [ '{{ basehref }}' => '../', '{{ froxlor_min_version }}' => '7.4.0', '{{ current_version }}' => PHP_VERSION, '{{ current_year }}' => date('Y', time()), ])); } // validate vendor autoloader if (!file_exists(dirname(__DIR__) . '/vendor/autoload.php')) { die(view($_deftheme . '/misc/vendormissinghint.html.twig', [ '{{ basehref }}' => '../', '{{ froxlor_install_dir }}' => dirname(__DIR__), '{{ current_year }}' => date('Y', time()), ])); } // check installation status if (file_exists(dirname(__DIR__) . '/lib/userdata.inc.php')) { header("Location: ../"); exit; } require dirname(__DIR__) . '/vendor/autoload.php'; require dirname(__DIR__) . '/lib/tables.inc.php'; // init twig UI::initTwig(true); UI::sendHeaders(); RateLimiter::run(true); $installer = new Install(); $installer->handle();