mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-25 19:42:30 +00:00
Merge pull request #2493 from phl0/stationListQsoCount
Add QSO count to station location list
This commit is contained in:
@@ -234,10 +234,12 @@ class Stationsetup_model extends CI_Model {
|
||||
}
|
||||
|
||||
function list_all_locations() {
|
||||
$sql = "select dxcc_entities.end, station_profile.station_id, station_profile_name, station_profile.hrdlog_username, station_gridsquare, station_city, station_iota, station_sota, station_callsign, station_power, station_dxcc, dxcc_entities.name as dxccname, dxcc_entities.prefix as dxccprefix, station_cnty, station_cq, station_itu, station_active, eqslqthnickname, state, county, station_sig, station_sig_info, qrzrealtime, station_wwff, station_pota, oqrs, oqrs_text, oqrs_email, webadifrealtime, clublogrealtime, clublogignore, hrdlogrealtime, creation_date, last_modified, station_uuid
|
||||
$sql = "select dxcc_entities.end, station_profile.station_id, station_profile_name, count(".$this->config->item('table_name').".station_id) as qso_total, station_profile.hrdlog_username, station_gridsquare, station_city, station_iota, station_sota, station_callsign, station_power, station_dxcc, dxcc_entities.name as dxccname, dxcc_entities.prefix as dxccprefix, station_cnty, station_cq, station_itu, station_active, eqslqthnickname, state, county, station_sig, station_sig_info, qrzrealtime, station_wwff, station_pota, oqrs, oqrs_text, oqrs_email, webadifrealtime, clublogrealtime, clublogignore, hrdlogrealtime, station_profile.creation_date, station_profile.last_modified, station_uuid
|
||||
from station_profile
|
||||
join dxcc_entities on station_profile.station_dxcc = dxcc_entities.adif
|
||||
where user_id = ?";
|
||||
left join ".$this->config->item('table_name')." on station_profile.station_id = ".$this->config->item('table_name').".station_id
|
||||
left outer join dxcc_entities on station_profile.station_dxcc = dxcc_entities.adif
|
||||
where user_id = ?
|
||||
group by station_profile.station_id;";
|
||||
|
||||
$query = $this->db->query($sql, array($this->session->userdata('user_id')));
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Active</th>
|
||||
<th>Active</th>
|
||||
<th>QSO Count</th>
|
||||
<th>Name</th>
|
||||
<th>Callsign</th>
|
||||
<th>Grid</th>
|
||||
@@ -24,7 +25,7 @@
|
||||
<th>SIG</th>
|
||||
<th>SIG Info</th>
|
||||
<th>eQSL Nickname</th>
|
||||
<th>eQSL default QSLmsg</th>
|
||||
<th>eQSL default QSLmsg</th>
|
||||
<th>QRZ realtime upload</th>
|
||||
<th>OQRS enabled</th>
|
||||
<th>OQRS Text</th>
|
||||
@@ -33,7 +34,7 @@
|
||||
<th>ClubLog realtime upload</th>
|
||||
<th>ClubLog Ignore</th>
|
||||
<th>HRDLog realtime upload</th>
|
||||
<th>HRDLog username</th>
|
||||
<th>HRDLog username</th>
|
||||
<th>Created</th>
|
||||
<th>Last Modified</th>
|
||||
</tr>
|
||||
@@ -41,17 +42,18 @@
|
||||
<tbody>
|
||||
<?php foreach ($locations as $loc): ?>
|
||||
<tr>
|
||||
<td><?php echo $loc->station_id; ?></td>
|
||||
<td><?php echo $loc->station_id; ?></td>
|
||||
<td><?php echo $loc->station_active ? 'Yes' : 'No' ?></td>
|
||||
<td><?php echo $loc->qso_total; ?></td>
|
||||
<td><a href="<?php echo site_url('station/edit')."/".$loc->station_id; ?>"><?php echo $loc->station_profile_name; ?></a></td>
|
||||
<td><?php echo $loc->station_callsign; ?></td>
|
||||
<td><?php echo $loc->station_gridsquare; ?></td>
|
||||
<td><?php echo $loc->station_city; ?></td>
|
||||
<td><?php echo ucwords(strtolower($loc->dxccname), "- (/") . ($loc->dxccprefix ? ' (' . $loc->dxccprefix . ') ' : ''); ?>
|
||||
<?php if (isset($loc->end)) {
|
||||
echo '<span class="badge text-bg-danger">'.__("Deleted DXCC").'</span>';
|
||||
} ?>
|
||||
</td>
|
||||
echo '<span class="badge text-bg-danger">'.__("Deleted DXCC").'</span>';
|
||||
} ?>
|
||||
</td>
|
||||
<td><?php echo $loc->station_iota; ?></td>
|
||||
<td><?php echo $loc->station_sota; ?></td>
|
||||
<td><?php echo $loc->station_power; ?></td>
|
||||
@@ -64,7 +66,7 @@
|
||||
<td><?php echo $loc->station_sig; ?></td>
|
||||
<td><?php echo $loc->station_sig_info; ?></td>
|
||||
<td><?php echo $loc->eqslqthnickname; ?></td>
|
||||
<td><?php echo $loc->eqsl_default_qslmsg; ?></td>
|
||||
<td><?php echo $loc->eqsl_default_qslmsg; ?></td>
|
||||
<td><?php echo $loc->qrzrealtime ? 'Yes' : 'No'; ?></td>
|
||||
<td><?php echo $loc->oqrs ? 'Yes' : 'No'; ?></td>
|
||||
<td><?php echo $loc->oqrs_text; ?></td>
|
||||
|
||||
Reference in New Issue
Block a user