Initial project push.
This commit is contained in:
29
src/Controller/MainController.php
Normal file
29
src/Controller/MainController.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user