diff --git a/application/models/Adif_data.php b/application/models/Adif_data.php index f48f52bf..efb07f93 100644 --- a/application/models/Adif_data.php +++ b/application/models/Adif_data.php @@ -35,28 +35,37 @@ class adif_data extends CI_Model { $this->load->model('stations'); $active_station_id = $this->stations->find_active(); - $this->db->where('station_id', $active_station_id); - $this->db->where('COL_PROP_MODE', 'SAT'); - $this->db->order_by("COL_TIME_ON", "ASC"); - $query = $this->db->get($this->config->item('table_name')); - - return $query; + $this->db->select(''.$this->config->item('table_name').'.*, station_profile.*'); + $this->db->from($this->config->item('table_name')); + $this->db->where($this->config->item('table_name').'.station_id', $active_station_id); + $this->db->where($this->config->item('table_name').'.COL_PROP_MODE', 'SAT'); + + $this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC"); + + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + + return $this->db->get(); } function satellte_lotw() { $this->load->model('stations'); $active_station_id = $this->stations->find_active(); - $this->db->where('station_id', $active_station_id); - $this->db->where('COL_PROP_MODE', 'SAT'); + $this->db->select(''.$this->config->item('table_name').'.*, station_profile.*'); + $this->db->from($this->config->item('table_name')); + $this->db->where($this->config->item('table_name').'.station_id', $active_station_id); + $this->db->where($this->config->item('table_name').'.COL_PROP_MODE', 'SAT'); - $where = "COL_LOTW_QSLRDATE != ''"; + $where = $this->config->item('table_name').".COL_LOTW_QSLRDATE != ''"; $this->db->where($where); - $this->db->order_by("COL_TIME_ON", "ASC"); - $query = $this->db->get($this->config->item('table_name')); - - return $query; + $this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC"); + + + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->limit(15); + + return $this->db->get(); } function export_custom($from, $to) { diff --git a/application/views/adif/data/exportsat.php b/application/views/adif/data/exportsat.php index ad365c1f..6843db77 100644 --- a/application/views/adif/data/exportsat.php +++ b/application/views/adif/data/exportsat.php @@ -8,6 +8,6 @@ result() as $qso) { //print_r($qso);?> - COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> - +COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('His', $time_on); ?>>COL_TIME_OFF); $new_off = date('His', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_VUCC_GRIDS != "") { ?>COL_VUCC_GRIDS); ?>>COL_VUCC_GRIDS; ?>COL_VUCC_GRIDS == "" && $qso->COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE != 0 || $qso->COL_SAT_MODE !="") {?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?>station_callsign) { ?>station_callsign); ?>>station_callsign; ?>station_city) { ?>station_city); ?>>station_city; ?>station_country) { ?>station_country); ?>>station_country; ?>station_dxcc) { ?>station_dxcc); ?>>station_dxcc; ?>station_gridsquare, ',') !== false ) { ?>station_gridsquare); ?>>station_gridsquare; ?>station_gridsquare); ?>>station_gridsquare; ?>station_iota) { ?>station_iota); ?>>station_iota; ?>station_sota) { ?>station_sota); ?>>station_sota; ?>station_cq) { ?>station_cq); ?>>station_cq; ?>station_itu) { ?>station_itu); ?>>station_itu; ?>station_cnty) { ?>station_cnty); ?>>station_cnty; ?> + \ No newline at end of file