mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Quick Lookup] Added continent
This commit is contained in:
@@ -45,7 +45,7 @@ class Lookup extends CI_Controller {
|
||||
} else {
|
||||
$this->load->model('bands');
|
||||
|
||||
if ($this->input->post('type') == 'itu') {
|
||||
if ($this->input->post('type') == 'itu' || $this->input->post('type') == 'continent') {
|
||||
$data['bands'] = $this->bands->get_worked_bands();
|
||||
} else {
|
||||
$data['bands'] = $this->bands->get_worked_bands(xss_clean($this->input->post('type')));
|
||||
@@ -63,6 +63,7 @@ class Lookup extends CI_Controller {
|
||||
$data['cqz'] = xss_clean($this->input->post('cqz'));
|
||||
$data['wwff'] = xss_clean($this->input->post('wwff'));
|
||||
$data['ituz'] = xss_clean($this->input->post('ituz'));
|
||||
$data['continent'] = xss_clean($this->input->post('continent'));
|
||||
$data['location_list'] = $location_list;
|
||||
|
||||
$data['result'] = $this->lookup_model->getSearchResult($data);
|
||||
@@ -74,22 +75,22 @@ class Lookup extends CI_Controller {
|
||||
public function scp() {
|
||||
session_write_close();
|
||||
$uppercase_callsign = strtoupper($this->input->post('callsign', TRUE) ?? '');
|
||||
|
||||
|
||||
// SCP results from logbook
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
||||
$arCalls = array();
|
||||
|
||||
|
||||
$query = $this->logbook_model->get_callsigns($uppercase_callsign);
|
||||
|
||||
|
||||
foreach ($query->result() as $row) {
|
||||
$normalized_call = str_replace('0', 'Ø', $row->COL_CALL);
|
||||
$arCalls[$normalized_call] = true;
|
||||
}
|
||||
|
||||
|
||||
// SCP results from Club Log master scp db
|
||||
$file = 'updates/clublog_scp.txt';
|
||||
|
||||
|
||||
if (is_readable($file)) {
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
$input = preg_quote($uppercase_callsign, '~');
|
||||
@@ -107,10 +108,10 @@ class Lookup extends CI_Controller {
|
||||
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// SCP results from master scp https://www.supercheckpartial.com
|
||||
$file = 'updates/MASTER.SCP';
|
||||
|
||||
|
||||
if (is_readable($file)) {
|
||||
$lines = file($file, FILE_IGNORE_NEW_LINES);
|
||||
$input = preg_quote($uppercase_callsign, '~');
|
||||
@@ -128,10 +129,10 @@ class Lookup extends CI_Controller {
|
||||
log_message('error', 'Failed to copy source file ('.$src.') to new location. Check if this path has the right permission: '.$file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Sort and print unique calls
|
||||
ksort($arCalls);
|
||||
|
||||
|
||||
foreach (array_keys($arCalls) as $strCall) {
|
||||
echo " " . $strCall . " ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user