diff --git a/application/controllers/Band.php b/application/controllers/Band.php new file mode 100644 index 00000000..505575a9 --- /dev/null +++ b/application/controllers/Band.php @@ -0,0 +1,30 @@ +load->helper(array('form', 'url')); + + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function index() + { + $this->load->model('bands'); + + $data['bands'] = $this->bands->all(); + + // Render Page + $data['page_title'] = "Bands"; + $this->load->view('interface_assets/header', $data); + $this->load->view('bands/index'); + $this->load->view('interface_assets/footer'); + } +} \ No newline at end of file diff --git a/application/models/Bands.php b/application/models/Bands.php index a56faaf0..a49ae19c 100644 --- a/application/models/Bands.php +++ b/application/models/Bands.php @@ -28,6 +28,15 @@ class Bands extends CI_Model { "SAT"=>0, ); + function all2() { + $this->db->order_by('band', 'ASC'); + return $this->db->get('bands'); + } + + function all() { + return $this->bandslots; + } + function get_worked_bands() { $CI =& get_instance(); $CI->load->model('logbooks_model'); diff --git a/application/views/bands/index.php b/application/views/bands/index.php new file mode 100644 index 00000000..b2608a57 --- /dev/null +++ b/application/views/bands/index.php @@ -0,0 +1,93 @@ +
+ Using the band list you can control which bands are shown when creating a new QSO. +
++ Active bands will be shown in the QSO "Band" drop-down, while inactive bands will be hidden and cannot be selected. +
+