Merge pull request #546 from AndreasK79/adifexport_option_for_lotw
Added option for adif export to only export those not flagged as expo…
这个提交包含在:
		
						当前提交
						44ba5960c4
					
				
					共有  3 个文件被更改,包括 21 次插入 和 3 次删除
				
			
		|  | @ -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,11 +67,10 @@ 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')); | ||||
|         $this->db->where($this->config->item('table_name').'.station_id', $active_station_id); | ||||
|  | @ -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> | ||||
|  |  | |||
		正在加载…
	
		在新工单中引用