exchanges on various sections within cloudlog
Squashed commit of the following:
commit 89edbf3ddadd7d796ba5412388f66d14e3e9ac17
Author: phl0 <florian@florian-wolters.de>
Date:   Wed Jan 12 20:47:17 2022 +0100
    Fix flicker issue on gridmaps page (by LA8AJA)
commit 5b0c2672aadbf0451ec52ecc65745e880b44ef8f
Author: phl0 <florian@florian-wolters.de>
Date:   Wed Jan 12 19:36:31 2022 +0100
    Also show tooltips for contest name
commit 88e091f65ace6bdbae3d605839665fdd457ea943
Author: phl0 <florian@florian-wolters.de>
Date:   Wed Jan 12 19:08:31 2022 +0100
    Enable QSL tooltips also for QSO list in qslprint section
commit 91b81a0b2ba531e867f82197fe1b201e24785dd2
Author: phl0 <florian@florian-wolters.de>
Date:   Tue Jan 11 17:46:38 2022 +0100
    Prevent display of empty date values
commit a66be2dab1d23b15fa41df0a2c9a0c41f455afff
Author: phl0 <florian@florian-wolters.de>
Date:   Tue Jan 11 17:12:43 2022 +0100
    Make tooltip work also for gridsquares section
    Tnx @AndreasK79
commit 92c13483b9c71d55fa3d863d426b300cf008dd31
Author: phl0 <florian@florian-wolters.de>
Date:   Tue Jan 11 15:37:21 2022 +0100
    Implement tooltip hints also for other awards sections
commit 625c0e73c5dd5823301d888be4d0b3419a76f1db
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 19:28:47 2022 +0100
    Implement tooltip for awards section
commit 0fe9061ecf3e4b8d9826dee62779e2493124d8a5
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 16:57:35 2022 +0100
    Fix bug with extra quotes if manager defined
commit cb8e4d1e4343670a60bc93ac3e87d54d45d0a9fd
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 16:18:44 2022 +0100
    Small bugix
commit 5bca33b7a1dca1b89d0921a8e0890fc1aebccedd
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 15:42:31 2022 +0100
    Add missing translations for electronic QSL
commit 617f58a6217aa385225eab27bfe577ad55b7ff37
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 00:40:32 2022 +0100
    Enable tooltips also for search results
commit 432a1b283a19196618d4c809545d01cef4f630d3
Author: phl0 <florian@florian-wolters.de>
Date:   Mon Jan 10 00:18:33 2022 +0100
    Also QSL method/manager info
commit b43e7a1419c75a199c0a28c9849f2b09e0c62288
Author: phl0 <florian@florian-wolters.de>
Date:   Sun Jan 9 23:28:54 2022 +0100
    Show details for paper QSLs
commit 1759d94d8af7299684265700cec51fe0591623dc
Author: phl0 <florian@florian-wolters.de>
Date:   Fri Jan 7 17:51:17 2022 +0100
    Add tooltip hints for QSL sent/rcvd dates
		
	
			
		
			
				
	
	
		
			258 行
		
	
	
	
		
			11 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			258 行
		
	
	
	
		
			11 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| function echo_table_header_col($ctx, $name) {
 | |
| 	switch($name) {
 | |
| 		case 'Mode': echo '<th>'.$ctx->lang->line('gen_hamradio_mode').'</th>'; break;
 | |
| 		case 'RSTS': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rsts').'</th>'; break;
 | |
| 		case 'RSTR': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rstr').'</th>'; break;
 | |
| 		case 'Country': echo '<th>'.$ctx->lang->line('general_word_country').'</th>'; break;
 | |
| 		case 'IOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_iota').'</th>'; break;
 | |
| 		case 'SOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_sota').'</th>'; break;
 | |
| 		case 'State': echo '<th>'.$ctx->lang->line('gen_hamradio_state').'</th>'; break;
 | |
| 		case 'Grid': echo '<th>'.$ctx->lang->line('gen_hamradio_gridsquare').'</th>'; break;
 | |
| 		case 'Band': echo '<th>'.$ctx->lang->line('gen_hamradio_band').'</th>'; break;
 | |
| 		case 'Operator': echo '<th>'.$ctx->lang->line('gen_hamradio_operator').'</th>'; break;
 | |
| 	}
 | |
| }
 | |
| 
 | |
| function echo_table_col($row, $name) {
 | |
| 	switch($name) {
 | |
| 		case 'Mode':    echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '</td>'; break;
 | |
|       case 'RSTS':    echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
 | |
|       case 'RSTR':    echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
 | |
| 		case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))) . '</td>'; break;
 | |
| 		case 'IOTA':    echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
 | |
| 		case 'SOTA':    echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
 | |
| 		case 'Grid':    echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE . '</td>'; break;
 | |
| 		case 'Band':    echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } echo '</td>'; break;
 | |
| 		case 'State':   echo '<td>' . ($row->COL_STATE) . '</td>'; break;
 | |
| 		case 'Operator': echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;
 | |
| 	}
 | |
| }
 | |
| ?>
 | |
| <div class="container dashboard">
 | |
| <?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
 | |
| 
 | |
| 	<?php if($todays_qsos >= 1) { ?>
 | |
| 		<div class="alert alert-success" role="alert">
 | |
| 			  <?php echo $this->lang->line('dashboard_you_have_had'); ?> <strong><?php echo $todays_qsos; ?></strong> <?php echo $this->lang->line('dashboard_qsos_today'); ?>
 | |
| 		</div>
 | |
| 	<?php } else { ?>
 | |
| 		<div class="alert alert-warning" role="alert">
 | |
| 			  <span class="badge badge-info"><?php echo $this->lang->line('general_word_important'); ?></span> <i class="fas fa-broadcast-tower"></i> <?php echo $this->lang->line('notice_turn_the_radio_on'); ?>
 | |
| 		</div>
 | |
| 	<?php } ?>
 | |
| 
 | |
| 	<?php if($current_active == 0) { ?>
 | |
| 		<div class="alert alert-danger" role="alert">
 | |
| 		  <?php echo $this->lang->line('error_no_active_station_profile'); ?>
 | |
| 		</div>
 | |
| 	<?php } ?>
 | |
| 
 | |
| <?php } ?>
 | |
| </div>
 | |
| 
 | |
| <!-- Map -->
 | |
| <div id="map" style="width: 100%; height: 350px"></div>
 | |
| 
 | |
| <div style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
 | |
| 
 | |
| <!-- Log Data -->
 | |
| <div class="row logdata">
 | |
|   <div class="col-sm-8">
 | |
| 
 | |
|   	<div class="table-responsive">
 | |
|     	<table class="table table-striped table-hover">
 | |
| 
 | |
|     		<thead>
 | |
| 				<tr class="titles">
 | |
| 					<th><?php echo $this->lang->line('general_word_date'); ?></th>
 | |
| 
 | |
| 					<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
 | |
| 					<th><?php echo $this->lang->line('general_word_time'); ?></th>
 | |
| 					<?php } ?>
 | |
| 					<th><?php echo $this->lang->line('gen_hamradio_call'); ?></th>
 | |
| 					<?php
 | |
| 					echo_table_header_col($this, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
 | |
| 					echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
 | |
| 					echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
 | |
| 					echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
 | |
| 				?>
 | |
| 				</tr>
 | |
| 			</thead>
 | |
| 
 | |
| 			<?php
 | |
| 			$i = 0;
 | |
| 			if(!empty($last_five_qsos) > 0) {
 | |
| 			foreach ($last_five_qsos->result() as $row) { ?>
 | |
| 				<?php  echo '<tr class="tr'.($i & 1).'">'; ?>
 | |
| 
 | |
| 					<?php
 | |
| 
 | |
| 					// Get Date format
 | |
| 					if($this->session->userdata('user_date_format')) {
 | |
| 						// If Logged in and session exists
 | |
| 						$custom_date_format = $this->session->userdata('user_date_format');
 | |
| 					} else {
 | |
| 						// Get Default date format from /config/cloudlog.php
 | |
| 						$custom_date_format = $this->config->item('qso_date_format');
 | |
| 					}
 | |
| 
 | |
| 					?>
 | |
| 
 | |
| 					<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
 | |
| 					<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
 | |
| 					<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
 | |
| 
 | |
| 					<?php } ?>
 | |
| 					<td>
 | |
|                         <a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","Ø",strtoupper($row->COL_CALL)); ?></a>
 | |
| 					</td>
 | |
| 					<?php
 | |
| 						echo_table_col($row, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
 | |
| 						echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
 | |
| 						echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
 | |
| 						echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
 | |
| 					?>
 | |
| 				</tr>
 | |
| 			<?php $i++; } } ?>
 | |
| 		</table>
 | |
| 	</div>
 | |
|   </div>
 | |
| 
 | |
|   <div class="col-sm-4">
 | |
|   	<div class="table-responsive">
 | |
| 
 | |
| 		<?php if($radio_status->num_rows()) { ?>
 | |
| 
 | |
| 			<table class="table table-striped">
 | |
| 					<tr class="titles">
 | |
| 						<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
 | |
| 					</tr>
 | |
| 
 | |
| 					<?php foreach ($radio_status->result_array() as $row) { ?>
 | |
| 					<tr>
 | |
| 						<td><?php echo $row['radio']; ?></td>
 | |
| 						<td>
 | |
| 							<?php if($row['radio'] == "SatPC32") { ?>
 | |
| 								<?php echo $row['sat_name']; ?>
 | |
| 							<?php } else { ?>
 | |
| 								<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
 | |
| 							<?php } ?>
 | |
| 						</td>
 | |
| 					</tr>
 | |
| 					<?php } ?>
 | |
| 
 | |
| 				</table>
 | |
| 
 | |
| 		<?php } ?>
 | |
| 
 | |
|     	<table class="table table-striped">
 | |
| 			<tr class="titles">
 | |
| 				<td colspan="2"><i class="fas fa-chart-bar"></i> <?php echo $this->lang->line('dashboard_qso_breakdown'); ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_total'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_qsos; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_year'); ?></td>
 | |
| 				<td width="50%"><?php echo $year_qsos; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_month'); ?></td>
 | |
| 				<td width="50%"><?php echo $month_qsos; ?></td>
 | |
| 			</tr>
 | |
| 		</table>
 | |
| 
 | |
| 
 | |
| 
 | |
| 		<table class="table table-striped">
 | |
| 			<tr class="titles">
 | |
| 				<td colspan="2"><i class="fas fa-globe-europe"></i> <?php echo $this->lang->line('dashboard_countries_breakdown'); ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_worked'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_countries; ?></td>
 | |
| 			</tr>
 | |
| 			<tr>
 | |
| 				<td width="50%"><a href="#" onclick="return false" data-original-title="QSL Cards / eQSL / LoTW" data-toggle="tooltip"><?php echo $this->lang->line('general_word_confirmed'); ?></a></td>
 | |
| 				<td width="50%">
 | |
| 					<?php echo $total_countries_confirmed_paper; ?> /
 | |
| 					<?php echo $total_countries_confirmed_eqsl; ?> /
 | |
| 					<?php echo $total_countries_confirmed_lotw; ?>
 | |
| 				</td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_needed'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_countries_needed; ?></td>
 | |
| 			</tr>
 | |
| 		</table>
 | |
| 
 | |
| 		<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_qsl_sent != 0 || $total_qsl_recv != 0 || $total_qsl_requested != 0)) { ?>
 | |
| 		<table class="table table-striped">
 | |
| 			<tr class="titles">
 | |
| 				<td colspan="2"><i class="fas fa-envelope"></i> <?php echo $this->lang->line('general_word_qslcards'); ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_sent'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_qsl_sent; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_received'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_qsl_recv; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_requested'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_qsl_requested; ?></td>
 | |
| 			</tr>
 | |
| 		</table>
 | |
| 		<?php } ?>
 | |
| 
 | |
| 		<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_eqsl_sent != 0 || $total_eqsl_recv != 0)) { ?>
 | |
| 		<table class="table table-striped">
 | |
| 			<tr class="titles">
 | |
| 				<td colspan="2"><i class="fas fa-address-card"></i> <?php echo $this->lang->line('general_word_eqslcards'); ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_sent'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_eqsl_sent; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_received'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_eqsl_recv; ?></td>
 | |
| 			</tr>
 | |
| 		</table>
 | |
| 		<?php } ?>
 | |
| 
 | |
| 		<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_lotw_sent != 0 || $total_lotw_recv != 0)) { ?>
 | |
| 		<table class="table table-striped">
 | |
| 			<tr class="titles">
 | |
| 				<td colspan="2"><i class="fas fa-list"></i> <?php echo $this->lang->line('general_word_lotw'); ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_sent'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_lotw_sent; ?></td>
 | |
| 			</tr>
 | |
| 
 | |
| 			<tr>
 | |
| 				<td width="50%"><?php echo $this->lang->line('general_word_received'); ?></td>
 | |
| 				<td width="50%"><?php echo $total_lotw_recv; ?></td>
 | |
| 			</tr>
 | |
| 		</table>
 | |
| 		<?php } ?>
 | |
| 	</div>
 | |
|   </div>
 | |
| </div>
 | |
| 
 | |
| </div>
 |