Merge pull request #1151 from AndreasK79/qrz_logbook_move_marking
Qrz logbook move marking of QSOs from ADIF Export to QRZ Logbook
这个提交包含在:
当前提交
9a3e65e8f4
共有 5 个文件被更改,包括 73 次插入 和 67 次删除
|
|
@ -121,26 +121,6 @@ class adif extends CI_Controller {
|
|||
$this->load->view('adif/mark_lotw', $data);
|
||||
}
|
||||
|
||||
public function mark_qrz() {
|
||||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
|
||||
|
||||
$this->load->model('adif_data');
|
||||
|
||||
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
|
||||
$this->load->view('adif/mark_qrz', $data);
|
||||
}
|
||||
|
||||
public function export_lotw()
|
||||
{
|
||||
// Set memory limit to unlimited to allow heavy usage
|
||||
|
|
|
|||
|
|
@ -108,11 +108,8 @@ class Qrz extends CI_Controller {
|
|||
|
||||
$data['page_title'] = "QRZ Logbook";
|
||||
|
||||
$data['station_profiles'] = $this->stations->all();
|
||||
$data['station_profile'] = $this->stations->stations_with_qrz_api_key();
|
||||
$active_station_id = $this->stations->find_active();
|
||||
$station_profile = $this->stations->profile($active_station_id);
|
||||
|
||||
$data['active_station_info'] = $station_profile->row();
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('qrz/export');
|
||||
|
|
@ -125,6 +122,7 @@ class Qrz extends CI_Controller {
|
|||
public function upload_station() {
|
||||
$this->setOptions();
|
||||
$this->load->model('stations');
|
||||
|
||||
$postData = $this->input->post();
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
|
@ -148,4 +146,26 @@ class Qrz extends CI_Controller {
|
|||
echo json_encode($data);
|
||||
}
|
||||
}
|
||||
|
||||
public function mark_qrz() {
|
||||
// Set memory limit to unlimited to allow heavy usage
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
$station_id = $this->security->xss_clean($this->input->post('station_profile'));
|
||||
|
||||
$this->load->model('adif_data');
|
||||
|
||||
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('qrz/mark_qrz', $data);
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
}
|
||||
|
|
@ -14,9 +14,6 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" id="lotw-tab" data-toggle="tab" href="#lotw" role="tab" aria-controls="lotw" aria-selected="false">Logbook Of The World</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="qrz-tab" data-toggle="tab" href="#qrz" role="tab" aria-controls="qrz" aria-selected="false">QRZ Logbook</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -186,40 +183,6 @@
|
|||
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to LoTW</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="qrz" role="tabpanel" aria-labelledby="home-tab">
|
||||
|
||||
|
||||
<form class="form" action="<?php echo site_url('adif/mark_qrz'); ?>" method="post" enctype="multipart/form-data">
|
||||
<select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;">
|
||||
<option value="0">Select Station Profile</option>
|
||||
<?php foreach ($station_profile->result() as $station) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>
|
||||
<p class="card-text">From date:</p>
|
||||
<div class="row">
|
||||
<div class="input-group date col-md-3" id="datetimepicker5" data-target-input="nearest">
|
||||
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
|
||||
<div class="input-group-append" data-target="#datetimepicker5" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="card-text">To date:</p>
|
||||
<div class="row">
|
||||
<div class="input-group date col-md-3" id="datetimepicker6" data-target-input="nearest">
|
||||
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
|
||||
<div class="input-group-append" data-target="#datetimepicker6" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to QRZ Logbook</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,11 +5,20 @@
|
|||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Upload Logbook
|
||||
<ul class="nav nav-tabs card-header-tabs pull-right" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="export-tab" data-toggle="tab" href="#export" role="tab" aria-controls="import" aria-selected="true">Upload Logbook</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="mark-tab" data-toggle="tab" href="#mark" role="tab" aria-controls="export" aria-selected="false">Mark QSOs</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="export" role="tabpanel" aria-labelledby="export-tab">
|
||||
<p>Here you can see and upload all QSOs which have not been previously uploaded to a QRZ logbook.</p>
|
||||
<p>You need to set a QRZ Logbook API key in your station profile. Only station profiles with an API Key set are displayed.</p>
|
||||
<p><span class="badge badge-warning">Warning</span>This might take a while as QSO uploads are processed sequentially.</p>
|
||||
|
|
@ -39,7 +48,7 @@
|
|||
echo '<td><button id="qrzUpload" type="button" name="qrzUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportQrz('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tfoot></table></div>';
|
||||
echo '</tfoot></table>';
|
||||
|
||||
}
|
||||
else {
|
||||
|
|
@ -48,5 +57,39 @@
|
|||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="mark" role="tabpanel" aria-labelledby="home-tab">
|
||||
|
||||
<form class="form" action="<?php echo site_url('qrz/mark_qrz'); ?>" method="post" enctype="multipart/form-data">
|
||||
<select name="station_profile" class="custom-select mb-4 mr-sm-4" style="width: 30%;">
|
||||
<option value="0">Select Station Profile</option>
|
||||
<?php foreach ($station_profiles->result() as $station) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>
|
||||
<p class="card-text">From date:</p>
|
||||
<div class="row">
|
||||
<div class="input-group date col-md-3" id="datetimepicker5" data-target-input="nearest">
|
||||
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
|
||||
<div class="input-group-append" data-target="#datetimepicker5" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="card-text">To date:</p>
|
||||
<div class="row">
|
||||
<div class="input-group date col-md-3" id="datetimepicker6" data-target-input="nearest">
|
||||
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
|
||||
<div class="input-group-append" data-target="#datetimepicker6" data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to QRZ Logbook</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
正在加载…
在新工单中引用