68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php defined('BASEPATH') or exit('No direct script access allowed');
|
|
|
|
/**
|
|
* CodeIgniter-HMVC
|
|
*
|
|
* @package CodeIgniter-HMVC
|
|
* @author N3Cr0N (N3Cr0N@list.ru)
|
|
* @copyright 2019 N3Cr0N
|
|
* @license https://opensource.org/licenses/MIT MIT License
|
|
* @link <URI> (description)
|
|
* @version GIT: $Id$
|
|
* @since Version 0.0.1
|
|
* @filesource
|
|
*
|
|
*/
|
|
|
|
class Dash extends Admin_Controller
|
|
{
|
|
/**
|
|
* [__construct description]
|
|
*
|
|
* @method __construct
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// To inherit directly the attributes of the parent class.
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* [index description]
|
|
*
|
|
* @method index
|
|
*
|
|
* @return [type] [description]
|
|
*/
|
|
public function index()
|
|
{
|
|
echo 'dash';
|
|
$this->load->view('welcome_message');
|
|
}
|
|
|
|
public function authendicate()
|
|
{
|
|
|
|
|
|
$session_data = array(
|
|
|
|
'user_id' => '10',
|
|
'user_name' => 'demo',
|
|
'user_email' => 'demo@demo.com',
|
|
'logged_in' => true
|
|
);
|
|
|
|
$this->session->set_userdata($session_data);
|
|
echo 'success<br/>';
|
|
print_r($this->session->all_userdata());
|
|
print_r($this->session->userdata('user_name'));
|
|
}
|
|
|
|
public function logout()
|
|
{
|
|
$this->session->sess_destroy();
|
|
print_r($this->session->all_userdata());
|
|
redirect('auth');
|
|
}
|
|
}
|