YAGS/web/CONTROLLERS/setup.php

14 lines
540 B
PHP

<?php
$container = new \wsos\structs\container();
$templates = $container->get("templateLoader");
$context = $container->get("context");
$protocol = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1')) ? 'https://' : 'http://';
$port = $_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '';
$context["apiHost"] = $protocol . $_SERVER['SERVER_NAME'] . $port;
$templates->load("setup.html");
$templates->render($context);
$templates->show();