only show modes which are worked or confirmed in the dxcc summary (qso logging)

This commit is contained in:
HB9HIL
2024-11-12 14:35:08 +01:00
parent 1558060d25
commit f7e5df5736
3 changed files with 51 additions and 30 deletions

View File

@@ -51,6 +51,12 @@ class Lookup extends CI_Controller {
$data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type')));
}
if ($this->input->post('reduced_mode', true)) {
$data['reduced_mode'] = true;
} else {
$data['reduced_mode'] = false;
}
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
$data['was'] = xss_clean($this->input->post('was'));

View File

@@ -11,39 +11,53 @@ echo '
</thead>
<tbody>';
foreach ($result as $mode => $value) {
echo '<tr>
<td>'. strtoupper($mode) .'</td>';
foreach ($value as $key => $val) {
switch($type) {
// function displayContacts(searchphrase, band, sat, orbit, mode, type, qsl) {
case 'dxcc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","All","All","' . $mode . '","DXCC2")\'>' . $val . '</a>'; break;
case 'iota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","All","All","' . $mode . '","IOTA")\'>' . $val . '</a>'; break;
case 'vucc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","All","All","' . $mode . '","VUCC")\'>' . $val . '</a>'; break;
case 'cq': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","All","All","' . $mode . '","CQZone")\'>' . $val . '</a>'; break;
case 'was': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","All","All","' . $mode . '","WAS")\'>' . $val . '</a>'; break;
case 'sota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","All","All","' . $mode . '","SOTA")\'>' . $val . '</a>'; break;
case 'wwff': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","All","All","' . $mode . '","WWFF")\'>' . $val . '</a>'; break;
case 'itu': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $ituz).'","' . $key . '","All","All","' . $mode . '","ITU")\'>' . $val . '</a>'; break;
$showRow = true;
if ($reduced_mode) {
$showRow = false;
foreach ($value as $val) {
if ($val == 'W' || $val == 'C') {
$showRow = true;
break;
}
}
$info = '<td>';
if ($val == 'W') {
$info .= '<div class=\'bg-danger awardsBgDanger\'>' . $linkinfo . '</div>';
}
else if ($val == 'C') {
$info .= '<div class=\'bg-success awardsBgSuccess\'>' . $linkinfo . '</div>';
}
else {
$info .= $val;
}
$info .= '</td>';
echo $info;
}
echo '</tr>';
if ($showRow) {
echo '<tr>
<td>'. strtoupper($mode) .'</td>';
foreach ($value as $key => $val) {
switch($type) {
// function displayContacts(searchphrase, band, sat, orbit, mode, type, qsl) {
case 'dxcc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","All","All","' . $mode . '","DXCC2")\'>' . $val . '</a>'; break;
case 'iota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","All","All","' . $mode . '","IOTA")\'>' . $val . '</a>'; break;
case 'vucc': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","All","All","' . $mode . '","VUCC")\'>' . $val . '</a>'; break;
case 'cq': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","All","All","' . $mode . '","CQZone")\'>' . $val . '</a>'; break;
case 'was': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","All","All","' . $mode . '","WAS")\'>' . $val . '</a>'; break;
case 'sota': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","All","All","' . $mode . '","SOTA")\'>' . $val . '</a>'; break;
case 'wwff': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","All","All","' . $mode . '","WWFF")\'>' . $val . '</a>'; break;
case 'itu': $linkinfo = '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $ituz).'","' . $key . '","All","All","' . $mode . '","ITU")\'>' . $val . '</a>'; break;
}
$info = '<td>';
if ($val == 'W') {
$info .= '<div class=\'bg-danger awardsBgDanger\'>' . $linkinfo . '</div>';
}
else if ($val == 'C') {
$info .= '<div class=\'bg-success awardsBgSuccess\'>' . $linkinfo . '</div>';
}
else {
$info .= $val;
}
$info .= '</td>';
echo $info;
}
echo '</tr>';
}
}
echo '</tbody></table>';
?>

View File

@@ -815,6 +815,7 @@ function getDxccResult(dxcc, name) {
data: {
type: 'dxcc',
dxcc: dxcc,
reduced_mode: true,
},
success: function (html) {
$('.dxccsummary').remove();