diff --git a/application/controllers/Maintenance.php b/application/controllers/Maintenance.php index 0e0deb2f2..f6dd25c2e 100644 --- a/application/controllers/Maintenance.php +++ b/application/controllers/Maintenance.php @@ -14,8 +14,8 @@ class Maintenance extends CI_Controller { $this->load->model('Stations'); $data['stations']=$this->Stations->all(); $data['page_title'] = "Maintenance"; - $data['is_there_qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); - if ($data['is_there_qsos_with_no_station_id']) { + $data['qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); + if ($data['qsos_with_no_station_id']) { $data['calls_wo_sid']=$this->Logbook_model->calls_without_station_id(); } $this->load->view('interface_assets/header', $data); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 6a48fbcc7..643d4b976 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4109,10 +4109,12 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = } public function check_for_station_id() { + $this->db->select('COL_TIME_ON, COL_CALL, COL_MODE, COL_BAND'); $this->db->where('station_id =', NULL); $query = $this->db->get($this->config->item('table_name')); + log_message('debug','SQL: '.$this->db->last_query()); if($query->num_rows() >= 1) { - return $query->num_rows(); + return $query->result(); } else { return 0; } diff --git a/application/views/maintenance/main.php b/application/views/maintenance/main.php index 1cc033554..c1c6432ec 100644 --- a/application/views/maintenance/main.php +++ b/application/views/maintenance/main.php @@ -13,11 +13,42 @@
| Date | +Time | +Call | +Mode | +Band | +
|---|---|---|---|---|
| '.date($custom_date_format, $timestamp).' | '; + $timestamp = strtotime($qso->COL_TIME_ON); + echo ''.date('H:i', $timestamp).' | '; + echo ''.$qso->COL_CALL.' | '; + echo ''.$qso->COL_MODE.' | '; + echo ''.$qso->COL_BAND.' | '; + echo '
Please reassign those QSOs to an existing station location: