| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | <div class="container"> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 	<br> | 
					
						
							|  |  |  | 		<?php if($this->session->flashdata('message')) { ?>
 | 
					
						
							|  |  |  | 			<!-- Display Message --> | 
					
						
							|  |  |  | 			<div class="alert-message error"> | 
					
						
							|  |  |  | 			  <p><?php echo $this->session->flashdata('message'); ?></p>
 | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 		<?php } ?>
 | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	<h2><?php echo $page_title; ?></h2>
 | 
					
						
							|  |  |  | 	 | 
					
						
							| 
									
										
										
										
											2023-08-02 21:44:37 +08:00
										 |  |  | 	<div class="card" style="margin-bottom: 15px;"> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 		  <div class="card-header"> | 
					
						
							|  |  |  | 			QSO-DB Maintenance | 
					
						
							|  |  |  | 		  </div> | 
					
						
							| 
									
										
										
										
											2023-10-27 19:28:53 +08:00
										 |  |  | 		<?php if(!empty($qsos_with_no_station_id)) { ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 21:44:37 +08:00
										 |  |  | 					<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;"> | 
					
						
							| 
									
										
										
										
											2023-10-27 19:28:53 +08:00
										 |  |  | 						<span class="badge badge-pill badge-warning">Warning</span> The Database contains <?php echo count($qsos_with_no_station_id); ?> QSO<?php echo count($qsos_with_no_station_id) > 1 ? 's' : '' ?> without a station-profile (location)<br/>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 					</div> | 
					
						
							|  |  |  | 		  <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2023-10-27 19:28:53 +08:00
										 |  |  | 		  <div class?"table-responsive"> | 
					
						
							|  |  |  | 				<table id="unasigned_qsos_table" class="table table-sm table-striped"> | 
					
						
							|  |  |  | 					<thead> | 
					
						
							|  |  |  | 						<tr> | 
					
						
							| 
									
										
										
										
											2023-10-28 22:06:32 +08:00
										 |  |  | 							<th scope="col"><input type="checkbox" onClick="toggleAll(this)"></th> | 
					
						
							| 
									
										
										
										
											2023-10-27 19:28:53 +08:00
										 |  |  | 							<th scope="col">Date</th> | 
					
						
							|  |  |  | 							<th scope="col">Time</th> | 
					
						
							|  |  |  | 							<th scope="col">Call</th> | 
					
						
							|  |  |  | 							<th scope="col">Mode</th> | 
					
						
							|  |  |  | 							<th scope="col">Band</th> | 
					
						
							|  |  |  | 						</tr> | 
					
						
							|  |  |  | 						<?php if($this->session->userdata('user_date_format')) { | 
					
						
							|  |  |  | 									$custom_date_format = $this->session->userdata('user_date_format'); | 
					
						
							|  |  |  | 								} else { | 
					
						
							|  |  |  | 									$custom_date_format = 'd.m.Y'; | 
					
						
							|  |  |  | 								} | 
					
						
							|  |  |  | 								foreach ($qsos_with_no_station_id as $qso) { | 
					
						
							|  |  |  | 									echo '<tr>'; | 
					
						
							| 
									
										
										
										
											2023-10-28 22:06:32 +08:00
										 |  |  | 									echo '<td><input type="checkbox" id="'.$qso->COL_PRIMARY_KEY.'" name="cBox[]" value="'.$qso->COL_PRIMARY_KEY.'"></td>'; | 
					
						
							| 
									
										
										
										
											2023-10-27 19:28:53 +08:00
										 |  |  | 									$timestamp = strtotime($qso->COL_TIME_ON); | 
					
						
							|  |  |  | 									echo '<td>'.date($custom_date_format, $timestamp).'</td>'; | 
					
						
							|  |  |  | 									$timestamp = strtotime($qso->COL_TIME_ON); | 
					
						
							|  |  |  | 									echo '<td>'.date('H:i', $timestamp).'</td>'; | 
					
						
							|  |  |  | 									echo '<td>'.$qso->COL_CALL.'</td>'; | 
					
						
							|  |  |  | 									echo '<td>'.$qso->COL_MODE.'</td>'; | 
					
						
							|  |  |  | 									echo '<td>'.$qso->COL_BAND.'</td>'; | 
					
						
							|  |  |  | 									echo '</tr>'; | 
					
						
							|  |  |  | 								} ?>
 | 
					
						
							|  |  |  | 					</thead> | 
					
						
							|  |  |  | 					<tbody> | 
					
						
							|  |  |  | 					</tbody> | 
					
						
							|  |  |  | 				</table> | 
					
						
							|  |  |  | 		  </div> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 		  	<p class="card-text">Please reassign those QSOs to an existing station location:</p> | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		 	<div class="table-responsive"> | 
					
						
							|  |  |  | 				<table id="station_locations_table" class="table table-sm table-striped"> | 
					
						
							|  |  |  | 					<thead> | 
					
						
							|  |  |  | 						<tr> | 
					
						
							|  |  |  | 							<th scope="col">Call</th> | 
					
						
							|  |  |  | 							<th scope="col">Target Location</th> | 
					
						
							|  |  |  | 							<th scope="col">Reassign</th> | 
					
						
							|  |  |  | 						</tr> | 
					
						
							|  |  |  | 					</thead> | 
					
						
							|  |  |  | 					<tbody> | 
					
						
							|  |  |  | 		<?php  | 
					
						
							| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | 		foreach ($calls_wo_sid as $call) { | 
					
						
							| 
									
										
										
										
											2023-10-29 08:43:22 +08:00
										 |  |  | 			echo '<tr><td><div id="station_call">'.$call['COL_STATION_CALLSIGN'].'</div></td><td><select name="station_profile" id="station_profile" onChange="updateCallsign(this)">'; | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 			$options=''; | 
					
						
							|  |  |  | 			foreach ($stations->result() as $station) { | 
					
						
							|  |  |  | 				$options.='<option value='.$station->station_id.'>'.$station->station_profile_name.' ('.$station->station_callsign.')</option>'; | 
					
						
							|  |  |  | 			} | 
					
						
							| 
									
										
										
										
											2023-10-28 22:06:32 +08:00
										 |  |  | 			echo $options.'</select></td><td><button class="btn btn-warning" onClick="reassign(\''.$call['COL_STATION_CALLSIGN'].'\',$(\'#station_profile option:selected\').val());"><i class="fas fa-sync"></i> Reassign</a></button></td></tr>'; | 
					
						
							| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | 		} ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 					</tbody> | 
					
						
							|  |  |  | 				</table> | 
					
						
							|  |  |  | 		  	</div> | 
					
						
							|  |  |  | 		 </div> | 
					
						
							|  |  |  | 		<?php  | 
					
						
							|  |  |  | 			} else { ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 21:44:37 +08:00
										 |  |  | 		<div class="alert alert-secondary" role="alert" style="margin-bottom: 0px !important;"> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 			<span class="badge badge-pill badge-success">Everything ok</span> Every QSO in your Database is assigned to a station-profile (location) | 
					
						
							|  |  |  | 		</div> | 
					
						
							| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | 		<?php } ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 	  </div> | 
					
						
							| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 	  <div class="card"> | 
					
						
							|  |  |  | 		  <div class="card-header"> | 
					
						
							|  |  |  | 			Settings Maintenance | 
					
						
							|  |  |  | 		  </div> | 
					
						
							|  |  |  | 		<?php if(!$this->config->item('cl_multilanguage')) { ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 21:44:37 +08:00
										 |  |  | 					<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;"> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 						<span class="badge badge-pill badge-warning">Warning</span> You didn't enabled Multilanguage support in your config.php | 
					
						
							|  |  |  | 					</div> | 
					
						
							|  |  |  | 		  <div class="card-body"> | 
					
						
							|  |  |  | 		  	<p class="card-text">Please edit your ./application/config/config.php File and add some rows to it:</br></br> | 
					
						
							|  |  |  | 			Go to your application/config Folder and compare config.sample.php with your config.php</br> | 
					
						
							|  |  |  | 			You'll probably find a block with language-settings. Please include this block into your current config.php | 
					
						
							|  |  |  | 			</p> | 
					
						
							|  |  |  | 		  </div>	 | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		<?php  | 
					
						
							|  |  |  | 		} else { ?>
 | 
					
						
							| 
									
										
										
										
											2023-08-02 21:44:37 +08:00
										 |  |  | 		<div class="alert alert-secondary" role="alert" style="margin-bottom: 0px !important;"> | 
					
						
							| 
									
										
										
										
											2023-08-02 14:34:12 +08:00
										 |  |  | 			<span class="badge badge-pill badge-success">Everything ok</span> You have enabled Multuser-Language support | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 		<?php } ?>
 | 
					
						
							|  |  |  | 	  </div> | 
					
						
							| 
									
										
										
										
											2023-08-01 16:59:36 +08:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 |