diff --git a/application/controllers/user.php b/application/controllers/user.php index 93e1d631..3bbe33c7 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -305,14 +305,11 @@ class User extends CI_Controller { $this->form_validation->set_rules('user_name', 'Username', 'required'); $this->form_validation->set_rules('user_password', 'Password', 'required'); - $data = $query->row(); - + $data['user'] = $query->row(); if ($this->form_validation->run() == FALSE) { - - //$data['page_title'] = Login; - + $data['page_title'] = "Login"; $this->load->view('layout/header', $data); $this->load->view('user/login'); $this->load->view('layout/footer'); @@ -321,10 +318,10 @@ class User extends CI_Controller { { if($this->user_model->login() == 1) { $this->session->set_flashdata('notice', 'User logged in'); - $this->user_model->update_session($data->user_id); + $this->user_model->update_session($data['user']->user_id); redirect('dashboard'); } else { - $this->session->set_flashdata('notice', 'Incorrect username or password!'); + $this->session->set_flashdata('error', 'Incorrect username or password!'); redirect('user/login'); } } diff --git a/application/views/layout/messages.php b/application/views/layout/messages.php new file mode 100644 index 00000000..da832f21 --- /dev/null +++ b/application/views/layout/messages.php @@ -0,0 +1,32 @@ + + + + + + +session->flashdata('notice') != '') { ?> +
+ + + +session->flashdata('warning') != '') { ?> + + + + +session->flashdata('error') != '') { ?> + + + + + + + \ No newline at end of file diff --git a/application/views/lotw/export.php b/application/views/lotw/export.php index 1f755828..ddb7e94f 100644 --- a/application/views/lotw/export.php +++ b/application/views/lotw/export.php @@ -1,11 +1,7 @@