mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Add filter for SAT and Orbit to DXCC table
This commit is contained in:
@@ -80,7 +80,7 @@ class DXCC extends CI_Model {
|
||||
if ($postdata['worked'] != NULL) {
|
||||
$workedDXCC = $this->getDxccBandWorked($location_list, $band, $postdata);
|
||||
foreach ($workedDXCC as $wdxcc) {
|
||||
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC", "")\'>W</a></div>';
|
||||
$dxccMatrix[$wdxcc->dxcc][$band] = '<div class="bg-danger awardsBgDanger" ><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wdxcc->name).'","'. $band . '","'. $postdata['sat'] . '","' . $postdata['orbit'] . '","'. $postdata['mode'] . '","DXCC", "")\'>W</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class DXCC extends CI_Model {
|
||||
if ($postdata['confirmed'] != NULL) {
|
||||
$confirmedDXCC = $this->getDxccBandConfirmed($location_list, $band, $postdata);
|
||||
foreach ($confirmedDXCC as $cdxcc) {
|
||||
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['mode'] . '","DXCC","'.$qsl.'")\'>C</a></div>';
|
||||
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","' . $postdata['mode'] . '","DXCC","'.$qsl.'")\'>C</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,12 +396,20 @@ class Logbook_model extends CI_Model {
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC', 'left outer');
|
||||
$this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer');
|
||||
if ($band == 'SAT' && $type == 'VUCC') {
|
||||
if ($band == 'SAT' && ($type == 'VUCC' || $type == 'DXCC')) {
|
||||
$this->db->join('satellite', 'satellite.name = '.$this->config->item('table_name').'.col_sat_name', 'left outer');
|
||||
}
|
||||
switch ($type) {
|
||||
case 'DXCC':
|
||||
$this->db->where('COL_COUNTRY', $searchphrase);
|
||||
if ($band == 'SAT' && $type == 'DXCC') {
|
||||
if ($sat != 'All' && $sat != null) {
|
||||
$this->db->where("COL_SAT_NAME = '$sat'");
|
||||
}
|
||||
if ($orbit != 'All' && $orbit != null) {
|
||||
$this->db->where("satellite.orbit = '$orbit'");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'DXCC2':
|
||||
$this->db->where('COL_DXCC', $searchphrase);
|
||||
|
||||
@@ -2239,13 +2239,15 @@ function viewEqsl(picture, callsign) {
|
||||
/*
|
||||
* Used to fetch QSOs from the logbook in the awards
|
||||
*/
|
||||
function displayContacts(searchphrase, band, mode, type, qsl) {
|
||||
function displayContacts(searchphrase, band, sat, orbit, mode, type, qsl) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/awards/qso_details_ajax',
|
||||
type: 'post',
|
||||
data: {
|
||||
'Searchphrase': searchphrase,
|
||||
'Band': band,
|
||||
'Sat': sat,
|
||||
'Orbit': orbit,
|
||||
'Mode': mode,
|
||||
'Type': type,
|
||||
'QSL' : qsl
|
||||
|
||||
Reference in New Issue
Block a user