Separate SAT and All without SATS

This commit is contained in:
Andreas Kristiansen
2026-03-03 07:46:01 +01:00
parent f5bc742a60
commit e7339f83f2
2 changed files with 81 additions and 87 deletions

View File

@@ -172,7 +172,7 @@
<label class="col-md-2 control-label" for="band2"><?= __("Band"); ?></label>
<div class="col-md-3">
<select id="band2" name="band" class="form-select form-select-sm">
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> ><?= __("Every band"); ?></option>
<option value="All" <?php if ($this->input->post('band') == "All" || $this->input->method() !== 'post') echo ' selected'; ?> ><?= __("Every band (w/o SAT)"); ?></option>
<?php foreach($worked_bands as $band) {
echo '<option value="' . $band . '"';
if ($this->input->post('band') == $band) echo ' selected';
@@ -260,63 +260,60 @@
<?php
$i = 1;
if ($dxcc_array) {
echo __('Legend:');
echo '<pre>'.__("(Q)SL-Paper-Card").", ";
echo __("(L)oTW").", ";
echo __("(e)QSL").", ";
echo __('QR(Z)-"confirmation"').", ";
echo __("(C)lublog").", ";
echo __("(W)orked").'</pre>';
echo '
echo __('Legend:');
echo '<pre>'.__("(Q)SL-Paper-Card").", ";
echo __("(L)oTW").", ";
echo __("(e)QSL").", ";
echo __('QR(Z)-"confirmation"').", ";
echo __("(C)lublog").", ";
echo __("(W)orked").'</pre>';
echo '
<table style="width:100%" class="table-sm table tabledxcc table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<thead>
<tr>
<td>#</td>
<td>' . __("DXCC Name") . '</td>
<td>' . __("Prefix") . '</td>';
foreach($bands as $band) {
echo '<td>' . $band . '</td>';
}
echo '</tr>
</thead>
<tbody>';
foreach($bands as $band) {
if (($posted_band != 'SAT') && ($band == 'SAT')) {
continue;
}
echo '<td>' . $band . '</td>';
}
echo '</tr>
</thead>
<tbody>';
foreach ($dxcc_array as $dxcc => $value) { // Fills the table with the data
echo '<tr>
<td>'. $i++ .'</td>';
foreach ($value as $name => $key) {
if (isset($value['Deleted']) && $value['Deleted'] == 1 && $name == "name") {
echo '<td style="text-align: center">' . $key . ' <span class="badge text-bg-danger">'.__("Deleted DXCC").'</span></td>';
} else if ($name == "Deleted") {
continue;
} else {
echo '<td style="text-align: center">' . $key . '</td>';
}
}
echo '</tr>';
}
echo '</table>
<h2>' . __("Summary") . '</h2>
echo '<tr>
<td>'. $i++ .'</td>';
foreach ($value as $name => $key) {
if (isset($value['Deleted']) && $value['Deleted'] == 1 && $name == "name") {
echo '<td style="text-align: center">' . $key . ' <span class="badge text-bg-danger">'.__("Deleted DXCC").'</span></td>';
} else if ($name == "Deleted") {
continue;
} else {
echo '<td style="text-align: center">' . $key . '</td>';
}
}
echo '</tr>';
}
echo '</table>
<h2>' . __("Summary") . '</h2>
<table class="table-sm tablesummary table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr><td></td>';
<table class="table-sm tablesummary table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr><td></td>';
$addsat='';
foreach($bands as $band) {
if ($band != 'SAT') {
echo '<td>' . $band . '</td>';
} else {
$addsat='<td>' . $band . '</td>';
}
}
if ($posted_band != 'SAT') {
echo '<td><b>' . __("Total (ex SAT)") . '</b></td>';
foreach($bands as $band) {
if (($posted_band != 'SAT') && ($band == 'SAT')) {
continue;
}
if (count($bands) > 1) {
echo '<td class="spacingcell"></td>';
}
echo $addsat;
echo '
echo '<td>' . $band . '</td>';
}
if ($posted_band != 'SAT') {
echo '<td><b>' . __("Total (ex SAT)") . '</b></td>';
}
echo '
</tr>
</thead>
<tbody>
@@ -324,55 +321,43 @@
<tr><td>' . __("Total worked") . '</td>';
$addsat='';
foreach ($dxcc_summary['worked'] as $band => $dxcc) { // Fills the table with the data
if ($posted_band == 'SAT' && $band == 'Total') {
if (($posted_band != 'SAT') && ($band == 'SAT')) {
continue;
}
if ($band != 'SAT') {
echo '<td style="text-align: center">';
if ($band == 'Total') {
echo '<b>'.$dxcc.'</b>';
} else {
echo $dxcc;
}
echo '</td>';
} else {
$addsat='<td style="text-align: center">' . $dxcc . '</td>';
if (($posted_band == 'SAT') && ($band == 'Total')) {
continue;
}
}
if (count($bands) > 1) {
echo '<td class="spacingcell"></td>';
}
if ($addsat != '' && count($dxcc_summary['worked']) > 1) {
echo $addsat;
echo '<td style="text-align: center">';
if ($band == 'Total' && $posted_band != 'SAT') {
echo '<b>'.$dxcc.'</b>';
} else {
echo $dxcc;
}
echo '</td>';
}
echo '</tr><tr>
<td>' . __("Total confirmed") . '</td>';
$addsat='';
foreach ($dxcc_summary['confirmed'] as $band => $dxcc) { // Fills the table with the data
if ($posted_band == 'SAT' && $band == 'Total') {
if (($posted_band != 'SAT') && ($band == 'SAT')) {
continue;
}
if ($band != 'SAT') {
echo '<td style="text-align: center">';
if ($band == 'Total') {
echo '<b>'.$dxcc.'</b>';
} else {
echo $dxcc;
}
echo '</td>';
} else {
$addsat='<td style="text-align: center">' . $dxcc . '</td>';
}
}
if (count($bands) > 1) {
echo '<td class="spacingcell"></td>';
}
if ($addsat != '' && count($dxcc_summary['confirmed']) > 1) {
echo $addsat;
if (($posted_band == 'SAT') && ($band == 'Total')) {
continue;
}
echo '<td style="text-align: center">';
if (($posted_band != 'SAT') && ($band == 'Total')) {
echo '<b>'.$dxcc.'</b>';
} else {
echo $dxcc;
}
echo '</td>';
}
echo '</tr>
@@ -380,7 +365,7 @@
</div>';
} else {
echo '<div class="alert alert-danger" role="alert">' . __("No results found for your search criteria. Please try again.") . '</div>';
echo '<div class="alert alert-danger" role="alert">' . __("No results found for your search criteria. Please try again.") . '</div>';
}
?>
</div>