kopia lustrzana https://github.com/magicbug/Cloudlog
Added red/yellow/green Colorscheme to Bandlist
rodzic
2174622756
commit
67208a6c27
|
@ -63,6 +63,7 @@ class Dxcluster_model extends CI_Model {
|
|||
if ( ($de != '') && ($de != 'Any') && (property_exists($singlespot->dxcc_spotter,'cont')) ){ // If we have a "de continent" and a filter-wish filter on that
|
||||
if (strtolower($de) == strtolower($singlespot->dxcc_spotter->cont ?? '')) {
|
||||
$singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1);
|
||||
$singlespot->cnfmd_call = ($this->logbook_model->check_if_callsign_cnfmd_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1);
|
||||
array_push($spotsout,$singlespot);
|
||||
}
|
||||
} else { // No de continent? No Filter --> Just push
|
||||
|
|
|
@ -1676,7 +1676,58 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
}
|
||||
|
||||
function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = null, $band = null) {
|
||||
function check_if_callsign_cnfmd_in_logbook($callsign, $StationLocationsArray = null, $band = null) {
|
||||
$user_gridmap_confirmation = $this->session->userdata('user_gridmap_confirmation');
|
||||
|
||||
if($StationLocationsArray == null) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
} else {
|
||||
$logbooks_locations_array = $StationLocationsArray;
|
||||
}
|
||||
|
||||
$extrawhere='';
|
||||
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'Q') !== false) {
|
||||
$extrawhere="COL_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'L') !== false) {
|
||||
if ($extrawhere!='') {
|
||||
$extrawhere.=" OR";
|
||||
}
|
||||
$extrawhere.=" COL_LOTW_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) {
|
||||
if ($extrawhere!='') {
|
||||
$extrawherei.=" OR";
|
||||
}
|
||||
$extrawhere.=" COL_EQSL_QSL_RCVD='Y'";
|
||||
}
|
||||
|
||||
|
||||
$this->db->select('COL_CALL');
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
|
||||
if($band != null && $band != 'SAT') {
|
||||
$this->db->where('COL_BAND', $band);
|
||||
} else if($band == 'SAT') {
|
||||
// Where col_sat_name is not empty
|
||||
$this->db->where('COL_SAT_NAME !=', '');
|
||||
}
|
||||
if ($extrawhere != '') {
|
||||
$this->db->where('('.$extrawhere.')');
|
||||
} else {
|
||||
$this->db->where("1=0");
|
||||
}
|
||||
$this->db->limit('2');
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
return $query->num_rows();
|
||||
|
||||
}
|
||||
|
||||
function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = null, $band = null) {
|
||||
|
||||
if($StationLocationsArray == null) {
|
||||
$CI =& get_instance();
|
||||
|
|
|
@ -45,10 +45,17 @@ $(function() {
|
|||
dxspots.sort(SortByQrg);
|
||||
dxspots.forEach((single) => {
|
||||
var data=[];
|
||||
if (single.cnfmd_call) {
|
||||
addon_class="text-success";
|
||||
} else if (single.worked_call) {
|
||||
addon_class="text-warning";
|
||||
} else {
|
||||
addon_class="";
|
||||
}
|
||||
data[0]=[];
|
||||
data[0].push(single.when_pretty);
|
||||
data[0].push(single.frequency*1);
|
||||
data[0].push((single.worked_call ?'<span class="text-success">' : '')+single.spotted+(single.worked_call ? '</span>' : ''));
|
||||
data[0].push((addon_class != '' ?'<span class="'+addon_class+'">' : '')+single.spotted+(addon_class != '' ? '</span>' : ''));
|
||||
data[0].push(single.dxcc_spotted.entity);
|
||||
data[0].push(single.spotter);
|
||||
if (oldtable.length > 0) {
|
||||
|
|
Ładowanie…
Reference in New Issue