[Quick lookup] Added clickable links so that you can see the qso information that lies behind the W/C in quick lookup.

这个提交包含在:
Andreas 2021-07-29 10:38:27 +02:00
父节点 6bd39ac356
当前提交 78f11d62c6
共有 4 个文件被更改,包括 57 次插入17 次删除

查看文件

@ -195,6 +195,14 @@ class Awards extends CI_Controller {
$data['results'] = $this->logbook_model->qso_details($searchphrase, $band, $mode, $type);
// 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
if ($type == 'DXCC2') {
$type = 'DXCC';
$dxccname = $this->logbook_model->get_entity($searchphrase);
$searchphrase = $dxccname['name'];
}
// Render Page
$data['page_title'] = "Log View - " . $type;
$data['filter'] = $type . " " . $searchphrase . " and band ".$band . " and mode ".$mode;

查看文件

@ -35,18 +35,18 @@ class Lookup extends CI_Controller {
$data['bands'] = $this->lookup_model->get_Worked_Bands($station_id);
$queryinfo['type'] = xss_clean($this->input->post('type'));
$queryinfo['dxcc'] = xss_clean($this->input->post('dxcc'));
$queryinfo['was'] = xss_clean($this->input->post('was'));
$queryinfo['sota'] = xss_clean($this->input->post('sota'));
$queryinfo['grid'] = xss_clean($this->input->post('grid'));
$queryinfo['iota'] = xss_clean($this->input->post('iota'));
$queryinfo['cqz'] = xss_clean($this->input->post('cqz'));
$queryinfo['wwff'] = xss_clean($this->input->post('wwff'));
$queryinfo['station_id'] = $station_id;
$queryinfo['bands'] = $data['bands'];
$data['type'] = xss_clean($this->input->post('type'));
$data['dxcc'] = xss_clean($this->input->post('dxcc'));
$data['was'] = xss_clean($this->input->post('was'));
$data['sota'] = xss_clean($this->input->post('sota'));
$data['grid'] = xss_clean($this->input->post('grid'));
$data['iota'] = xss_clean($this->input->post('iota'));
$data['cqz'] = xss_clean($this->input->post('cqz'));
$data['wwff'] = xss_clean($this->input->post('wwff'));
$data['station_id'] = $station_id;
$data['result'] = $this->lookup_model->getSearchResult($data);
$data['result'] = $this->lookup_model->getSearchResult($queryinfo);
$this->load->view('lookup/result', $data);
}

查看文件

@ -244,6 +244,9 @@ class Logbook_model extends CI_Model {
case 'DXCC':
$this->db->where('COL_COUNTRY', $searchphrase);
break;
case 'DXCC2':
$this->db->where('COL_DXCC', $searchphrase);
break;
case 'IOTA':
$this->db->where('COL_IOTA', $searchphrase);
break;
@ -257,6 +260,13 @@ class Logbook_model extends CI_Model {
$this->db->where('COL_STATE', $searchphrase);
$this->db->where_in('COL_DXCC', ['291', '6', '110']);
break;
case 'SOTA':
$this->db->where('COL_SOTA_REF', $searchphrase);
break;
case 'WWFF':
$this->db->where('COL_SIG', 'WWFF');
$this->db->where('COL_SIG_INFO', $searchphrase);
break;
}
$this->db->where('station_id', $station_id);

查看文件

@ -13,15 +13,37 @@ echo '
foreach ($result as $mode => $value) {
echo '<tr>
<td>'. strtoupper($mode) .'</td>';
foreach ($value as $key) {
if ($key == 'W') {
echo '<td><div class=\'alert-danger\'>' . $key . '</div></td>';
foreach ($value as $key => $val) {
if ($val == 'W') {
$info = '<td><div class=\'alert-danger\'>';
switch($type) {
case 'dxcc': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","' . $mode . '","DXCC2")\'>W</a>'; break;
case 'iota': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","' . $mode . '","IOTA")\'>W</a>'; break;
case 'grid': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","' . $mode . '","VUCC")\'>W</a>'; break;
case 'cqz': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","' . $mode . '","CQZone")\'>W</a>'; break;
case 'was': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","' . $mode . '","WAS")\'>W</a>'; break;
case 'sota': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","' . $mode . '","SOTA")\'>W</a>'; break;
case 'wwff': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","' . $mode . '","WWFF")\'>W</a>'; break;
}
$info .= '</div></td>';
echo $info;
}
else if ($key == 'C') {
echo '<td><div class=\'alert-success\'>' . $key . '</div></td>';
else if ($val == 'C') {
$info = '<td><div class=\'alert-success\'>';
switch($type) {
case 'dxcc': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $dxcc).'","' . $key . '","' . $mode . '","DXCC2")\'>C</a>'; break;
case 'iota': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $iota).'","' . $key . '","' . $mode . '","IOTA")\'>C</a>'; break;
case 'grid': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $grid).'","' . $key . '","' . $mode . '","VUCC")\'>C</a>'; break;
case 'cqz': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cqz).'","' . $key . '","' . $mode . '","CQZone")\'>C</a>'; break;
case 'was': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $was).'","' . $key . '","' . $mode . '","WAS")\'>C</a>'; break;
case 'sota': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $sota).'","' . $key . '","' . $mode . '","SOTA")\'>C</a>'; break;
case 'wwff': $info .= '<a href=\'javascript:displayContacts("'.str_replace("&", "%26", $wwff).'","' . $key . '","' . $mode . '","WWFF")\'>C</a>'; break;
}
$info .= '</div></td>';
echo $info;
}
else {
echo '<td>' . $key . '</td>';
echo '<td>' . $val . '</td>';
}
}
echo '</tr>';