kopia lustrzana https://github.com/magicbug/Cloudlog
commit
887340b635
|
@ -112,4 +112,20 @@ class Lookup extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
public function dok($call) {
|
||||
|
||||
if($call) {
|
||||
$uppercase_callsign = strtoupper($call);
|
||||
}
|
||||
|
||||
// DOK results from logbook
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
$query = $this->logbook_model->get_dok($uppercase_callsign);
|
||||
|
||||
if ($query->row()) {
|
||||
echo $query->row()->COL_DARC_DOK;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -429,6 +429,16 @@ class Logbook_model extends CI_Model {
|
|||
|
||||
}
|
||||
|
||||
public function get_dok($callsign){
|
||||
$this->db->select('COL_DARC_DOK');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit(1);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
|
||||
}
|
||||
|
||||
function add_qso($data, $skipexport = false) {
|
||||
|
||||
if ($data['COL_DXCC'] == "Not Found"){
|
||||
|
|
|
@ -286,6 +286,9 @@ function reset_fields() {
|
|||
$('#input_usa_state').val("");
|
||||
$('#qso-last-table').show();
|
||||
$('#partial_view').hide();
|
||||
var $select = $('#darc_dok').selectize();
|
||||
var selectize = $select[0].selectize;
|
||||
selectize.clear();
|
||||
|
||||
mymap.setView(pos, 12);
|
||||
mymap.removeLayer(markers);
|
||||
|
@ -377,6 +380,19 @@ $("#callsign").focusout(function() {
|
|||
$('#hamqth_info').html('<a target="_blank" href="https://www.hamqth.com/'+find_callsign+'"><img width="32" height="32" src="'+base_url+'images/icons/hamqth.com.png"></a>');
|
||||
$('#hamqth_info').attr('title', 'Lookup '+find_callsign+' info on hamqth.com');
|
||||
|
||||
var $select = $('#darc_dok').selectize();
|
||||
var selectize = $select[0].selectize;
|
||||
if (result.dxcc.adif == '230') {
|
||||
$.get('lookup/dok/' + $('#callsign').val().toUpperCase(), function(result) {
|
||||
if (result) {
|
||||
selectize.addOption({name: result});
|
||||
selectize.setValue(result, false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
selectize.clear();
|
||||
}
|
||||
|
||||
$('#dxcc_id').val(result.dxcc.adif);
|
||||
$('#cqz').val(result.dxcc.cqz);
|
||||
$('#ituz').val(result.dxcc.ituz);
|
||||
|
|
Ładowanie…
Reference in New Issue