27 lines
599 B
PHP
Executable File
27 lines
599 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( $_ENV['MAINTENANCE']) return $this->load->view('underconstruction');
|
|
|
|
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' );
|
|
}
|
|
}
|