Ability to search for QSOs with IOTA refs eg eu-008
这个提交包含在:
父节点
6b3ab6c543
当前提交
bcb01b7423
共有 3 个文件被更改,包括 64 次插入 和 31 次删除
|
|
@ -277,6 +277,17 @@ class Logbook extends CI_Controller {
|
||||||
|
|
||||||
$data['results'] = $query;
|
$data['results'] = $query;
|
||||||
|
|
||||||
|
$this->load->view('search/result_search.php', $data);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$this->load->model('search');
|
||||||
|
|
||||||
|
$iota_search = $this->search->callsign_iota($id);
|
||||||
|
|
||||||
|
|
||||||
|
if ($iota_search->num_rows() > 0)
|
||||||
|
{
|
||||||
|
$data['results'] = $iota_search;
|
||||||
$this->load->view('search/result_search.php', $data);
|
$this->load->view('search/result_search.php', $data);
|
||||||
} 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) {
|
||||||
|
|
@ -299,11 +310,13 @@ class Logbook extends CI_Controller {
|
||||||
$data['callsign'] = $this->hamio->callsign($id);
|
$data['callsign'] = $this->hamio->callsign($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$data['id'] = strtoupper($id);
|
$data['id'] = strtoupper($id);
|
||||||
|
|
||||||
$this->load->view('search/result', $data);
|
$this->load->view('search/result', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Find DXCC
|
// Find DXCC
|
||||||
function find_dxcc($callsign) {
|
function find_dxcc($callsign) {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ class Search extends CI_Controller {
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
// Auth check
|
||||||
$this->load->model('user_model');
|
$this->load->model('user_model');
|
||||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
if(!$this->user_model->authorize($this->config->item('auth_mode'))) {
|
||||||
if($this->user_model->validate_session()) {
|
if($this->user_model->validate_session()) {
|
||||||
|
|
|
||||||
19
application/models/search.php
普通文件
19
application/models/search.php
普通文件
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Search extends CI_Model {
|
||||||
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
function callsign_iota($reference) {
|
||||||
|
$this->db->where('COL_IOTA', $reference);
|
||||||
|
$query = $this->db->get($this->config->item('table_name'));
|
||||||
|
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
正在加载…
在新工单中引用