kopia lustrzana https://github.com/magicbug/Cloudlog
				
				
				
			renamed station profile to station location
only show station locations of user check station location user in backendpull/1297/head
							rodzic
							
								
									aad1823e15
								
							
						
					
					
						commit
						309803e252
					
				|  | @ -144,7 +144,7 @@ class adif extends CI_Controller { | |||
| 		$data['page_title'] = "ADIF Import / Export"; | ||||
| 		$data['max_upload'] = ini_get('upload_max_filesize'); | ||||
| 
 | ||||
| 		$data['station_profile'] = $this->stations->all(); | ||||
| 		$data['station_profile'] = $this->stations->all_of_user(); | ||||
|         $active_station_id = $this->stations->find_active(); | ||||
|         $station_profile = $this->stations->profile($active_station_id); | ||||
| 
 | ||||
|  | @ -157,7 +157,7 @@ class adif extends CI_Controller { | |||
| 
 | ||||
| 	public function import() { | ||||
| 		$this->load->model('stations'); | ||||
| 		$data['station_profile'] = $this->stations->all(); | ||||
| 		$data['station_profile'] = $this->stations->all_of_user(); | ||||
| 
 | ||||
|         $active_station_id = $this->stations->find_active(); | ||||
|         $station_profile = $this->stations->profile($active_station_id); | ||||
|  |  | |||
|  | @ -68,6 +68,13 @@ class adif_data extends CI_Model { | |||
|     } | ||||
| 
 | ||||
|     function export_custom($from, $to, $station_id, $exportLotw = false) { | ||||
|         // be sure that station belongs to user
 | ||||
|         $CI =& get_instance(); | ||||
|         $CI->load->model('Stations'); | ||||
|         if (!$CI->Stations->check_station_is_accessible($station_id)) { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         $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', $station_id); | ||||
|  |  | |||
|  | @ -1751,6 +1751,13 @@ class Logbook_model extends CI_Model { | |||
|      * $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF | ||||
|      */ | ||||
| 	function import($record, $station_id = "0", $skipDuplicate = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false, $operatorName = false) { | ||||
|         // be sure that station belongs to user
 | ||||
|         $CI =& get_instance(); | ||||
|         $CI->load->model('Stations'); | ||||
|         if (!$CI->Stations->check_station_is_accessible($station_id)) { | ||||
|             return 'Station not accessible<br>'; | ||||
|         } | ||||
| 
 | ||||
|         $CI =& get_instance(); | ||||
|         $CI->load->library('frequency'); | ||||
|         $my_error = ""; | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ | |||
| 
 | ||||
|                 <form class="form" action="<?php echo site_url('adif/import'); ?>" 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> | ||||
|                     <option value="0">Select Station Location</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 } ?>
 | ||||
|  | @ -98,7 +98,7 @@ | |||
|                 <h5 class="card-title">Take your logbook file anywhere!</h5> | ||||
|                 <p class="card-text">Exporting ADIFs allows you to import contacts into third party applications like LoTW, Awards or just for keeping a backup.</p> | ||||
| 					  <select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;"> | ||||
| 						  <option value="0">Select Station Profile</option> | ||||
| 						  <option value="0">Select Station Location</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 } ?>
 | ||||
|  | @ -155,7 +155,7 @@ | |||
|         <div class="tab-pane fade" id="lotw" role="tabpanel" aria-labelledby="home-tab"> | ||||
|             <form class="form" action="<?php echo site_url('adif/mark_lotw'); ?>" 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> | ||||
| 					<option value="0">Select Station Location</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 } ?>
 | ||||
|  |  | |||
|  | @ -61,7 +61,7 @@ | |||
| 
 | ||||
| 				<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> | ||||
| 						<option value="0">Select Station Location</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 } ?>
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Thomas Werzmirzowsky
						Thomas Werzmirzowsky