2017-09-15 14:44:40 +03:00
|
|
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
2015-12-30 13:02:14 +02:00
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* Easy!Appointments - Open Source Web Scheduler
|
|
|
|
*
|
|
|
|
* @package EasyAppointments
|
|
|
|
* @author A.Tselegidis <alextselegidis@gmail.com>
|
2017-01-31 09:35:34 +03:00
|
|
|
* @copyright Copyright (c) 2013 - 2017, Alex Tselegidis
|
2015-12-30 13:02:14 +02:00
|
|
|
* @license http://opensource.org/licenses/GPL-3.0 - GPLv3
|
|
|
|
* @link http://easyappointments.org
|
|
|
|
* @since v1.0.0
|
|
|
|
* ---------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Errors Controller
|
|
|
|
*
|
|
|
|
* @package Controllers
|
|
|
|
*/
|
|
|
|
class Errors extends CI_Controller {
|
2017-09-15 14:36:37 +03:00
|
|
|
/**
|
|
|
|
* Class Constructor
|
|
|
|
*/
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
2017-09-06 16:22:11 +03:00
|
|
|
|
2017-09-15 14:36:37 +03:00
|
|
|
$this->load->library('session');
|
2017-09-06 16:22:11 +03:00
|
|
|
|
2017-09-15 14:36:37 +03:00
|
|
|
// Set user's selected language.
|
|
|
|
if ($this->session->userdata('language'))
|
|
|
|
{
|
|
|
|
$this->config->set_item('language', $this->session->userdata('language'));
|
|
|
|
$this->lang->load('translations', $this->session->userdata('language'));
|
|
|
|
} else
|
|
|
|
{
|
|
|
|
$this->lang->load('translations', $this->config->item('language')); // default
|
|
|
|
}
|
|
|
|
}
|
2015-12-30 13:02:14 +02:00
|
|
|
|
2017-09-06 16:22:11 +03:00
|
|
|
/**
|
|
|
|
* Display the 404 error page.
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
public function index()
|
|
|
|
{
|
2015-12-30 13:02:14 +02:00
|
|
|
$this->e404();
|
|
|
|
}
|
|
|
|
|
2017-09-06 16:22:11 +03:00
|
|
|
/**
|
|
|
|
* Display the 404 error page.
|
|
|
|
*/
|
2017-09-15 14:36:37 +03:00
|
|
|
public function error404()
|
|
|
|
{
|
|
|
|
$this->load->helper('google_analytics');
|
2015-12-30 13:02:14 +02:00
|
|
|
$this->load->model('settings_model');
|
|
|
|
$view['company_name'] = $this->settings_model->get_setting('company_name');
|
|
|
|
$this->load->view('general/error404', $view);
|
|
|
|
}
|
|
|
|
}
|