Allow to select the callsign to download LoTW cnfms for
这个提交包含在:
父节点
114cd08765
当前提交
ea27403ea6
共有 4 个文件被更改,包括 32 次插入 和 5 次删除
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.';
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,21 @@
|
|||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label class="form-check-label" for="callsign"><?php echo lang('lotw_select_callsign'); ?></label>
|
||||
<?php
|
||||
$options = [];
|
||||
foreach ($callsigns->result() as $call) {
|
||||
$options[$call->callsign] = $call->callsign;
|
||||
}
|
||||
ksort($options);
|
||||
array_unshift($options, 'All');
|
||||
echo form_dropdown('callsign', $options, 'All');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<p class="form-text text-muted"><?php echo lang('lotw_report_download_overview_helptext'); ?></p>
|
||||
</div>
|
||||
|
|
|
|||
正在加载…
在新工单中引用