Merge pull request #1116 from AndreasK79/mm_dxcc_fix

[QSO Entry] Maritime Mobile identification fix
pull/1119/head
Peter Goodhall 2021-07-30 13:49:17 +01:00 zatwierdzone przez GitHub
commit bad229dd09
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 21 dodań i 5 usunięć

Wyświetl plik

@ -239,7 +239,7 @@ class CQ extends CI_Model{
function getSummaryByBand($band, $station_id) {
$sql = "SELECT count(distinct thcv.col_cqz) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= " where station_id = " . $station_id . ' and col_cqz > 0';
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
@ -258,7 +258,7 @@ class CQ extends CI_Model{
function getSummaryByBandConfirmed($band, $station_id){
$sql = "SELECT count(distinct thcv.col_cqz) as count FROM " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= " where station_id = " . $station_id . ' and col_cqz > 0';
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";

Wyświetl plik

@ -2092,7 +2092,14 @@ class Logbook_model extends CI_Model {
if (preg_match('/(^KG4)[A-Z09]{3,}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 6 char, it is USA
$call = "K";
}
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
return array($row['adif'], $row['entity'], $row['cqz']);
}
}
$len = strlen($call);
@ -2137,7 +2144,16 @@ class Logbook_model extends CI_Model {
if (preg_match('/(^KG4)[A-Z09]{3,}/', $call)) { // KG4/ and KG4 5 char calls are Guantanamo Bay. If 6 char, it is USA
$call = "K";
}
} elseif (preg_match_all('/^((\d|[A-Z])+\/)?((\d|[A-Z]){3,})(\/(\d|[A-Z])+)?(\/(\d|[A-Z])+)?$/', $call, $matches)) {
if ($matches[5][0] == '/MM') {
$row['adif'] = 0;
$row['entity'] = 'None';
$row['cqz'] = 0;
$row['long'] = '0';
$row['lat'] = '0';
return $row;
}
}
$len = strlen($call);

Wyświetl plik

@ -258,7 +258,7 @@
<label for="cqz"><?php echo $this->lang->line('gen_hamradio_cq_zone'); ?></label>
<select class="custom-select" id="cqz" name="cqz" required>
<?php
for ($i = 1; $i<=40; $i++) {
for ($i = 0; $i<=40; $i++) {
echo '<option value="'. $i . '">'. $i .'</option>';
}
?>