当前提交
882669a7b2
共有 2 个文件被更改,包括 20 次插入 和 11 次删除
|
|
@ -168,7 +168,7 @@ class Logbook extends CI_Controller {
|
|||
$return['confirmed'] = $this->confirmed_grid_before($return['callsign_qra'], $type, $band, $mode);
|
||||
|
||||
if ($this->session->userdata('user_show_profile_image')) {
|
||||
if (isset($callbook)) {
|
||||
if (isset($callbook) && isset($callbook['image'])) {
|
||||
if ($callbook['image'] == "") {
|
||||
$return['image'] = "n/a";
|
||||
} else {
|
||||
|
|
@ -851,14 +851,16 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
|
||||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
}
|
||||
$data= $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
|
||||
$callsign['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
|
||||
|
||||
if (empty($data['callsign']))
|
||||
if (empty($callsign['callsign']['callsign']))
|
||||
{
|
||||
$qrz_session_key = $this->qrz->session($this->config->item('qrz_username'), $this->config->item('qrz_password'));
|
||||
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
|
||||
$data = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
|
||||
$callsign['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
|
||||
}
|
||||
} else {
|
||||
$callsign['error'] = 'Lookup not configured or set to hamqth. Currently only qrz is supported.';
|
||||
}
|
||||
|
||||
// There's no hamli integration? Disabled for now.
|
||||
|
|
@ -866,12 +868,20 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
||||
$data['callsign'] = $this->hamli->callsign($id);
|
||||
$callsign['callsign'] = $this->hamli->callsign($id);
|
||||
}*/
|
||||
|
||||
$data['id'] = strtoupper($id);
|
||||
if (isset($callsign['callsign']['gridsquare'])) {
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$callsign['grid_worked'] = $CI->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($callsign['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
|
||||
}
|
||||
if (isset($callsign['callsign']['error'])) {
|
||||
$callsign['error'] = $callsign['callsign']['error'];
|
||||
}
|
||||
$callsign['id'] = strtoupper($id);
|
||||
|
||||
return $this->load->view('search/result', $data, true);
|
||||
return $this->load->view('search/result', $callsign, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -928,7 +938,7 @@ function worked_grid_before($gridsquare, $type, $band, $mode)
|
|||
$data['error'] = $data['callsign']['error'];
|
||||
}
|
||||
} else {
|
||||
$data['error'] = 'No result (qrz not configured)';
|
||||
$data['error'] = 'Lookup not configured or set to hamqth. Currently only qrz is supported.';
|
||||
} /*else {
|
||||
// Lookup using hamli
|
||||
$this->load->library('hamli');
|
||||
|
|
|
|||
|
|
@ -433,8 +433,7 @@ class Logbook_model extends CI_Model {
|
|||
$this->db->limit(500);
|
||||
|
||||
$result = $this->db->get($this->config->item('table_name'));
|
||||
log_message('debug', 'SQL: '.$this->db->last_query());
|
||||
return $result;
|
||||
return $result;
|
||||
//return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
|
|
@ -4083,6 +4082,7 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
|
|||
$this->db->where("((COL_DISTANCE is NULL) or (COL_DISTANCE = 0))");
|
||||
$this->db->where("COL_GRIDSQUARE is NOT NULL");
|
||||
$this->db->where("COL_GRIDSQUARE != ''");
|
||||
$this->db->where("COL_GRIDSQUARE != station_gridsquare");
|
||||
$this->db->trans_start();
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
|
|
@ -4117,7 +4117,6 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
|
|||
$this->db->select('COL_PRIMARY_KEY, COL_TIME_ON, COL_CALL, COL_MODE, COL_BAND');
|
||||
$this->db->where('station_id =', NULL);
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
log_message('debug','SQL: '.$this->db->last_query());
|
||||
if($query->num_rows() >= 1) {
|
||||
return $query->result();
|
||||
} else {
|
||||
|
|
|
|||
正在加载…
在新工单中引用