[QSLPrint] Bugfix for exporting ADIF and CSV when all is selected in Station Location
这个提交包含在:
父节点
2263b73605
当前提交
fddc03b4ef
共有 5 个文件被更改,包括 20 次插入 和 18 次删除
|
|
@ -35,8 +35,8 @@ class QSLPrint extends CI_Controller {
|
|||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
if ($this->uri->segment(3) == 'All') {
|
||||
$station_id = NULL;
|
||||
if ($this->uri->segment(3) == 'all') {
|
||||
$station_id = 'All';
|
||||
} else {
|
||||
$station_id = $this->security->xss_clean($this->uri->segment(3));
|
||||
}
|
||||
|
|
@ -53,8 +53,8 @@ class QSLPrint extends CI_Controller {
|
|||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
if ($this->uri->segment(3) == 'All') {
|
||||
$station_id = NULL;
|
||||
if ($this->uri->segment(3) == 'all') {
|
||||
$station_id = 'All';
|
||||
} else {
|
||||
$station_id = $this->security->xss_clean($this->uri->segment(3));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class adif_data extends CI_Model {
|
|||
|
||||
if ($station_id == NULL) {
|
||||
$this->db->where($this->config->item('table_name').'.station_id', $active_station_id);
|
||||
} else {
|
||||
} else if ($station_id != 'All') {
|
||||
$this->db->where($this->config->item('table_name').'.station_id', $station_id);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -776,23 +776,21 @@ class Logbook_model extends CI_Model {
|
|||
COL_SAT_MODE,
|
||||
COL_QSL_RCVD,
|
||||
COL_COMMENT,
|
||||
(CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING,
|
||||
ADIF,
|
||||
ENTITY
|
||||
FROM '.$this->config->item('table_name').', dxcc_prefixes, station_profile
|
||||
WHERE
|
||||
COL_QSL_SENT in (\'R\', \'Q\')
|
||||
and (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like CONCAT(dxcc_prefixes.call,\'%\')
|
||||
and (end is null or end > now())
|
||||
and ' . $this->config->item('table_name') . '.station_id = station_profile.station_id';
|
||||
(select adif from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ADIF,
|
||||
(select entity from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ENTITY,
|
||||
(CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING
|
||||
FROM '.$this->config->item('table_name').' thcv
|
||||
join station_profile on thcv.station_id = station_profile.station_id
|
||||
WHERE
|
||||
COL_QSL_SENT in (\'R\', \'Q\')';
|
||||
|
||||
if ($station_id2 == NULL) {
|
||||
$sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id;
|
||||
} else {
|
||||
$sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id2;
|
||||
$sql .= ' and thcv.station_id = ' . $station_id;
|
||||
} else if ($station_id2 != 'All') {
|
||||
$sql .= ' and thcv.station_id = ' . $station_id2;
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY adif, col_routing';
|
||||
$sql .= ' ORDER BY ADIF, COL_ROUTING';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
return $query;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
<th style=\'text-align: center\'>'. $this->lang->line('general_word_time') .'</th>
|
||||
<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\'>' . $this->lang->line('gen_hamradio_qsl') . ' ' . $this->lang->line('general_word_qslcard_via') . '</th>
|
||||
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_station') . '</th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); }; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qsl->COL_QSL_VIA . '</td>';
|
||||
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue(\''.$qsl->COL_PRIMARY_KEY.'\')" class="btn btn-sm btn-danger">Delete from queue</button></td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="openQsoList(\''.$qsl->COL_CALL.'\')" class="btn btn-sm btn-success">Open QSO list</button></td>';
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ if ($qsos->result() != NULL) {
|
|||
<th style=\'text-align: center\'>'. $this->lang->line('general_word_time') .'</th>
|
||||
<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\'>' . $this->lang->line('gen_hamradio_qsl') . ' ' . $this->lang->line('general_word_qslcard_via') . '</th>
|
||||
<th style=\'text-align: center\'>' . $this->lang->line('gen_hamradio_station') . '</th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
|
|
@ -30,6 +31,7 @@ if ($qsos->result() != NULL) {
|
|||
echo '<td style=\'text-align: center\'>'; $timestamp = strtotime($qsl->COL_TIME_ON); echo date('H:i', $timestamp); echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; if($qsl->COL_SAT_NAME != null) { echo $qsl->COL_SAT_NAME; } else { echo strtolower($qsl->COL_BAND); }; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qsl->COL_QSL_VIA . '</td>';
|
||||
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qsl->station_callsign . '</span></td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="deleteFromQslQueue(\''.$qsl->COL_PRIMARY_KEY.'\')" class="btn btn-sm btn-danger">Delete from queue</button></td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="openQsoList(\''.$qsl->COL_CALL.'\')" class="btn btn-sm btn-success">Open QSO list</button></td>';
|
||||
|
|
|
|||
正在加载…
在新工单中引用