Cloudlog/application/views/statistics/uniquetable.php
Peter Goodhall 43e7d9cb9d Fix undefined index errors in statistics tables
Initialize bandcalls and modecalls arrays with default zero values in Stats.php to prevent undefined index errors. Update qsotable.php and uniquetable.php views to display 0 when mode or band totals are not set.
2025-08-10 17:44:25 +01:00

30 行
无行尾
1.1 KiB
PHP

<?php
if ($qsoarray) {
echo '<br />
<table style="width:100%" class="uniquetable table-sm table table-bordered table-hover table-striped table-condensed text-center">
<thead>';
echo '<tr><th></th>';
foreach($bands as $band) {
echo '<th>' . $band . '</th>';
}
echo '<th>'.lang('statistics_total').'</th>';
echo '</tr>
</thead>
<tbody>';
foreach ($qsoarray as $mode => $value) {
echo '<tr>
<th>'. $mode .'</th>';
foreach ($value as $key => $val) {
echo '<td>' . $val . '</td>';
}
echo '<th>' . (isset($modeunique[$mode]) ? $modeunique[$mode] : 0) . '</th>';
echo '</tr>';
}
echo '</tbody><tfoot><tr><th>'.lang('statistics_total').'</th>';
foreach($bands as $band) {
echo '<th>' . (isset($bandunique[$band]) ? $bandunique[$band] : 0) . '</th>';
}
echo '<th>' . $total->calls . '</th>';
echo '</tr></tfoot></table>';
}