kopia lustrzana https://github.com/magicbug/Cloudlog
Added option for adif export to only export those not flagged as exported.
rodzic
35b074fbaf
commit
62e961747d
|
@ -82,7 +82,14 @@ class adif extends CI_Controller {
|
|||
|
||||
$this->load->model('adif_data');
|
||||
|
||||
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'));
|
||||
// Used for exporting QSOs not previously exported to LoTW
|
||||
if ($this->input->post('exportLotw') == 1) {
|
||||
$exportLotw = true;
|
||||
} else {
|
||||
$exportLotw = false;
|
||||
}
|
||||
|
||||
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $exportLotw);
|
||||
|
||||
$this->load->view('adif/data/exportall', $data);
|
||||
|
||||
|
|
|
@ -67,10 +67,9 @@ class adif_data extends CI_Model {
|
|||
return $this->db->get();
|
||||
}
|
||||
|
||||
function export_custom($from, $to) {
|
||||
function export_custom($from, $to, $exportLotw = false) {
|
||||
$this->load->model('stations');
|
||||
$active_station_id = $this->stations->find_active();
|
||||
|
||||
|
||||
$this->db->select(''.$this->config->item('table_name').'.*, station_profile.*');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
|
@ -87,6 +86,10 @@ class adif_data extends CI_Model {
|
|||
$to = $to->format('Y-m-d');
|
||||
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'");
|
||||
}
|
||||
if ($exportLotw) {
|
||||
$this->db->where($this->config->item('table_name').".COL_LOTW_QSL_SENT != 'Y'");
|
||||
}
|
||||
|
||||
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC");
|
||||
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
|
|
|
@ -106,6 +106,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-10">
|
||||
<div class="form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="exportLotw" value="1" id="exportLotw">
|
||||
<label class="form-check-label" for="exportLotw">Export QSOs not uploaded to LoTW</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-outline-secondary btn-sm" value="Export">Export QSOs</button>
|
||||
</form>
|
||||
|
|
Ładowanie…
Reference in New Issue