[Search] Added migration script and tweaks to view

pull/1739/head
Andreas 2022-11-01 19:47:06 +01:00
rodzic ee985302dd
commit ef2d032e03
4 zmienionych plików z 1060 dodań i 5 usunięć

Wyświetl plik

@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 104;
$config['migration_version'] = 105;
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -748,9 +748,9 @@ class Logbook extends CI_Controller {
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$sql = 'select * from ' . $this->config->item('table_name') .
$sql = 'select *, (select group_concat(distinct cqzone order by cqzone) from dxcc_master where countrycode = thcv.col_dxcc and cqzone <> \'\' order by cqzone asc) as correctcqzone from ' . $this->config->item('table_name') .
' thcv join station_profile on thcv.station_id = station_profile.station_id where thcv.station_id in ('. $location_list . ')
and not exists (select 1 from dxcc_master where countrycode = thcv.col_dxcc and cqzone = col_cqz)
and not exists (select 1 from dxcc_master where countrycode = thcv.col_dxcc and cqzone = col_cqz) and col_dxcc > 0
';
if ($station_id != 'All') {

Wyświetl plik

@ -1,6 +1,6 @@
<?php
if ($qsos->result() != NULL) {
Echo 'The following QSOs were found on the same band, mode, date and time difference 30 minutes:';
Echo 'The following QSOs were found to have an incorrect CQ zone that this DXCC normally has:';
echo '<table style="width:100%" class="qsolist table-sm table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
@ -10,6 +10,8 @@ if ($qsos->result() != NULL) {
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_mode') . '</th>
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_band') . '</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\'>' . $this->lang->line('gen_hamradio_station') . '</th>
</tr>
</thead><tbody>';
@ -23,14 +25,18 @@ if ($qsos->result() != NULL) {
$custom_date_format = $this->config->item('qso_date_format');
}
$i = 0;
foreach ($qsos->result() as $qso) {
echo '<tr>';
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\'><form id="searchcall" method="POST" action="'.site_url('search'). '"><input type="hidden" value="'. strtoupper($qso->COL_CALL) .'" name="callsign"><a href="javascript:$(\'#searchcall\').submit()">' . $qso->COL_CALL . '</a></form></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\'>' . $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 badge-light">' . $qso->station_callsign . '</span></td>';
echo '</tr>';
}