Add prop_mode if set

This commit is contained in:
phl0
2024-04-25 07:46:31 +02:00
parent 1146beabf0
commit adbfaab361
2 changed files with 3 additions and 3 deletions

View File

@@ -347,7 +347,7 @@ class Awards extends CI_Controller {
$i=1;
fputcsv($fp, array('No', 'Callsign', 'Date', 'Band', 'Mode', 'Remarks'), ';');
foreach ($qsos as $qso) {
fputcsv($fp, array($i, $qso['call'], $qso['date'], $qso['band'], $qso['mode'], $qso['cnty'].' - '.$qso['jcc']), ';');
fputcsv($fp, array($i, $qso['call'], $qso['date'], ($qso['prop_mode'] != null ? $qso['band'].' / '.$qso['prop_mode'] : $qso['band']), $qso['mode'], $qso['cnty'].' - '.$qso['jcc']), ';');
$i++;
}
fclose($fp);

View File

@@ -1178,14 +1178,14 @@ class Jcc_model extends CI_Model {
$qsos = array();
foreach($jccs as $jcc) {
$qso = $this->getFirstQso($location_list, $jcc);
$qsos[] = array('call' => $qso[0]->COL_CALL, 'date' => $qso[0]->COL_TIME_ON, 'band' => $qso[0]->COL_BAND, 'mode' => $qso[0]->COL_MODE, 'cnty' => $qso[0]->COL_CNTY, 'jcc' => $this->jaCities[$qso[0]->COL_CNTY]);
$qsos[] = array('call' => $qso[0]->COL_CALL, 'date' => $qso[0]->COL_TIME_ON, 'band' => $qso[0]->COL_BAND, 'mode' => $qso[0]->COL_MODE, 'prop_mode' => $qso[0]->COL_PROP_MODE, 'cnty' => $qso[0]->COL_CNTY, 'jcc' => $this->jaCities[$qso[0]->COL_CNTY]);
}
return $qsos;
}
function getFirstQso($location_list, $jcc) {
$sql = 'SELECT COL_CNTY, COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE FROM '.$this->config->item('table_name').' t1
$sql = 'SELECT COL_CNTY, COL_CALL, COL_TIME_ON, COL_BAND, COL_MODE, COL_PROP_MODE FROM '.$this->config->item('table_name').' t1
WHERE station_id in ('.$location_list.')';
$sql .= ' AND COL_CNTY = \''.$jcc.'\'';
$sql .= ' ORDER BY COL_TIME_ON ASC LIMIT 1';