Merge pull request #2929 from AndreasK79/searc_remove_cq_itu

[Search] Removed incorrect CQ and ITU zones. Use DBtools instead
This commit is contained in:
Andreas Kristiansen
2026-02-08 19:45:07 +01:00
committed by GitHub
9 changed files with 0 additions and 343 deletions

View File

@@ -44,30 +44,6 @@ class Search extends CI_Controller {
}
}
// Searches for incorrect CQ Zones
public function incorrect_cq_zones() {
$this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user();
$data['page_title'] = __("Incorrectly logged CQ zones");
$this->load->view('interface_assets/header', $data);
$this->load->view('search/cqzones');
$this->load->view('interface_assets/footer');
}
// Searches for incorrect ITU Zones
public function incorrect_itu_zones() {
$this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user();
$data['page_title'] = __("Incorrectly logged ITU zones");
$this->load->view('interface_assets/header', $data);
$this->load->view('search/ituzones');
$this->load->view('interface_assets/footer');
}
// Searches for unconfirmed Lotw QSOs where QSO partner has uploaded to LoTW after the QSO date
public function lotw_unconfirmed() {
$this->load->model('stations');

View File

@@ -998,100 +998,6 @@ function findlotwunconfirmed(){
});
}
function findincorrectcqzones() {
event.preventDefault();
$('#partial_view').load(base_url+"index.php/logbook/search_incorrect_cq_zones/"+$("#station_id").val(), function() {
$('.qsolist').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
{
extend: 'csv',
className: 'mb-1 btn-sm btn btn-primary', // Bootstrap classes
init: function(api, node, config) {
$(node).removeClass('dt-button').addClass('btn btn-primary'); // Ensure Bootstrap class applies
},
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
$('#btn-lba').removeAttr('hidden');
$(document).ready(function() {
var target = document.body;
var observer = new MutationObserver(function() {
$('#dt-search-0').on('keyup', function (e) {
tocrappyzero=$(this).val().toUpperCase().replaceAll(/0/g, 'Ø');
$(this).val(tocrappyzero);
$(this).trigger("input");
});
});
var config = { childList: true, subtree: true};
// pass in the target node, as well as the observer options
observer.observe(target, config);
});
});
}
function findincorrectituzones() {
event.preventDefault();
$('#partial_view').load(base_url+"index.php/logbook/search_incorrect_itu_zones/"+$("#station_id").val(), function() {
$('.qsolist').DataTable({
"pageLength": 25,
responsive: false,
ordering: false,
"scrollY": "500px",
"scrollCollapse": true,
"paging": false,
"scrollX": true,
"language": {
url: getDataTablesLanguageUrl(),
},
dom: 'Bfrtip',
buttons: [
{
extend: 'csv',
className: 'mb-1 btn btn-sm btn-primary', // Bootstrap classes
init: function(api, node, config) {
$(node).removeClass('dt-button').addClass('btn btn-primary'); // Ensure Bootstrap class applies
},
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$(".buttons-csv").css("color", "white");
}
$('#btn-lba').removeAttr('hidden');
$(document).ready(function() {
var target = document.body;
var observer = new MutationObserver(function() {
$('#dt-search-0').on('keyup', function (e) {
tocrappyzero=$(this).val().toUpperCase().replaceAll(/0/g, 'Ø');
$(this).val(tocrappyzero);
$(this).trigger("input");
});
});
var config = { childList: true, subtree: true};
// pass in the target node, as well as the observer options
observer.observe(target, config);
});
});
}
function searchButtonPress() {
if (event) { event.preventDefault(); }
if ($('#callsign').val()) {
@@ -1120,7 +1026,6 @@ $($('#callsign')).on('keypress',function(e) {
}
});
});
</script>
<?php } ?>

View File

@@ -1,50 +0,0 @@
<div class="container search">
<h1>
<?= __("Search"); ?>
<small class="text-muted"><?= __("Ready to find a QSO?"); ?></small>
</h1>
<div class="card text-center">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search'); ?>"><?= __("Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/filter'); ?>"><?= __("Advanced Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="<?php echo site_url('search/incorrect_cq_zones'); ?>"><?= __("Incorrect CQ Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_itu_zones'); ?>"><?= __("Incorrect ITU Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>"><?= __("QSOs unconfirmed on LoTW"); ?></a>
</li>
</ul>
</div>
<div class="card-body">
<form method="post" action="" id="search_box" name="test">
<div class="mb-3 row">
<label for="callsign" class="w-auto col-form-label"><?= __("Station location:"); ?></label>
<select id="station_id" name="station_profile" class="form-select form-select-sm mb-3 w-auto">
<option value="All"><?= __("All"); ?></option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>"><?= __("Callsign"); ?>: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<div class="col-sm-4">
<button onclick="findincorrectcqzones();" class="btn btn-sm btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> <?= __("Search"); ?></button>
<button hidden="true" type="button" class="btn btn-sm btn-outline-primary me-1" id="btn-lba" onclick="open_in_lba();"><?= __("Open in the Advanced Logbook"); ?></button>
</div>
</div>
</form>
<div id="partial_view"></div>
</div>
</div>
</div>

View File

@@ -1,53 +0,0 @@
<?php
if ($qsos->result() != NULL) {
echo __("The following QSOs were found to have an incorrect CQ zone that this DXCC normally has (a maximum of 5000 QSOs are shown):");
echo '<table style="width:100%" class="qsolist table table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th style=\'text-align: center\'>' . __("Date") . '</th>
<th style=\'text-align: center\'>' . __("Time") . '</th>
<th style=\'text-align: center\'>' . __("Callsign") . '</th>
<th style=\'text-align: center\'>' . __("Mode") . '</th>
<th style=\'text-align: center\'>' . __("Band") . '</th>
<th style=\'text-align: center\'>' . __("Gridsquare") . '</th>
<th style=\'text-align: center\'>' . __("CQ Zone") . '</th>
<th style=\'text-align: center\'>' . __("DXCC CQ Zone") . '</th>
<th style=\'text-align: center\'>' . __("DXCC") . '</th>
<th style=\'text-align: center\'>' . __("Station") . '</th>
</tr>
</thead><tbody>';
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
$i = 0;
foreach ($qsos->result() as $qso) {
echo '<tr id="qso_'. $qso->COL_PRIMARY_KEY .'">';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qso->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qso->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'><a id="edit_qso" href="javascript:displayQso(' . $qso->COL_PRIMARY_KEY . ')">' . str_replace("0","&Oslash;",strtoupper($qso->COL_CALL)) . '</a></td>';
echo '<td style=\'text-align: center\'>'; echo $qso->COL_SUBMODE==null?$qso->COL_MODE:$qso->COL_SUBMODE; echo '</td>';
echo '<td style=\'text-align: center\'>'; if($qso->COL_SAT_NAME != null) { echo $qso->COL_SAT_NAME; } else { echo strtolower($qso->COL_BAND); }; echo '</td>';
echo '<td style=\'text-align: center\'>'; echo strlen($qso->COL_GRIDSQUARE ?? '')==0?$qso->COL_VUCC_GRIDS:$qso->COL_GRIDSQUARE; echo '</td>';
echo '<td style=\'text-align: center\'>' . $qso->COL_CQZ . '</td>';
echo '<td style=\'text-align: center\'>' . $qso->correctcqzone . '</td>';
echo '<td style=\'text-align: center\'>' . ucwords(strtolower($qso->COL_COUNTRY), "- (/") . '</td>';
echo '<td style=\'text-align: center\'><span class="badge text-bg-light">' . $qso->station_callsign . '</span></td>';
echo '</tr>';
}
echo '</tbody></table>';
?>
<?php
} else {
echo '<div class="alert alert-success">' . __("No incorrect CQ Zones were found.") . '</div>';
}
?>

View File

@@ -21,12 +21,6 @@
</li>
<li class="nav-item">
<a class="nav-link active" href="<?php echo site_url('search/filter'); ?>"><?= __("Advanced Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>"><?= __("Incorrect CQ Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_itu_zones'); ?>"><?= __("Incorrect ITU Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>"><?= __("QSOs unconfirmed on LoTW"); ?></a>

View File

@@ -1,50 +0,0 @@
<div class="container search">
<h1>
<?= __("Search"); ?>
<small class="text-muted"><?= __("Ready to find a QSO?"); ?></small>
</h1>
<div class="card text-center">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search'); ?>"><?= __("Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/filter'); ?>"><?= __("Advanced Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>"><?= __("Incorrect CQ Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="<?php echo site_url('search/incorrect_itu_zones'); ?>"><?= __("Incorrect ITU Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>"><?= __("QSOs unconfirmed on LoTW"); ?></a>
</li>
</ul>
</div>
<div class="card-body">
<form method="post" action="" id="search_box" name="test">
<div class="mb-3 row">
<label for="callsign" class="w-auto col-form-label"><?= __("Station location:"); ?></label>
<select id="station_id" name="station_profile" class="form-select form-select-sm col-sm-3 mb-3 w-auto">
<option value="All"><?= __("All"); ?></option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>"><?= __("Callsign"); ?>: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<div class="col-sm-4">
<button onclick="findincorrectituzones();" class="btn btn-sm btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> <?= __("Search"); ?></button>
<button hidden="true" type="button" class="btn btn-sm btn-outline-primary me-1" id="btn-lba" onclick="open_in_lba();"><?= __("Open in the Advanced Logbook"); ?></button>
</div>
</div>
</form>
<div id="partial_view"></div>
</div>
</div>
</div>

View File

@@ -1,53 +0,0 @@
<?php
if ($qsos->result() != NULL) {
echo __("The following QSOs were found to have an incorrect ITU zone that this DXCC normally has (a maximum of 5000 QSOs are shown):");
echo '<table style="width:100%" class="qsolist table table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th style=\'text-align: center\'>' . __("Date") . '</th>
<th style=\'text-align: center\'>' . __("Time") . '</th>
<th style=\'text-align: center\'>' . __("Callsign") . '</th>
<th style=\'text-align: center\'>' . __("Mode") . '</th>
<th style=\'text-align: center\'>' . __("Band") . '</th>
<th style=\'text-align: center\'>' . __("Gridsquare") . '</th>
<th style=\'text-align: center\'>' . __("ITU Zone") . '</th>
<th style=\'text-align: center\'>' . __("DXCC ITU Zone") . '</th>
<th style=\'text-align: center\'>' . __("DXCC") . '</th>
<th style=\'text-align: center\'>' . __("Station") . '</th>
</tr>
</thead><tbody>';
// Get Date format
if($this->session->userdata('user_date_format')) {
// If Logged in and session exists
$custom_date_format = $this->session->userdata('user_date_format');
} else {
// Get Default date format from /config/wavelog.php
$custom_date_format = $this->config->item('qso_date_format');
}
$i = 0;
foreach ($qsos->result() as $qso) {
echo '<tr id="qso_'. $qso->COL_PRIMARY_KEY .'">';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qso->COL_TIME_ON); echo date($custom_date_format, $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qso->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
echo '<td style=\'text-align: center\'><a id="edit_qso" href="javascript:displayQso(' . $qso->COL_PRIMARY_KEY . ')">' . str_replace("0","&Oslash;",strtoupper($qso->COL_CALL)) . '</a></td>';
echo '<td style=\'text-align: center\'>'; echo $qso->COL_SUBMODE==null?$qso->COL_MODE:$qso->COL_SUBMODE; echo '</td>';
echo '<td style=\'text-align: center\'>'; if($qso->COL_SAT_NAME != null) { echo $qso->COL_SAT_NAME; } else { echo strtolower($qso->COL_BAND); }; echo '</td>';
echo '<td style=\'text-align: center\'>'; echo strlen($qso->COL_GRIDSQUARE ?? '')==0?$qso->COL_VUCC_GRIDS:$qso->COL_GRIDSQUARE; echo '</td>';
echo '<td style=\'text-align: center\'>' . $qso->COL_ITUZ . '</td>';
echo '<td style=\'text-align: center\'>' . $qso->correctituzone . '</td>';
echo '<td style=\'text-align: center\'>' . ucwords(strtolower($qso->COL_COUNTRY), "- (/") . '</td>';
echo '<td style=\'text-align: center\'><span class="badge text-bg-light">' . $qso->station_callsign . '</span></td>';
echo '</tr>';
}
echo '</tbody></table>';
?>
<?php
} else {
echo '<div class="alert alert-success">' . __("No incorrect CQ Zones were found.") . '</div>';
}
?>

View File

@@ -13,12 +13,6 @@
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/filter'); ?>"><?= __("Advanced Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link " href="<?php echo site_url('search/incorrect_cq_zones'); ?>"><?= __("Incorrect CQ Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_itu_zones'); ?>"><?= __("Incorrect ITU Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="<?php echo site_url('search/lotw_unconfirmed'); ?>"><?= __("QSOs unconfirmed on LoTW"); ?></a>

View File

@@ -13,12 +13,6 @@
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/filter'); ?>"><?= __("Advanced Search"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>"><?= __("Incorrect CQ Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/incorrect_itu_zones'); ?>"><?= __("Incorrect ITU Zones"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>"><?= __("QSOs unconfirmed on LoTW"); ?></a>