pull/3018/head
Peter Goodhall 2024-03-18 14:25:30 +00:00
rodzic 237f679674
commit 6dde203bf5
2 zmienionych plików z 14 dodań i 8 usunięć

Wyświetl plik

@ -5,13 +5,17 @@ class Qsl_model extends CI_Model {
$CI->load->model('logbooks_model'); $CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
$this->db->select('*'); if (is_array($logbooks_locations_array) && !empty($logbooks_locations_array)) {
$this->db->from($this->config->item('table_name')); $this->db->select('*');
$this->db->join('qsl_images', 'qsl_images.qsoid = ' . $this->config->item('table_name') . '.col_primary_key'); $this->db->from($this->config->item('table_name'));
$this->db->where_in('station_id', $logbooks_locations_array); $this->db->join('qsl_images', 'qsl_images.qsoid = ' . $this->config->item('table_name') . '.col_primary_key');
$this->db->order_by("id", "desc"); $this->db->where_in('station_id', $logbooks_locations_array);
$this->db->order_by("id", "desc");
return $this->db->get();
return $this->db->get();
} else {
return false;
}
} }
function getQslForQsoId($id) { function getQslForQsoId($id) {

Wyświetl plik

@ -18,7 +18,7 @@
$custom_date_format = $this->config->item('qso_date_format'); $custom_date_format = $this->config->item('qso_date_format');
} }
if (is_array($qslarray->result())) { if ($qslarray !== FALSE && is_array($qslarray->result())) {
echo '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed"> echo '<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">
<thead> <thead>
<tr> <tr>
@ -57,6 +57,8 @@
} }
echo '</tbody></table>'; echo '</tbody></table>';
} else {
echo '<div class="alert alert-warning" role="alert">No QSL Cards Found.</div>';
} }
?> ?>