46 lines
970 B
PHP
Executable File
46 lines
970 B
PHP
Executable File
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Class : Error (Error Controller)
|
|
* Error class to control to authenticate user credentials and starts user's session.
|
|
* @author :Venba Info Tech -
|
|
* @version : 1.1
|
|
* @since : 18 November 2017
|
|
*/
|
|
class Error extends CI_Controller
|
|
{
|
|
/**
|
|
* default constructor of the class
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Index Page for this controller(default function of the class)
|
|
*/
|
|
public function index()
|
|
{
|
|
$this->isLoggedIn();
|
|
}
|
|
|
|
/**
|
|
* To check the user is logged in or not
|
|
*/
|
|
function isLoggedIn()
|
|
{
|
|
$isLoggedIn = $this->session->userdata('isLoggedIn');
|
|
|
|
if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
|
|
{
|
|
$this->load->view('login');
|
|
}
|
|
else
|
|
{
|
|
redirect('pageNotFound');
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|