kopia lustrzana https://github.com/magicbug/Cloudlog
If QSL VIA information is already stored for the callsign in the database populate the QSO form instead of QRZ lookup
rodzic
8f546d8203
commit
0025c9a4ac
|
@ -71,6 +71,7 @@ class Logbook extends CI_Controller {
|
|||
"callsign_qra" => "",
|
||||
"callsign_qth" => "",
|
||||
"callsign_iota" => "",
|
||||
"qsl_manager" => "",
|
||||
"bearing" => "",
|
||||
"workedBefore" => false,
|
||||
"lotw_member" => $lotw_member,
|
||||
|
@ -86,6 +87,7 @@ class Logbook extends CI_Controller {
|
|||
$return['callsign_qra'] = $this->logbook_model->call_qra($callsign);
|
||||
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
|
||||
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
|
||||
$return['qsl_manager'] = $this->logbook_model->call_qslvia($callsign);
|
||||
$return['bearing'] = $this->bearing($return['callsign_qra']);
|
||||
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra']);
|
||||
|
||||
|
|
|
@ -352,6 +352,26 @@ class Logbook_model extends CI_Model {
|
|||
return $name;
|
||||
}
|
||||
|
||||
function call_qslvia($callsign) {
|
||||
$this->db->select('COL_CALL, COL_QSL_VIA, COL_TIME_ON');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$where = "COL_NAME != \"\"";
|
||||
|
||||
$this->db->where($where);
|
||||
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit(1);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
$name = "";
|
||||
if ($query->num_rows() > 0)
|
||||
{
|
||||
$data = $query->row();
|
||||
$qsl_via = $data->COL_QSL_VIA;
|
||||
}
|
||||
|
||||
return $qsl_via;
|
||||
}
|
||||
|
||||
function call_qth($callsign) {
|
||||
$this->db->select('COL_CALL, COL_QTH, COL_TIME_ON');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
|
|
Ładowanie…
Reference in New Issue