Add functionality to lookup per source grid(s)

这个提交包含在:
phl0 2023-09-16 00:32:39 +02:00
父节点 5fb7e75d90
当前提交 27652fc773
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A
共有 3 个文件被更改,包括 18 次插入9 次删除

查看文件

@ -221,7 +221,8 @@ class Awards extends CI_Controller {
$mode = str_replace('"', "", $this->security->xss_clean($this->input->post("Mode")));
$type = $this->security->xss_clean($this->input->post('Type'));
$qsl = $this->input->post('QSL') == null ? '' : $this->security->xss_clean($this->input->post('QSL'));
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl);
$searchmode = $this->input->post('searchmode') == null ? '' : $this->security->xss_clean($this->input->post('searchmode'));
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode);
// This is done because we have two different ways to get dxcc info in Cloudlog. Once is using the name (in awards), and the other one is using the ADIF DXCC.
// We replace the values to make it look a bit nicer

查看文件

@ -328,7 +328,7 @@ class Logbook_model extends CI_Model {
/*
* Used to fetch QSOs from the logbook in the awards
*/
public function qso_details($searchphrase, $band, $mode, $type, $qsl){
public function qso_details($searchphrase, $band, $mode, $type, $qsl, $searchmode = null){
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
@ -347,7 +347,11 @@ class Logbook_model extends CI_Model {
$this->db->where('COL_IOTA', $searchphrase);
break;
case 'VUCC':
$this->db->where("(COL_GRIDSQUARE like '%" . $searchphrase . "%' OR COL_VUCC_GRIDS like'%" . $searchphrase ."%')");
if ($searchmode == 'activated') {
$this->db->where("station_gridsquare like '%" . $searchphrase . "%'");
} else {
$this->db->where("(COL_GRIDSQUARE like '%" . $searchphrase . "%' OR COL_VUCC_GRIDS like'%" . $searchphrase ."%')");
}
break;
case 'CQZone':
$this->db->where('COL_CQZ', $searchphrase);

查看文件

@ -108,15 +108,19 @@ function gridPlot(form) {
}
function spawnGridsquareModal(loc_4char) {
var ajax_data = ({
'Searchphrase': loc_4char,
'Band': $("#band").val(),
'Mode': $("#mode").val(),
'Type': 'VUCC'
})
if (type == 'activated') {
ajax_data.searchmode = 'activated';
}
$.ajax({
url: base_url + 'index.php/awards/qso_details_ajax',
type: 'post',
data: {
'Searchphrase': loc_4char,
'Band': $("#band").val(),
'Mode': $("#mode").val(),
'Type': 'VUCC'
},
data: ajax_data,
success: function (html) {
BootstrapDialog.show({
title: 'QSO Data',