diff --git a/application/controllers/adif.php b/application/controllers/adif.php index ce991a74..02dd85d7 100644 --- a/application/controllers/adif.php +++ b/application/controllers/adif.php @@ -6,7 +6,10 @@ class adif extends CI_Controller { /* Shows Export Views */ public function export() { - $this->load->view('layout/header'); + + $data['page_title'] = "ADIF Export"; + + $this->load->view('layout/header', $data); $this->load->view('adif/main'); $this->load->view('layout/footer'); } diff --git a/application/controllers/api.php b/application/controllers/api.php index 565714ec..45d59fec 100644 --- a/application/controllers/api.php +++ b/application/controllers/api.php @@ -20,7 +20,10 @@ class API extends CI_Controller { function help() { - $this->load->view('layout/header'); + + $data['page_title'] = "API Help"; + + $this->load->view('layout/header', $data); $this->load->view('api/help'); $this->load->view('layout/footer'); } diff --git a/application/controllers/backup.php b/application/controllers/backup.php index 98e41a5e..ae779ebb 100644 --- a/application/controllers/backup.php +++ b/application/controllers/backup.php @@ -6,7 +6,9 @@ class Backup extends CI_Controller { public function index() { - $this->load->view('layout/header'); + $data['page_title'] = "Backup"; + + $this->load->view('layout/header', $data); $this->load->view('backup/main'); $this->load->view('layout/footer'); } @@ -30,8 +32,10 @@ class Backup extends CI_Controller { $data['status'] = true; } - $this->load->view('layout/header'); - $this->load->view('backup/adif_view', $data); + $data['page_title'] = "ADIF - Backup"; + + $this->load->view('layout/header', $data); + $this->load->view('backup/adif_view'); $this->load->view('layout/footer'); } @@ -52,8 +56,10 @@ class Backup extends CI_Controller { $data['status'] = true; } - $this->load->view('layout/header'); - $this->load->view('backup/notes_view', $data); + $data['page_title'] = "Notes - Backup"; + + $this->load->view('layout/header', $data); + $this->load->view('backup/notes_view'); $this->load->view('layout/footer'); } diff --git a/application/controllers/dashboard.php b/application/controllers/dashboard.php index 21c69926..a5599ff1 100644 --- a/application/controllers/dashboard.php +++ b/application/controllers/dashboard.php @@ -45,9 +45,10 @@ class Dashboard extends CI_Controller { $data['last_five_qsos'] = $this->logbook_model->get_last_qsos('9'); - - $this->load->view('layout/header'); - $this->load->view('dashboard/index', $data); + $data['page_title'] = "Dashboard"; + + $this->load->view('layout/header', $data); + $this->load->view('dashboard/index'); $this->load->view('layout/footer'); } diff --git a/application/controllers/notes.php b/application/controllers/notes.php index 7eb33338..6f6a5ada 100644 --- a/application/controllers/notes.php +++ b/application/controllers/notes.php @@ -7,9 +7,9 @@ class Notes extends CI_Controller { { $this->load->model('note'); $data['notes'] = $this->note->list_all(); - - $this->load->view('layout/header'); - $this->load->view('notes/main', $data); + $data['page_title'] = "Notes"; + $this->load->view('layout/header', $data); + $this->load->view('notes/main'); $this->load->view('layout/footer'); } @@ -26,7 +26,8 @@ class Notes extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); + $data['page_title'] = "Add Notes"; + $this->load->view('layout/header', $data); $this->load->view('notes/add'); $this->load->view('layout/footer'); } @@ -45,8 +46,9 @@ class Notes extends CI_Controller { $data['note'] = $this->note->view($id); // Display - $this->load->view('layout/header'); - $this->load->view('notes/view',$data); + $data['page_title'] = "Note"; + $this->load->view('layout/header', $data); + $this->load->view('notes/view'); $this->load->view('layout/footer'); } @@ -65,8 +67,9 @@ class Notes extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); - $this->load->view('notes/edit', $data); + $data['page_title'] = "Edit Note"; + $this->load->view('layout/header', $data); + $this->load->view('notes/edit'); $this->load->view('layout/footer'); } else diff --git a/application/controllers/qso.php b/application/controllers/qso.php index ac3adfa2..e4bd26ee 100644 --- a/application/controllers/qso.php +++ b/application/controllers/qso.php @@ -28,8 +28,10 @@ class QSO extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); - $this->load->view('qso/index', $data); + $data['page_title'] = "Add QSO"; + + $this->load->view('layout/header', $data); + $this->load->view('qso/index'); $this->load->view('layout/footer'); } else @@ -51,8 +53,10 @@ class QSO extends CI_Controller { $data['notice'] = "QSO Added"; // Load view to create another contact - $this->load->view('layout/header'); - $this->load->view('qso/index', $data); + $data['page_title'] = "Add QSO"; + + $this->load->view('layout/header', $data); + $this->load->view('qso/index'); $this->load->view('layout/footer'); } } @@ -74,8 +78,9 @@ class QSO extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/mini_header'); - $this->load->view('qso/edit', $data); + $data['page_title'] = "Edit"; + $this->load->view('layout/mini_header', $data); + $this->load->view('qso/edit'); $this->load->view('layout/mini_footer'); } else diff --git a/application/controllers/search.php b/application/controllers/search.php index ba895c01..96ac408c 100644 --- a/application/controllers/search.php +++ b/application/controllers/search.php @@ -14,7 +14,9 @@ class Search extends CI_Controller { } } - $this->load->view('layout/header'); + $data['page_title'] = "Search"; + + $this->load->view('layout/header', $data); $this->load->view('search/main'); $this->load->view('layout/footer'); } diff --git a/application/controllers/statistics.php b/application/controllers/statistics.php index 4ff46496..29c4a124 100644 --- a/application/controllers/statistics.php +++ b/application/controllers/statistics.php @@ -37,8 +37,10 @@ class Statistics extends CI_Controller { $data['total_digi'] = $this->logbook_model->total_digi(); - $this->load->view('layout/header'); - $this->load->view('statistics/index', $data); + $data['page_title'] = "Statistics"; + + $this->load->view('layout/header', $data); + $this->load->view('statistics/index'); $this->load->view('layout/footer'); } } diff --git a/application/controllers/user.php b/application/controllers/user.php index 59ce6879..6f829bef 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -10,8 +10,10 @@ class User extends CI_Controller { $data['results'] = $this->user_model->users(); - $this->load->view('layout/header'); - $this->load->view('user/main', $data); + $data['page_title'] = "Users"; + + $this->load->view('layout/header', $data); + $this->load->view('user/main'); $this->load->view('layout/footer'); } @@ -36,7 +38,9 @@ class User extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); + $data['page_title'] = "Add User"; + + $this->load->view('layout/header', $data); if($this->input->post('user_name')) { $data['user_name'] = $this->input->post('user_name'); @@ -48,7 +52,7 @@ class User extends CI_Controller { $data['user_callsign'] = $this->input->post('user_callsign'); $data['user_locator'] = $this->input->post('user_locator'); $data['user_timezone'] = $this->input->post('user_timezone'); - $this->load->view('user/add', $data); + $this->load->view('user/add'); } else { $this->load->view('user/add', $data); } @@ -73,7 +77,9 @@ class User extends CI_Controller { redirect('user'); return; } - $this->load->view('layout/header'); + $data['page_title'] = "Users"; + + $this->load->view('layout/header', $data); $data['user_name'] = $this->input->post('user_name'); $data['user_email'] = $this->input->post('user_email'); $data['user_password'] = $this->input->post('user_password'); @@ -82,7 +88,7 @@ class User extends CI_Controller { $data['user_lastname'] = $this->input->post('user_lastname'); $data['user_callsign'] = $this->input->post('user_callsign'); $data['user_locator'] = $this->input->post('user_locator'); - $this->load->view('user/add', $data); + $this->load->view('user/add'); $this->load->view('layout/footer'); } } @@ -111,7 +117,9 @@ class User extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); + $data['page_title'] = "Edit User"; + + $this->load->view('layout/header', $data); $q = $query->row(); $data['id'] = $q->user_id; @@ -210,7 +218,9 @@ class User extends CI_Controller { } return; } - $this->load->view('layout/header'); + $data['page_title'] = "Edit User"; + + $this->load->view('layout/header', $data); $data['user_name'] = $this->input->post('user_name'); $data['user_email'] = $this->input->post('user_email'); $data['user_password'] = $this->input->post('user_password'); @@ -220,7 +230,7 @@ class User extends CI_Controller { $data['user_callsign'] = $this->input->post('user_callsign'); $data['user_locator'] = $this->input->post('user_locator'); $data['user_timezone'] = $this->input->post('user_timezone'); - $this->load->view('user/edit', $data); + $this->load->view('user/edit'); $this->load->view('layout/footer'); } } @@ -228,10 +238,10 @@ class User extends CI_Controller { function profile() { $this->load->model('user_model'); $query = $this->user_model->get_by_id($this->session->userdata('user_id')); - - $this->load->view('layout/header'); $data = $query->row(); - $this->load->view('user/profile', $data); + + $this->load->view('layout/header', $data); + $this->load->view('user/profile'); $this->load->view('layout/footer'); } @@ -248,8 +258,9 @@ class User extends CI_Controller { if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); - $this->load->view('user/delete', $data); + + $this->load->view('layout/header', $data); + $this->load->view('user/delete'); $this->load->view('layout/footer'); } else @@ -276,10 +287,14 @@ class User extends CI_Controller { $data = $query->row(); + if ($this->form_validation->run() == FALSE) { - $this->load->view('layout/header'); - $this->load->view('user/login', $data); + + $data['page_title'] = "Login"; + + $this->load->view('layout/header', $data); + $this->load->view('user/login'); $this->load->view('layout/footer'); } else diff --git a/application/views/backup/main.php b/application/views/backup/main.php index 00a03687..c09e3468 100644 --- a/application/views/backup/main.php +++ b/application/views/backup/main.php @@ -3,4 +3,9 @@
Backup options.
+