wavelog/application/controllers/Awards.php

1999 lines
80 KiB
PHP
Raw Normal View History

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Handles Displaying of information for awards.
These are taken from comments fields or ADIF fields
*/
class Awards extends CI_Controller {
2019-10-05 19:35:55 +01:00
function __construct()
{
parent::__construct();
$this->load->model('user_model');
2024-08-16 10:08:44 +02:00
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('error', __("You're not allowed to do that!")); redirect('dashboard'); }
2019-10-05 19:35:55 +01:00
}
public function index()
{
// Render Page
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Awards");
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/index');
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/footer');
}
public function dok ()
{
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
2024-01-31 13:57:05 +00:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
$this->load->model('dok');
$this->load->model('bands');
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
$this->load->model('modes');
if($this->input->method() === 'post') {
$postdata['doks'] = $this->security->xss_clean($this->input->post('doks'));
} else {
$postdata['doks'] = 'both';
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
$data['worked_bands'] = $this->bands->get_worked_bands('dok');
$data['modes'] = $this->modes->active();
if ($this->input->post('band') != NULL) {
if ($this->input->post('band') == 'All') {
$bands = $data['worked_bands'];
} else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
}
} else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands;
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
} else {
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['dok_array'] = $this->dok->get_dok_array($bands, $postdata, $location_list);
$data['dok_summary'] = $this->dok->get_dok_summary($bands, $postdata, $location_list);
} else {
$location_list = null;
$data['dok_array'] = null;
$data['dok_summary'] = null;
}
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("DOK"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/dok/index');
$this->load->view('interface_assets/footer');
}
public function dxcc () {
2016-02-12 16:31:29 +00:00
$this->load->model('dxcc');
$this->load->model('modes');
$this->load->model('bands');
2020-12-11 23:45:06 +01:00
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['worked_bands'] = $this->bands->get_worked_bands('dxcc'); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
2024-05-27 09:23:39 +00:00
} else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
2024-05-27 09:23:39 +00:00
} else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
2024-05-27 09:20:04 +00:00
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
$postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
$postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
$postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
$postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
$postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sats'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbits'));
2024-05-27 09:23:39 +00:00
} else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['includedeleted'] = 0;
$postdata['Africa'] = 1;
$postdata['Asia'] = 1;
$postdata['Europe'] = 1;
$postdata['NorthAmerica'] = 1;
$postdata['SouthAmerica'] = 1;
$postdata['Oceania'] = 1;
$postdata['Antarctica'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
$postdata['sat'] = 'All';
$postdata['orbit'] = 'All';
}
$dxcclist = $this->dxcc->fetchdxcc($postdata);
2024-11-03 13:04:42 +01:00
if ($dxcclist[0]->adif == "0") {
unset($dxcclist[0]);
}
$data['dxcc_array'] = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata);
$data['dxcc_summary'] = $this->dxcc->get_dxcc_summary($bands, $postdata);
2016-02-12 16:31:29 +00:00
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("DXCC"));
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/header', $data);
2016-02-12 16:31:29 +00:00
$this->load->view('awards/dxcc/index');
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/footer');
}
2023-11-29 20:16:53 +01:00
public function waja () {
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/wajamap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wajamap.js")),
'assets/js/leaflet/L.Maidenhead.js',
2023-11-29 20:16:53 +01:00
];
$this->load->model('waja');
2024-05-27 09:26:29 +00:00
$this->load->model('modes');
$this->load->model('bands');
2023-11-29 20:16:53 +01:00
2024-05-27 09:26:29 +00:00
$data['worked_bands'] = $this->bands->get_worked_bands('waja');
$data['modes'] = $this->modes->active();
2023-11-29 20:16:53 +01:00
2024-05-27 09:26:29 +00:00
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
}
else {
$bands = $data['worked_bands'];
}
2023-11-29 20:16:53 +01:00
2024-05-27 09:26:29 +00:00
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
2023-11-29 20:16:53 +01:00
2024-05-27 09:26:29 +00:00
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
$postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
$postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
$postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
$postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
$postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['includedeleted'] = 0;
$postdata['Africa'] = 1;
$postdata['Asia'] = 1;
$postdata['Europe'] = 1;
$postdata['NorthAmerica'] = 1;
$postdata['SouthAmerica'] = 1;
$postdata['Oceania'] = 1;
$postdata['Antarctica'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
2023-11-29 20:16:53 +01:00
2024-05-27 09:26:29 +00:00
$data['waja_array'] = $this->waja->get_waja_array($bands, $postdata);
$data['waja_summary'] = $this->waja->get_waja_summary($bands, $postdata);
2023-11-29 20:16:53 +01:00
// Render Page
2024-06-08 11:01:59 +02:00
$data['page_title'] =__( "Awards - WAJA");
2023-11-29 20:16:53 +01:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/waja/index');
2023-12-03 15:57:25 +01:00
$this->load->view('interface_assets/footer', $footerData);
2023-11-29 20:16:53 +01:00
}
2024-04-29 19:42:20 +02:00
public function jcc () {
2024-02-23 22:38:03 +01:00
$footerData = [];
2024-04-29 14:21:47 +02:00
$footerData['scripts'] = [
'assets/js/sections/jcc.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/jcc.js")),
'assets/js/sections/jccmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/jccmap.js"))
];
2024-02-23 22:38:03 +01:00
2024-02-24 16:30:53 +01:00
$this->load->model('jcc_model');
$this->load->model('modes');
$this->load->model('bands');
2024-02-23 22:38:03 +01:00
$data['worked_bands'] = $this->bands->get_worked_bands('jcc');
$data['modes'] = $this->modes->active();
2024-02-23 22:38:03 +01:00
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
} else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
} else {
$bands = $data['worked_bands'];
}
2024-02-23 22:38:03 +01:00
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
2024-02-23 22:38:03 +01:00
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
$postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
$postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
$postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
$postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
$postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
} else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 0;
$postdata['includedeleted'] = 0;
$postdata['Africa'] = 1;
$postdata['Asia'] = 1;
$postdata['Europe'] = 1;
$postdata['NorthAmerica'] = 1;
$postdata['SouthAmerica'] = 1;
$postdata['Oceania'] = 1;
$postdata['Antarctica'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
2024-02-23 22:38:03 +01:00
$data['jcc_array'] = $this->jcc_model->get_jcc_array($bands, $postdata);
$data['jcc_summary'] = $this->jcc_model->get_jcc_summary($bands, $postdata);
2024-02-23 22:38:03 +01:00
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("JCC"));
2024-02-23 22:38:03 +01:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/jcc/index');
$this->load->view('interface_assets/footer', $footerData);
}
public function jcc_export() {
$this->load->model('Jcc_model');
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
2024-04-25 00:27:49 +02:00
$qsos = $this->Jcc_model->exportJcc($postdata);
2024-04-24 22:42:11 +02:00
$fp = fopen( 'php://output', 'w' );
$i=1;
fputcsv($fp, array('No', 'Callsign', 'Date', 'Band', 'Mode', 'Remarks'), ';');
foreach ($qsos as $qso) {
fputcsv($fp, array($i, $qso['call'], $qso['date'], ($qso['prop_mode'] != null ? $qso['band'].' / '.$qso['prop_mode'] : $qso['band']), $qso['mode'], $qso['cnty'].' - '.$qso['jcc']), ';');
$i++;
}
fclose($fp);
return;
}
2024-04-24 09:34:30 +02:00
public function jcc_cities() {
$this->load->model('Jcc_model');
$data = $this->Jcc_model->jccCities();
header('Content-Type: application/json');
echo json_encode($data, JSON_PRETTY_PRINT);
}
2024-04-29 19:42:20 +02:00
2024-05-27 10:48:12 +00:00
public function vucc() {
$this->load->model('vucc');
$this->load->model('bands');
$data['worked_bands'] = $this->bands->get_worked_bands('vucc');
2020-03-15 14:18:49 +01:00
2024-05-27 10:48:12 +00:00
$data['vucc_array'] = $this->vucc->get_vucc_array($data);
2020-03-15 14:18:49 +01:00
2024-05-27 10:48:12 +00:00
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("VUCC"));
2024-05-27 10:48:12 +00:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/vucc/index');
$this->load->view('interface_assets/footer');
}
2020-03-15 14:18:49 +01:00
2024-05-27 10:48:12 +00:00
public function vucc_band(){
$this->load->model('vucc');
$band = str_replace('"', "", $this->security->xss_clean($this->input->get("Band")));
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
$data['vucc_array'] = $this->vucc->vucc_details($band, $type);
$data['type'] = $type;
2020-03-15 14:18:49 +01:00
2024-05-27 10:48:12 +00:00
// Render Page
$data['page_title'] = "VUCC - " .$band . " Band";
$data['filter'] = "band ".$band;
$data['band'] = $band;
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/vucc/band');
$this->load->view('interface_assets/footer');
}
2020-03-15 14:18:49 +01:00
2024-05-27 10:48:12 +00:00
public function vucc_details_ajax(){
$this->load->model('logbook_model');
2020-09-20 14:09:46 +02:00
2024-05-27 10:48:12 +00:00
$gridsquare = str_replace('"', "", $this->security->xss_clean($this->input->post("Gridsquare")));
$band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band")));
$data['results'] = $this->logbook_model->vucc_qso_details($gridsquare, $band);
2020-09-20 14:09:46 +02:00
2024-05-27 10:48:12 +00:00
// Render Page
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Log View - VUCC");
2024-05-27 10:48:12 +00:00
$data['filter'] = "vucc " . $gridsquare . " and band ".$band;
$this->load->view('awards/details', $data);
}
2020-09-20 14:09:46 +02:00
/*
* Used to fetch QSOs from the logbook in the awards
*/
2024-05-27 10:48:12 +00:00
public function qso_details_ajax() {
$this->load->model('logbook_model');
$searchphrase = str_replace('"', "", $this->security->xss_clean($this->input->post("Searchphrase")));
$band = str_replace('"', "", $this->security->xss_clean($this->input->post("Band")));
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
2024-04-05 16:36:44 +02:00
$sat = str_replace('"', "", $this->security->xss_clean($this->input->post("Sat")));
$orbit = str_replace('"', "", $this->security->xss_clean($this->input->post("Orbit")));
2024-05-27 10:48:12 +00:00
$propagation = str_replace('"', "", $this->security->xss_clean($this->input->post("Propagation")) ?? '');
$type = $this->security->xss_clean($this->input->post('Type'));
$qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL'));
$searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode'));
2024-05-05 23:10:02 +02:00
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $sat, $orbit, $searchmode, $propagation);
// This is done because we have two different ways to get dxcc info in Wavelog. Once is using the name (in awards), and the other one is using the ADIF DXCC.
// We replace the values to make it look a bit nicer
if ($type == 'DXCC2') {
$type = 'DXCC';
$dxccname = $this->logbook_model->get_entity($searchphrase);
$searchphrase = $dxccname['name'];
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
$qsltype = [];
if (strpos($qsl, "Q") !== false) {
$qsltype[] = "QSL";
}
if (strpos($qsl, "L") !== false) {
2023-04-26 05:44:54 +02:00
$qsltype[] = "LoTW";
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
}
if (strpos($qsl, "E") !== false) {
$qsltype[] = "eQSL";
}
if (strpos($qsl, "Z") !== false) {
$qsltype[] = "QRZ.com";
}
2024-05-27 10:48:12 +00:00
if (strpos($qsl, "C") !== false) {
$qsltype[] = "Clublog";
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
// Render Page
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Log View")." - " . $type;
2024-08-17 17:35:51 +02:00
$data['filter'] = $type." ".$searchphrase.__(" and band ").$band;
2024-04-05 16:36:44 +02:00
if ($band == 'SAT') {
if ($sat != 'All' && $sat != null) {
2024-06-08 11:01:59 +02:00
$data['filter'] .= __(" and sat ").$sat;
2024-04-05 16:36:44 +02:00
}
if ($orbit != 'All' && $orbit != null) {
2024-06-08 11:01:59 +02:00
$data['filter'] .= __(" and orbit type ").$orbit;
2024-04-05 16:36:44 +02:00
}
}
2024-05-27 10:48:12 +00:00
if ($propagation != '' && $propagation != null) {
2024-06-08 11:01:59 +02:00
$data['filter'] .= __(" and propagation ").$propagation;
2024-05-27 10:48:12 +00:00
}
if ($mode != null && strtolower($mode) != 'all') {
2024-06-08 11:01:59 +02:00
$data['filter'] .= __(" and mode ").$mode;
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
if (!empty($qsltype)) {
2024-06-08 11:01:59 +02:00
$data['filter'] .= __(" and ").implode('/', $qsltype);
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
}
$this->load->view('awards/details', $data);
}
/*
Handles showing worked SOTAs
Comment field - SOTA:#
*/
public function sota() {
// Grab all worked sota stations
$this->load->model('sota');
$data['sota_all'] = $this->sota->get_all();
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("SOTA"));
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/sota/index');
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/footer');
}
2022-09-10 15:04:05 +02:00
/*
Handles showing worked WWFFs
Comment field - WWFF:#
*/
public function wwff() {
// Grab all worked wwff stations
$this->load->model('wwff');
$data['wwff_all'] = $this->wwff->get_all();
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("WWFF"));
2022-09-10 15:04:05 +02:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wwff/index');
$this->load->view('interface_assets/footer');
}
/*
Handles showing worked POTAs
Comment field - POTA:#
*/
public function pota() {
// Grab all worked pota stations
$this->load->model('pota');
$data['pota_all'] = $this->pota->get_all();
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("POTA"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/pota/index');
$this->load->view('interface_assets/footer');
}
public function cq() {
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/cqmap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/cqmap_geojson.js")),
'assets/js/sections/cqmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/cqmap.js"))
];
2024-06-03 16:04:14 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
2016-04-13 16:16:07 +01:00
$this->load->model('cq');
2021-07-26 09:00:52 +02:00
$this->load->model('modes');
$this->load->model('bands');
2016-04-13 16:16:07 +01:00
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
2021-07-26 09:00:52 +02:00
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->input->post('band');
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
2021-07-26 09:00:52 +02:00
$postdata['mode'] = 'All';
}
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['cq_array'] = $this->cq->get_cq_array($bands, $postdata, $location_list);
$data['cq_summary'] = $this->cq->get_cq_summary($bands, $postdata, $location_list);
} else {
$location_list = null;
$data['cq_array'] = null;
$data['cq_summary'] = null;
}
2016-04-13 16:16:07 +01:00
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("CQ Magazine WAZ"));
2019-02-10 22:47:57 +00:00
$this->load->view('interface_assets/header', $data);
2016-04-13 16:16:07 +01:00
$this->load->view('awards/cq/index');
$this->load->view('interface_assets/footer', $footerData);
2016-04-13 16:16:07 +01:00
}
public function was() {
2023-12-12 21:35:03 +01:00
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/wasmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wasmap.js")),
'assets/js/leaflet/L.Maidenhead.js',
2023-12-12 21:35:03 +01:00
];
$this->load->model('was');
2021-07-27 12:11:41 +02:00
$this->load->model('modes');
$this->load->model('bands');
2021-07-27 12:11:41 +02:00
$data['worked_bands'] = $this->bands->get_worked_bands('was');
2021-07-27 12:11:41 +02:00
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
2021-07-27 12:11:41 +02:00
$postdata['mode'] = 'All';
}
$data['was_array'] = $this->was->get_was_array($bands, $postdata);
2022-01-04 19:13:41 +01:00
$data['was_summary'] = $this->was->get_was_summary($bands, $postdata);
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("Worked All States (WAS)"));;
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/was/index');
2023-12-12 21:35:03 +01:00
$this->load->view('interface_assets/footer', $footerData);
}
2024-01-08 10:17:53 +01:00
public function rac() {
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/racmap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/racmap_geojson.js")),
2024-01-31 08:36:18 +01:00
'assets/js/sections/racmap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/racmap.js")),
'assets/js/leaflet/L.Maidenhead.js',
2024-01-08 10:17:53 +01:00
];
$this->load->model('rac');
$this->load->model('modes');
$this->load->model('bands');
$data['worked_bands'] = $this->bands->get_worked_bands('rac');
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
2024-01-08 10:17:53 +01:00
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
2024-01-08 10:17:53 +01:00
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
$data['rac_array'] = $this->rac->get_rac_array($bands, $postdata);
$data['rac_summary'] = $this->rac->get_rac_summary($bands, $postdata);
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("RAC"));
2024-01-08 10:17:53 +01:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/rac/index');
$this->load->view('interface_assets/footer', $footerData);
}
2024-02-17 00:47:00 +01:00
public function helvetia() {
2024-02-16 23:25:07 +01:00
$footerData = [];
$footerData['scripts'] = [
2024-02-17 00:47:00 +01:00
'assets/js/sections/helvetiamap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/helvetiamap_geojson.js")),
'assets/js/sections/helvetiamap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/helvetiamap.js")),
2024-02-16 23:25:07 +01:00
'assets/js/leaflet/L.Maidenhead.js',
];
2024-02-17 20:49:11 +01:00
$this->load->model('helvetia_model');
2024-02-16 23:25:07 +01:00
$this->load->model('modes');
$this->load->model('bands');
2024-02-17 00:47:00 +01:00
$data['worked_bands'] = $this->bands->get_worked_bands('helvetia');
2024-02-16 23:25:07 +01:00
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
2024-02-17 20:49:11 +01:00
$data['helvetia_array'] = $this->helvetia_model->get_helvetia_array($bands, $postdata);
$data['helvetia_summary'] = $this->helvetia_model->get_helvetia_summary($bands, $postdata);
2024-02-16 23:25:07 +01:00
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] =sprintf(__("Awards - %s"), __("H26"));
2024-02-16 23:25:07 +01:00
$this->load->view('interface_assets/header', $data);
2024-02-17 00:47:00 +01:00
$this->load->view('awards/helvetia/index');
2024-02-16 23:25:07 +01:00
$this->load->view('interface_assets/footer', $footerData);
}
2024-05-27 12:22:21 +00:00
public function iota () {
2024-02-18 16:22:18 +00:00
$this->load->model('iota');
$this->load->model('modes');
$this->load->model('bands');
2024-08-15 08:37:48 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";
2024-02-18 16:22:18 +00:00
$data['worked_bands'] = $this->bands->get_worked_bands('iota'); // Used in the view for band select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
} else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
} else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if($this->input->method() === 'post') {
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
2024-02-18 16:33:29 +00:00
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked')) ?? NULL;
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed')) ?? NULL;
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked')) ?? NULL;
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted')) ?? NULL;
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa')) ?? NULL;
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia')) ?? NULL;
$postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe')) ?? NULL;
$postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica')) ?? NULL;
$postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica')) ?? NULL;
$postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania')) ?? NULL;
$postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica')) ?? NULL;
$postdata['band'] = $this->security->xss_clean($this->input->post('band')) ?? NULL;
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode')) ?? NULL;
2024-02-18 16:22:18 +00:00
} else { // Setting default values at first load of page
2024-05-27 12:22:21 +00:00
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
2024-02-18 16:22:18 +00:00
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['includedeleted'] = 0;
$postdata['Africa'] = 1;
$postdata['Asia'] = 1;
$postdata['Europe'] = 1;
$postdata['NorthAmerica'] = 1;
$postdata['SouthAmerica'] = 1;
$postdata['Oceania'] = 1;
$postdata['Antarctica'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
2024-08-15 08:37:48 +02:00
$iotalist = $this->iota->fetchIota($postdata, $location_list);
$data['iota_array'] = $this->iota->get_iota_array($iotalist, $bands, $postdata, $location_list);
$data['iota_summary'] = $this->iota->get_iota_summary($bands, $postdata, $location_list);
2024-02-18 16:22:18 +00:00
// Render Page
2024-06-23 01:22:51 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("IOTA (Island On The Air)"));
2024-02-18 16:22:18 +00:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/iota/index');
$this->load->view('interface_assets/footer');
2020-03-07 11:39:22 +01:00
}
public function counties() {
$this->load->model('counties');
$data['counties_array'] = $this->counties->get_counties_array();
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("US Counties"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/counties/index');
$this->load->view('interface_assets/footer');
}
public function counties_details() {
$this->load->model('counties');
$state = str_replace('"', "", $this->security->xss_clean($this->input->get("State")));
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("Type")));
$data['counties_array'] = $this->counties->counties_details($state, $type);
$data['type'] = $type;
// Render Page
2024-06-08 11:13:17 +02:00
$data['page_title'] = __("US Counties");
$data['filter'] = $type . " counties in state ".$state;
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/counties/details');
$this->load->view('interface_assets/footer');
}
public function counties_details_ajax(){
$this->load->model('logbook_model');
$state = str_replace('"', "", $this->security->xss_clean($this->input->post("State")));
$county = str_replace('"', "", $this->security->xss_clean($this->input->post("County")));
$data['results'] = $this->logbook_model->county_qso_details($state, $county);
// Render Page
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Log View - Counties");
$data['filter'] = "county " . $state;
$this->load->view('awards/details', $data);
}
2023-12-12 19:15:56 +01:00
public function gridmaster($dxcc) {
$dxcc = $this->security->xss_clean($dxcc);
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Awards - ").strtoupper($dxcc)." Gridmaster";
2023-10-19 14:00:20 +02:00
$this->load->model('bands');
$this->load->model('gridmap_model');
$this->load->model('stations');
$data['homegrid']= explode(',', $this->stations->find_gridsquare());
$data['modes'] = $this->gridmap_model->get_worked_modes();
$data['bands']= $this->bands->get_worked_bands();
$data['sats_available']= $this->bands->get_worked_sats();
$data['layer']= $this->optionslib->get_option('option_map_tile_server');
$data['attribution']= $this->optionslib->get_option('option_map_tile_server_copyright');
2024-06-06 21:32:42 +02:00
$data['gridsquares_gridsquares']= __("Gridsquares");
$data['gridsquares_gridsquares_worked']= __("Gridsquares worked");
$data['gridsquares_gridsquares_lotw']= __("Gridsquares confirmed on LoTW");
$data['gridsquares_gridsquares_paper']= __("Gridsquares confirmed by paper QSL");
2023-10-19 14:00:20 +02:00
2023-12-12 19:15:56 +01:00
$indexData['dxcc'] = $dxcc;
2023-10-19 14:00:20 +02:00
$footerData = [];
$footerData['scripts']= [
'assets/js/leaflet/geocoding.js',
'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js',
2023-12-12 19:15:56 +01:00
'assets/js/sections/gridmaster.js'
2023-10-19 14:00:20 +02:00
];
$this->load->view('interface_assets/header',$data);
2023-12-12 19:15:56 +01:00
$this->load->view('awards/gridmaster/index',$indexData);
2023-10-19 14:00:20 +02:00
$this->load->view('interface_assets/footer',$footerData);
}
2023-10-20 13:27:44 +02:00
public function ffma() {
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("Fred Fish Memorial Award (FFMA)"));
2023-10-20 13:27:44 +02:00
$this->load->model('bands');
$this->load->model('ffma_model');
$this->load->model('stations');
$data['homegrid']= explode(',', $this->stations->find_gridsquare());
$data['layer']= $this->optionslib->get_option('option_map_tile_server');
$data['attribution']= $this->optionslib->get_option('option_map_tile_server_copyright');
2024-06-06 21:32:42 +02:00
$data['gridsquares_gridsquares']= __("Gridsquares");
$data['gridsquares_gridsquares_worked']= __("Gridsquares worked");
$data['gridsquares_gridsquares_lotw']= __("Gridsquares confirmed on LoTW");
$data['gridsquares_gridsquares_paper']= __("Gridsquares confirmed by paper QSL");
2023-12-12 21:58:34 +01:00
$data['grid_count'] = $this->ffma_model->get_grid_count();
$data['grids'] = $this->ffma_model->get_grids();
2023-10-20 13:27:44 +02:00
$footerData = [];
$footerData['scripts']= [
2024-08-15 08:37:48 +02:00
'assets/js/leaflet/geocoding.js',
'assets/js/leaflet/L.MaidenheadColouredGridmasterMap.js',
'assets/js/sections/ffma.js'
2023-10-20 13:27:44 +02:00
];
$this->load->view('interface_assets/header',$data);
$this->load->view('awards/ffma/index');
$this->load->view('interface_assets/footer',$footerData);
2024-08-15 08:37:48 +02:00
}
2023-10-20 13:27:44 +02:00
public function getFfmaGridsjs() {
2024-08-15 08:37:48 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$location_list = "'".implode("','",$logbooks_locations_array)."'";
2023-10-20 13:27:44 +02:00
$this->load->model('ffma_model');
$array_grid_4char = array();
$array_grid_4char_lotw = array();
$array_grid_4char_paper = array();
$grid_4char = "";
$grid_4char_lotw = "";
2024-08-15 08:37:48 +02:00
$query = $this->ffma_model->get_lotw($location_list);
2023-10-20 13:27:44 +02:00
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_4char_lotw, $array_grid_4char_lotw)){
array_push($array_grid_4char_lotw, $grid_4char_lotw);
}
}
}
2024-08-15 08:37:48 +02:00
$query = $this->ffma_model->get_paper($location_list);
2023-10-20 13:27:44 +02:00
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_4char_paper, $array_grid_4char_paper)){
array_push($array_grid_4char_paper, $grid_4char_paper);
}
}
}
2024-08-15 08:37:48 +02:00
$query = $this->ffma_model->get_worked($location_list);
2023-10-20 13:27:44 +02:00
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_four = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_four, $array_grid_4char)){
array_push($array_grid_4char, $grid_four);
}
}
}
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->ffma_model->get_vucc_lotw($location_list);
2023-10-20 13:27:44 +02:00
foreach($vucc_grids as $key) {
$grid_four_lotw = strtoupper(substr($key,0,4));
if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){
array_push($array_grid_4char_lotw, $grid_four_lotw);
}
}
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->ffma_model->get_vucc_paper($location_list);
2023-10-20 13:27:44 +02:00
foreach($vucc_grids as $key) {
$grid_four_paper = strtoupper(substr($key,0,4));
if(!in_array($grid_four_paper, $array_grid_4char_paper)){
array_push($array_grid_4char_paper, $grid_four_paper);
}
}
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->ffma_model->get_vucc_worked($location_list);
2023-10-20 13:27:44 +02:00
foreach($vucc_grids as $key) {
$grid_four = strtoupper(substr($key,0,4));
if(!in_array($grid_four, $array_grid_4char)){
array_push($array_grid_4char, $grid_four);
}
}
$data['grid_4char_lotw'] = ($array_grid_4char_lotw);
$data['grid_4char_paper'] = ($array_grid_4char_paper);
$data['grid_4char'] = ($array_grid_4char);
2023-12-12 21:58:34 +01:00
$data['grid_count'] = $this->ffma_model->get_grid_count();
$data['grids'] = $this->ffma_model->get_grids();
2023-10-20 13:27:44 +02:00
header('Content-Type: application/json');
echo json_encode($data);
}
2023-12-12 19:15:56 +01:00
public function getGridmasterGridsjs($dxcc) {
2024-08-15 08:37:48 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$location_list = "'".implode("','",$logbooks_locations_array)."'";
2023-10-19 14:00:20 +02:00
$this->load->model('gridmaster_model');
2023-12-12 19:15:56 +01:00
$dxcc = $this->security->xss_clean($dxcc);
2023-10-19 14:00:20 +02:00
$array_grid_4char = array();
$array_grid_4char_lotw = array();
$array_grid_4char_paper = array();
2023-10-19 14:00:20 +02:00
$grid_4char = "";
$grid_4char_lotw = "";
2023-10-19 14:00:20 +02:00
2024-08-15 08:37:48 +02:00
$query = $this->gridmaster_model->get_lotw($dxcc, $location_list);
2023-10-19 14:00:20 +02:00
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_4char_lotw = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_4char_lotw, $array_grid_4char_lotw)){
array_push($array_grid_4char_lotw, $grid_4char_lotw);
2023-10-19 14:00:20 +02:00
}
}
}
2023-10-19 14:00:20 +02:00
2024-08-15 08:37:48 +02:00
$query = $this->gridmaster_model->get_paper($dxcc, $location_list);
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_4char_paper = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_4char_paper, $array_grid_4char_paper)){
array_push($array_grid_4char_paper, $grid_4char_paper);
}
2023-10-19 14:00:20 +02:00
}
}
2024-08-15 08:37:48 +02:00
$query = $this->gridmaster_model->get_worked($dxcc, $location_list);
2023-10-19 14:00:20 +02:00
if ($query && $query->num_rows() > 0) {
foreach ($query->result() as $row) {
$grid_four = strtoupper(substr($row->GRID_SQUARES,0,4));
if(!in_array($grid_four, $array_grid_4char)){
2023-10-20 13:27:44 +02:00
array_push($array_grid_4char, $grid_four);
2023-10-19 14:00:20 +02:00
}
}
}
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->gridmaster_model->get_vucc_lotw($dxcc, $location_list);
2023-10-19 14:00:20 +02:00
foreach($vucc_grids as $key) {
$grid_four_lotw = strtoupper(substr($key,0,4));
if(!in_array($grid_four_lotw, $array_grid_4char_lotw)){
array_push($array_grid_4char_lotw, $grid_four_lotw);
}
}
2023-10-19 14:00:20 +02:00
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->gridmaster_model->get_vucc_paper($dxcc, $location_list);
foreach($vucc_grids as $key) {
$grid_four_paper = strtoupper(substr($key,0,4));
if(!in_array($grid_four_paper, $array_grid_4char_paper)){
array_push($array_grid_4char_paper, $grid_four_paper);
2023-10-19 14:00:20 +02:00
}
}
2024-08-15 08:37:48 +02:00
$vucc_grids = $this->gridmaster_model->get_vucc_worked($dxcc, $location_list);
2023-10-19 14:00:20 +02:00
foreach($vucc_grids as $key) {
$grid_four = strtoupper(substr($key,0,4));
if(!in_array($grid_four, $array_grid_4char)){
array_push($array_grid_4char, $grid_four);
}
}
$data['grid_4char_lotw'] = ($array_grid_4char_lotw);
$data['grid_4char_paper'] = ($array_grid_4char_paper);
2023-10-19 14:00:20 +02:00
$data['grid_4char'] = ($array_grid_4char);
2023-12-12 19:15:56 +01:00
$data['grid_count'] = $this->gridmaster_model->get_grid_count($dxcc);
$data['grids'] = $this->gridmaster_model->get_grids($dxcc);
$data['lat'] = $this->gridmaster_model->get_lat($dxcc);
$data['lon'] = $this->gridmaster_model->get_lon($dxcc);
$data['zoom'] = $this->gridmaster_model->get_zoom($dxcc);
2023-10-19 14:00:20 +02:00
header('Content-Type: application/json');
echo json_encode($data);
}
/*
Handles showing worked Sigs
Adif fields: my_sig
*/
public function sig() {
// Grab all worked sig stations
$this->load->model('sig');
$data['sig_types'] = $this->sig->get_all_sig_types();
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("SIG"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/sig/index');
$this->load->view('interface_assets/footer');
}
/*
Handles showing worked Sigs
*/
public function sig_details() {
// Grab all worked sig stations
$this->load->model('sig');
$type = str_replace('"', "", $this->security->xss_clean($this->input->get("type")));
$data['sig_all'] = $this->sig->get_all($type);
$data['type'] = $type;
// Render page
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Awards - SIG - ") . $type;
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/sig/qso_list');
$this->load->view('interface_assets/footer');
}
/*
Handles exporting SIGS to ADIF
*/
public function sigexportadif() {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
$this->load->model('adif_data');
$type = $this->security->xss_clean($this->uri->segment(3));
$data['qsos'] = $this->adif_data->sig_all($type);
$this->load->view('adif/data/exportall', $data);
}
2021-04-30 16:25:38 +01:00
/*
function was_map
2021-07-27 12:11:41 +02:00
This displays the WAS map and requires the $band_type and $mode_type
2021-04-30 16:25:38 +01:00
*/
2023-12-12 21:35:03 +01:00
public function was_map() {
$stateString = 'AK,AL,AR,AZ,CA,CO,CT,DE,FL,GA,HI,IA,ID,IL,IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY';
$wasArray = explode(',', $stateString);
$this->load->model('was');
2023-12-12 21:35:03 +01:00
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
2023-12-12 21:35:03 +01:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$was_array = $this->was->get_was_array($bands, $postdata);
2023-12-12 21:35:03 +01:00
$states = array();
2023-12-12 21:35:03 +01:00
foreach ($wasArray as $state) { // Generating array for use in the table
$states[$state] = '-'; // Inits each state's count
}
2023-12-12 21:35:03 +01:00
foreach ($was_array as $was => $value) {
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
$states[$was] = 'W';
break;
}
if (strpos($key, '>C<') !== false) {
$states[$was] = 'C';
break;
}
if (strpos($key, '-') !== false) {
$states[$was] = '-';
break;
}
}
}
}
2024-01-08 10:17:53 +01:00
header('Content-Type: application/json');
echo json_encode($states);
}
/*
function RAC_map
This displays the RAC map and requires the $band_type and $mode_type
*/
public function rac_map() {
$stateString = 'AB,BC,MB,NB,NL,NT,NS,NU,ON,PE,QC,SK,YT';
$racArray = explode(',', $stateString);
$this->load->model('rac');
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
2024-01-08 10:17:53 +01:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$rac_array = $this->rac->get_rac_array($bands, $postdata);
$states = array();
foreach ($racArray as $state) { // Generating array for use in the table
$states[$state] = '-'; // Inits each state's count
}
foreach ($rac_array as $was => $value) {
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
$states[$was] = 'W';
break;
}
if (strpos($key, '>C<') !== false) {
$states[$was] = 'C';
break;
}
if (strpos($key, '-') !== false) {
$states[$was] = '-';
break;
}
}
}
}
2023-12-12 21:35:03 +01:00
header('Content-Type: application/json');
echo json_encode($states);
}
2022-10-12 09:44:13 +02:00
2024-02-16 23:25:07 +01:00
/*
function H26_map
This displays the H26 map and requires the $band_type and $mode_type
*/
2024-02-17 00:47:00 +01:00
public function helvetia_map() {
2024-02-17 00:59:43 +01:00
$stateString = 'AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,TI,UR,VD,VS,ZG,ZH';
2024-02-17 00:47:00 +01:00
$helvetiaArray = explode(',', $stateString);
2024-02-16 23:25:07 +01:00
2024-02-17 20:49:11 +01:00
$this->load->model('helvetia_model');
2024-02-16 23:25:07 +01:00
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
2024-02-17 20:49:11 +01:00
$helvetia_array = $this->helvetia_model->get_helvetia_array($bands, $postdata);
2024-02-16 23:25:07 +01:00
$states = array();
2024-02-17 00:47:00 +01:00
foreach ($helvetiaArray as $state) { // Generating array for use in the table
2024-02-16 23:25:07 +01:00
$states[$state] = '-'; // Inits each state's count
}
2024-02-17 00:47:00 +01:00
foreach ($helvetia_array as $was => $value) {
2024-02-16 23:25:07 +01:00
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
$states[$was] = 'W';
break;
}
if (strpos($key, '>C<') !== false) {
$states[$was] = 'C';
break;
}
if (strpos($key, '-') !== false) {
$states[$was] = '-';
break;
}
}
}
}
header('Content-Type: application/json');
echo json_encode($states);
}
2022-10-12 09:44:13 +02:00
/*
function cq_map
This displays the CQ Zone map and requires the $band_type and $mode_type
*/
public function cq_map() {
2024-06-03 16:04:14 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
2022-10-12 09:44:13 +02:00
$this->load->model('cq');
$bands[] = $this->input->post('band');
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
2024-05-27 09:20:04 +00:00
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
2022-10-12 09:44:13 +02:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
2022-10-12 09:44:13 +02:00
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$cq_array = $this->cq->get_cq_array($bands, $postdata, $location_list);
} else {
$location_list = null;
$cq_array = null;
}
2023-12-03 15:57:25 +01:00
$zones = array();
2022-10-12 09:44:13 +02:00
foreach ($cq_array as $cq => $value) {
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
$zones[] = 'W';
break;
}
if (strpos($key, '>C<') !== false) {
$zones[] = 'C';
break;
}
if (strpos($key, '-') !== false) {
$zones[] = '-';
break;
}
}
}
}
header('Content-Type: application/json');
echo json_encode($zones);
}
2023-12-03 15:57:25 +01:00
/*
function waja_map
*/
public function waja_map() {
2023-12-04 11:00:01 +01:00
$prefectureString = '01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47';
$wajaArray = explode(',', $prefectureString);
2023-12-03 15:57:25 +01:00
$this->load->model('waja');
$this->load->model('bands');
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
2023-12-03 15:57:25 +01:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
2023-12-03 15:57:25 +01:00
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$waja_array = $this->waja->get_waja_array($bands, $postdata);
$prefectures = array();
2023-12-04 11:00:01 +01:00
foreach ($wajaArray as $state) { // Generating array for use in the table
$prefectures[$state] = '-'; // Inits each state's count
}
2023-12-03 15:57:25 +01:00
foreach ($waja_array as $waja => $value) {
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
2023-12-04 11:00:01 +01:00
$prefectures[$waja] = 'W';
2023-12-03 15:57:25 +01:00
break;
}
if (strpos($key, '>C<') !== false) {
2023-12-04 11:00:01 +01:00
$prefectures[$waja] = 'C';
2023-12-03 15:57:25 +01:00
break;
}
if (strpos($key, '-') !== false) {
2023-12-04 11:00:01 +01:00
$prefectures[$waja] = '-';
2023-12-03 15:57:25 +01:00
break;
}
}
}
}
header('Content-Type: application/json');
echo json_encode($prefectures);
}
2022-11-11 19:23:41 +01:00
/*
function dxcc_map
This displays the DXCC map
*/
public function dxcc_map() {
$this->load->model('dxcc');
$this->load->model('bands');
$bands[] = $this->security->xss_clean($this->input->post('band'));
2022-11-11 19:23:41 +01:00
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
2022-11-11 19:23:41 +01:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
2022-11-11 19:23:41 +01:00
$postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1;
$postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1;
$postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1;
$postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL: 1;
$postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL: 1;
$postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL: 1;
$postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1;
$postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1;
$postdata['sat'] = $this->security->xss_clean($this->input->post('sat'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit'));
2022-11-11 19:23:41 +01:00
$dxcclist = $this->dxcc->fetchdxcc($postdata);
2024-11-03 13:04:42 +01:00
if ($dxcclist[0]->adif == "0") {
unset($dxcclist[0]);
}
2022-11-11 19:23:41 +01:00
$dxcc_array = $this->dxcc->get_dxcc_array($dxcclist, $bands, $postdata);
$i = 0;
foreach ($dxcclist as $dxcc) {
$newdxcc[$i]['adif'] = $dxcc->adif;
$newdxcc[$i]['prefix'] = $dxcc->prefix;
$newdxcc[$i]['name'] = ucwords(strtolower($dxcc->name), "- (/");
if ($dxcc->Enddate!=null) {
$newdxcc[$i]['name'] .= ' (deleted)';
}
2022-11-11 19:23:41 +01:00
$newdxcc[$i]['lat'] = $dxcc->lat;
$newdxcc[$i]['long'] = $dxcc->long;
$newdxcc[$i++]['status'] = isset($dxcc_array[$dxcc->adif]) ? $this->returnStatus($dxcc_array[$dxcc->adif]) : 'x';
2022-11-11 19:23:41 +01:00
}
header('Content-Type: application/json');
echo json_encode($newdxcc);
}
2022-12-11 17:47:36 +01:00
2024-04-29 14:21:47 +02:00
/*
function jcc_map
This displays the DXCC map
*/
public function jcc_map() {
$this->load->model('jcc_model');
$this->load->model('bands');
2024-04-29 14:21:47 +02:00
$bands[] = $this->security->xss_clean($this->input->post('band'));
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$jcc_wkd = $this->jcc_model->fetch_jcc_wkd($postdata);
$jcc_cnfm = $this->jcc_model->fetch_jcc_cnfm($postdata);
$jccs = [];
foreach ($jcc_wkd as $jcc) {
$jccs[$jcc->COL_CNTY] = array(1, 0);
}
foreach ($jcc_cnfm as $jcc) {
$jccs[$jcc->COL_CNTY][1] = 1;
}
2024-04-29 14:21:47 +02:00
header('Content-Type: application/json');
echo json_encode($jccs);
2024-04-29 14:21:47 +02:00
}
2022-12-11 17:47:36 +01:00
/*
function iota
This displays the IOTA map
*/
public function iota_map() {
$this->load->model('iota');
$this->load->model('bands');
2024-08-15 08:37:48 +02:00
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";
2022-12-11 17:47:36 +01:00
$bands[] = $this->security->xss_clean($this->input->post('band'));
2022-12-11 17:47:36 +01:00
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->input->post('band');
$postdata['mode'] = $this->input->post('mode');
2022-12-11 17:47:36 +01:00
$postdata['includedeleted'] = $this->input->post('includedeleted') == 0 ? NULL: 1;
$postdata['Africa'] = $this->input->post('Africa') == 0 ? NULL: 1;
$postdata['Asia'] = $this->input->post('Asia') == 0 ? NULL: 1;
$postdata['Europe'] = $this->input->post('Europe') == 0 ? NULL: 1;
$postdata['NorthAmerica'] = $this->input->post('NorthAmerica') == 0 ? NULL: 1;
$postdata['SouthAmerica'] = $this->input->post('SouthAmerica') == 0 ? NULL: 1;
$postdata['Oceania'] = $this->input->post('Oceania') == 0 ? NULL: 1;
$postdata['Antarctica'] = $this->input->post('Antarctica') == 0 ? NULL: 1;
2024-08-15 08:37:48 +02:00
$iotalist = $this->iota->fetchIota($postdata, $location_list);
2022-12-11 17:47:36 +01:00
2024-08-15 08:37:48 +02:00
$iota_array = $this->iota->get_iota_array($iotalist, $bands, $postdata, $location_list);
2022-12-11 17:47:36 +01:00
$i = 0;
foreach ($iotalist as $iota) {
$newiota[$i]['tag'] = $iota->tag;
$newiota[$i]['prefix'] = $iota->prefix;
$newiota[$i]['name'] = ucwords(strtolower($iota->name), "- (/");
if ($iota->status == 'D') {
$newiota[$i]['name'] .= ' (deleted)';
}
$newiota[$i]['lat1'] = $iota->lat1;
$newiota[$i]['lon1'] = $iota->lon1;
$newiota[$i]['lat2'] = $iota->lat2;
$newiota[$i]['lon2'] = $iota->lon2;
$newiota[$i++]['status'] = isset($iota_array[$iota->tag]) ? $this->returnStatus($iota_array[$iota->tag]) : 'x';
}
header('Content-Type: application/json');
echo json_encode($newiota);
}
function returnStatus($string) {
foreach ($string as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
return 'W';
}
if (strpos($key, '>C<') !== false) {
return 'C';
}
if ($key == '-') {
return '-';
}
}
}
}
2024-04-20 10:05:33 +02:00
public function wab() {
$this->load->model('bands');
$this->load->model('gridmap_model');
$this->load->model('stations');
2024-04-20 10:05:33 +02:00
$data['modes'] = $this->gridmap_model->get_worked_modes();
$data['bands'] = $this->bands->get_worked_bands();
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
2024-04-20 10:05:33 +02:00
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['user_default_confirmation'] = $this->session->userdata('user_default_confirmation');
2024-04-20 10:05:33 +02:00
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/wab.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/wab.js"))
];
2024-04-20 10:05:33 +02:00
// Render page
2024-06-08 11:19:51 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), "Worked All Britain");
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wab/index');
$this->load->view('interface_assets/footer', $footerData);
}
2024-04-21 09:02:18 +02:00
public function wab_map() {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sat'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('wab');
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$wab_array = $this->wab->get_wab_array($location_list, $postdata);
} else {
$location_list = null;
$wab_array = null;
}
2024-04-21 09:02:18 +02:00
header('Content-Type: application/json');
echo json_encode($wab_array);
}
2024-04-21 09:02:18 +02:00
public function wab_list() {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sat'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbit'));
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('wab');
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$wab_array = $this->wab->get_wab_list($location_list, $postdata);
} else {
$location_list = null;
$wab_array = null;
}
2024-04-21 09:02:18 +02:00
$data['wab_array'] = $wab_array;
$data['postdata']['band'] = $postdata['band'];
$data['postdata']['mode'] = $postdata['mode'];
$data['postdata']['sat'] = $postdata['sat'];
$data['postdata']['orbit'] = $postdata['orbit'];
2024-04-21 09:02:18 +02:00
$this->load->view('awards/wab/list', $data);
}
2024-04-21 09:02:18 +02:00
2024-04-27 17:37:43 +02:00
public function itu() {
$footerData = [];
$footerData['scripts'] = [
'assets/js/sections/itumap_geojson.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/itumap_geojson.js")),
'assets/js/sections/itumap.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/itumap.js"))
];
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('itu');
$this->load->model('modes');
$this->load->model('bands');
$data['worked_bands'] = $this->bands->get_worked_bands('cq');
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->input->post('band');
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['clublog'] = $this->security->xss_clean($this->input->post('clublog'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
}
2024-04-27 17:37:43 +02:00
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['clublog'] = 0;
2024-04-27 17:37:43 +02:00
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
}
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['itu_array'] = $this->itu->get_itu_array($bands, $postdata, $location_list);
$data['itu_summary'] = $this->itu->get_itu_summary($bands, $postdata, $location_list);
} else {
$location_list = null;
$data['itu_array'] = null;
$data['itu_summary'] = null;
}
// Render page
2024-06-08 11:13:17 +02:00
$data['page_title'] = sprintf(__("Awards - %s"), __("ITU Zones"));
2024-04-27 17:37:43 +02:00
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/itu/index');
$this->load->view('interface_assets/footer', $footerData);
}
/*
function itu_map
This displays the ITU Zone map and requires the $band_type and $mode_type
*/
public function itu_map() {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('itu');
$bands[] = $this->input->post('band');
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
2024-04-27 17:37:43 +02:00
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$itu_array = $this->itu->get_itu_array($bands, $postdata, $location_list);
} else {
$location_list = null;
$itu_array = null;
}
$zones = array();
foreach ($itu_array as $itu => $value) {
foreach ($value as $key) {
if($key != "") {
if (strpos($key, '>W<') !== false) {
$zones[] = 'W';
break;
}
if (strpos($key, '>C<') !== false) {
$zones[] = 'C';
break;
}
if (strpos($key, '-') !== false) {
$zones[] = '-';
break;
}
}
}
}
header('Content-Type: application/json');
echo json_encode($zones);
}
2024-09-06 11:24:03 +02:00
public function wac() {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->load->model('wac');
$this->load->model('modes');
$this->load->model('bands');
$data['worked_bands'] = $this->bands->get_worked_bands();
$data['modes'] = $this->modes->active(); // Used in the view for mode select
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
}
else {
$bands[] = $this->input->post('band');
}
}
else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->security->xss_clean($this->input->post('qsl'));
$postdata['lotw'] = $this->security->xss_clean($this->input->post('lotw'));
$postdata['eqsl'] = $this->security->xss_clean($this->input->post('eqsl'));
$postdata['qrz'] = $this->security->xss_clean($this->input->post('qrz'));
$postdata['worked'] = $this->security->xss_clean($this->input->post('worked'));
$postdata['confirmed'] = $this->security->xss_clean($this->input->post('confirmed'));
$postdata['notworked'] = $this->security->xss_clean($this->input->post('notworked'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sats'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbits'));
}
else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
$postdata['sat'] = 'All';
$postdata['orbit'] = 'All';
}
if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$data['wac_array'] = $this->wac->get_wac_array($bands, $postdata, $location_list);
$data['wac_summary'] = $this->wac->get_wac_summary($bands, $postdata, $location_list);
} else {
$location_list = null;
$data['wac_array'] = null;
$data['wac_summary'] = null;
}
// Render page
$data['page_title'] = sprintf(__("Awards - %s"), __("Worked All Continents (WAC)"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wac/index');
$this->load->view('interface_assets/footer');
}
2024-12-19 14:24:15 +01:00
public function wae () {
$this->load->model('wae');
$this->load->model('modes');
$this->load->model('bands');
$data['orbits'] = $this->bands->get_worked_orbits();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_default_band'] = $this->session->userdata('user_default_band');
$data['worked_bands'] = $this->bands->get_worked_bands('dxcc'); // Used in the view for band select
$data['modes'] = $this->modes->active(); // Used in the view for mode select
if ($this->input->post('band') != NULL) { // Band is not set when page first loads.
if ($this->input->post('band') == 'All') { // Did the user specify a band? If not, use all bands
$bands = $data['worked_bands'];
} else {
$bands[] = $this->security->xss_clean($this->input->post('band'));
}
} else {
$bands = $data['worked_bands'];
}
$data['bands'] = $bands; // Used for displaying selected band(s) in the table in the view
if($this->input->method() === 'post') {
$postdata['qsl'] = $this->input->post('qsl') == 0 ? NULL: 1;
$postdata['lotw'] = $this->input->post('lotw') == 0 ? NULL: 1;
$postdata['eqsl'] = $this->input->post('eqsl') == 0 ? NULL: 1;
$postdata['qrz'] = $this->input->post('qrz') == 0 ? NULL: 1;
$postdata['clublog'] = $this->input->post('clublog') == 0 ? NULL: 1;
$postdata['worked'] = $this->input->post('worked') == 0 ? NULL: 1;
$postdata['confirmed'] = $this->input->post('confirmed') == 0 ? NULL: 1;
$postdata['notworked'] = $this->input->post('notworked') == 0 ? NULL: 1;
$postdata['includedeleted'] = $this->security->xss_clean($this->input->post('includedeleted'));
$postdata['Africa'] = $this->security->xss_clean($this->input->post('Africa'));
$postdata['Asia'] = $this->security->xss_clean($this->input->post('Asia'));
$postdata['Europe'] = $this->security->xss_clean($this->input->post('Europe'));
$postdata['NorthAmerica'] = $this->security->xss_clean($this->input->post('NorthAmerica'));
$postdata['SouthAmerica'] = $this->security->xss_clean($this->input->post('SouthAmerica'));
$postdata['Oceania'] = $this->security->xss_clean($this->input->post('Oceania'));
$postdata['Antarctica'] = $this->security->xss_clean($this->input->post('Antarctica'));
$postdata['band'] = $this->security->xss_clean($this->input->post('band'));
$postdata['mode'] = $this->security->xss_clean($this->input->post('mode'));
$postdata['sat'] = $this->security->xss_clean($this->input->post('sats'));
$postdata['orbit'] = $this->security->xss_clean($this->input->post('orbits'));
} else { // Setting default values at first load of page
$postdata['qsl'] = 1;
$postdata['lotw'] = 1;
$postdata['eqsl'] = 0;
$postdata['qrz'] = 0;
$postdata['worked'] = 1;
$postdata['confirmed'] = 1;
$postdata['notworked'] = 1;
$postdata['includedeleted'] = 0;
$postdata['Africa'] = 1;
$postdata['Asia'] = 1;
$postdata['Europe'] = 1;
$postdata['NorthAmerica'] = 1;
$postdata['SouthAmerica'] = 1;
$postdata['Oceania'] = 1;
$postdata['Antarctica'] = 1;
$postdata['band'] = 'All';
$postdata['mode'] = 'All';
$postdata['sat'] = 'All';
$postdata['orbit'] = 'All';
}
2024-12-21 12:46:00 +01:00
$data['wae_array'] = $this->wae->get_wae_array($bands, $postdata);
2024-12-19 14:24:15 +01:00
$data['wae_summary'] = $this->wae->get_wae_summary($bands, $postdata);
// Render Page
$data['page_title'] = sprintf(__("Awards - %s"), __("WAE"));
$this->load->view('interface_assets/header', $data);
$this->load->view('awards/wae/index');
$this->load->view('interface_assets/footer');
}
Rework DOK stats and add some eye candy Squashed commit of the following: commit 91b55288edee8cdae93570212e0e94c3cc2e66ff Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:59:52 2023 +0100 Add link to DD3AH map commit 11149f8202bb118d635b952512de4f4456c1789a Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:29:37 2023 +0100 Add datatable commit fc768b32bc256c12668bb1c095184e56edbb2d25 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 16 14:06:38 2023 +0100 Remove old code commit b8dfe8566fdc8b20a105b7120faeff4a054b4166 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 23:13:09 2023 +0100 Filter summary for DOK/SDOK and remove empty lines commit 5d081a2f7dacd0da8761b7e06a253a6e4050b6c4 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:55:46 2023 +0100 Remove not worked for now commit 00e9354a5f0be9d40ca3b16e29dbf1728b7d2875 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 22:53:17 2023 +0100 Include SAT QSOs in totals commit c1dd7e131ee750b647d4ba802c5aa7af742bdea3 Author: phl0 <github@florian-wolters.de> Date: Sun Jan 15 17:16:30 2023 +0100 Use worked DOKs from DB instead of list from file commit 5e60dc51b5b6ea12bf0109847967c80b0f31e79a Author: phl0 <github@florian-wolters.de> Date: Fri Jan 13 14:59:27 2023 +0100 Use QSL only for confirmed QSOs commit 26c03d9a62492bcbfdfdfb5ec1b6d72e61134bce Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 16:40:37 2023 +0100 Add filter to QSO details popup commit 20b704aa853c806b0739ac9bd3d4a6082987fb9c Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:25:35 2023 +0100 Forgot to delete replaced part of code commit 574a1ebd17625f508ac40cb87b927efdc9d9f998 Author: phl0 <github@florian-wolters.de> Date: Mon Jan 9 15:20:21 2023 +0100 Hide NM as just a marker for no DOK at all commit 2b5c2ad8e149c370e036fdfc2f978f411bc11ea7 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:49:03 2023 +0100 Remove debug statement commit 39406b96a3ec8f98ec8548156b83016d68cb6897 Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 22:48:06 2023 +0100 Add option for eQSL commit 2de47e79f232a8505e951366c557b136c6b6d28d Author: phl0 <github@florian-wolters.de> Date: Thu Jan 5 15:27:10 2023 +0100 Rework DOK stats
2023-01-16 17:08:27 +01:00
}