| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | <div class="container"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <br> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <h2><?php echo $page_title; ?></h2>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <div class="card"> | 
					
						
							|  |  |  |         <div class="card-header"> | 
					
						
							|  |  |  |             Request a QSL card | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |         <div class="card-body"> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |             <div class="stationinfo"> | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |                 <?php | 
					
						
							| 
									
										
										
										
											2023-04-18 02:04:23 +08:00
										 |  |  | 		if ($global_oqrs_text) { | 
					
						
							|  |  |  | 			echo $global_oqrs_text; | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 			echo '<br /><br />'; | 
					
						
							| 
									
										
										
										
											2023-04-18 02:04:23 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 		if ($groupedSearch == 'on') { | 
					
						
							| 
									
										
										
										
											2023-11-14 20:35:53 +08:00
										 |  |  | 			echo 'This search will search in all station locations where OQRS is active.<br /><br /><form class="d-flex align-items-center" onsubmit="return false;"><label class="my-1 me-2" for="oqrssearch">Enter your callsign: </label> | 
					
						
							| 
									
										
										
										
											2023-12-27 04:58:52 +08:00
										 |  |  | 			<input class="form-control me-sm-2 w-auto" id="oqrssearch" type="search" name="callsign" placeholder="Search Callsign" aria-label="Search" required="required"> | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 			<button onclick="searchOqrsGrouped();" class="btn btn-sm btn-primary" id="stationbuttonsubmit" type="button"><i class="fas fa-search"></i> Search</button> | 
					
						
							|  |  |  | 			</form>'; | 
					
						
							|  |  |  | 			echo '<div class="searchinfo"></div>'; | 
					
						
							| 
									
										
										
										
											2023-04-27 02:33:45 +08:00
										 |  |  | 			?>
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |                 <script> | 
					
						
							|  |  |  |                 // Get the input field
 | 
					
						
							|  |  |  |                 var input = document.getElementById("oqrssearch"); | 
					
						
							| 
									
										
										
										
											2023-04-27 02:33:45 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |                 // Execute a function when the user presses a key on the keyboard
 | 
					
						
							|  |  |  |                 input.addEventListener("keypress", function(event) { | 
					
						
							|  |  |  |                     // If the user presses the "Enter" key on the keyboard
 | 
					
						
							|  |  |  |                     if (event.key === "Enter") { | 
					
						
							|  |  |  |                         // Cancel the default action, if needed
 | 
					
						
							|  |  |  |                         event.preventDefault(); | 
					
						
							|  |  |  |                         // Trigger the button element with a click
 | 
					
						
							|  |  |  |                         document.getElementById("stationbuttonsubmit").click(); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 }); | 
					
						
							|  |  |  |                 </script> | 
					
						
							|  |  |  | 				</div> | 
					
						
							|  |  |  |                 <?php | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 			} else { | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 		  if ($stations->result() != NULL) { ?>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-14 20:35:53 +08:00
										 |  |  |                 <form class="d-flex align-items-center" enctype="multipart/form-data"> | 
					
						
							|  |  |  |                     <label class="my-1 me-2" for="station">Select station: </label> | 
					
						
							| 
									
										
										
										
											2023-11-29 03:34:18 +08:00
										 |  |  |                     <select id="station" class="form-select w-auto my-1 me-sm-2" name="station"> | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |                         <?php foreach($stations->result() as $station) { | 
					
						
							| 
									
										
										
										
											2022-12-23 02:59:42 +08:00
										 |  |  | 									echo '<option value="' . $station->station_id . '">' . $station->station_profile_name . ' - ' . $station->station_callsign . '</option>'."\n"; | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 								} ?>
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |                     </select> | 
					
						
							|  |  |  |                     <button id="button1id" type="button" onclick="loadStationInfo();" name="button1id" class="btn btn-sm btn-primary"> Proceed</button> | 
					
						
							|  |  |  |                 </form> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2023-06-13 02:27:18 +08:00
										 |  |  | 			<div class="resulttable"></div> | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-12 19:57:01 +08:00
										 |  |  |             <div class="searchinfo"></div> | 
					
						
							| 
									
										
										
										
											2023-11-29 03:34:18 +08:00
										 |  |  |             <?php | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-25 20:00:30 +08:00
										 |  |  | 		else { | 
					
						
							|  |  |  | 			echo 'No stations found that are using Cloudlog OQRS.'; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 		?>
 | 
					
						
							| 
									
										
										
										
											2022-11-16 01:29:33 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2023-06-13 02:27:18 +08:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2023-11-29 03:34:18 +08:00
										 |  |  | </div> |