mirror of
https://github.com/magicbug/Cloudlog
synced 2024-11-23 10:08:38 +00:00
added hamqth to name/city/iota
This commit is contained in:
parent
c9741fa126
commit
256a29e25a
@ -164,13 +164,18 @@ class Logbook extends CI_Controller {
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
|
||||
echo $callbook['city'];
|
||||
|
||||
} else {
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
} elseif ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||
// Load the HamQTH library
|
||||
$this->load->library('hamqth');
|
||||
|
||||
$callbook = $this->hamli->callsign($callsign);
|
||||
if(!$this->session->userdata('hamqth_session_key')) {
|
||||
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
|
||||
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
|
||||
}
|
||||
|
||||
$callbook = $this->hamqth->search($qra, $this->session->userdata('hamqth_session_key'));
|
||||
echo $callbook['city'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,6 +193,18 @@ class Logbook extends CI_Controller {
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
|
||||
echo $callbook['iota'];
|
||||
|
||||
} elseif ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||
// Load the HamQTH library
|
||||
$this->load->library('hamqth');
|
||||
|
||||
if(!$this->session->userdata('hamqth_session_key')) {
|
||||
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
|
||||
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
|
||||
}
|
||||
|
||||
$callbook = $this->hamqth->search($qra, $this->session->userdata('hamqth_session_key'));
|
||||
echo $callbook['iota'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,13 +229,18 @@ class Logbook extends CI_Controller {
|
||||
|
||||
$callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
|
||||
echo $callbook['name'];
|
||||
} else {
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
} elseif ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||
// Load the HamQTH library
|
||||
$this->load->library('hamqth');
|
||||
|
||||
$callbook = $this->hamli->callsign($callsign);
|
||||
if(!$this->session->userdata('hamqth_session_key')) {
|
||||
$hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
|
||||
$this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
|
||||
}
|
||||
|
||||
$callbook = $this->hamqth->search($qra, $this->session->userdata('hamqth_session_key'));
|
||||
echo $callbook['name'];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user