cloudlog/application/controllers/Dxcluster.php
Peter Goodhall 5f0c95804a Add user-specific bands to bandmap and persist radio selection
The bandmap now displays only the bands configured for the current user, using a new Bands model method to retrieve and order them. The band selection dropdown in the bandmap view is dynamically generated based on user bands, with a fallback to defaults. Additionally, the selected radio is now persisted in localStorage and synchronized across selects, and the bandmap window width was adjusted for better display.
2025-10-02 17:40:49 +01:00

31 lines
No EOL
772 B
PHP

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dxcluster extends CI_Controller {
function __construct()
{
parent::__construct();
$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'); }
}
function index()
{
$data['page_title'] = "DX Cluster Spots";
$this->load->view('dxcluster/index', $data);
}
function bandmap()
{
$this->load->model('bands');
$data['page_title'] = "DX Cluster Bandmap";
$data['bands'] = $this->bands->get_user_bands_for_bandmap();
$this->load->view('dxcluster/bandmap', $data);
}
}