Added possibility to mark QSOs as exported to LoTW.
这个提交包含在:
父节点
4f467e7256
当前提交
e7d1b3bf27
共有 5 个文件被更改,包括 101 次插入 和 11 次删除
|
|
@ -85,7 +85,31 @@ class adif extends CI_Controller {
|
||||||
|
|
||||||
$this->load->view('adif/data/exportall', $data);
|
$this->load->view('adif/data/exportall', $data);
|
||||||
|
|
||||||
}
|
if ($this->input->post('markLotw') == 1) {
|
||||||
|
foreach ($data['qsos']->result() as $qso)
|
||||||
|
{
|
||||||
|
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function mark_lotw() {
|
||||||
|
// Set memory limit to unlimited to allow heavy usage
|
||||||
|
ini_set('memory_limit', '-1');
|
||||||
|
|
||||||
|
$this->load->model('adif_data');
|
||||||
|
|
||||||
|
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'));
|
||||||
|
|
||||||
|
//$this->load->view('adif/import', $data);
|
||||||
|
|
||||||
|
foreach ($data['qsos']->result() as $qso)
|
||||||
|
{
|
||||||
|
$this->adif_data->mark_lotw_sent($qso->COL_PRIMARY_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->load->view('adif/mark_lotw', $data);
|
||||||
|
}
|
||||||
|
|
||||||
public function export_lotw()
|
public function export_lotw()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ class adif_data extends CI_Model {
|
||||||
'COL_LOTW_QSL_SENT' => 'Y'
|
'COL_LOTW_QSL_SENT' => 'Y'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->db->set('COL_LOTW_QSLSDATE', 'CURDATE()', FALSE);
|
$this->db->set('COL_LOTW_QSLSDATE', 'now()', FALSE);
|
||||||
$this->db->where('COL_PRIMARY_KEY', $id);
|
$this->db->where('COL_PRIMARY_KEY', $id);
|
||||||
$this->db->update($this->config->item('table_name'), $data);
|
$this->db->update($this->config->item('table_name'), $data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,23 +60,55 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="card-text">To date:</p>
|
<p class="card-text">To date:</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="input-group date col-md-3" id="datetimepicker2" 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="#datetimepicker2" data-toggle="datetimepicker">
|
||||||
|
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="form-group row">
|
||||||
|
<div class="col-md-10">
|
||||||
|
<div class="form-check-inline">
|
||||||
|
<input class="form-check-input" type="checkbox" name="markLotw" value="1" id="markLotw">
|
||||||
|
<label class="form-check-label" for="markLotw">Mark exported QSOs as uploaded to LoTW</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="input-group date col-md-3" id="datetimepicker2" data-target-input="nearest">
|
<button type="submit" class="btn btn-outline-secondary btn-sm" value="Export">Export QSOs</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
<h6>Logbook of The World</h6>
|
||||||
|
<p>If no date are chosen, that means all QSOs will be marked!</p>
|
||||||
|
<form class="form" action="<?php echo site_url('adif/mark_lotw'); ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<p class="card-text">From date:</p>
|
||||||
|
<div class="row">
|
||||||
|
<div class="input-group date col-md-3" id="datetimepicker3" 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="#datetimepicker3" 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="datetimepicker4" data-target-input="nearest">
|
||||||
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
|
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
|
||||||
<div class="input-group-append" data-target="#datetimepicker2" data-toggle="datetimepicker">
|
<div class="input-group-append" data-target="#datetimepicker4" data-toggle="datetimepicker">
|
||||||
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<button type="submit" class="btn btn-outline-secondary btn-sm" value="Export">Mark QSOs as exported to LoTW</button>
|
||||||
|
|
||||||
<br>
|
|
||||||
<button type="submit" class="btn btn-outline-secondary btn-sm" value="Export">Export QSOs</button>
|
|
||||||
</form>
|
</form>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<h6>Export Satellite Only QSOs</h6>
|
<h6>Export Satellite Only QSOs</h6>
|
||||||
<a href="<?php echo site_url('adif/exportsat'); ?>" title="Export All Satellite Contacts" target="_blank" class="btn btn-outline-secondary btn-sm">Export All Satellite QSOs</a>
|
<a href="<?php echo site_url('adif/exportsat'); ?>" title="Export All Satellite Contacts" target="_blank" class="btn btn-outline-secondary btn-sm">Export All Satellite QSOs</a>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="container">
|
||||||
|
<br>
|
||||||
|
<?php if($this->session->flashdata('message')) { ?>
|
||||||
|
<!-- Display Message -->
|
||||||
|
<div class="alert-message error">
|
||||||
|
<p><?php echo $this->session->flashdata('message'); ?></p>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
QSOs marked
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="card-title">Yay, it's done!</h3>
|
||||||
|
<p class="card-text">The QSOs are marked as exported to LoTW.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
@ -24,6 +24,18 @@
|
||||||
format: 'DD/MM/YYYY',
|
format: 'DD/MM/YYYY',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('#datetimepicker3').datetimepicker({
|
||||||
|
format: 'DD/MM/YYYY',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('#datetimepicker4').datetimepicker({
|
||||||
|
format: 'DD/MM/YYYY',
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用