mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Bands without sat
This commit is contained in:
@@ -79,6 +79,9 @@ class WAE extends CI_Model {
|
|||||||
|
|
||||||
// Initialize all bands to dash
|
// Initialize all bands to dash
|
||||||
foreach ($bands as $band) {
|
foreach ($bands as $band) {
|
||||||
|
if (($postdata['band'] != 'SAT') && ($band == 'SAT')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$dxccMatrix[$adif][$band] = '-';
|
$dxccMatrix[$adif][$band] = '-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,6 +91,9 @@ class WAE extends CI_Model {
|
|||||||
$dxccMatrix[$region]['name'] = $info['name'];
|
$dxccMatrix[$region]['name'] = $info['name'];
|
||||||
$dxccMatrix[$region]['Dxccprefix'] = $info['prefix'];
|
$dxccMatrix[$region]['Dxccprefix'] = $info['prefix'];
|
||||||
foreach ($bands as $band) {
|
foreach ($bands as $band) {
|
||||||
|
if (($postdata['band'] != 'SAT') && ($band == 'SAT')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$dxccMatrix[$region][$band] = '-';
|
$dxccMatrix[$region][$band] = '-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,60 +177,63 @@ class WAE extends CI_Model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($waeDataSat as $wae) {
|
if ($postdata['band'] == 'SAT') {
|
||||||
// Skip if this band is not in our requested bands list
|
|
||||||
if (!isset($validBands['SAT'])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use region only if it's a valid WAE region, otherwise use DXCC
|
foreach ($waeDataSat as $wae) {
|
||||||
$entityKey = (!empty($wae->col_region) && in_array($wae->col_region, $this->validWaeRegions)) ? $wae->col_region : (string)$wae->dxcc;
|
// Skip if this band is not in our requested bands list
|
||||||
|
if (!isset($validBands['SAT'])) {
|
||||||
// Track worked status for this entity
|
continue;
|
||||||
if (!isset($entityWorkedStatus[$entityKey])) {
|
|
||||||
$entityWorkedStatus[$entityKey] = 0;
|
|
||||||
}
|
|
||||||
$entityWorkedStatus[$entityKey]++;
|
|
||||||
|
|
||||||
// Check if confirmed based on the confirmation types selected in postdata
|
|
||||||
$isConfirmed = false;
|
|
||||||
$confirmationLetters = '';
|
|
||||||
if (isset($postdata['qsl']) && $postdata['qsl'] == 1 && $wae->qsl > 0) {
|
|
||||||
$isConfirmed = true;
|
|
||||||
$confirmationLetters .= 'Q';
|
|
||||||
}
|
|
||||||
if (isset($postdata['lotw']) && $postdata['lotw'] == 1 && $wae->lotw > 0) {
|
|
||||||
$isConfirmed = true;
|
|
||||||
$confirmationLetters .= 'L';
|
|
||||||
}
|
|
||||||
if (isset($postdata['eqsl']) && $postdata['eqsl'] == 1 && $wae->eqsl > 0) {
|
|
||||||
$isConfirmed = true;
|
|
||||||
$confirmationLetters .= 'E';
|
|
||||||
}
|
|
||||||
if (isset($postdata['qrz']) && $postdata['qrz'] == 1 && $wae->qrz > 0) {
|
|
||||||
$isConfirmed = true;
|
|
||||||
$confirmationLetters .= 'Z';
|
|
||||||
}
|
|
||||||
if (isset($postdata['clublog']) && $postdata['clublog'] == 1 && $wae->clublog > 0) {
|
|
||||||
$isConfirmed = true;
|
|
||||||
$confirmationLetters .= 'C';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($isConfirmed) {
|
|
||||||
$dxccMatrix[$entityKey]['SAT'] = '<div class="bg-success awardsBgSuccess" additional_successinfo=">C<"><a href=\'javascript:displayContacts("'.$entityKey.'","SAT","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE","'.$qsl.'","'.$postdata['dateFrom'].'","'.$postdata['dateTo'].'")\'>'.$confirmationLetters.'</a></div>';
|
|
||||||
// Track confirmed entities for summary
|
|
||||||
if (!isset($confirmedEntities['SAT'][$entityKey])) {
|
|
||||||
$confirmedEntities['SAT'][$entityKey] = true;
|
|
||||||
$summary['confirmed']['SAT']++;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$dxccMatrix[$entityKey]['SAT'] = '<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$entityKey.'","SAT","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "", "'.$postdata['dateFrom'].'", "'.$postdata['dateTo'].'")\'>W</a></div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Track worked entities for summary
|
// Use region only if it's a valid WAE region, otherwise use DXCC
|
||||||
if (!isset($workedEntities['SAT'][$entityKey])) {
|
$entityKey = (!empty($wae->col_region) && in_array($wae->col_region, $this->validWaeRegions)) ? $wae->col_region : (string)$wae->dxcc;
|
||||||
$workedEntities['SAT'][$entityKey] = true;
|
|
||||||
$summary['worked']['SAT']++;
|
// Track worked status for this entity
|
||||||
|
if (!isset($entityWorkedStatus[$entityKey])) {
|
||||||
|
$entityWorkedStatus[$entityKey] = 0;
|
||||||
|
}
|
||||||
|
$entityWorkedStatus[$entityKey]++;
|
||||||
|
|
||||||
|
// Check if confirmed based on the confirmation types selected in postdata
|
||||||
|
$isConfirmed = false;
|
||||||
|
$confirmationLetters = '';
|
||||||
|
if (isset($postdata['qsl']) && $postdata['qsl'] == 1 && $wae->qsl > 0) {
|
||||||
|
$isConfirmed = true;
|
||||||
|
$confirmationLetters .= 'Q';
|
||||||
|
}
|
||||||
|
if (isset($postdata['lotw']) && $postdata['lotw'] == 1 && $wae->lotw > 0) {
|
||||||
|
$isConfirmed = true;
|
||||||
|
$confirmationLetters .= 'L';
|
||||||
|
}
|
||||||
|
if (isset($postdata['eqsl']) && $postdata['eqsl'] == 1 && $wae->eqsl > 0) {
|
||||||
|
$isConfirmed = true;
|
||||||
|
$confirmationLetters .= 'E';
|
||||||
|
}
|
||||||
|
if (isset($postdata['qrz']) && $postdata['qrz'] == 1 && $wae->qrz > 0) {
|
||||||
|
$isConfirmed = true;
|
||||||
|
$confirmationLetters .= 'Z';
|
||||||
|
}
|
||||||
|
if (isset($postdata['clublog']) && $postdata['clublog'] == 1 && $wae->clublog > 0) {
|
||||||
|
$isConfirmed = true;
|
||||||
|
$confirmationLetters .= 'C';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($isConfirmed) {
|
||||||
|
$dxccMatrix[$entityKey]['SAT'] = '<div class="bg-success awardsBgSuccess" additional_successinfo=">C<"><a href=\'javascript:displayContacts("'.$entityKey.'","SAT","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE","'.$qsl.'","'.$postdata['dateFrom'].'","'.$postdata['dateTo'].'")\'>'.$confirmationLetters.'</a></div>';
|
||||||
|
// Track confirmed entities for summary
|
||||||
|
if (!isset($confirmedEntities['SAT'][$entityKey])) {
|
||||||
|
$confirmedEntities['SAT'][$entityKey] = true;
|
||||||
|
$summary['confirmed']['SAT']++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$dxccMatrix[$entityKey]['SAT'] = '<div class="bg-danger awardsBgWarning" ><a href=\'javascript:displayContacts("'.$entityKey.'","SAT","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","'. $postdata['mode'] . '","WAE", "", "'.$postdata['dateFrom'].'", "'.$postdata['dateTo'].'")\'>W</a></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Track worked entities for summary
|
||||||
|
if (!isset($workedEntities['SAT'][$entityKey])) {
|
||||||
|
$workedEntities['SAT'][$entityKey] = true;
|
||||||
|
$summary['worked']['SAT']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
<label class="col-md-2 control-label" for="mode"><?= __("Mode"); ?></label>
|
<label class="col-md-2 control-label" for="mode"><?= __("Mode"); ?></label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<select id="mode" name="mode" class="form-select form-select-sm">
|
<select id="mode" name="mode" class="form-select form-select-sm">
|
||||||
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'mode') echo ' selected'; ?>><?= __("All"); ?></option>
|
<option value="All" <?php if ($this->input->post('mode') == "All" || $this->input->method() !== 'mode') echo ' selected'; ?>><?= __("Every band (w/o SAT)"); ?></option>
|
||||||
<?php
|
<?php
|
||||||
foreach($modes->result() as $mode){
|
foreach($modes->result() as $mode){
|
||||||
if ($mode->submode == null) {
|
if ($mode->submode == null) {
|
||||||
@@ -201,6 +201,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
<td>' . __("WAE Name") . '</td>
|
<td>' . __("WAE Name") . '</td>
|
||||||
<td>' . __("Prefix") . '</td>';
|
<td>' . __("Prefix") . '</td>';
|
||||||
foreach($bands as $band) {
|
foreach($bands as $band) {
|
||||||
|
if (($posted_band != 'SAT') && ($band == 'SAT')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
echo '<td>' . $band . '</td>';
|
echo '<td>' . $band . '</td>';
|
||||||
}
|
}
|
||||||
echo '</tr>
|
echo '</tr>
|
||||||
@@ -227,21 +230,15 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr><td></td>';
|
<tr><td></td>';
|
||||||
|
|
||||||
$addsat='';
|
|
||||||
foreach($bands as $band) {
|
foreach($bands as $band) {
|
||||||
if ($band != 'SAT') {
|
if (($posted_band != 'SAT') && ($band == 'SAT')) {
|
||||||
echo '<td>' . $band . '</td>';
|
continue;
|
||||||
} else {
|
|
||||||
$addsat='<td>' . $band . '</td>';
|
|
||||||
}
|
}
|
||||||
}
|
echo '<td>' . $band . '</td>';
|
||||||
if ($posted_band != 'SAT') {
|
}
|
||||||
|
if ($posted_band != 'SAT') {
|
||||||
echo '<td><b>' . __("Total (ex SAT)") . '</b></td>';
|
echo '<td><b>' . __("Total (ex SAT)") . '</b></td>';
|
||||||
}
|
}
|
||||||
if (count($bands) > 1) {
|
|
||||||
echo '<td class="spacingcell"></td>';
|
|
||||||
}
|
|
||||||
echo $addsat;
|
|
||||||
echo '
|
echo '
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -251,59 +248,45 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
|
|
||||||
$addsat='';
|
$addsat='';
|
||||||
foreach ($wae_summary['worked'] as $band => $dxcc) { // Fills the table with the data
|
foreach ($wae_summary['worked'] as $band => $dxcc) { // Fills the table with the data
|
||||||
if ($posted_band == 'SAT' && $band == 'Total') {
|
if (($posted_band != 'SAT') && ($band == 'SAT')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($band != 'SAT') {
|
|
||||||
echo '<td style="text-align: center">';
|
if (($posted_band == 'SAT') && ($band == 'Total')) {
|
||||||
if ($band == 'Total') {
|
continue;
|
||||||
echo '<b>'.$dxcc.'</b>';
|
|
||||||
} else {
|
|
||||||
echo $dxcc;
|
|
||||||
}
|
|
||||||
echo '</td>';
|
|
||||||
} else {
|
|
||||||
$addsat='<td style="text-align: center">' . $dxcc . '</td>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<td style="text-align: center">';
|
||||||
|
if ($band == 'Total' && $posted_band != 'SAT') {
|
||||||
|
echo '<b>'.$dxcc.'</b>';
|
||||||
|
} else {
|
||||||
|
echo $dxcc;
|
||||||
|
}
|
||||||
|
echo '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($bands) > 1) {
|
|
||||||
echo '<td class="spacingcell"></td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($addsat != '' && count($wae_summary['worked']) > 1) {
|
|
||||||
echo $addsat;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</tr><tr>
|
echo '</tr><tr>
|
||||||
<td>' . __("Total confirmed") . '</td>';
|
<td>' . __("Total confirmed") . '</td>';
|
||||||
|
|
||||||
$addsat='';
|
$addsat='';
|
||||||
foreach ($wae_summary['confirmed'] as $band => $dxcc) { // Fills the table with the data
|
foreach ($wae_summary['confirmed'] as $band => $dxcc) { // Fills the table with the data
|
||||||
if ($posted_band == 'SAT' && $band == 'Total') {
|
if (($posted_band != 'SAT') && ($band == 'SAT')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($band != 'SAT') {
|
|
||||||
echo '<td style="text-align: center">';
|
if (($posted_band == 'SAT') && ($band == 'Total')) {
|
||||||
if ($band == 'Total') {
|
continue;
|
||||||
echo '<b>'.$dxcc.'</b>';
|
|
||||||
} else {
|
|
||||||
echo $dxcc;
|
|
||||||
}
|
|
||||||
echo '</td>';
|
|
||||||
} else {
|
|
||||||
$addsat='<td style="text-align: center">' . $dxcc . '</td>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo '<td style="text-align: center">';
|
||||||
|
if (($posted_band != 'SAT') && ($band == 'Total')) {
|
||||||
|
echo '<b>'.$dxcc.'</b>';
|
||||||
|
} else {
|
||||||
|
echo $dxcc;
|
||||||
|
}
|
||||||
|
echo '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($bands) > 1) {
|
|
||||||
echo '<td class="spacingcell"></td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($addsat != '' && count($wae_summary['confirmed']) > 1) {
|
|
||||||
echo $addsat;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</tr>
|
echo '</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>';
|
</div>';
|
||||||
|
|||||||
Reference in New Issue
Block a user