diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index a6f3bf7d..b64c8e0d 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -746,9 +746,9 @@ class Lotw extends CI_Controller { $lotw_url .= "&qso_qslsince="; $lotw_url .= "$lotw_last_qsl_date"; - // Only pull back entries that belong to this callsign - $lotw_call = $this->session->userdata('user_callsign'); - $lotw_url .= "&qso_owncall=$lotw_call"; + if ($this->input->post('callsign') != '0') { + $lotw_url .= "&qso_owncall=".$this->input->post('callsign'); + } file_put_contents($file, file_get_contents($lotw_url)); @@ -761,9 +761,11 @@ class Lotw extends CI_Controller { { $data['error'] = $this->upload->display_errors(); + $this->load->model('Stations'); + $data['callsigns'] = $this->Stations->callsigns_of_user($this->session->userdata('user_id')); $this->load->view('interface_assets/header', $data); - $this->load->view('lotw/import'); + $this->load->view('lotw/import', $data); $this->load->view('interface_assets/footer'); } else diff --git a/application/language/bulgarian/lotw_lang.php b/application/language/bulgarian/lotw_lang.php index eda6a36d..feb31524 100644 --- a/application/language/bulgarian/lotw_lang.php +++ b/application/language/bulgarian/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Upload the Exported ADIF fi $lang['lotw_upload_type_must_be_adi'] = 'Log files must have the file type .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Pull LoTW data for me'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] = 'Cloudlog will use the LoTW username and password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since chosen date, or since your last LoTW confirmation (fetched from your log), up until now.'; diff --git a/application/language/chinese_simplified/lotw_lang.php b/application/language/chinese_simplified/lotw_lang.php index 7d788259..4ffcc62e 100644 --- a/application/language/chinese_simplified/lotw_lang.php +++ b/application/language/chinese_simplified/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = '下载从 LoTW Les téléchargements du journal Cloudlog auront toutes les confirmations depuis la date choisie, ou depuis votre dernière confirmation LoTW (récupérée de votre journal), jusqu'à présent."; diff --git a/application/language/german/lotw_lang.php b/application/language/german/lotw_lang.php index 550abb2b..52f985b6 100644 --- a/application/language/german/lotw_lang.php +++ b/application/language/german/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Lade die exportierte ADIF-D $lang['lotw_upload_type_must_be_adi'] = 'Logdateien müssen den Dateityp .adi haben'; $lang['lotw_pull_lotw_data_for_me'] = 'Lade LoTW-Daten für mich'; +$lang['lotw_select_callsign'] = 'Rufzeichen, für das LoTW Bestätigungen geladen werden sollen'; $lang['lotw_report_download_overview_helptext'] = 'Cloudlog nutzt Benutzername und Passwort, welche in Deinem Benutzerprofil gespeichert sind, um einen Report vom LoTW zu laden. Der Report, den Cloudlog lädt, enthält alle Bestätigungen seit dem gewählten Datum oder seit der letzen LoTW-Bestätigung (wird aus Deinem Log extrahiert) bis jetzt.'; diff --git a/application/language/greek/lotw_lang.php b/application/language/greek/lotw_lang.php index f578e26a..ec4cf4fe 100644 --- a/application/language/greek/lotw_lang.php +++ b/application/language/greek/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Μεταφορτώστε τ $lang['lotw_upload_type_must_be_adi'] = 'Τα αρχεία καταγραφής πρέπει να έχουν τον τύπο αρχείου .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Τραβήξτε δεδομένα LoTW για μένα'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] = 'Το Cloudlog θα χρησιμοποιήσει το όνομα χρήστη και τον κωδικό πρόσβασης LoTW που είναι αποθηκευμένα στο προφίλ χρήστη σας για να πραγματοποιήσει λήψη μιας αναφοράς από το LoTW για εσάς. Οι λήψεις αναφοράς Cloudlog θα έχουν όλες τις επιβεβαιώσεις από την επιλεγμένη ημερομηνία ή από την τελευταία επιβεβαίωση LoTW (που ελήφθη από το αρχείο καταγραφής σας), μέχρι τώρα.'; diff --git a/application/language/italian/lotw_lang.php b/application/language/italian/lotw_lang.php index b217e8e8..18e06555 100644 --- a/application/language/italian/lotw_lang.php +++ b/application/language/italian/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Carica il file ADIF Esporta $lang['lotw_upload_type_must_be_adi'] = 'I file di log devono essere di tipo .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Ottieni dati da LoTW per me'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] ='Cloudlog userà il nome utente e password LoTW memorizzato nel tuo profilo per scaricare un report da LoTW per te. Il report scaricato da Cloudlog avrà tutte le conferme fino alla data scelta, o fino alla ultima conferma su LoTW (recuperato dal tuo log), fino ad ora.'; diff --git a/application/language/polish/lotw_lang.php b/application/language/polish/lotw_lang.php index 8bc828da..51054880 100644 --- a/application/language/polish/lotw_lang.php +++ b/application/language/polish/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Wyślij pobrany plik ADIF z $lang['lotw_upload_type_must_be_adi'] = 'Pliki logu muszą mieć rozszerzenie .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Pobierz dane z LoTW za mnie'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] ='Cloudlog będzie używał loginu i hasła podanego w profilu, aby pobierać raporty z LoTW.Raport będzie zawierał wszystkie potwierdzenia od wybranej daty, lub ostatniej potwierdzonej łączności z LoTW (wybranej z logiu), do teraz.'; diff --git a/application/language/russian/lotw_lang.php b/application/language/russian/lotw_lang.php index 82e87538..786ab193 100644 --- a/application/language/russian/lotw_lang.php +++ b/application/language/russian/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Загрузить эксп $lang['lotw_upload_type_must_be_adi'] = 'Файлы журнала должны быть с расширением .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Подтянуть мои данные из LoTW'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] ='Cloudlog использует логин и пароль для LoTW, сохранённые в вашем профиле, для того чтобы скачивать ваши журналы с LoTW. Журнал, скачанный в Cloudlog будет содержать все подтверждения, начиная с выбранной даты, или начиная с последнего подтверждения в LoTW (загруженного из вашего журнала), до настоящего момента.'; diff --git a/application/language/spanish/lotw_lang.php b/application/language/spanish/lotw_lang.php index 0db69c01..e47efb5d 100644 --- a/application/language/spanish/lotw_lang.php +++ b/application/language/spanish/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Suba el archivo ADIF export $lang['lotw_upload_type_must_be_adi'] = 'Los archivos de registro deben ser del tipo .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Extraer los datos LoTW por mí'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] ='Cloudlog usará el usuario y contraseña de LoTW guardado en su perfil para descargar un informe de LoTW por usted. El informe contendrá todas las confirmaciones desde la fecha elegida o desde su última confirmación LoTW hasta ahora.'; diff --git a/application/language/swedish/lotw_lang.php b/application/language/swedish/lotw_lang.php index 5788bea2..4eaa19dd 100644 --- a/application/language/swedish/lotw_lang.php +++ b/application/language/swedish/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Ladda upp exporterad ADIF f $lang['lotw_upload_type_must_be_adi'] = 'Loggfil måste vara av format .adi'; $lang['lotw_pull_lotw_data_for_me'] = 'Hämta LoTW data'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] = 'Cloudlog använder LoTW användarnamn och lösenord som är sparat i din användarprofil för att ladda ner repport från LoTW. Rapporten Cloudlog kommer att ladda ner kommer att ha alla bekräftelser sedan valt datum, eller sedan din senaste LoTW-bekräftelse (hämtad från din logg), fram till nu.'; diff --git a/application/language/turkish/lotw_lang.php b/application/language/turkish/lotw_lang.php index 5e4f277b..f17af902 100644 --- a/application/language/turkish/lotw_lang.php +++ b/application/language/turkish/lotw_lang.php @@ -34,6 +34,7 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'LoTW\'den Dışa Aktarılan $lang['lotw_upload_type_must_be_adi'] = 'Günlük dosyaları .adi dosya tipine sahip olmalıdır'; $lang['lotw_pull_lotw_data_for_me'] = 'Benim için LoTW verilerini çek'; +$lang['lotw_select_callsign'] = 'Select callsign to pull LoTW confirmations for'; $lang['lotw_report_download_overview_helptext'] ='Cloudlog, sizin için LoTW\'den bir rapor indirmek için kullanıcı profilinizde kayıtlı LoTW kullanıcı adını ve şifreyi kullanacak. Cloudlog indirmeleri raporu, seçilen tarihten itibaren veya son LoTW onayınızdan (günlüğünüzden alınır) bu yana şimdiye kadarki tüm onaylara sahip olacaktır.'; diff --git a/application/models/Stations.php b/application/models/Stations.php index 054921cf..03b89aa7 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -24,7 +24,7 @@ class Stations extends CI_Model { } function all_of_user($userid = null) { - if ($userid == null) { + if ($userid == null) { $userid=$this->session->userdata('user_id'); // Fallback to session-uid, if userid is omitted } $this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as dxcc_end'); @@ -33,6 +33,15 @@ class Stations extends CI_Model { return $this->db->get('station_profile'); } + function callsigns_of_user($userid = null) { + if ($userid == null) { + $userid=$this->session->userdata('user_id'); // Fallback to session-uid, if userid is omitted + } + $this->db->select('distinct(station_profile.station_callsign) as callsign'); + $this->db->where('user_id', $userid); + return $this->db->get('station_profile'); + } + function profile($id) { // Clean ID $clean_id = $this->security->xss_clean($id); diff --git a/application/views/lotw/import.php b/application/views/lotw/import.php index d76e9239..8b370340 100644 --- a/application/views/lotw/import.php +++ b/application/views/lotw/import.php @@ -1,9 +1,9 @@
- +
: