Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Login extends CI_Controller{
- public function __construct()
- {
- parent::__construct();
- $this->load->model('Login_model');
- $this->load->helper('url_helper');
- $this->load->library('session');
- }
- public function index($error = "")
- {
- if ( ! file_exists(APPPATH.'views/Login/index.php'))
- {
- // Whoops, we don't have a page for that!
- show_404();
- }
- $data['title'] = 'Middleware';
- $data['error'] = $error;
- if($this->session->userdata('id'))
- {
- redirect('/Home/index'); // Works on development
- }
- else
- {
- $this->load->view('Login/index', $data);
- }
- }
- public function process()
- {
- $login = $this->input->post("Login");
- if($login !== NULL)
- {
- $username = $this->input->post("username");
- $password = $this->input->post("password");
- $user = $this->Login_model->validate_user($username, $password);
- if($user !== NULL)
- {
- $this->session->set_userdata($user);
- redirect('/Home/index'); // Works on development
- }
- else
- {
- $this->index("Login failed");
- }
- }
- }
- }
- INFO - 2016-06-04 03:41:46 --> Config Class Initialized
- INFO - 2016-06-04 03:41:46 --> Hooks Class Initialized
- DEBUG - 2016-06-04 03:41:46 --> UTF-8 Support Enabled
- INFO - 2016-06-04 03:41:46 --> Utf8 Class Initialized
- INFO - 2016-06-04 03:41:46 --> URI Class Initialized
- DEBUG - 2016-06-04 03:41:46 --> No URI present. Default controller set.
- INFO - 2016-06-04 03:41:46 --> Router Class Initialized
- INFO - 2016-06-04 03:41:46 --> Output Class Initialized
- INFO - 2016-06-04 03:41:46 --> Security Class Initialized
- DEBUG - 2016-06-04 03:41:46 --> Global POST, GET and COOKIE data sanitized
- INFO - 2016-06-04 03:41:46 --> Input Class Initialized
- INFO - 2016-06-04 03:41:46 --> Language Class Initialized
- INFO - 2016-06-04 03:41:46 --> Loader Class Initialized
- INFO - 2016-06-04 03:41:46 --> Helper loaded: url_helper
- INFO - 2016-06-04 03:41:46 --> Helper loaded: utility_helper
- INFO - 2016-06-04 03:41:46 --> Controller Class Initialized
- INFO - 2016-06-04 03:41:46 --> Database Driver Class Initialized
- INFO - 2016-06-04 03:41:46 --> Session: Class initialized using 'files' driver.
- INFO - 2016-06-04 03:41:47 --> Config Class Initialized
- INFO - 2016-06-04 03:41:47 --> Hooks Class Initialized
- DEBUG - 2016-06-04 03:41:47 --> UTF-8 Support Enabled
- INFO - 2016-06-04 03:41:47 --> Utf8 Class Initialized
- INFO - 2016-06-04 03:41:47 --> URI Class Initialized
- INFO - 2016-06-04 03:41:47 --> Router Class Initialized
- INFO - 2016-06-04 03:41:47 --> Output Class Initialized
- INFO - 2016-06-04 03:41:47 --> Security Class Initialized
- DEBUG - 2016-06-04 03:41:47 --> Global POST, GET and COOKIE data sanitized
- INFO - 2016-06-04 03:41:47 --> Input Class Initialized
- INFO - 2016-06-04 03:41:47 --> Language Class Initialized
- INFO - 2016-06-04 03:41:47 --> Loader Class Initialized
- INFO - 2016-06-04 03:41:47 --> Helper loaded: url_helper
- INFO - 2016-06-04 03:41:47 --> Helper loaded: utility_helper
- INFO - 2016-06-04 03:41:47 --> Controller Class Initialized
- INFO - 2016-06-04 03:41:47 --> Database Driver Class Initialized
- INFO - 2016-06-04 03:41:47 --> Session: Class initialized using 'files' driver.
- INFO - 2016-06-04 03:41:47 --> File loaded: /hermes/bosnaweb21a/b2784/sl.kavishus/public_html/mystream/application/views/Login/index.php
- INFO - 2016-06-04 03:41:47 --> Final output sent to browser
- DEBUG - 2016-06-04 03:41:47 --> Total execution time: 0.1088
- INFO - 2016-06-04 03:41:53 --> Config Class Initialized
- INFO - 2016-06-04 03:41:53 --> Hooks Class Initialized
- DEBUG - 2016-06-04 03:41:53 --> UTF-8 Support Enabled
- INFO - 2016-06-04 03:41:54 --> Utf8 Class Initialized
- INFO - 2016-06-04 03:41:54 --> URI Class Initialized
- INFO - 2016-06-04 03:41:54 --> Router Class Initialized
- INFO - 2016-06-04 03:41:54 --> Output Class Initialized
- INFO - 2016-06-04 03:41:54 --> Security Class Initialized
- DEBUG - 2016-06-04 03:41:54 --> Global POST, GET and COOKIE data sanitized
- INFO - 2016-06-04 03:41:54 --> Input Class Initialized
- INFO - 2016-06-04 03:41:54 --> Language Class Initialized
- INFO - 2016-06-04 03:41:54 --> Loader Class Initialized
- INFO - 2016-06-04 03:41:54 --> Helper loaded: url_helper
- INFO - 2016-06-04 03:41:54 --> Helper loaded: utility_helper
- INFO - 2016-06-04 03:41:54 --> Controller Class Initialized
- INFO - 2016-06-04 03:41:54 --> Database Driver Class Initialized
- INFO - 2016-06-04 03:41:54 --> Session: Class initialized using 'files' driver.
- INFO - 2016-06-04 03:41:54 --> Final output sent to browser
- DEBUG - 2016-06-04 03:41:54 --> Total execution time: 0.1034
- INFO - 2016-06-04 03:41:59 --> Config Class Initialized
- INFO - 2016-06-04 03:41:59 --> Hooks Class Initialized
- DEBUG - 2016-06-04 03:41:59 --> UTF-8 Support Enabled
- INFO - 2016-06-04 03:41:59 --> Utf8 Class Initialized
- INFO - 2016-06-04 03:41:59 --> URI Class Initialized
- INFO - 2016-06-04 03:41:59 --> Router Class Initialized
- INFO - 2016-06-04 03:41:59 --> Output Class Initialized
- INFO - 2016-06-04 03:41:59 --> Security Class Initialized
- DEBUG - 2016-06-04 03:41:59 --> Global POST, GET and COOKIE data sanitized
- INFO - 2016-06-04 03:41:59 --> Input Class Initialized
- INFO - 2016-06-04 03:41:59 --> Language Class Initialized
- INFO - 2016-06-04 03:41:59 --> Loader Class Initialized
- INFO - 2016-06-04 03:41:59 --> Helper loaded: url_helper
- INFO - 2016-06-04 03:41:59 --> Helper loaded: utility_helper
- INFO - 2016-06-04 03:41:59 --> Controller Class Initialized
- INFO - 2016-06-04 03:41:59 --> Database Driver Class Initialized
- INFO - 2016-06-04 03:41:59 --> Session: Class initialized using 'files' driver.
- INFO - 2016-06-04 03:41:59 --> Final output sent to browser
- DEBUG - 2016-06-04 03:41:59 --> Total execution time: 0.0664
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement