added hamqth function to qra lookup
这个提交包含在:
父节点
db92a9e89f
当前提交
73622819e4
共有 1 个文件被更改,包括 9 次插入 和 5 次删除
|
|
@ -124,7 +124,6 @@ class Logbook extends CI_Controller {
|
||||||
} else {
|
} else {
|
||||||
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
|
if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
|
||||||
// Lookup using QRZ
|
// Lookup using QRZ
|
||||||
|
|
||||||
$this->load->library('qrz');
|
$this->load->library('qrz');
|
||||||
|
|
||||||
if(!$this->session->userdata('qrz_session_key')) {
|
if(!$this->session->userdata('qrz_session_key')) {
|
||||||
|
|
@ -135,13 +134,18 @@ class Logbook extends CI_Controller {
|
||||||
$callbook = $this->qrz->search($qra, $this->session->userdata('qrz_session_key'));
|
$callbook = $this->qrz->search($qra, $this->session->userdata('qrz_session_key'));
|
||||||
echo $callbook['gridsquare'];
|
echo $callbook['gridsquare'];
|
||||||
|
|
||||||
} else {
|
} elseif ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
|
||||||
// Lookup using hamli
|
// Load the HamQTH library
|
||||||
$this->load->library('hamli');
|
$this->load->library('hamqth');
|
||||||
|
|
||||||
$callbook = $this->hamli->callsign($qra);
|
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('hamlib_session_key'));
|
||||||
echo $callbook['gridsquare'];
|
echo $callbook['gridsquare'];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
正在加载…
在新工单中引用