Add SAT to WAZ timeline

This commit is contained in:
phl0
2026-02-19 14:39:16 +01:00
parent ec0396b736
commit 3d07d6bff6
2 changed files with 19 additions and 8 deletions

View File

@@ -230,8 +230,11 @@ class Timeline_model extends CI_Model {
public function get_timeline_waz($band, $mode, $propmode, $location_list, $qsl, $lotw, $eqsl, $clublog, $year, $qrz, $onlynew) {
$binding = [];
$sql = "select min(date(COL_TIME_ON)) date, col_cqz from "
.$this->config->item('table_name'). " thcv
$sql = "SELECT * FROM (";
$sql .= "SELECT COL_TIME_ON AS date, col_cqz, ";
$sql .= "COL_SAT_NAME AS sat_name, ";
$sql .= "ROW_NUMBER() OVER (PARTITION BY col_cqz ORDER BY COL_TIME_ON ASC) AS rn ";
$sql .= "FROM ".$this->config->item('table_name'). " thcv
where station_id in (" . $location_list . ")";
if ($band == 'SAT') { // Left for compatibility reasons
@@ -268,8 +271,10 @@ class Timeline_model extends CI_Model {
$sql .= $this->addQslToQuery($qsl, $lotw, $eqsl, $clublog, $qrz);
$sql .= " and col_cqz <> '' group by col_cqz
order by date desc";
$sql .= " and col_cqz <> ''";
$sql .= ") ranked ";
$sql .= "WHERE rn = 1 ";
$sql .= "ORDER BY date DESC;";
$query = $this->db->query($sql, $binding);

View File

@@ -336,8 +336,11 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $
<tr>
<td>#</td>
<td>'.__("Date").'</td>
<td>'.__("CQ Zone").'</td>
<td>'.__("Show QSOs").'</td>
<td>'.__("CQ Zone").'</td>';
if ($propmode == 'SAT' || $propmode == 'All') {
echo ' <td>'.__("Satellite").'</td>';
}
echo ' <td>'.__("Show QSOs").'</td>
</tr>
</thead>
<tbody>';
@@ -348,8 +351,11 @@ function write_waz_timeline($timeline_array, $custom_date_format, $bandselect, $
echo '<tr>
<td>' . $i-- . '</td>
<td>' . date($custom_date_format, $date_as_timestamp) . '</td>
<td>' . $line->col_cqz . '</td>
<td><a href=javascript:displayTimelineContacts("' . $line->col_cqz . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").'</a></td>
<td>' . $line->col_cqz . '</td>';
if ($propmode == 'SAT' || $propmode == 'All') {
echo '<td>' . $line->sat_name . '</td>';
}
echo ' <td><a href=javascript:displayTimelineContacts("' . $line->col_cqz . '","'. $bandselect . '","'. $modeselect. '","' . $propmode . '","' . $award .'")>'.__("Show").'</a></td>
</tr>';
}
echo '</tfoot></table></div>';