diff --git a/README.md b/README.md
index 49355f72b..5d59c16e4 100644
--- a/README.md
+++ b/README.md
@@ -38,12 +38,12 @@ When submitting PRs please make sure code is commented and includes one feature
## Credits
-Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K0SKW), Andy (GI0VGV), Tobias (DL4TMA), Tony (G0WFV), Kim (DG9VH), Michael (G7VJR), Andreas (LA8AJA), Matthias (DL9MJ) for contributing code or help to Cloudlog.
+Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K0SKW), Andy (GI0VGV), Tobias (DL4TMA), Tony (G0WFV), Kim (DG9VH), Michael (G7VJR), Andreas (LA8AJA), Matthias (DL9MJ), Thomas (DO2TWE) and Pat (KT3PJ) for contributing code or help to Cloudlog.
## Patreons & Donors
Cloudlog is supported by Patreon and donations via PayPal, thanks to the following people:
-Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy
+Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU)
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)
diff --git a/application/controllers/Adif.php b/application/controllers/Adif.php
index 3864f0be5..eb789d6da 100644
--- a/application/controllers/Adif.php
+++ b/application/controllers/Adif.php
@@ -121,26 +121,6 @@ class adif extends CI_Controller {
$this->load->view('adif/mark_lotw', $data);
}
- public function mark_qrz() {
- // Set memory limit to unlimited to allow heavy usage
- ini_set('memory_limit', '-1');
-
- $station_id = $this->security->xss_clean($this->input->post('station_profile'));
-
- $this->load->model('adif_data');
-
- $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
-
- $this->load->model('logbook_model');
-
- foreach ($data['qsos']->result() as $qso)
- {
- $this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
- }
-
- $this->load->view('adif/mark_qrz', $data);
- }
-
public function export_lotw()
{
// Set memory limit to unlimited to allow heavy usage
diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php
index b9996ccb2..6beb4edf3 100644
--- a/application/controllers/Contesting.php
+++ b/application/controllers/Contesting.php
@@ -1,16 +1,13 @@
lang->load('contesting');
@@ -18,47 +15,28 @@ class Contesting extends CI_Controller {
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
- public function index()
- {
-
+ public function index() {
$this->load->model('cat');
$this->load->model('stations');
- $this->load->model('logbook_model');
- $this->load->model('user_model');
$this->load->model('modes');
$this->load->model('contesting_model');
- $data['active_station_profile'] = $this->stations->find_active();
- $data['notice'] = false;
- $data['stations'] = $this->stations->all();
+ $data['my_gridsquare'] = $this->stations->find_gridsquare();
$data['radios'] = $this->cat->radios();
$data['modes'] = $this->modes->active();
$data['contestnames'] = $this->contesting_model->getActivecontests();
-
- $this->load->library('form_validation');
+ $this->load->library('form_validation');
$this->form_validation->set_rules('start_date', 'Date', 'required');
$this->form_validation->set_rules('start_time', 'Time', 'required');
$this->form_validation->set_rules('callsign', 'Callsign', 'required');
- $data['page_title'] = "Contest Logging";
-
- $this->load->view('interface_assets/header', $data);
- $this->load->view('contesting/index');
- $this->load->view('interface_assets/footer');
-
-
- //setcookie("radio", $qso_data['radio'], time()+3600*24*99);
- //setcookie("station_profile_id", $qso_data['station_profile_id'], time()+3600*24*99);
-
- //$this->session->set_userdata($qso_data);
-
- // If SAT name is set make it session set to sat
- if($this->input->post('sat_name')) {
- $this->session->set_userdata('prop_mode', 'SAT');
- }
+ $data['page_title'] = "Contest Logging";
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('contesting/index');
+ $this->load->view('interface_assets/footer');
}
public function getSessionQsos() {
@@ -73,8 +51,7 @@ class Contesting extends CI_Controller {
return json_encode($data);
}
- public function create()
- {
+ public function create() {
$this->load->model('Contesting_model');
$this->load->library('form_validation');
@@ -104,8 +81,7 @@ class Contesting extends CI_Controller {
$this->load->view('interface_assets/footer');
}
- public function edit($id)
- {
+ public function edit($id) {
$this->load->library('form_validation');
$this->load->model('Contesting_model');
diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php
index 5462d8ddb..d061d156e 100644
--- a/application/controllers/Eqsl.php
+++ b/application/controllers/Eqsl.php
@@ -144,19 +144,17 @@ class eqsl extends CI_Controller {
$active_station_info = $station_profile->row();
// Query the logbook to determine when the last LoTW confirmation was
$eqsl_last_qsl_date = $this->logbook_model->eqsl_last_qsl_rcvd_date();
-
- // Build URL for eQSL inbox file
- $eqsl_url .= "?";
- $eqsl_url .= "UserName=" . $data['user_eqsl_name'];
- $eqsl_url .= "&Password=" . urlencode($data['user_eqsl_password']);
-
- $eqsl_url .= "&RcvdSince=" . $eqsl_last_qsl_date;
- $eqsl_url .= "&QTHNickname=" . urlencode($active_station_info->eqslqthnickname);
-
- // Pull back only confirmations
- $eqsl_url .= "&ConfirmedOnly=1";
- //echo "
".$eqsl_url."
";
+ // Build parameters for eQSL inbox file
+ $eqsl_params = http_build_query(array(
+ 'UserName' => $data['user_eqsl_name'],
+ 'Password' => $data['user_eqsl_password'],
+ 'RcvdSince' => $eqsl_last_qsl_date,
+ 'QTHNickname' => $active_station_info->eqslqthnickname,
+ 'ConfirmedOnly' => 1
+ ));
+
+ //echo "
".$eqsl_url."
".$eqsl_params."
";
// At this point, what we get isn't the ADI file we need, but rather
// an HTML page, which contains a link to the generated ADI file that we want.
@@ -170,8 +168,10 @@ class eqsl extends CI_Controller {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
- // use the URL we built
+ // use the URL and params we built
curl_setopt($ch, CURLOPT_URL, $eqsl_url);
+ curl_setopt($ch, CURLOPT_POST, 1);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $eqsl_params);
$input = curl_exec($ch);
$chi = curl_getinfo($ch);
@@ -589,11 +589,24 @@ class eqsl extends CI_Controller {
$this->load->view('interface_assets/footer');
}
- function image($id, $callsign, $mode, $band, $hour, $minute, $day, $month, $year) {
+ function image($id) {
$this->load->library('electronicqsl');
$this->load->model('Eqsl_images');
if($this->Eqsl_images->get_image($id) == "No Image") {
+ $this->load->model('logbook_model');
+ $qso_query = $this->logbook_model->get_qso($id);
+ $qso = $qso_query->row();
+ $qso_timestamp = strtotime($qso->COL_TIME_ON);
+ $callsign = $qso->COL_CALL;
+ $band = $qso->COL_BAND;
+ $mode = $qso->COL_MODE;
+ $year = date('Y', $qso_timestamp);
+ $month = date('m', $qso_timestamp);
+ $day = date('d', $qso_timestamp);
+ $hour = date('H', $qso_timestamp);
+ $minute = date('i', $qso_timestamp);
+
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
$q = $query->row();
$username = $q->user_eqsl_name;
@@ -613,14 +626,14 @@ class eqsl extends CI_Controller {
}
foreach ($images as $image)
- {
- header('Content-Type: image/jpg');
- readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
- $content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
- $filename = uniqid().'.jpg';
- file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
+ {
+ header('Content-Type: image/jpg');
+ readfile ("https://www.eqsl.cc".$image->getAttribute('src'));
+ $content = file_get_contents("https://www.eqsl.cc".$image->getAttribute('src'));
+ $filename = uniqid().'.jpg';
+ file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content);
- $this->Eqsl_images->save_image($id, $filename);
+ $this->Eqsl_images->save_image($id, $filename);
}
} else {
header('Content-Type: image/jpg');
diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php
index e05716b59..432bd82eb 100755
--- a/application/controllers/Logbook.php
+++ b/application/controllers/Logbook.php
@@ -137,7 +137,7 @@ class Logbook extends CI_Controller {
$measurement_base = $this->session->userdata('user_measurement_base');
}
- $return['callsign_name'] = $this->logbook_model->call_name($callsign);
+ $return['callsign_name'] = $this->logbook_model->call_name($callsign);
$return['callsign_qra'] = $this->logbook_model->call_qra($callsign);
$return['callsign_qth'] = $this->logbook_model->call_qth($callsign);
$return['callsign_iota'] = $this->logbook_model->call_iota($callsign);
@@ -155,38 +155,8 @@ class Logbook extends CI_Controller {
}
- if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null)
- {
- // Lookup using QRZ
- $this->load->library('qrz');
+ $callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
- if(!$this->session->userdata('qrz_session_key')) {
- $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);
- }
-
- $callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'));
- }
-
- if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null)
- {
- // Load the HamQTH library
- $this->load->library('hamqth');
-
- if(!$this->session->userdata('hamqth_session_key')) {
- $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
- $this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
- }
-
- $callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
-
- // If HamQTH session has expired, start a new session and retry the search.
- if($callbook['error'] == "Session does not exist or expired") {
- $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
- $this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
- $callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
- }
- }
if (isset($callbook))
{
@@ -552,8 +522,14 @@ class Logbook extends CI_Controller {
$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'));
- $data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
+ if (empty($data['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'));
+ }
}
// There's no hamli integration? Disabled for now.
@@ -610,7 +586,7 @@ class Logbook extends CI_Controller {
$this->session->set_userdata('qrz_session_key', $qrz_session_key);
}
- $data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'));
+ $data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
} else {
// Lookup using hamli
$this->load->library('hamli');
diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php
index 29e1e856e..c663d6ff2 100644
--- a/application/controllers/Qrz.php
+++ b/application/controllers/Qrz.php
@@ -108,11 +108,8 @@ class Qrz extends CI_Controller {
$data['page_title'] = "QRZ Logbook";
+ $data['station_profiles'] = $this->stations->all();
$data['station_profile'] = $this->stations->stations_with_qrz_api_key();
- $active_station_id = $this->stations->find_active();
- $station_profile = $this->stations->profile($active_station_id);
-
- $data['active_station_info'] = $station_profile->row();
$this->load->view('interface_assets/header', $data);
$this->load->view('qrz/export');
@@ -125,6 +122,7 @@ class Qrz extends CI_Controller {
public function upload_station() {
$this->setOptions();
$this->load->model('stations');
+
$postData = $this->input->post();
$this->load->model('logbook_model');
@@ -148,4 +146,26 @@ class Qrz extends CI_Controller {
echo json_encode($data);
}
}
-}
\ No newline at end of file
+
+ public function mark_qrz() {
+ // Set memory limit to unlimited to allow heavy usage
+ ini_set('memory_limit', '-1');
+
+ $station_id = $this->security->xss_clean($this->input->post('station_profile'));
+
+ $this->load->model('adif_data');
+
+ $data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $station_id);
+
+ $this->load->model('logbook_model');
+
+ foreach ($data['qsos']->result() as $qso)
+ {
+ $this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
+ }
+
+ $this->load->view('interface_assets/header', $data);
+ $this->load->view('qrz/mark_qrz', $data);
+ $this->load->view('interface_assets/footer');
+ }
+}
diff --git a/application/controllers/Qslprint.php b/application/controllers/Qslprint.php
index 3de67e652..bc826b06b 100644
--- a/application/controllers/Qslprint.php
+++ b/application/controllers/Qslprint.php
@@ -35,8 +35,8 @@ class QSLPrint extends CI_Controller {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
- if ($this->uri->segment(3) == 'All') {
- $station_id = NULL;
+ if ($this->uri->segment(3) == 'all') {
+ $station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}
@@ -53,8 +53,8 @@ class QSLPrint extends CI_Controller {
// Set memory limit to unlimited to allow heavy usage
ini_set('memory_limit', '-1');
- if ($this->uri->segment(3) == 'All') {
- $station_id = NULL;
+ if ($this->uri->segment(3) == 'all') {
+ $station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}
@@ -115,8 +115,8 @@ class QSLPrint extends CI_Controller {
function qsl_printed() {
- if ($this->uri->segment(3) == 'All') {
- $station_id = NULL;
+ if ($this->uri->segment(3) == 'all') {
+ $station_id = 'All';
} else {
$station_id = $this->security->xss_clean($this->uri->segment(3));
}
diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php
index e8e2f957d..245fc1a9a 100755
--- a/application/controllers/Qso.php
+++ b/application/controllers/Qso.php
@@ -153,6 +153,7 @@ class QSO extends CI_Controller {
$this->load->model('logbook_model');
$this->load->model('user_model');
$this->load->model('modes');
+ $this->load->model('contesting_model');
$this->load->library('form_validation');
@@ -167,6 +168,7 @@ class QSO extends CI_Controller {
$data['dxcc'] = $this->logbook_model->fetchDxcc();
$data['iota'] = $this->logbook_model->fetchIota();
$data['modes'] = $this->modes->all();
+ $data['contest'] = $this->contesting_model->getActivecontests();
$this->load->view('qso/edit_ajax', $data);
}
@@ -384,7 +386,7 @@ class QSO extends CI_Controller {
foreach ($result as &$value) {
$county = explode(',', $value);
// Limit to 100 as to not slowdown browser too much
- if (count($json) <= 100) {
+ if (count($json) <= 300) {
$json[] = ["name"=>$county[1]];
}
}
diff --git a/application/controllers/Search.php b/application/controllers/Search.php
index 3ef1f1f66..50de2354f 100644
--- a/application/controllers/Search.php
+++ b/application/controllers/Search.php
@@ -32,6 +32,7 @@ class Search extends CI_Controller {
$this->load->model('Search_filter');
$data['get_table_names'] = $this->Search_filter->get_table_columns();
+ $data['stored_queries'] = $this->Search_filter->get_stored_queries();
//print_r($this->Search_filter->get_table_columns());
@@ -50,262 +51,342 @@ class Search extends CI_Controller {
}
function json_result() {
-
if(isset($_POST['search'])) {
- $json = $_POST['search'];
-
- $search_items = json_decode($json, true);
-
- $search_type = "";
-
- foreach($search_items as $key=>$value){
-
-
- if($value == "AND") {
- $search_type = "AND";
- }
- if ($value == "OR") {
- $search_type = "OR";
- }
-
- if(is_array($value)) {
- foreach($value as $values)
- {
-
- if(isset($values['rules'])) {
- if($values['condition'] == "AND") {
- $this->db->group_start();
- } else {
- $this->db->or_group_start();
- }
- foreach($values['rules'] as $group_value)
- {
- if($group_value['operator'] == "equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'], $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'], $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "not_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' !=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' !=', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "begins_with") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', $group_value['value']."%");
- } else {
- $this->db->or_where($group_value['field'].' like ', $group_value['value']."%");
- }
- }
-
- if($group_value['operator'] == "contains") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', "%".$group_value['value']."%");
- } else {
- $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']."%");
- }
- }
-
- if($group_value['operator'] == "ends_with") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' like ', "%".$group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']);
- }
- }
-
- if($group_value['operator'] == "is_empty") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'], "''");
- } else {
- $this->db->or_where($group_value['field'], "''");
- }
- }
-
- if($group_value['operator'] == "is_not_empty") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' !=', "''");
- } else {
- $this->db->or_where($group_value['field'].' !=', "''");
- }
- }
-
- if($group_value['operator'] == "is_null") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' is ', NULL);
- } else {
- $this->db->or_where($group_value['field'].' is ', NULL);
- }
- }
-
- if($group_value['operator'] == "is_not_null") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' is not ', NULL);
- } else {
- $this->db->or_where($group_value['field'].' is not ', NULL);
- }
- }
-
-
- if($group_value['operator'] == "less") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' <', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' <', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "less_or_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' <=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' <=', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "greater") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' >', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' >', $group_value['value']);
- }
- }
-
- if($group_value['operator'] == "greater_or_equal") {
- if($values['condition'] == "AND") {
- $this->db->where($group_value['field'].' >=', $group_value['value']);
- } else {
- $this->db->or_where($group_value['field'].' >=', $group_value['value']);
- }
- }
-
- }
- $this->db->group_end();
- } else {
- //print_r($values['field']);
- if(isset($values['operator'])) {
-
- }
- if($values['operator'] == "equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'], $values['value']);
- } else {
- $this->db->or_where($values['field'], $values['value']);
- }
- }
-
- if($values['operator'] == "not_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' !=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' !=', $values['value']);
- }
- }
-
- if($values['operator'] == "begins_with") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', $values['value']."%");
- } else {
- $this->db->or_where($values['field'].' like ', $values['value']."%");
- }
- }
-
- if($values['operator'] == "contains") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', "%".$values['value']."%");
- } else {
- $this->db->or_where($values['field'].' like ', "%".$values['value']."%");
- }
- }
-
- if($values['operator'] == "ends_with") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' like ', "%".$values['value']);
- } else {
- $this->db->or_where($values['field'].' like ', "%".$values['value']);
- }
- }
-
- if($values['operator'] == "is_empty") {
- if($search_type == "AND") {
- $this->db->where($values['field'], "");
- } else {
- $this->db->or_where($values['field'], "");
- }
- }
-
- if($values['operator'] == "is_not_empty") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' !=', "");
- } else {
- $this->db->or_where($values['field'].' !=', "");
- }
- }
-
- if($values['operator'] == "is_null") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' is ', NULL);
- } else {
- $this->db->or_where($values['field'].' is ', NULL);
- }
- }
-
- if($values['operator'] == "is_not_null") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' is not ', NULL);
- } else {
- $this->db->or_where($values['field'].' is not ', NULL);
- }
- }
-
- if($values['operator'] == "less") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' <', $values['value']);
- } else {
- $this->db->or_where($values['field'].' <', $values['value']);
- }
- }
-
- if($values['operator'] == "less_or_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' <=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' <=', $values['value']);
- }
- }
-
- if($values['operator'] == "greater") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' >', $values['value']);
- } else {
- $this->db->or_where($values['field'].' >', $values['value']);
- }
- }
-
- if($values['operator'] == "greater_or_equal") {
- if($search_type == "AND") {
- $this->db->where($values['field'].' >=', $values['value']);
- } else {
- $this->db->or_where($values['field'].' >=', $values['value']);
- }
- }
- }
-
- }
- }
- }
- $this->db->order_by('COL_TIME_ON', 'DESC');
- $query = $this->db->get($this->config->item('table_name'));
- echo json_encode($query->result_array());
- } else {
- echo "Noooooooob";
- }
-
+ $result = $this->fetchQueryResult($_POST['search'], false);
+ echo json_encode($result->result_array());
+ }
}
+
+ function get_stored_queries() {
+ $this->load->model('Search_filter');
+ $data['result'] = $this->Search_filter->get_stored_queries();
+ $this->load->view('search/stored_queries', $data);
+ }
+
+ function search_result() {
+ if(isset($_POST['search'])) {
+ $data['results'] = $this->fetchQueryResult($_POST['search'], false);
+ $this->load->view('search/search_result_ajax', $data);
+ }
+ }
+
+ function export_to_adif() {
+ if(isset($_POST['search'])) {
+ $data['qsos'] = $this->fetchQueryResult($_POST['search'], false);
+ $this->load->view('adif/data/exportall', $data);
+ }
+ }
+
+ function export_stored_query_to_adif() {
+ $this->db->where('id', xss_clean($this->input->post('id')));
+ $sql = $this->db->get('queries')->result();
+
+ $data['qsos'] = $this->db->query($sql[0]->query);
+ $this->load->view('adif/data/exportall', $data);
+ }
+
+ function run_query() {
+ $this->db->where('id', xss_clean($this->input->post('id')));
+ $sql = $this->db->get('queries')->result();
+ $sql = $sql[0]->query;
+
+ if (stristr($sql, 'select') && !stristr($sql, 'delete') && !stristr($sql, 'update')) {
+ $data['results'] = $this->db->query($sql);
+
+ $this->load->view('search/search_result_ajax', $data);
+ }
+ }
+
+ function save_query() {
+ if(isset($_POST['search'])) {
+ $query = $this->fetchQueryResult($_POST['search'], true);
+
+ $data = array(
+ 'userid' => xss_clean($this->session->userdata('user_id')),
+ 'query' => $query,
+ 'description' => xss_clean($_POST['description'])
+ );
+
+ $this->db->insert('queries', $data);
+ $last_id = $this->db->insert_id();
+ header('Content-Type: application/json');
+ echo json_encode(array('id' => $last_id, 'description' => xss_clean($_POST['description'])));
+ }
+ }
+
+ function delete_query() {
+ $id = xss_clean($this->input->post('id'));
+ $this->load->model('search_filter');
+ $this->search_filter->delete_query($id);
+ }
+
+ function save_edited_query() {
+ $data = array(
+ 'description' => xss_clean($this->input->post('description')),
+ );
+
+ $this->db->where('id', xss_clean($this->input->post('id')));
+ $this->db->where('userid', $this->session->userdata['user_id']);
+ $this->db->update('queries', $data);
+ }
+
+ function fetchQueryResult($json, $returnquery) {
+
+ $search_items = json_decode($json, true);
+
+ $search_type = "";
+
+ foreach($search_items as $key=>$value){
+
+
+ if($value == "AND") {
+ $search_type = "AND";
+ }
+ if ($value == "OR") {
+ $search_type = "OR";
+ }
+
+ if(is_array($value)) {
+ foreach($value as $values)
+ {
+
+ if(isset($values['rules'])) {
+ if($values['condition'] == "AND") {
+ $this->db->group_start();
+ } else {
+ $this->db->or_group_start();
+ }
+ foreach($values['rules'] as $group_value)
+ {
+ if($group_value['operator'] == "equal") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'], $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'], $group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "not_equal") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' !=', $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' !=', $group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "begins_with") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' like ', $group_value['value']."%");
+ } else {
+ $this->db->or_where($group_value['field'].' like ', $group_value['value']."%");
+ }
+ }
+
+ if($group_value['operator'] == "contains") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' like ', "%".$group_value['value']."%");
+ } else {
+ $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']."%");
+ }
+ }
+
+ if($group_value['operator'] == "ends_with") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' like ', "%".$group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' like ', "%".$group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "is_empty") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'], "''");
+ } else {
+ $this->db->or_where($group_value['field'], "''");
+ }
+ }
+
+ if($group_value['operator'] == "is_not_empty") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' !=', "''");
+ } else {
+ $this->db->or_where($group_value['field'].' !=', "''");
+ }
+ }
+
+ if($group_value['operator'] == "is_null") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' is ', NULL);
+ } else {
+ $this->db->or_where($group_value['field'].' is ', NULL);
+ }
+ }
+
+ if($group_value['operator'] == "is_not_null") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' is not ', NULL);
+ } else {
+ $this->db->or_where($group_value['field'].' is not ', NULL);
+ }
+ }
+
+
+ if($group_value['operator'] == "less") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' <', $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' <', $group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "less_or_equal") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' <=', $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' <=', $group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "greater") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' >', $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' >', $group_value['value']);
+ }
+ }
+
+ if($group_value['operator'] == "greater_or_equal") {
+ if($values['condition'] == "AND") {
+ $this->db->where($group_value['field'].' >=', $group_value['value']);
+ } else {
+ $this->db->or_where($group_value['field'].' >=', $group_value['value']);
+ }
+ }
+
+ }
+ $this->db->group_end();
+ } else {
+ //print_r($values['field']);
+ if(isset($values['operator'])) {
+
+ }
+ if($values['operator'] == "equal") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'], $values['value']);
+ } else {
+ $this->db->or_where($values['field'], $values['value']);
+ }
+ }
+
+ if($values['operator'] == "not_equal") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' !=', $values['value']);
+ } else {
+ $this->db->or_where($values['field'].' !=', $values['value']);
+ }
+ }
+
+ if($values['operator'] == "begins_with") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' like ', $values['value']."%");
+ } else {
+ $this->db->or_where($values['field'].' like ', $values['value']."%");
+ }
+ }
+
+ if($values['operator'] == "contains") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' like ', "%".$values['value']."%");
+ } else {
+ $this->db->or_where($values['field'].' like ', "%".$values['value']."%");
+ }
+ }
+
+ if($values['operator'] == "ends_with") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' like ', "%".$values['value']);
+ } else {
+ $this->db->or_where($values['field'].' like ', "%".$values['value']);
+ }
+ }
+
+ if($values['operator'] == "is_empty") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'], "");
+ } else {
+ $this->db->or_where($values['field'], "");
+ }
+ }
+
+ if($values['operator'] == "is_not_empty") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' !=', "");
+ } else {
+ $this->db->or_where($values['field'].' !=', "");
+ }
+ }
+
+ if($values['operator'] == "is_null") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' is ', NULL);
+ } else {
+ $this->db->or_where($values['field'].' is ', NULL);
+ }
+ }
+
+ if($values['operator'] == "is_not_null") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' is not ', NULL);
+ } else {
+ $this->db->or_where($values['field'].' is not ', NULL);
+ }
+ }
+
+ if($values['operator'] == "less") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' <', $values['value']);
+ } else {
+ $this->db->or_where($values['field'].' <', $values['value']);
+ }
+ }
+
+ if($values['operator'] == "less_or_equal") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' <=', $values['value']);
+ } else {
+ $this->db->or_where($values['field'].' <=', $values['value']);
+ }
+ }
+
+ if($values['operator'] == "greater") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' >', $values['value']);
+ } else {
+ $this->db->or_where($values['field'].' >', $values['value']);
+ }
+ }
+
+ if($values['operator'] == "greater_or_equal") {
+ if($search_type == "AND") {
+ $this->db->where($values['field'].' >=', $values['value']);
+ } else {
+ $this->db->or_where($values['field'].' >=', $values['value']);
+ }
+ }
+ }
+
+ }
+ }
+ }
+
+ $this->db->order_by('COL_TIME_ON', 'DESC');
+ $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
+
+ if ($returnquery) {
+ $query = $this->db->get_compiled_select($this->config->item('table_name'));
+ } else {
+ $query = $this->db->get($this->config->item('table_name'));
+ }
+ return $query;
+ }
}
diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php
index 9f7c057b9..3454a7064 100644
--- a/application/language/english/general_words_lang.php
+++ b/application/language/english/general_words_lang.php
@@ -94,6 +94,7 @@ $lang['gen_hamradio_wwff_reference'] = 'WWFF Reference';
$lang['gen_hamradio_dok'] = 'DOK';
$lang['gen_hamradio_state'] = 'State';
$lang['gen_hamradio_iota'] = 'IOTA';
+$lang['gen_hamradio_sota'] = 'SOTA';
$lang['gen_hamradio_gridsquare'] = 'Gridsquare';
$lang['gen_hamradio_sig'] = 'Sig';
diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php
index 09c616625..d48b88cc0 100644
--- a/application/language/german/general_words_lang.php
+++ b/application/language/german/general_words_lang.php
@@ -14,7 +14,7 @@ $lang['general_word_date'] = 'Datum';
$lang['general_word_time'] = 'Zeit';
$lang['general_word_none'] = 'None';
$lang['general_word_name'] = 'Name';
-$lang['general_word_location'] = 'Stelle';
+$lang['general_word_location'] = 'Standort';
$lang['general_word_comment'] = 'Kommentar';
$lang['general_word_general'] = 'Allgemeines';
$lang['general_word_satellite'] = 'Satellit';
diff --git a/application/libraries/AdifHelper.php b/application/libraries/AdifHelper.php
index 65a26c379..c2d045e44 100644
--- a/application/libraries/AdifHelper.php
+++ b/application/libraries/AdifHelper.php
@@ -110,6 +110,8 @@ class AdifHelper {
$line .= $this->getAdifFieldLine("SRX_STRING", $qso->COL_SRX_STRING);
+ $line .= $this->getAdifFieldLine("CONTEST_ID", $qso->COL_CONTEST_ID);
+
$line .= $this->getAdifFieldLine("TX_PWR", $qso->COL_TX_PWR);
$line .= $this->getAdifFieldLine("COMMENT", $qso->COL_COMMENT);
diff --git a/application/libraries/Hamqth.php b/application/libraries/Hamqth.php
index ff10e1e8d..b347b47e4 100644
--- a/application/libraries/Hamqth.php
+++ b/application/libraries/Hamqth.php
@@ -56,41 +56,44 @@ class Hamqth {
public function search($callsign, $key)
{
+ $data = null;
+ try {
+ // URL to the XML Source
+ $xml_feed_url = 'https://www.hamqth.com/xml.php?id=' . $key . '&callsign=' . $callsign . '&prg=cloudlog';
- // URL to the XML Source
- $xml_feed_url = 'https://www.hamqth.com/xml.php?id='.$key.'&callsign='.$callsign.'&prg=cloudlog';
+ // CURL Functions
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
+ curl_setopt($ch, CURLOPT_HEADER, false);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $xml = curl_exec($ch);
+ curl_close($ch);
- // CURL Functions
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
- curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $xml = curl_exec($ch);
- curl_close($ch);
+ // Create XML object
+ $xml = simplexml_load_string($xml);
+ if (empty($xml)) return;
- // Create XML object
- $xml = simplexml_load_string($xml);
+ // Return Required Fields
+ $data['callsign'] = (string)$xml->search->callsign;
+ $data['name'] = (string)$xml->search->nick;
+ $data['gridsquare'] = (string)$xml->search->grid;
+ $data['city'] = (string)$xml->search->adr_city;
+ $data['lat'] = (string)$xml->search->latitude;
+ $data['long'] = (string)$xml->search->longitude;
+ $data['iota'] = (string)$xml->search->iota;
+ $data['us_state'] = (string)$xml->search->us_state;
+ $data['us_county'] = (string)$xml->search->us_county;
+ $data['error'] = (string)$xml->session->error;
- // Return Required Fields
- $data['callsign'] = (string) $xml->search->callsign;
- $data['name'] = (string) $xml->search->nick;
- $data['gridsquare'] = (string) $xml->search->grid;
- $data['city'] = (string) $xml->search->adr_city;
- $data['lat'] = (string) $xml->search->latitude;
- $data['long'] = (string) $xml->search->longitude;
- $data['iota'] = (string) $xml->search->iota;
- $data['us_state'] = (string) $xml->search->us_state;
- $data['us_county'] = (string) $xml->search->us_county;
- $data['error'] = (string) $xml->session->error;
-
- if($xml->search->country == "United States") {
- $data['state'] = (string) $xml->search->us_state;
- $data['us_county'] = (string) $xml->search->us_county;
- } else {
- $data['state'] = null;
- $data['us_county'] = null;
- }
-
- return $data;
+ if ($xml->search->country == "United States") {
+ $data['state'] = (string)$xml->search->us_state;
+ $data['us_county'] = (string)$xml->search->us_county;
+ } else {
+ $data['state'] = null;
+ $data['us_county'] = null;
+ }
+ } finally {
+ return $data;
+ }
}
}
diff --git a/application/libraries/Qra.php b/application/libraries/Qra.php
index 7398151d9..322b3e1ed 100644
--- a/application/libraries/Qra.php
+++ b/application/libraries/Qra.php
@@ -23,14 +23,18 @@ class Qra {
// calculate the bearing between two squares
function bearing($tx, $rx, $unit = 'M') {
- if(strlen($tx) <= 6 && strlen($rx) <= 6) {
- $my = qra2latlong($tx);
- $stn = qra2latlong($rx);
-
- $bearing = bearing($my[0], $my[1], $stn[0], $stn[1], $unit);
-
- return $bearing;
+ if(strlen($tx) > 6) {
+ $tx = substr($tx, 0, 6);
}
+ if(strlen($rx) > 6) {
+ $rx = substr($rx, 0, 6);
+ }
+ $my = qra2latlong($tx);
+ $stn = qra2latlong($rx);
+
+ $bearing = bearing($my[0], $my[1], $stn[0], $stn[1], $unit);
+
+ return $bearing;
}
/*
@@ -40,6 +44,12 @@ class Qra {
*
*/
function distance($tx, $rx, $unit = 'M') {
+ if(strlen($tx) > 6) {
+ $tx = substr($tx, 0, 6);
+ }
+ if(strlen($rx) > 6) {
+ $rx = substr($rx, 0, 6);
+ }
// Calc LatLongs
$my = qra2latlong($tx);
$stn = qra2latlong($rx);
@@ -52,12 +62,9 @@ class Qra {
}
}
-
-
function distance($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
$theta = $lon1 - $lon2;
- $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) *
-cos(deg2rad($theta));
+ $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta));
$dist = acos($dist);
$dist = rad2deg($dist);
$dist = $dist * 60 * 1.1515;
@@ -111,27 +118,28 @@ function get_bearing($lat1, $lon1, $lat2, $lon2) {
return (rad2deg(atan2(sin(deg2rad($lon2) - deg2rad($lon1)) * cos(deg2rad($lat2)), cos(deg2rad($lat1)) * sin(deg2rad($lat2)) - sin(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($lon2) - deg2rad($lon1)))) + 360) % 360;
}
-function qra2latlong($strQRA)
-
-{
- if (strlen($strQRA) %2 == 0) {
- $strQRA = strtoupper($strQRA);
- if (strlen($strQRA) == 4) $strQRA .= "MM";
- if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}$/',$strQRA)) return false;
- list($a,$b,$c,$d,$e,$f) = str_split($strQRA,1);
- $a = ord($a) - ord('A');
- $b = ord($b) - ord('A');
- $c = ord($c) - ord('0');
- $d = ord($d) - ord('0');
- $e = ord($e) - ord('A');
- $f = ord($f) - ord('A');
- $nLong = ($a*20) + ($c*2) + (($e+0.5)/12) - 180;
- $nLat = ($b*10) + $d + (($f+0.5)/24) - 90;
- $arLatLong = array($nLat,$nLong);
- return($arLatLong);
- } else {
- return array(0, 0);
+function qra2latlong($strQRA) {
+ if (strlen($strQRA) %2 == 0) {
+ $strQRA = strtoupper($strQRA);
+ if (strlen($strQRA) == 4) $strQRA .= "MM";
+ if(strlen($strQRA) > 6) {
+ $strQRA = substr($strQRA, 0, 6);
}
+ if (!preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}$/',$strQRA)) return false;
+ list($a,$b,$c,$d,$e,$f) = str_split($strQRA,1);
+ $a = ord($a) - ord('A');
+ $b = ord($b) - ord('A');
+ $c = ord($c) - ord('0');
+ $d = ord($d) - ord('0');
+ $e = ord($e) - ord('A');
+ $f = ord($f) - ord('A');
+ $nLong = ($a*20) + ($c*2) + (($e+0.5)/12) - 180;
+ $nLat = ($b*10) + $d + (($f+0.5)/24) - 90;
+ $arLatLong = array($nLat,$nLong);
+ return($arLatLong);
+ } else {
+ return array(0, 0);
+ }
}
/* End of file Qra.php */
diff --git a/application/libraries/Qrz.php b/application/libraries/Qrz.php
index 1359a8c9c..d1a26f30f 100755
--- a/application/libraries/Qrz.php
+++ b/application/libraries/Qrz.php
@@ -54,42 +54,51 @@ class Qrz {
}
- public function search($callsign, $key)
+ public function search($callsign, $key, $use_fullname)
{
+ $data = null;
+ try {
+ // URL to the XML Source
+ $xml_feed_url = 'http://xmldata.qrz.com/xml/current/?s=' . $key . ';callsign=' . $callsign . '';
- // URL to the XML Source
- $xml_feed_url = 'http://xmldata.qrz.com/xml/current/?s='.$key.';callsign='.$callsign.'';
-
- // CURL Functions
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
- curl_setopt($ch, CURLOPT_HEADER, false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $xml = curl_exec($ch);
- curl_close($ch);
-
- // Create XML object
- $xml = simplexml_load_string($xml);
-
- // Return Required Fields
- $data['callsign'] = (string) $xml->Callsign->call;
- $data['name'] = (string) $xml->Callsign->fname;
- $data['gridsquare'] = (string) $xml->Callsign->grid;
- $data['city'] = (string) $xml->Callsign->addr2;
- $data['lat'] = (string) $xml->Callsign->lat;
- $data['long'] = (string) $xml->Callsign->lon;
- $data['iota'] = (string) $xml->Callsign->iota;
- $data['qslmgr'] = (string) $xml->Callsign->qslmgr;
+ // CURL Functions
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, $xml_feed_url);
+ curl_setopt($ch, CURLOPT_HEADER, false);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ $xml = curl_exec($ch);
+ curl_close($ch);
- if($xml->Callsign->country == "United States") {
- $data['state'] = (string) $xml->Callsign->state;
- $data['us_county'] = (string) $xml->Callsign->county;
- } else {
- $data['state'] = null;
- $data['us_county'] = null;
- }
+ // Create XML object
+ $xml = simplexml_load_string($xml);
+ if (empty($xml)) return;
-
- return $data;
+ // Return Required Fields
+ $data['callsign'] = (string)$xml->Callsign->call;
+
+ if ($use_fullname === true) {
+ $data['name'] = (string)$xml->Callsign->fname. ' ' . (string)$xml->Callsign->name;
+ } else {
+ $data['name'] = (string)$xml->Callsign->fname;
+ }
+ $data['name'] = trim($data['name']);
+ $data['gridsquare'] = (string)$xml->Callsign->grid;
+ $data['city'] = (string)$xml->Callsign->addr2;
+ $data['lat'] = (string)$xml->Callsign->lat;
+ $data['long'] = (string)$xml->Callsign->lon;
+ $data['iota'] = (string)$xml->Callsign->iota;
+ $data['qslmgr'] = (string)$xml->Callsign->qslmgr;
+
+ if ($xml->Callsign->country == "United States") {
+ $data['state'] = (string)$xml->Callsign->state;
+ $data['us_county'] = (string)$xml->Callsign->county;
+ } else {
+ $data['state'] = null;
+ $data['us_county'] = null;
+ }
+ } finally {
+
+ return $data;
+ }
}
}
diff --git a/application/migrations/071_add_queries_table.php b/application/migrations/071_add_queries_table.php
new file mode 100644
index 000000000..a1f90889b
--- /dev/null
+++ b/application/migrations/071_add_queries_table.php
@@ -0,0 +1,14 @@
+db->query("create table if not exists queries (id integer not null auto_increment, query text, description text, userid integer not null, primary key (id)) ENGINE=myisam DEFAULT CHARSET=utf8;");
+ }
+
+ public function down()
+ {
+ $this->db->query("");
+ }
+}
diff --git a/application/models/Adif_data.php b/application/models/Adif_data.php
index b43ef50e8..7210dbe41 100644
--- a/application/models/Adif_data.php
+++ b/application/models/Adif_data.php
@@ -25,7 +25,7 @@ class adif_data extends CI_Model {
if ($station_id == NULL) {
$this->db->where($this->config->item('table_name').'.station_id', $active_station_id);
- } else {
+ } else if ($station_id != 'All') {
$this->db->where($this->config->item('table_name').'.station_id', $station_id);
}
diff --git a/application/models/Contesting_model.php b/application/models/Contesting_model.php
index 1b6d60d8e..a3832258e 100644
--- a/application/models/Contesting_model.php
+++ b/application/models/Contesting_model.php
@@ -21,7 +21,10 @@ class Contesting_model extends CI_Model {
$date = DateTime::createFromFormat('d-m-Y H:i:s', $qsoarray[0]);
$date = $date->format('Y-m-d H:i:s');
- $sql = "SELECT date_format(col_time_on, '%d-%m-%Y %H:%i:%s') as col_time_on, col_call, col_band, col_mode, col_submode, col_rst_sent, col_rst_rcvd, col_srx, col_srx_string, col_stx, col_stx_string FROM " .
+ $sql = "SELECT date_format(col_time_on, '%d-%m-%Y %H:%i:%s') as col_time_on, col_call, col_band, col_mode,
+ col_submode, col_rst_sent, col_rst_rcvd, coalesce(col_srx, '') col_srx, coalesce(col_srx_string, '') col_srx_string,
+ coalesce(col_stx, '') col_stx, coalesce(col_stx_string, '') col_stx_string, coalesce(col_gridsquare, '') col_gridsquare,
+ coalesce(col_vucc_grids, '') col_vucc_grids FROM " .
$this->config->item('table_name') .
" WHERE station_id = " . $station_id .
" AND COL_TIME_ON >= '" . $date . "'" .
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index 660dd3145..798412f49 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -23,18 +23,11 @@ class Logbook_model extends CI_Model {
}
// Contest exchange, need to separate between serial and other type of exchange
- if($this->input->post('exchangeradio')) {
- if($this->input->post('exchangeradio') == "serial") {
- $srx = $this->input->post('exch_recv');
- $stx = $this->input->post('exch_sent');
- $srx_string = null;
- $stx_string = null;
- } else {
- $srx = null;
- $stx = null;
- $srx_string = $this->input->post('exch_recv');
- $stx_string = $this->input->post('exch_sent');
- }
+ if($this->input->post('exchangetype')) {
+ $srx_string = $this->input->post('exch_recv');
+ $stx_string = $this->input->post('exch_sent');
+ $srx = $this->input->post('exch_serial_r');
+ $stx = $this->input->post('exch_serial_s');
} else {
$srx_string = null;
$stx_string = null;
@@ -162,7 +155,7 @@ class Logbook_model extends CI_Model {
'COL_SIG' => trim($this->input->post('sig')),
'COL_SIG_INFO' => trim($this->input->post('sig_info')),
'COL_DARC_DOK' => trim($this->input->post('darc_dok')),
- 'COL_NOTES' => $this->input->post('notes'),
+ 'COL_NOTES' => $this->input->post('notes'),
);
$station_id = $this->input->post('station_profile');
@@ -494,6 +487,12 @@ class Logbook_model extends CI_Model {
$srx_string = null;
}
+ if (stristr($this->input->post('usa_county'), ',')) {
+ $uscounty = $this->input->post('usa_county');
+ } else {
+ $uscounty = $this->input->post('usa_state') .",".$this->input->post('usa_county');
+ }
+
$data = array(
'COL_TIME_ON' => $this->input->post('time_on'),
'COL_TIME_OFF' => $this->input->post('time_off'),
@@ -543,7 +542,7 @@ class Logbook_model extends CI_Model {
'station_id' => $this->input->post('station_profile'),
'COL_OPERATOR' => $this->input->post('operator_callsign'),
'COL_STATE' =>$this->input->post('usa_state'),
- 'COL_CNTY' =>$this->input->post('usa_state') .",".$this->input->post('usa_county'),
+ 'COL_CNTY' => $uscounty
);
if ($this->exists_qrz_api_key($data['station_id'])) {
@@ -802,23 +801,21 @@ class Logbook_model extends CI_Model {
COL_SAT_MODE,
COL_QSL_RCVD,
COL_COMMENT,
- (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING,
- ADIF,
- ENTITY
- FROM '.$this->config->item('table_name').', dxcc_prefixes, station_profile
- WHERE
- COL_QSL_SENT in (\'R\', \'Q\')
- and (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like CONCAT(dxcc_prefixes.call,\'%\')
- and (end is null or end > now())
- and ' . $this->config->item('table_name') . '.station_id = station_profile.station_id';
+ (select adif from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ADIF,
+ (select entity from dxcc_prefixes where (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) like concat(dxcc_prefixes.`call`,\'%\') order by end limit 1) as ENTITY,
+ (CASE WHEN COL_QSL_VIA != \'\' THEN COL_QSL_VIA ELSE COL_CALL END) AS COL_ROUTING
+ FROM '.$this->config->item('table_name').' thcv
+ join station_profile on thcv.station_id = station_profile.station_id
+ WHERE
+ COL_QSL_SENT in (\'R\', \'Q\')';
if ($station_id2 == NULL) {
- $sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id;
- } else {
- $sql .= ' and ' . $this->config->item('table_name') . '.station_id = ' . $station_id2;
+ $sql .= ' and thcv.station_id = ' . $station_id;
+ } else if ($station_id2 != 'All') {
+ $sql .= ' and thcv.station_id = ' . $station_id2;
}
- $sql .= ' ORDER BY adif, col_routing';
+ $sql .= ' ORDER BY ADIF, COL_ROUTING';
$query = $this->db->query($sql);
return $query;
@@ -1667,7 +1664,7 @@ class Logbook_model extends CI_Model {
$entity = $this->get_entity($record['dxcc']);
$dxcc = array($record['dxcc'], $entity['name']);
} else {
- $dxcc = NULL;
+ $dxcc = $this->check_dxcc_table($record['call'], $time_off);
}
} else {
$dxcc = $this->check_dxcc_table($record['call'], $time_off);
@@ -1680,7 +1677,9 @@ class Logbook_model extends CI_Model {
if(isset($record['country'])) {
$country = $record['country'];
} else {
- $country = ucwords(strtolower($dxcc[1]));
+ if (isset($dxcc[1])) {
+ $country = ucwords(strtolower($dxcc[1]));
+ }
}
// RST recevied
@@ -2410,6 +2409,54 @@ class Logbook_model extends CI_Model {
}
}
+ public function loadCallBook($callsign, $use_fullname=false)
+ {
+ $callbook = null;
+ try {
+ if ($this->config->item('callbook') == "qrz" && $this->config->item('qrz_username') != null && $this->config->item('qrz_password') != null) {
+ // Lookup using QRZ
+ $this->load->library('qrz');
+
+ if (!$this->session->userdata('qrz_session_key')) {
+ $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);
+ }
+
+
+
+ $callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
+
+ // if we got nothing, it's probably because our session key is invalid, try again
+ if (!isset($callbook['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);
+ $callbook = $this->qrz->search($callsign, $this->session->userdata('qrz_session_key'), $use_fullname);
+ }
+ }
+
+ if ($this->config->item('callbook') == "hamqth" && $this->config->item('hamqth_username') != null && $this->config->item('hamqth_password') != null) {
+ // Load the HamQTH library
+ $this->load->library('hamqth');
+
+ if (!$this->session->userdata('hamqth_session_key')) {
+ $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
+ $this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
+ }
+
+ $callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
+
+ // If HamQTH session has expired, start a new session and retry the search.
+ if ($callbook['error'] == "Session does not exist or expired") {
+ $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password'));
+ $this->session->set_userdata('hamqth_session_key', $hamqth_session_key);
+ $callbook = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key'));
+ }
+ }
+ } finally {
+ return $callbook;
+ }
+ }
public function update_all_station_ids() {
@@ -2537,4 +2584,6 @@ function validateADIFDate($date, $format = 'Ymd')
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
+
+
?>
diff --git a/application/models/Qslprint_model.php b/application/models/Qslprint_model.php
index b32ef8b55..23177eb3b 100644
--- a/application/models/Qslprint_model.php
+++ b/application/models/Qslprint_model.php
@@ -22,7 +22,7 @@ class Qslprint_model extends CI_Model {
if ($station_id2 == NULL) {
$this->db->where("station_id", $station_id);
- } else {
+ } else if ($station_id2 != 'All') {
$this->db->where("station_id", $station_id2);
}
diff --git a/application/models/Search_filter.php b/application/models/Search_filter.php
index c215c780b..d6d4c835d 100644
--- a/application/models/Search_filter.php
+++ b/application/models/Search_filter.php
@@ -13,6 +13,15 @@ class Search_filter extends CI_Model {
return $query;
}
+ function get_stored_queries() {
+ $this->db->where('userid', $this->session->userdata('user_id'));
+ return $this->db->get('queries')->result();
+ }
+
+ function delete_query($id) {
+ $this->db->delete('queries', array('id' => xss_clean($id), 'userid' =>$this->session->userdata('user_id')));
+ }
+
}
-?>
\ No newline at end of file
+?>
diff --git a/application/models/User_model.php b/application/models/User_model.php
index aa68b105a..e1ab3ac12 100644
--- a/application/models/User_model.php
+++ b/application/models/User_model.php
@@ -363,7 +363,7 @@ class User_Model extends CI_Model {
// FUNCTION: array timezones()
// Returns a list of timezones
function timezones() {
- $r = $this->db->query('SELECT id, name FROM timezones ORDER BY offset');
+ $r = $this->db->query('SELECT id, name FROM timezones ORDER BY `offset`');
$ts = array();
foreach ($r->result_array() as $t) {
$ts[$t['id']] = $t['name'];
diff --git a/application/views/adif/import.php b/application/views/adif/import.php
index 7405abdf4..33b97b8e7 100644
--- a/application/views/adif/import.php
+++ b/application/views/adif/import.php
@@ -14,9 +14,6 @@
Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations. Only confirmations received since your last eQSL-confirmed QSO will be downloaded.
+Cloudlog will use the eQSL credentials from your Cloudlog user profile to connect to eQSL and download confirmations.
diff --git a/application/views/gridsquares/index.php b/application/views/gridsquares/index.php index 9bc61d13a..3b71cf5e2 100644 --- a/application/views/gridsquares/index.php +++ b/application/views/gridsquares/index.php @@ -20,7 +20,7 @@ - +- + - +
++ - Info You can find out how to use the search filter functions in the wiki. + +
+ + +| Date/Time | -Call | -Mode | -Sent | -Recv'd | -Band | -Country | -- |
| lang->line('general_word_date'); ?> | + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> +lang->line('general_word_time'); ?> | + +lang->line('gen_hamradio_call'); ?> | +'; + switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { + case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; + case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; + case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; + case 'Country': echo $this->lang->line('general_word_country'); break; + case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; + case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; + case 'State': echo $this->lang->line('gen_hamradio_state'); break; + case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; + case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + } + echo ''; + echo ''; + switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { + case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; + case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; + case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; + case 'Country': echo $this->lang->line('general_word_country'); break; + case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; + case 'State': echo $this->lang->line('gen_hamradio_state'); break; + case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; + case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; + case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + } + echo ' | '; + echo ''; + switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { + case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; + case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; + case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; + case 'Country': echo $this->lang->line('general_word_country'); break; + case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; + case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; + case 'State': echo $this->lang->line('gen_hamradio_state'); break; + case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; + case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + } + echo ' | '; + echo ''; + switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { + case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; + case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; + case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; + case 'Country': echo $this->lang->line('general_word_country'); break; + case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; + case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; + case 'State': echo $this->lang->line('gen_hamradio_state'); break; + case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; + case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + } + echo ' | '; + echo ''; + switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { + case 'Mode': echo $this->lang->line('gen_hamradio_mode'); break; + case 'RSTS': echo $this->lang->line('gen_hamradio_rsts'); break; + case 'RSTR': echo $this->lang->line('gen_hamradio_rstr'); break; + case 'Country': echo $this->lang->line('general_word_country'); break; + case 'IOTA': echo $this->lang->line('gen_hamradio_iota'); break; + case 'SOTA': echo $this->lang->line('gen_hamradio_sota'); break; + case 'State': echo $this->lang->line('gen_hamradio_state'); break; + case 'Grid': echo $this->lang->line('gen_hamradio_gridsquare'); break; + case 'Band': echo $this->lang->line('gen_hamradio_band'); break; + } + echo ' | '; + + if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> +QSL | + session->userdata('user_eqsl_name') != "") { ?> +eQSL | + + session->userdata('user_lotw_name') != "") { ?> +LoTW | + + +lang->line('gen_hamradio_station'); ?> | + config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> ++ + | COL_TIME_ON); echo date($custom_date_format, $timestamp); ?> | + config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?> +COL_TIME_ON); echo date('H:i', $timestamp); ?> | + ++ COL_CALL)); ?> + | + session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) { + case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; + case 'RSTS': echo ' | ' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; + case 'RSTR': echo ' | ' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; + case 'Country': echo ' | ' . ucwords(strtolower(($row->COL_COUNTRY)));; break; + case 'IOTA': echo ' | ' . ($row->COL_IOTA); break; + case 'SOTA': echo ' | ' . ($row->COL_SOTA_REF); break; + case 'Grid': echo ' | '; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; + case 'Band': echo ' | '; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; + case 'State': echo ' | ' . ($row->COL_STATE); break; + } + echo ' | '; + switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) { + case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; + case 'RSTS': echo ' | ' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; + case 'RSTR': echo ' | ' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; + case 'Country': echo ' | ' . ucwords(strtolower(($row->COL_COUNTRY)));; break; + case 'IOTA': echo ' | ' . ($row->COL_IOTA); break; + case 'SOTA': echo ' | ' . ($row->COL_SOTA_REF); break; + case 'Grid': echo ' | '; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; + case 'Band': echo ' | '; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; + case 'State': echo ' | ' . ($row->COL_STATE); break; + } + echo ' | '; + + switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) { + case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; + case 'RSTS': echo ' | ' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; + case 'RSTR': echo ' | ' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; + case 'Country': echo ' | ' . ucwords(strtolower(($row->COL_COUNTRY)));; break; + case 'IOTA': echo ' | ' . ($row->COL_IOTA); break; + case 'SOTA': echo ' | ' . ($row->COL_SOTA_REF); break; + case 'Grid': echo ' | '; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; + case 'Band': echo ' | '; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; + case 'State': echo ' | ' . ($row->COL_STATE); break; + } + echo ' | '; + switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) { + case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; + case 'RSTS': echo ' | ' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; + case 'RSTR': echo ' | ' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; + case 'Country': echo ' | ' . ucwords(strtolower(($row->COL_COUNTRY)));; break; + case 'IOTA': echo ' | ' . ($row->COL_IOTA); break; + case 'SOTA': echo ' | ' . ($row->COL_SOTA_REF); break; + case 'Grid': echo ' | '; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; + case 'Band': echo ' | '; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; + case 'State': echo ' | ' . ($row->COL_STATE); break; + } + echo ' | '; + switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) { + case 'Mode': echo ''; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break; + case 'RSTS': echo ' | ' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '' . $row->COL_STX . '';}if ($row->COL_STX_STRING) { echo '' . $row->COL_STX_STRING . '';}; break; + case 'RSTR': echo ' | ' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '' . $row->COL_SRX . '';}if ($row->COL_SRX_STRING) { echo '' . $row->COL_SRX_STRING . '';}; break; + case 'Country': echo ' | ' . ucwords(strtolower(($row->COL_COUNTRY)));; break; + case 'IOTA': echo ' | ' . ($row->COL_IOTA); break; + case 'SOTA': echo ' | ' . ($row->COL_SOTA_REF); break; + case 'Grid': echo ' | '; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break; + case 'Band': echo ' | '; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break; + case 'State': echo ' | ' . ($row->COL_STATE); break; + } + echo ' | '; + if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> ++ ">▲ + ">▼ + | + + session->userdata('user_eqsl_name') != ""){ ?> ++ ▲ + + COL_EQSL_QSL_RCVD =='Y') { ?> + COL_PRIMARY_KEY); ?>" data-fancybox="images" data-width="528" data-height="336">▼ + + ▼ + + + | + + + session->userdata('user_lotw_name') != "") { ?> ++ COL_LOTW_QSL_SENT != ''){ ?> + ▲ + ▼ + + | + + + + + station_callsign)) { ?> ++ station_callsign; ?> + | + + + config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?> +
+
+
+
+
+
+
+ |
+
+
+
+
+
| # | +Description | +Query | ++ | + | ' . $i++ . ' | '; + echo '' . $q->description . ' | '; + echo '' . $q->query . ' | '; + echo 'Edit>'; + echo ' | Delete | '; + echo ''; + } + ?> + +
|---|
' + tmp.qsocount + ' contacts were plotted.
'); + var color = ifDarkModeThemeReturn('white', 'grey'); var options = { chart: { type: 'column', zoomType: 'xy', - renderTo: 'container' + renderTo: 'container', + backgroundColor: getBodyBackground() }, title: { - text: 'Time Distribution' + text: 'Time Distribution', + style: { + color: color + } }, xAxis: { categories: [], @@ -42,10 +47,23 @@ function plotTimeplotterChart(tmp) { type: "category", min:0, max:47, + labels: { + style: { + color: color + } + } }, yAxis: { title: { - text: '# QSOs' + text: '# QSOs', + style: { + color: color + } + }, + labels: { + style: { + color: color + } } }, rangeSelector: { @@ -60,6 +78,11 @@ function plotTimeplotterChart(tmp) { } } }, + legend: { + itemStyle: { + color: color + } + }, series: [] }; var myComments=[]; diff --git a/install/config/config.php b/install/config/config.php index 44ff528f4..934e0d630 100644 --- a/install/config/config.php +++ b/install/config/config.php @@ -42,10 +42,12 @@ $config['display_freq'] = false; | | 'qrz_username' QRZ.com user login | 'qrz_password' QRZ.com user password +| 'use_fullname' Get full names from QRZ, may not be GDPR compliant */ $config['qrz_username'] = ""; $config['qrz_password'] = ""; +$config['use_fullname'] = false; /* |--------------------------------------------------------------------------