origo/src/Controller/MainController.php
2026-01-15 09:50:55 -05:00

30 lines
587 B
PHP

<?php
namespace Origo\Controller;
use Origo\Controller\ControllerBase;
use Origo\Controller\ControllerInterface;
use Origo\Services\Template;
class MainController extends ControllerBase implements ControllerInterface {
public function __construct() {
parent::__construct();
}
/**
* Get the response.
*/
public function getResponse(): string {
$session_id = $this->request->getCookie('ORIGOSESS');
if($session_id) {
header("Location: /dashboard");
die();
}
$template = new Template('main.html');
return $template->render();
}
}