当前提交
a1673d23d6
共有 5 个文件被更改,包括 79 次插入 和 11 次删除
|
|
@ -20,4 +20,4 @@ class Hamsat extends CI_Controller {
|
|||
$this->load->view('/hamsat/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -2828,10 +2879,6 @@ class Logbook_model extends CI_Model {
|
|||
$record['station_callsign']=$station_profile_call;
|
||||
}
|
||||
|
||||
if (($station_id != 0) && ($record['station_callsign'] != $station_profile_call)) { // Check if station_call from import matches profile ONLY when submitting via GUI.
|
||||
return "Wrong station_callsign ".$record['station_callsign']." while importing QSO with ".$record['call']." for ".$station_profile_call." : SKIPPED";
|
||||
}
|
||||
|
||||
$CI =& get_instance();
|
||||
$CI->load->library('frequency');
|
||||
$my_error = "";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,22 @@
|
|||
- <?php echo $rove['start_time']; ?> - <?php echo $rove['end_time']; ?>
|
||||
|
||||
</td>
|
||||
<td><span data-toggle="tooltip" title="<?php echo $rove['comment']; ?>"><?php echo $rove['callsign']; ?></span></td>
|
||||
<td>
|
||||
<?php
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$CI->load->model('logbook_model');
|
||||
$call_worked = $CI->logbook_model->check_if_callsign_worked_in_logbook($rove['callsign'], $logbooks_locations_array, "SAT");
|
||||
echo " <span data-toggle=\"tooltip\" title=\"".$rove['comment']."\">";
|
||||
if ($call_worked != 0) {
|
||||
echo "<span class=\"text-success\">".$rove['callsign']."</span>";
|
||||
} else {
|
||||
echo $rove['callsign'];
|
||||
}
|
||||
echo "</span></td>";
|
||||
?>
|
||||
</td>
|
||||
<td><span data-toggle="tooltip" title="<?php echo $rove['frequency']; ?> - <?php echo $rove['mode']; ?>"><?= $rove['satellite'] ?></span></td>
|
||||
<td>
|
||||
|
||||
|
|
@ -43,8 +58,6 @@
|
|||
<?php
|
||||
|
||||
// Load the logbook model and call check_if_grid_worked_in_logbook
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$worked = $CI->logbook_model->check_if_grid_worked_in_logbook($rove['gridsquare'], null, "SAT");
|
||||
if ($worked != 0) {
|
||||
echo " <span data-toggle=\"tooltip\" title=\"Worked\" class=\"badge badge-success\">" . $rove['gridsquare'] . "</span>";
|
||||
|
|
@ -60,4 +73,4 @@
|
|||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
正在加载…
在新工单中引用