Cloudlog/application/models/Dok.php

252 wiersze
8.7 KiB
PHP

<?php
class DOK extends CI_Model {
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 16:08:27 +00:00
function get_dok_array($bands, $postdata, $location_list) {
$doks = array();
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 16:08:27 +00:00
$list = $this->getDoksFromDB($location_list);
foreach ($this->getSdoksFromDB($location_list) as $sdok) {
$list[] = $sdok;
}
foreach ($list as $dok) {
$doks[$dok->COL_DARC_DOK]['count'] = 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 16:08:27 +00:00
$qsl = "";
if ($postdata['confirmed'] != NULL) {
if ($postdata['qsl'] != NULL ) {
$qsl .= "Q";
}
if ($postdata['lotw'] != NULL ) {
$qsl .= "L";
}
if ($postdata['eqsl'] != NULL ) {
$qsl .= "E";
}
}
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 16:08:27 +00:00
foreach ($bands as $band) {
foreach ($list as $dok) {
$bandDok[$dok->COL_DARC_DOK][$band] = '-';
}
if ($postdata['worked'] != NULL) {
$dokBand = $this->getDokWorked($location_list, $band, $postdata);
foreach ($dokBand as $line) {
if (array_key_exists($line->COL_DARC_DOK, $bandDok)) { /* For now ignore DOKs which are logged but not existing in the official lists any more */
$bandDok[$line->COL_DARC_DOK][$band] = '<div class="bg-danger awardsBgDanger"><a href=\'javascript:displayContacts("' . $line->COL_DARC_DOK . '","' . $band . '","' . $postdata['mode'] . '","DOK", "")\'>W</a></div>';
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 16:08:27 +00:00
$doks[$line->COL_DARC_DOK]['count']++;
}
}
}
if ($postdata['confirmed'] != NULL) {
$dokBand = $this->getDokConfirmed($location_list, $band, $postdata);
foreach ($dokBand as $line) {
if (array_key_exists($line->COL_DARC_DOK, $bandDok)) { /* For now ignore DOKs which are logged but not existing in the official lists any more */
$bandDok[$line->COL_DARC_DOK][$band] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("' . $line->COL_DARC_DOK . '","' . $band . '","' . $postdata['mode'] . '","DOK", "'.$qsl.'")\'>C</a></div>';
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 16:08:27 +00:00
$doks[$line->COL_DARC_DOK]['count']++;
}
}
}
// We want to remove the worked DOKs in the list, since we do not want to display them
if ($postdata['worked'] == NULL) {
$dokBand = $this->getDokWorked($location_list, $postdata['band'], $postdata);
foreach ($dokBand as $line) {
unset($bandDok[$line->COL_DARC_DOK]);
}
}
// We want to remove the worked DOKs in the list, since we do not want to display them
if ($postdata['confirmed'] == NULL) {
$dokBand = $this->getDokConfirmed($location_list, $postdata['band'], $postdata);
foreach ($dokBand as $line) {
unset($bandDok[$line->COL_DARC_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 16:08:27 +00:00
foreach ($list as $dok) {
if($doks[$dok->COL_DARC_DOK]['count'] == 0) {
unset($bandDok[$dok->COL_DARC_DOK]);
}
}
// We want to hide NM as marking not having a DOK at all
2023-01-17 20:55:46 +00:00
if (isset($bandDok['NM'])) {
unset($bandDok['NM']);
}
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 16:08:27 +00:00
if (isset($bandDok)) {
return $bandDok;
} else {
return 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 16:08:27 +00:00
}
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 16:08:27 +00:00
function getDokWorked($location_list, $band, $postdata) {
$sql = "SELECT DISTINCT COL_DARC_DOK FROM " . $this->config->item('table_name') . " thcv
WHERE station_id IN (" . $location_list . ") AND COL_DARC_DOK <> '' AND COL_DARC_DOK <> 'NM'";
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 16:08:27 +00:00
if ($postdata['mode'] != 'All') {
$sql .= " AND (COL_MODE = '" . $postdata['mode'] . "' OR COL_SUBMODE = '" . $postdata['mode'] . "')";
}
$sql .= $this->addDokTypeToQuery($postdata['doks']);
$sql .= $this->addBandToQuery($band);
$sql .= " AND NOT EXISTS (SELECT 1 from " . $this->config->item('table_name') .
" WHERE station_id in (" . $location_list .
") AND COL_DARC_DOK = thcv.COL_DARC_DOK AND COL_DARC_DOK <> '' AND COL_DARC_DOK <> 'NM' ";
$sql .= $this->addDokTypeToQuery($postdata['doks']);
$sql .= $this->addBandToQuery($band);
$sql .= $this->addQslToQuery($postdata);
$sql .= ")";
$query = $this->db->query($sql);
return $query->result();
}
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 16:08:27 +00:00
function getDokConfirmed($location_list, $band, $postdata) {
$sql = "SELECT DISTINCT COL_DARC_DOK FROM " . $this->config->item('table_name') . " thcv
WHERE station_id IN (" . $location_list . ") AND COL_DARC_DOK <> '' AND COL_DARC_DOK <> '' AND COL_DARC_DOK <> 'NM'";
if ($postdata['mode'] != 'All') {
$sql .= " AND (COL_MODE = '" . $postdata['mode'] . "' or COL_SUBMODE = '" . $postdata['mode'] . "')";
}
$sql .= $this->addDokTypeToQuery($postdata['doks']);
$sql .= $this->addBandToQuery($band);
$sql .= $this->addQslToQuery($postdata);
$query = $this->db->query($sql);
return $query->result();
}
function addQslToQuery($postdata) {
$sql = '';
$qsl = array();
if ($postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) {
2023-01-18 12:34:27 +00:00
$sql .= ' and (';
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 16:08:27 +00:00
if ($postdata['qsl'] != NULL) {
array_push($qsl, "col_qsl_rcvd = 'Y'");
}
if ($postdata['lotw'] != NULL) {
array_push($qsl, "col_lotw_qsl_rcvd = 'Y'");
}
if ($postdata['eqsl'] != NULL) {
array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'");
}
$sql .= implode(' or ', $qsl);
$sql .= ')';
}
return $sql;
}
function addBandToQuery($band) {
$sql = '';
if ($band != 'All') {
if ($band == 'SAT') {
$sql .= " AND COL_PROP_MODE ='" . $band . "'";
} else {
$sql .= " AND COL_PROP_MODE !='SAT'";
$sql .= " AND col_BAND ='" . $band . "'";
}
}
return $sql;
}
function addDokTypeToQuery($doks) {
$sql = '';
if ($doks == 'dok') {
$sql .= " AND COL_DARC_DOK REGEXP '^[A-Z][0-9]{2}$'";
} else if ($doks == 'sdok') {
$sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'";
}
return $sql;
}
function get_dok_summary($bands, $postdata, $location_list) {
foreach ($bands as $band) {
$worked = $this->getSummaryByBand($band, $postdata, $location_list);
$confirmed = $this->getSummaryByBandConfirmed($band, $postdata, $location_list);
$dokSummary['worked'][$band] = $worked[0]->count;
$dokSummary['confirmed'][$band] = $confirmed[0]->count;
}
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 16:08:27 +00:00
$workedTotal = $this->getSummaryByBand($postdata['band'], $postdata, $location_list);
$confirmedTotal = $this->getSummaryByBandConfirmed($postdata['band'], $postdata, $location_list);
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 16:08:27 +00:00
$dokSummary['worked']['Total'] = $workedTotal[0]->count;
$dokSummary['confirmed']['Total'] = $confirmedTotal[0]->count;
return $dokSummary;
}
function getSummaryByBand($band, $postdata, $location_list) {
$sql = "SELECT count(distinct thcv.COL_DARC_DOK) AS count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " WHERE station_id IN (" . $location_list . ') AND COL_DARC_DOK != "" AND COL_DARC_DOK <> "NM"';
if ($band == 'SAT') {
$sql .= " AND thcv.COL_PROP_MODE ='" . $band . "'";
} else if ($band == 'All') {
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('dok');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " AND thcv.COL_BAND in (" . $bandslots_list . ")";
} else {
$sql .= " AND thcv.COL_PROP_MODE !='SAT'";
$sql .= " AND thcv.COL_BAND ='" . $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 16:08:27 +00:00
if ($postdata['doks'] == 'dok') {
$sql .= " AND COL_DARC_DOK REGEXP '^[A-Z][0-9]{2}$'";
} else if ($postdata['doks'] == 'sdok') {
$sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'";
}
$query = $this->db->query($sql);
return $query->result();
}
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 16:08:27 +00:00
function getSummaryByBandConfirmed($band, $postdata, $location_list){
$sql = "SELECT count(distinct thcv.COL_DARC_DOK) AS count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " WHERE station_id IN (" . $location_list . ') AND COL_DARC_DOK != "" AND COL_DARC_DOK <> "NM"';
if ($band == 'SAT') {
$sql .= " AND thcv.COL_PROP_MODE ='" . $band . "'";
} else if ($band == 'All') {
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('dok');
$bandslots_list = "'".implode("','",$bandslots)."'";
$sql .= " AND thcv.COL_BAND in (" . $bandslots_list . ")";
} else {
$sql .= " AND thcv.COL_PROP_MODE !='SAT'";
$sql .= " AND thcv.COL_BAND ='" . $band . "'";
}
if ($postdata['doks'] == 'dok') {
$sql .= " AND COL_DARC_DOK REGEXP '^[A-Z][0-9]{2}$'";
} else if ($postdata['doks'] == 'sdok') {
$sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'";
}
$sql .= $this->addQslToQuery($postdata);
$query = $this->db->query($sql);
return $query->result();
}
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 16:08:27 +00:00
function getDoksFromDB($location_list) {
$sql = 'SELECT DISTINCT `COL_DARC_DOK` FROM '.$this->config->item('table_name');
$sql .= " WHERE station_id IN (" . $location_list . ') AND COL_DARC_DOK != "" AND COL_DARC_DOK <> "NM"';
$sql .= " AND COL_DARC_DOK REGEXP '^[A-Z][0-9]{2}$'";
$sql .= " ORDER BY COL_DARC_DOK ASC";
$query = $this->db->query($sql);
return $query->result();
}
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 16:08:27 +00:00
function getSdoksFromDB($location_list) {
$sql = 'SELECT DISTINCT `COL_DARC_DOK` FROM '.$this->config->item('table_name');
$sql .= " WHERE station_id IN (" . $location_list . ') AND COL_DARC_DOK != "" AND COL_DARC_DOK <> "NM"';
$sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'";
$sql .= " ORDER BY COL_DARC_DOK ASC";
$query = $this->db->query($sql);
return $query->result();
}
}
?>