Merge pull request #2886 from int2001/timesWorked
这个提交包含在:
当前提交
366d649bda
共有 19 个文件被更改,包括 85 次插入 和 15 次删除
|
|
@ -129,27 +129,16 @@ class Logbook extends CI_Controller {
|
|||
"qsl_manager" => "",
|
||||
"bearing" => "",
|
||||
"workedBefore" => false,
|
||||
"timesWorked" => 0,
|
||||
"lotw_member" => $lotw_member,
|
||||
"lotw_days" => $lotw_days,
|
||||
"image" => "",
|
||||
];
|
||||
|
||||
$return['dxcc'] = $this->dxcheck($callsign);
|
||||
$split_callsign=explode('/',$callsign);
|
||||
if (count($split_callsign)==1) { // case F0ABC --> return cel 0 //
|
||||
$lookupcall = $split_callsign[0];
|
||||
} else if (count($split_callsign)==3) { // case EA/F0ABC/P --> return cel 1 //
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // case F0ABC/P --> return cel 0 OR case EA/FOABC --> retunr 1 (normaly not exist) //
|
||||
if (in_array(strtoupper($split_callsign[1]), array('P','M','MM','QRP','0','1','2','3','4','5','6','7','8','9'))) {
|
||||
$lookupcall = $split_callsign[0];
|
||||
} else if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // Last Element up to 3 Chars? Take first element as Call
|
||||
$lookupcall = $split_callsign[0];
|
||||
}
|
||||
}
|
||||
|
||||
$lookupcall=$this->get_plaincall($callsign);
|
||||
|
||||
$return['partial'] = $this->partial($lookupcall);
|
||||
|
||||
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
|
||||
|
|
@ -170,6 +159,7 @@ class Logbook extends CI_Controller {
|
|||
$return['callsign_us_county'] = $this->nval($callbook['us_county'] ?? '', $this->logbook_model->call_us_county($callsign));
|
||||
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
|
||||
$return['confirmed'] = $this->confirmed_grid_before($return['callsign_qra'], $type, $band, $mode);
|
||||
$return['timesWorked'] = $this->logbook_model->times_worked($lookupcall);
|
||||
|
||||
if ($this->session->userdata('user_show_profile_image')) {
|
||||
if (isset($callbook) && isset($callbook['image'])) {
|
||||
|
|
@ -193,6 +183,24 @@ class Logbook extends CI_Controller {
|
|||
return;
|
||||
}
|
||||
|
||||
function get_plaincall($callsign) {
|
||||
$split_callsign=explode('/',$callsign);
|
||||
if (count($split_callsign)==1) { // case F0ABC --> return cel 0 //
|
||||
$lookupcall = $split_callsign[0];
|
||||
} else if (count($split_callsign)==3) { // case EA/F0ABC/P --> return cel 1 //
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // case F0ABC/P --> return cel 0 OR case EA/FOABC --> retunr 1 (normaly not exist) //
|
||||
if (in_array(strtoupper($split_callsign[1]), array('P','M','MM','QRP','0','1','2','3','4','5','6','7','8','9'))) {
|
||||
$lookupcall = $split_callsign[0];
|
||||
} else if (strlen($split_callsign[1])>3) { // Last Element longer than 3 chars? Take that as call
|
||||
$lookupcall = $split_callsign[1];
|
||||
} else { // Last Element up to 3 Chars? Take first element as Call
|
||||
$lookupcall = $split_callsign[0];
|
||||
}
|
||||
}
|
||||
return $lookupcall;
|
||||
}
|
||||
|
||||
// Returns $val2 first if it has value, even if it is null or empty string, if not return $val1.
|
||||
function nval($val1, $val2) {
|
||||
return (($val2 ?? "") === "" ? ($val1 ?? "") : ($val2 ?? ""));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('Не е разрешен директен дост
|
|||
$lang['qso_title_qso_map'] = 'Карта на QSO';
|
||||
$lang['qso_title_suggestions'] = 'Предложения';
|
||||
$lang['qso_title_previous_contacts'] = 'Предишни контакти';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'QSO 地图';
|
||||
$lang['qso_title_suggestions'] = '建议';
|
||||
$lang['qso_title_previous_contacts'] = '先前通联';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = '操作员照片';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG 输入呼号';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Mapa spojení';
|
||||
$lang['qso_title_suggestions'] = 'Návrhy';
|
||||
$lang['qso_title_previous_contacts'] = 'Předchozí spojení';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('Directe toegang tot scripts is niet toegestaan');
|
|||
$lang['qso_title_qso_map'] = 'QSO Kaart';
|
||||
$lang['qso_title_suggestions'] = 'Suggesties';
|
||||
$lang['qso_title_previous_contacts'] = 'Eerdere verbindingen';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'QSO Map';
|
||||
$lang['qso_title_suggestions'] = 'Suggestions';
|
||||
$lang['qso_title_previous_contacts'] = 'Previous Contacts';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Vasta-aseman sijainti kartalla';
|
||||
$lang['qso_title_suggestions'] = 'Kutsumerkkiehdotukset';
|
||||
$lang['qso_title_previous_contacts'] = 'Edelliset yhteydet';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profiilikuva';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Carte QSO';
|
||||
$lang['qso_title_suggestions'] = 'Suggestions';
|
||||
$lang['qso_title_previous_contacts'] = 'Contacts précédents';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('Direkter Zugriff auf Skripte ist nicht erlaubt');
|
|||
$lang['qso_title_qso_map'] = 'QSO-Karte';
|
||||
$lang['qso_title_suggestions'] = 'Vorschläge';
|
||||
$lang['qso_title_previous_contacts'] = 'Vorherige Kontakte';
|
||||
$lang['qso_title_times_worked_before'] = "mal vorher gearbeitet";
|
||||
$lang['qso_title_image'] = 'Profilbild';
|
||||
$lang['qso_previous_max_shown'] = "Es werden maximal 5 Kontakte angezeigt.";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Rufzeichen';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Χάρτης QSO';
|
||||
$lang['qso_title_suggestions'] = 'Εισήγησης';
|
||||
$lang['qso_title_previous_contacts'] = 'Προηγούμενες Επαφές';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Εικόνα προφίλ';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('Non è permesso l\'accesso diretto allo script');
|
|||
$lang['qso_title_qso_map'] = 'Mappa QSO';
|
||||
$lang['qso_title_suggestions'] = 'Suggerimenti';
|
||||
$lang['qso_title_previous_contacts'] = 'Contatti Precedenti';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Immagine Profilo';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Mapa łączności';
|
||||
$lang['qso_title_suggestions'] = 'Sugestie';
|
||||
$lang['qso_title_previous_contacts'] = 'Poprzednie łączności';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Карта QSO';
|
||||
$lang['qso_title_suggestions'] = 'Предложения';
|
||||
$lang['qso_title_previous_contacts'] = 'Предыдущие контакты';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'Mapa de QSO';
|
||||
$lang['qso_title_suggestions'] = 'Sugerencias';
|
||||
$lang['qso_title_previous_contacts'] = 'Contactos previos';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profile Picture';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
$lang['qso_title_qso_map'] = 'QSO-karta';
|
||||
$lang['qso_title_suggestions'] = 'Förslag';
|
||||
$lang['qso_title_previous_contacts'] = 'Föregående QSOn';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profilbild';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ defined('BASEPATH') OR exit('Doğrudan komut dosyası erişimine izin verilmez')
|
|||
$lang['qso_title_qso_map'] = 'QSO Haritası';
|
||||
$lang['qso_title_suggestions'] = 'Öneriler';
|
||||
$lang['qso_title_previous_contacts'] = 'Önceki Görüşmeler';
|
||||
$lang['qso_title_times_worked_before'] = "times worked before";
|
||||
$lang['qso_title_image'] = 'Profil Resmi';
|
||||
$lang['qso_previous_max_shown'] = "Max. 5 previous contacts are shown";
|
||||
|
||||
// Quicklog on Dashboard
|
||||
$lang['qso_quicklog_enter_callsign'] = 'QUICKLOG Enter Callsign';
|
||||
|
|
|
|||
|
|
@ -1347,6 +1347,28 @@ class Logbook_model extends CI_Model {
|
|||
return $name;
|
||||
}
|
||||
|
||||
function times_worked($callsign) {
|
||||
$this->db->select('count(1) as TWKED');
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->group_start();
|
||||
$this->db->where($this->config->item('table_name').'.COL_CALL', $callsign);
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$callsign,'before');
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', $callsign.'/','after');
|
||||
$this->db->or_like($this->config->item('table_name').'.COL_CALL', '/'.$callsign.'/');
|
||||
$this->db->group_end();
|
||||
$this->db->where('station_profile.user_id', $this->session->userdata('user_id'));
|
||||
$this->db->limit(1);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
$name = "";
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
$data = $query->row();
|
||||
$times_worked = $data->TWKED;
|
||||
}
|
||||
|
||||
return $times_worked;
|
||||
}
|
||||
|
||||
function call_qslvia($callsign) {
|
||||
$this->db->select('COL_CALL, COL_QSL_VIA, COL_TIME_ON');
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
<script language="javascript">
|
||||
var qso_manual = "<?php echo $_GET['manual']; ?>";
|
||||
var text_error_timeoff_less_timeon = "<?php echo lang('qso_error_timeoff_less_timeon'); ?>";
|
||||
var lang_qso_title_previous_contacts = "<?php echo lang('qso_title_previous_contacts'); ?>";
|
||||
var lang_qso_title_times_worked_before = "<?php echo lang('qso_title_times_worked_before'); ?>";
|
||||
</script>
|
||||
|
||||
<div class="row qsopane">
|
||||
|
|
@ -637,7 +639,7 @@
|
|||
<?php } ?>
|
||||
|
||||
<div class="card previous-qsos">
|
||||
<div class="card-header"><h4 class="card-title" style="font-size: 16px; font-weight: bold;"><?php echo lang('qso_title_previous_contacts'); ?></h4></div>
|
||||
<div class="card-header"><h4 class="card-title" id="timesWorked" style="font-size: 16px; font-weight: bold;"><?php echo lang('qso_title_previous_contacts'); ?></h4></div>
|
||||
|
||||
<div id="partial_view" style="font-size: 0.95rem;"></div>
|
||||
|
||||
|
|
@ -645,6 +647,7 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<small class="mt-0.5" style="float: right;"><?php echo lang('qso_previous_max_shown'); ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ function reset_fields() {
|
|||
mymap.removeLayer(markers);
|
||||
$('.callsign-suggest').hide();
|
||||
$('.dxccsummary').remove();
|
||||
$('#timesWorked').html(lang_qso_title_previous_contacts);
|
||||
}
|
||||
|
||||
function resetTimers(manual) {
|
||||
|
|
@ -758,6 +759,11 @@ $("#callsign").focusout(function() {
|
|||
county_selectize.setValue(result.callsign_us_county, false);
|
||||
}
|
||||
|
||||
if(result.timesWorked != "") {
|
||||
$('#timesWorked').html(result.timesWorked + ' ' + lang_qso_title_times_worked_before);
|
||||
} else {
|
||||
$('#timesWorked').html(lang_qso_title_previous_contacts);
|
||||
}
|
||||
if($('#iota_ref').val() == "") {
|
||||
$('#iota_ref').val(result.callsign_iota);
|
||||
}
|
||||
|
|
@ -1048,6 +1054,7 @@ function resetDefaultQSOFields() {
|
|||
$('#callsign-image').attr('style', 'display: none;');
|
||||
$('#callsign-image-content').text("");
|
||||
$('.dxccsummary').remove();
|
||||
$('#timesWorked').html(lang_qso_title_previous_contacts);
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
|
|
|
|||
正在加载…
在新工单中引用