diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-10-22 15:42:07 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-10-22 22:36:55 +0200 |
commit | de02b8cb514a95c100d0ec11ab469acfc687ca00 (patch) | |
tree | 9c09a70f4ac2b582ae80dd6e065f700ef460ed11 /application/controllers/user.php | |
parent | 36f0185d8c950933099268c69081cabc084545c9 (diff) |
switch design to bootstrap; minor fixes along the way
Initial-work-by: Oliver Mader <b52@reaktor42.de>
Additional-work-by: Markus Cisler <mrkscslr@gmail.com>
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/user.php')
-rw-r--r-- | application/controllers/user.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php index ef79baa78..aa1ea235b 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -29,9 +29,9 @@ class User extends CI_Controller { { $this->data["username"] = $this->muser->get_username(); - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'index', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } function login() @@ -39,17 +39,17 @@ class User extends CI_Controller { $this->muser->require_session(); $this->session->keep_flashdata("uri"); - if ($this->input->post('process')) { + if ($this->input->post('process') !== false) { $username = $this->input->post('username'); $password = $this->input->post('password'); $result = $this->muser->login($username, $password); if ($result !== true) { - $data['login_error'] = true; - $this->load->view($this->var->view_dir.'header', $this->data); + $this->data['login_error'] = true; + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'login', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } else { $uri = $this->session->flashdata("uri"); if ($uri) { @@ -59,9 +59,9 @@ class User extends CI_Controller { } } } else { - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'login', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } } @@ -100,16 +100,16 @@ class User extends CI_Controller { $userid = $this->muser->get_userid(); $query = $this->db->query(" - SELECT `key` + SELECT `key`, `date` FROM invitations WHERE user = ? ", array($userid))->result_array(); $this->data["query"] = $query; - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'invite', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } function register() @@ -172,9 +172,9 @@ class User extends CI_Controller { DELETE FROM invitations WHERE `key` = ? ", array($key)); - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'registered', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); return; } else { $values["username"] = $username; @@ -186,9 +186,9 @@ class User extends CI_Controller { $this->data["values"] = $values; $this->data["error"] = $error; - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'register', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } function logout() @@ -213,9 +213,9 @@ class User extends CI_Controller { } } - $this->load->view($this->var->view_dir.'header', $this->data); + $this->load->view('header', $this->data); $this->load->view($this->var->view_dir.'hash_password', $this->data); - $this->load->view($this->var->view_dir.'footer', $this->data); + $this->load->view('footer', $this->data); } function cron() |