Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Home extends CI_Controller
- {
- public function __construct()
- {
- parent::__construct();
- }
- public function index()
- {
- $this->load->library('trinity');
- $this->trinity->BuildIndex();
- }
- public function login()
- {
- $this->load->library('trinity');
- $this->load->library('session');
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- var_dump($username);
- var_dump($password);
- var_dump($_POST);
- if($this->session->userdata('logged_in'))
- {
- show_error('You are already logged in!');
- }
- else
- {
- $this->trinity->Login($username, $password);
- redirect('home');
- }
- }
- public function logout()
- {
- $this->load->library('trinity');
- $this->trinity->Logout();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement