Files
dbois/application/controllers/Main.php
T
2017-12-25 20:23:32 +01:00

25 lines
518 B
PHP
Executable File

<?php
defined( 'BASEPATH' ) OR exit( 'No direct script access allowed' );
class Main extends MY_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
if ( AUTHENTICATED == FALSE ) return $this->showLoginPage();
$pages = Page::getPages( $this->user );
$this->load->view( 'main_view', ['pages' => $pages] );
}
private function showLoginPage()
{
$this->load->view( 'pages/login/login_view' );
}
}