当前提交
						cd8a38d717
					
				
					共有  3 个文件被更改,包括 9 次插入 和 9 次删除
				
			
		|  | @ -24,10 +24,9 @@ class Qrz extends CI_Controller { | ||||||
|         $station_ids = $this->logbook_model->get_station_id_with_qrz_api(); |         $station_ids = $this->logbook_model->get_station_id_with_qrz_api(); | ||||||
| 
 | 
 | ||||||
|         if ($station_ids) { |         if ($station_ids) { | ||||||
|             foreach ($station_ids as $station_id) { |             foreach ($station_ids as $station) { | ||||||
|                 $result = $this->logbook_model->exists_qrz_api_key($station_id); |                 $qrz_api_key = $station->qrzapikey; | ||||||
|                 $qrz_api_key = $result->qrzapikey; |                 if($this->mass_upload_qsos($station->station_id, $qrz_api_key)) { | ||||||
|                 if($this->mass_upload_qsos($station_id, $qrz_api_key)) { |  | ||||||
|                     echo "QSOs have been uploaded to QRZ.com."; |                     echo "QSOs have been uploaded to QRZ.com."; | ||||||
|                     log_message('info', 'QSOs have been uploaded to QRZ.com.'); |                     log_message('info', 'QSOs have been uploaded to QRZ.com.'); | ||||||
|                 } else{ |                 } else{ | ||||||
|  | @ -108,7 +107,7 @@ class Qrz extends CI_Controller { | ||||||
| 
 | 
 | ||||||
|         $data['page_title'] = "QRZ Logbook"; |         $data['page_title'] = "QRZ Logbook"; | ||||||
| 
 | 
 | ||||||
| 		$data['station_profiles'] = $this->stations->all(); | 		$data['station_profiles'] = $this->stations->all_of_user(); | ||||||
|         $data['station_profile'] = $this->stations->stations_with_qrz_api_key(); |         $data['station_profile'] = $this->stations->stations_with_qrz_api_key(); | ||||||
| 
 | 
 | ||||||
|         $this->load->view('interface_assets/header', $data); |         $this->load->view('interface_assets/header', $data); | ||||||
|  |  | ||||||
|  | @ -383,7 +383,7 @@ class Logbook_model extends CI_Model { | ||||||
|   */ |   */ | ||||||
|   function exists_qrz_api_key($station_id) { |   function exists_qrz_api_key($station_id) { | ||||||
|       $sql = 'select qrzapikey, qrzrealtime from station_profile |       $sql = 'select qrzapikey, qrzrealtime from station_profile | ||||||
|             where station_id = ' . $station_id; |             where station_id = ' . $station_id . ' and station_profile.user_id = ' . $this->session->userdata('user_id'); | ||||||
| 
 | 
 | ||||||
|       $query = $this->db->query($sql); |       $query = $this->db->query($sql); | ||||||
| 
 | 
 | ||||||
|  | @ -926,12 +926,12 @@ class Logbook_model extends CI_Model { | ||||||
|      * Function returns all the station_id's with QRZ API Key's |      * Function returns all the station_id's with QRZ API Key's | ||||||
|      */ |      */ | ||||||
|     function get_station_id_with_qrz_api() { |     function get_station_id_with_qrz_api() { | ||||||
|         $sql = 'select station_id from station_profile |         $sql = 'select station_id, qrzapikey from station_profile | ||||||
|             where coalesce(qrzapikey, "") <> ""'; |             where coalesce(qrzapikey, "") <> ""'; | ||||||
| 
 | 
 | ||||||
|         $query = $this->db->query($sql); |         $query = $this->db->query($sql); | ||||||
| 
 | 
 | ||||||
|         $result = $query->row(); |         $result = $query->result(); | ||||||
| 
 | 
 | ||||||
|         if ($result) { |         if ($result) { | ||||||
|             return $result; |             return $result; | ||||||
|  |  | ||||||
|  | @ -269,7 +269,8 @@ class Stations extends CI_Model { | ||||||
|                     " where COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
 |                     " where COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
 | ||||||
|                     group by station_id |                     group by station_id | ||||||
|                 ) as totc on station_profile.station_id = totc.station_id |                 ) as totc on station_profile.station_id = totc.station_id | ||||||
|                 where coalesce(station_profile.qrzapikey, '') <> ''";
 |                 where coalesce(station_profile.qrzapikey, '') <> '' | ||||||
|  | 				 and station_profile.user_id = " . $this->session->userdata('user_id');
 | ||||||
|         $query = $this->db->query($sql); |         $query = $this->db->query($sql); | ||||||
| 
 | 
 | ||||||
|         return $query; |         return $query; | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用