2011-07-24 23:33:08 +01:00
|
|
|
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
|
|
|
|
|
|
class Statistics extends CI_Controller {
|
|
|
|
|
|
2026-01-08 06:38:12 +00:00
|
|
|
function __construct() {
|
2023-05-17 02:08:11 +03:00
|
|
|
parent::__construct();
|
2026-01-08 06:38:12 +00:00
|
|
|
|
|
|
|
|
if (!$this->user_model->authorize(2)) {
|
|
|
|
|
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
|
|
|
|
|
redirect('dashboard');
|
|
|
|
|
}
|
2023-05-17 02:08:11 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-12-01 09:21:43 +00:00
|
|
|
public function index() {
|
|
|
|
|
$this->load->model('bands');
|
|
|
|
|
|
2019-05-13 17:37:01 +01:00
|
|
|
// Render User Interface
|
2011-11-04 17:32:03 +00:00
|
|
|
|
2019-05-13 17:37:01 +01:00
|
|
|
// Set Page Title
|
2024-06-06 21:32:42 +02:00
|
|
|
$data['page_title'] = __("Statistics");
|
2022-10-05 23:23:32 +02:00
|
|
|
$data['sat_active'] = array_search("SAT", $this->bands->get_user_bands(), true);
|
2024-12-01 09:38:57 +00:00
|
|
|
$data['years'] = $this->get_years();
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2019-05-13 17:37:01 +01:00
|
|
|
// Load Views
|
|
|
|
|
$this->load->view('interface_assets/header', $data);
|
2011-11-04 17:32:03 +00:00
|
|
|
$this->load->view('statistics/index');
|
2019-05-13 17:37:01 +01:00
|
|
|
$this->load->view('interface_assets/footer');
|
2011-07-24 23:33:08 +01:00
|
|
|
}
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2024-12-01 09:38:57 +00:00
|
|
|
function get_years() {
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
$totals_year = $this->logbook_model->totals_year();
|
|
|
|
|
$years=[];
|
|
|
|
|
if ($totals_year) {
|
|
|
|
|
foreach($totals_year->result() as $years_obj) {
|
|
|
|
|
$years[] = $years_obj->year;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $years;
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
public function get_year() {
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
|
|
|
|
// get data
|
|
|
|
|
$totals_year = $this->logbook_model->totals_year();
|
|
|
|
|
|
|
|
|
|
$yearstats = array();
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
$i = 0;
|
|
|
|
|
if ($totals_year) {
|
|
|
|
|
foreach($totals_year->result() as $qso_numbers) {
|
|
|
|
|
$yearstats[$i]['year'] = $qso_numbers->year;
|
|
|
|
|
$yearstats[$i++]['total'] = $qso_numbers->total;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($yearstats);
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-30 11:22:37 +00:00
|
|
|
public function get_year_month() {
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
2025-12-30 11:22:37 +00:00
|
|
|
|
|
|
|
|
// get data
|
2025-12-31 09:03:13 +00:00
|
|
|
$totals_month = $this->logbook_model->totals_year_month($dateFrom, $dateTo);
|
2025-12-30 11:22:37 +00:00
|
|
|
|
|
|
|
|
$monthstats = array();
|
|
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
if ($totals_month) {
|
|
|
|
|
foreach($totals_month->result() as $qso_numbers) {
|
|
|
|
|
$monthstats[$i]['month'] = intval($qso_numbers->month);
|
|
|
|
|
$monthstats[$i++]['total'] = $qso_numbers->total;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($monthstats);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
public function get_mode() {
|
|
|
|
|
$this->load->model('logbook_model');
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
2022-09-18 16:48:16 +02:00
|
|
|
|
|
|
|
|
$modestats = array();
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
$i = 0;
|
2025-12-31 09:03:13 +00:00
|
|
|
$ssb = $this->logbook_model->total_ssb($dateFrom, $dateTo);
|
|
|
|
|
$cw = $this->logbook_model->total_cw($dateFrom, $dateTo);
|
|
|
|
|
$fm = $this->logbook_model->total_fm($dateFrom, $dateTo);
|
|
|
|
|
$am = $this->logbook_model->total_am($dateFrom, $dateTo);
|
|
|
|
|
$digi = $this->logbook_model->total_digi($dateFrom, $dateTo);
|
2025-07-16 19:06:31 +00:00
|
|
|
if ($ssb > 0) {
|
|
|
|
|
$modestats[$i]['mode'] = 'ssb';
|
|
|
|
|
$modestats[$i++]['total'] = $ssb;
|
|
|
|
|
}
|
|
|
|
|
if ($cw > 0) {
|
|
|
|
|
$modestats[$i]['mode'] = 'cw';
|
|
|
|
|
$modestats[$i++]['total'] = $cw;
|
|
|
|
|
}
|
|
|
|
|
if ($fm > 0) {
|
|
|
|
|
$modestats[$i]['mode'] = 'fm';
|
|
|
|
|
$modestats[$i++]['total'] = $fm;
|
|
|
|
|
}
|
|
|
|
|
if ($am > 0) {
|
|
|
|
|
$modestats[$i]['mode'] = 'am';
|
|
|
|
|
$modestats[$i++]['total'] = $am;
|
|
|
|
|
}
|
|
|
|
|
if ($digi > 0) {
|
|
|
|
|
$modestats[$i]['mode'] = 'digi';
|
|
|
|
|
$modestats[$i]['total'] = $digi;
|
|
|
|
|
}
|
2023-02-09 12:12:54 +01:00
|
|
|
usort($modestats, fn($a, $b) => $b['total'] <=> $a['total']);
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
|
|
|
|
|
echo json_encode($modestats);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_band() {
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
|
|
|
|
$bandstats = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$total_bands = $this->logbook_model->total_bands($dateFrom, $dateTo);
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
$i = 0;
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
if ($total_bands) {
|
|
|
|
|
foreach($total_bands->result() as $qso_numbers) {
|
|
|
|
|
$bandstats[$i]['band'] = $qso_numbers->band;
|
|
|
|
|
$bandstats[$i++]['count'] = $qso_numbers->count;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($bandstats);
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-27 10:53:54 +00:00
|
|
|
public function get_operators() {
|
|
|
|
|
|
|
|
|
|
//load logbook model
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
|
|
|
|
//define stats array
|
|
|
|
|
$operatorstats = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
//get date range if present
|
|
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
2025-05-26 12:36:40 +02:00
|
|
|
|
2025-01-27 10:53:54 +00:00
|
|
|
//load stats
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_operators = $this->logbook_model->total_operators($dateFrom, $dateTo);
|
2025-01-27 10:53:54 +00:00
|
|
|
|
|
|
|
|
$i = 0;
|
|
|
|
|
|
|
|
|
|
//convert to final form
|
|
|
|
|
if ($total_operators) {
|
|
|
|
|
foreach($total_operators->result() as $qso_numbers) {
|
|
|
|
|
$operatorstats[$i]['operator'] = $qso_numbers->operator;
|
|
|
|
|
$operatorstats[$i++]['count'] = $qso_numbers->count;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//return as json
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($operatorstats);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
public function get_sat() {
|
|
|
|
|
$this->load->model('logbook_model');
|
|
|
|
|
|
|
|
|
|
$satstats = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$total_sat = $this->logbook_model->total_sat($dateFrom, $dateTo);
|
2022-09-18 16:48:16 +02:00
|
|
|
$i = 0;
|
2024-07-29 19:39:49 +02:00
|
|
|
|
2022-09-18 16:48:16 +02:00
|
|
|
if ($total_sat) {
|
|
|
|
|
foreach($total_sat->result() as $qso_numbers) {
|
|
|
|
|
$satstats[$i]['sat'] = $qso_numbers->COL_SAT_NAME;
|
|
|
|
|
$satstats[$i++]['count'] = $qso_numbers->count;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($satstats);
|
|
|
|
|
}
|
2022-09-25 20:39:55 +02:00
|
|
|
|
2024-01-22 16:26:19 +00:00
|
|
|
public function get_unique_sat_callsigns() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2024-07-29 21:35:01 +02:00
|
|
|
$total_qsos = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$result = $this->stats->unique_sat_callsigns($dateFrom, $dateTo);
|
2024-01-22 16:26:19 +00:00
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['satunique'] = $result['satunique'];
|
|
|
|
|
$total_qsos['modeunique'] = $result['modeunique'];
|
|
|
|
|
$total_qsos['total'] = $result['total'];
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_qsos['sats'] = $this->stats->get_sats($dateFrom, $dateTo);
|
|
|
|
|
$total_qsos['modes'] = $this->stats->get_sat_modes($dateFrom, $dateTo);
|
2024-01-22 16:26:19 +00:00
|
|
|
|
|
|
|
|
$this->load->view('statistics/satuniquetable', $total_qsos);
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-20 07:21:45 +00:00
|
|
|
public function get_unique_sat_grids() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
|
|
|
|
$total_qsos = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$result = $this->stats->unique_sat_grids($dateFrom, $dateTo);
|
2025-07-20 07:21:45 +00:00
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['satunique'] = $result['satunique'];
|
|
|
|
|
$total_qsos['modeunique'] = $result['modeunique'];
|
|
|
|
|
$total_qsos['total'] = $result['total'];
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_qsos['sats'] = $this->stats->get_sats($dateFrom, $dateTo);
|
|
|
|
|
$total_qsos['modes'] = $this->stats->get_sat_modes($dateFrom, $dateTo);
|
2025-07-20 07:21:45 +00:00
|
|
|
|
|
|
|
|
$this->load->view('statistics/satuniquegridtable', $total_qsos);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-25 20:39:55 +02:00
|
|
|
public function get_unique_callsigns() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2024-07-29 21:35:01 +02:00
|
|
|
$total_qsos = array();
|
|
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$result = $this->stats->unique_callsigns($dateFrom, $dateTo);
|
2022-09-25 20:39:55 +02:00
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['bandunique'] = $result['bandunique'];
|
|
|
|
|
$total_qsos['modeunique'] = $result['modeunique'];
|
|
|
|
|
$total_qsos['total'] = $result['total'];
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_qsos['bands'] = $this->stats->get_bands($dateFrom, $dateTo);
|
2022-09-25 20:39:55 +02:00
|
|
|
|
|
|
|
|
$this->load->view('statistics/uniquetable', $total_qsos);
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-23 08:02:28 +00:00
|
|
|
public function get_total_sat_qsos() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2024-07-29 21:35:01 +02:00
|
|
|
$total_qsos = array();
|
2024-01-23 08:02:28 +00:00
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$result = $this->stats->total_sat_qsos($dateFrom, $dateTo);
|
2024-01-23 08:02:28 +00:00
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['sattotal'] = $result['sattotal'];
|
|
|
|
|
$total_qsos['modetotal'] = $result['modetotal'];
|
|
|
|
|
$total_qsos['modes'] = $result['modes'];
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_qsos['sats'] = $this->stats->get_sats($dateFrom, $dateTo);
|
2024-01-23 08:02:28 +00:00
|
|
|
|
|
|
|
|
$this->load->view('statistics/satqsotable', $total_qsos);
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-25 20:39:55 +02:00
|
|
|
public function get_total_qsos() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2024-07-29 21:35:01 +02:00
|
|
|
$total_qsos = array();
|
2022-09-25 20:39:55 +02:00
|
|
|
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
|
|
|
|
$result = $this->stats->total_qsos($dateFrom, $dateTo);
|
2022-09-25 20:39:55 +02:00
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['bandtotal'] = $result['bandtotal'];
|
|
|
|
|
$total_qsos['modetotal'] = $result['modetotal'];
|
2025-12-31 09:03:13 +00:00
|
|
|
$total_qsos['bands'] = $this->stats->get_bands($dateFrom, $dateTo);
|
2022-09-25 20:39:55 +02:00
|
|
|
|
|
|
|
|
$this->load->view('statistics/qsotable', $total_qsos);
|
|
|
|
|
}
|
2024-07-29 19:39:49 +02:00
|
|
|
|
|
|
|
|
public function qslstats() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2024-07-29 21:35:01 +02:00
|
|
|
$total_qsos = array();
|
2024-07-29 19:39:49 +02:00
|
|
|
|
|
|
|
|
$result = $this->stats->total_qsls();
|
|
|
|
|
$total_qsos['qsoarray'] = $result['qsoView'];
|
|
|
|
|
$total_qsos['qsosatarray'] = $result['qsoSatView'];
|
|
|
|
|
$total_qsos['bands'] = $this->stats->get_bands();
|
|
|
|
|
$total_qsos['sats'] = $this->stats->get_sats();
|
|
|
|
|
|
|
|
|
|
// Set Page Title
|
|
|
|
|
$data['page_title'] = __("QSL Statistics");
|
|
|
|
|
|
|
|
|
|
// Load Views
|
2024-09-04 09:22:41 +08:00
|
|
|
$this->load->view('interface_assets/header', $data);
|
2024-07-29 19:39:49 +02:00
|
|
|
$this->load->view('statistics/qsltable', $total_qsos);
|
|
|
|
|
$this->load->view('interface_assets/footer');
|
|
|
|
|
}
|
2024-08-06 11:14:26 +02:00
|
|
|
|
|
|
|
|
public function antennaanalytics() {
|
|
|
|
|
$this->load->model('stats');
|
2024-11-22 09:54:30 +01:00
|
|
|
$this->load->model('logbookadvanced_model');
|
|
|
|
|
$this->load->model('bands');
|
2026-08-06 08:50:34 +00:00
|
|
|
$this->load->model('distances_model');
|
|
|
|
|
|
|
|
|
|
$this->distances_model->backfill_missing_geodata(); // azimuthdata() ignores QSOs without ANT_AZ, so fill the gaps first
|
2024-08-06 11:14:26 +02:00
|
|
|
|
2024-08-10 12:18:51 +02:00
|
|
|
$data = array();
|
|
|
|
|
|
2024-11-23 13:05:59 +01:00
|
|
|
$headerData['page_title'] = __("Antenna Analytics");
|
|
|
|
|
|
2024-08-10 12:18:51 +02:00
|
|
|
$data['satellites'] = $this->stats->get_sats();
|
2024-11-22 09:54:30 +01:00
|
|
|
$data['bands'] = $this->bands->get_worked_bands();
|
|
|
|
|
$data['modes'] = $this->logbookadvanced_model->get_modes();
|
|
|
|
|
$data['sats'] = $this->bands->get_worked_sats();
|
|
|
|
|
$data['orbits'] = $this->bands->get_worked_orbits();
|
2024-08-06 11:14:26 +02:00
|
|
|
|
|
|
|
|
$footerData = [];
|
|
|
|
|
$footerData['scripts'] = [
|
2026-02-13 16:58:57 +01:00
|
|
|
'assets/js/chart.js',
|
|
|
|
|
'assets/js/sections/antennastats.js',
|
|
|
|
|
'assets/js/bootstrap-multiselect.js',
|
2024-08-06 11:14:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// Load Views
|
2024-11-23 13:05:59 +01:00
|
|
|
$this->load->view('interface_assets/header', $headerData);
|
2024-08-10 12:18:51 +02:00
|
|
|
$this->load->view('statistics/antennaanalytics', $data);
|
2024-08-06 11:14:26 +02:00
|
|
|
$this->load->view('interface_assets/footer', $footerData);
|
|
|
|
|
}
|
2024-11-22 09:54:30 +01:00
|
|
|
|
|
|
|
|
public function get_azimuth_data() {
|
|
|
|
|
$band = xss_clean($this->input->post('band'));
|
|
|
|
|
$mode = xss_clean($this->input->post('mode'));
|
|
|
|
|
$sat = xss_clean($this->input->post('sat'));
|
|
|
|
|
$orbit = xss_clean($this->input->post('orbit'));
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
2024-11-22 09:54:30 +01:00
|
|
|
|
|
|
|
|
$this->load->model('stats');
|
2025-12-31 09:03:13 +00:00
|
|
|
$azimutharray = $this->stats->azimuthdata($band, $mode, $sat, $orbit, $dateFrom, $dateTo);
|
2024-11-22 09:54:30 +01:00
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($azimutharray);
|
|
|
|
|
}
|
2024-11-22 16:50:15 +01:00
|
|
|
|
|
|
|
|
public function get_elevation_data() {
|
|
|
|
|
$sat = xss_clean($this->input->post('sat'));
|
|
|
|
|
$orbit = xss_clean($this->input->post('orbit'));
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = xss_clean($this->input->post('dateFrom'));
|
|
|
|
|
$dateTo = xss_clean($this->input->post('dateTo'));
|
2024-11-22 16:50:15 +01:00
|
|
|
|
|
|
|
|
$this->load->model('stats');
|
2025-12-31 09:03:13 +00:00
|
|
|
$elevationarray = $this->stats->elevationdata($sat, $orbit, $dateFrom, $dateTo);
|
2024-11-22 16:50:15 +01:00
|
|
|
|
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
|
echo json_encode($elevationarray);
|
|
|
|
|
}
|
2025-03-10 15:48:30 +01:00
|
|
|
|
|
|
|
|
public function sat_qsos_ajax() {
|
|
|
|
|
$this->load->model('stats');
|
|
|
|
|
|
2025-03-10 15:05:43 +00:00
|
|
|
$sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat")));
|
2025-03-10 15:01:18 +00:00
|
|
|
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
|
2025-12-31 09:03:13 +00:00
|
|
|
$dateFrom = $this->security->xss_clean($this->input->post("dateFrom"));
|
|
|
|
|
$dateTo = $this->security->xss_clean($this->input->post("dateTo"));
|
|
|
|
|
$data['results'] = $this->stats->sat_qsos($sat,$dateFrom,$dateTo,$mode);
|
2025-03-10 15:48:30 +01:00
|
|
|
|
|
|
|
|
$data['page_title'] = __("Log View")." - " . __("Satellite QSOs");
|
|
|
|
|
$data['filter'] = $sat;
|
2025-07-01 17:24:07 +02:00
|
|
|
$data['ispopup'] = true;
|
2026-05-26 09:55:56 +00:00
|
|
|
$data['adif_propmodes'] = $this->config->item('adif_propmodes');
|
2025-03-10 15:48:30 +01:00
|
|
|
|
2025-03-10 15:01:18 +00:00
|
|
|
$this->load->view('statistics/details', $data);
|
2025-03-10 15:48:30 +01:00
|
|
|
}
|
2025-05-26 12:36:40 +02:00
|
|
|
|
|
|
|
|
public function initials() {
|
2025-05-26 22:11:12 +02:00
|
|
|
$this->load->model('stats');
|
2025-05-26 12:36:40 +02:00
|
|
|
$this->load->model('bands');
|
|
|
|
|
|
2025-05-26 22:11:12 +02:00
|
|
|
$data['modes'] = $this->stats->get_eme_modes();
|
2025-05-26 12:36:40 +02:00
|
|
|
|
2025-05-26 20:06:08 +02:00
|
|
|
$data['worked_bands'] = $this->bands->get_worked_bands_eme();
|
2025-05-26 12:36:40 +02:00
|
|
|
|
|
|
|
|
// Set Page Title
|
|
|
|
|
$data['page_title'] = __("EME Initials");
|
|
|
|
|
|
2025-05-26 16:23:17 +02:00
|
|
|
$footerData = [];
|
|
|
|
|
$footerData['scripts'] = [
|
2026-02-13 16:58:57 +01:00
|
|
|
'assets/js/sections/initials.js',
|
2025-05-26 16:23:17 +02:00
|
|
|
];
|
|
|
|
|
|
2025-05-26 12:36:40 +02:00
|
|
|
// Load Views
|
|
|
|
|
$this->load->view('interface_assets/header', $data);
|
|
|
|
|
$this->load->view('statistics/initials');
|
2025-05-26 16:23:17 +02:00
|
|
|
$this->load->view('interface_assets/footer', $footerData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getInitials() {
|
|
|
|
|
$band = xss_clean($this->input->post('band'));
|
|
|
|
|
$mode = xss_clean($this->input->post('mode'));
|
|
|
|
|
|
2025-05-29 14:21:58 +02:00
|
|
|
if ($this->session->userdata('user_measurement_base') == NULL) {
|
|
|
|
|
$measurement_base = $this->config->item('measurement_base');
|
|
|
|
|
} else {
|
|
|
|
|
$measurement_base = $this->session->userdata('user_measurement_base');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch ($measurement_base) {
|
|
|
|
|
case 'M':
|
|
|
|
|
$unit = "mi";
|
|
|
|
|
$factor = 0.621371;
|
|
|
|
|
break;
|
|
|
|
|
case 'K':
|
|
|
|
|
$unit = "km";
|
|
|
|
|
$factor = 1;
|
|
|
|
|
break;
|
|
|
|
|
case 'N':
|
|
|
|
|
$unit = "nmi";
|
|
|
|
|
$factor = 0.539957;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
$unit = "km";
|
|
|
|
|
$factor = 1;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2025-05-26 16:23:17 +02:00
|
|
|
$this->load->model('stats');
|
2025-05-29 14:21:58 +02:00
|
|
|
$data['factor'] = $factor;
|
|
|
|
|
$data['unit'] = $unit;
|
2025-05-26 16:23:17 +02:00
|
|
|
$data['intials_array'] = $this->stats->getInitialsFromDb($band, $mode);
|
|
|
|
|
$this->load->view('statistics/initialresult', $data);
|
2025-05-26 12:36:40 +02:00
|
|
|
}
|
2011-08-19 18:24:56 +01:00
|
|
|
}
|