mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
22e74b55e4
Squashed commit of the following: commit 1091c0321e49b37f29d2997ff28051f137efc53f Author: phl0 <florian@florian-wolters.de> Date: Tue Mar 22 17:31:08 2022 +0100 Also take VUCC_GRIDS into account commit c396e87c78e659c98c86ebf96ce21ba9a34203d0 Author: phl0 <florian@florian-wolters.de> Date: Thu Jan 27 23:19:39 2022 +0100 Add ShowQSO function for detailed view commit 52d3ef9b60de6a82c9239e6be387aa35050db203 Author: phl0 <florian@florian-wolters.de> Date: Thu Jan 27 20:59:58 2022 +0100 Distinguish between LEO and GEO in SAT selection commit 019d1d71bf3f06abbd38c65b0278c52c785bf407 Author: phl0 <florian@florian-wolters.de> Date: Thu Jan 27 19:57:48 2022 +0100 Make sure mincount is numeric commit 3802f9269d7e6bae7891e814909bd364afbfdf73 Author: phl0 <florian@florian-wolters.de> Date: Thu Jan 27 00:37:35 2022 +0100 Implement optional minimin grid count commit d206f2429d2bbaab1336c2266e7036e2ea77718d Author: phl0 <florian@florian-wolters.de> Date: Wed Jan 26 23:21:55 2022 +0100 Add table showing gridsquare activators
76 lines
2.7 KiB
PHP
76 lines
2.7 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Activators 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'); }
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
// Render Page
|
|
$data['page_title'] = "Gridsquare Activators";
|
|
|
|
$this->load->model('Activators_model');
|
|
|
|
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
|
|
$band = $this->input->post('band');
|
|
}
|
|
else {
|
|
$band = 'All';
|
|
}
|
|
|
|
$this->load->model('bands');
|
|
|
|
$data['worked_bands'] = $this->bands->get_worked_bands();
|
|
$data['maxactivatedgrids'] = $this->Activators_model->get_max_activated_grids();
|
|
$data['activators_array'] = $this->Activators_model->get_activators($band, $this->input->post('mincount'), $this->input->post('leogeo'));
|
|
$data['activators_vucc_array'] = $this->Activators_model->get_activators_vucc($band, $this->input->post('leogeo'));
|
|
$data['bandselect'] = $band;
|
|
|
|
$this->load->view('interface_assets/header', $data);
|
|
$this->load->view('activators/index');
|
|
$this->load->view('interface_assets/footer');
|
|
}
|
|
|
|
public function details() {
|
|
$this->load->model('logbook_model');
|
|
|
|
$call = str_replace('"', "", $this->input->post("Callsign"));
|
|
$band = str_replace('"', "", $this->input->post("Band"));
|
|
$leogeo = str_replace('"', "", $this->input->post("LeoGeo"));
|
|
$data['results'] = $this->logbook_model->activator_details($call, $band, $leogeo);
|
|
$data['filter'] = "Call ".$call;
|
|
switch($band) {
|
|
case 'All': $data['page_title'] = "Log View All Bands";
|
|
$data['filter'] .= " and Band All";
|
|
break;
|
|
case 'SAT': $data['page_title'] = "Log View SAT";
|
|
$data['filter'] .= " and Band SAT";
|
|
break;
|
|
default: $data['page_title'] = "Log View Band";
|
|
$data['filter'] .= " and Band ".$band;
|
|
break;
|
|
}
|
|
if ($band == "SAT") {
|
|
switch($leogeo) {
|
|
case 'both': $data['filter'] .= " and GEO/LEO";
|
|
break;
|
|
case 'leo': $data['filter'] .= " and LEO";
|
|
break;
|
|
case 'geo': $data['filter'] .= " and GEO";
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
$this->load->view('activators/details', $data);
|
|
}
|
|
|
|
}
|