diff --git a/application/models/Adif_data.php b/application/models/Adif_data.php index 8b15e9f2..6918070c 100644 --- a/application/models/Adif_data.php +++ b/application/models/Adif_data.php @@ -11,9 +11,9 @@ class adif_data extends CI_Model { function export_all() { $this->load->model('stations'); $active_station_id = $this->stations->find_active(); - - $this->db->where('station_id', $active_station_id); - $this->db->order_by("COL_TIME_ON", "ASC"); + $this->db->where($this->config->item('table_name').'.station_id', $active_station_id); + $this->db->order_by("COL_TIME_ON", "ASC"); + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $query = $this->db->get($this->config->item('table_name')); return $query; diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index a4984701..ced1876b 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -749,10 +749,11 @@ class Logbook_model extends CI_Model { } function get_clublog_qsos($station_id){ - $this->db->where('station_id', $station_id); + $this->db->where($this->config->item('table_name').'.station_id', $station_id); $this->db->where("COL_CLUBLOG_QSO_UPLOAD_STATUS", null); $this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", ""); $this->db->or_where("COL_CLUBLOG_QSO_UPLOAD_STATUS", "N"); + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $query = $this->db->get($this->config->item('table_name')); diff --git a/application/views/adif/data/clublog.php b/application/views/adif/data/clublog.php index 9cdab7e2..d8bb419a 100644 --- a/application/views/adif/data/clublog.php +++ b/application/views/adif/data/clublog.php @@ -3,7 +3,10 @@ config->item('app_version')); ?>>Version config->item('app_version')."\n"; ?> -result() as $qso) { //print_r($qso);?> - COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>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); ?>>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_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>COL_OPERATOR) { ?>COL_OPERATOR); ?>>COL_OPERATOR; ?> - - \ No newline at end of file +load->library('AdifHelper'); + +foreach ($qsos->result() as $qso) { + echo $CI->adifhelper->getAdifLine($qso); +} \ No newline at end of file diff --git a/application/views/adif/data/exportsat.php b/application/views/adif/data/exportsat.php index 39108dcc..26991708 100644 --- a/application/views/adif/data/exportsat.php +++ b/application/views/adif/data/exportsat.php @@ -7,7 +7,10 @@ config->item('app_version')); ?>>Version config->item('app_version')."\n"; ?> -result() as $qso) { ?> - - COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ / 1000000; ?>>COL_FREQ_RX != "0") { ?>COL_FREQ_RX / 1000000; ?>>COL_BAND_RX) { ?>COL_BAND_RX); ?>>COL_BAND_RX; ?>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_STATE) { ?>COL_STATE); ?>>COL_STATE; ?>COL_SOTA_REF) { ?>COL_SOTA_REF); ?>>COL_SOTA_REF; ?>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; ?>state) { ?>state); ?>>state; ?>COL_COMMENT !="") { ?>COL_COMMENT);?>>COL_COMMENT; ?> - \ No newline at end of file +load->library('AdifHelper'); + +foreach ($qsos->result() as $qso) { + echo $CI->adifhelper->getAdifLine($qso); +} diff --git a/application/views/backup/exportall.php b/application/views/backup/exportall.php index 1520795a..7cd134dd 100644 --- a/application/views/backup/exportall.php +++ b/application/views/backup/exportall.php @@ -1,9 +1,12 @@ -2.2 +3.1.0 config->item('app_name')); ?>>config->item('app_name')."\n"; ?> config->item('app_version')); ?>>Version config->item('app_version')."\n"; ?> -result() as $qso) { //print_r($qso);?> - COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ); ?>>COL_FREQ; ?>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('Hi', $time_on); ?>>COL_TIME_OFF); $new_off = date('Hi', $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_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>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_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?> - - \ No newline at end of file +load->library('AdifHelper'); + +foreach ($qsos->result() as $qso) { + echo $CI->adifhelper->getAdifLine($qso); +}