diff --git a/application/config/config.sample.php b/application/config/config.sample.php
index 254ed3b4..e3d1a577 100644
--- a/application/config/config.sample.php
+++ b/application/config/config.sample.php
@@ -9,14 +9,14 @@
| 'app_name' Name of the App 'Cloudlog'
| 'app_version' Set by the dev team.
| 'directory' directory where cloudlog is installed eg "logger"
-| 'callbook' Selects which Callbook lookup to use defaults "hamio" but supports "qrz"
+| 'callbook' Selects which Callbook lookup to use defaults "hamli" but supports "qrz"
*/
$config['app_name'] = "Cloudlog";
$config['app_version'] = "0.1";
$config['directory'] = "logbook";
-$config['callbook'] = "qrz"; // Options are hamio or qrz
+$config['callbook'] = "qrz"; // Options are hamli or qrz
/*
|--------------------------------------------------------------------------
@@ -25,11 +25,11 @@ $config['callbook'] = "qrz"; // Options are hamio or qrz
|
| 'table_name' SQL table where log can be found
| 'locator' Default locator used to calculate bearings/distance
-| 'display_freq' Show or Hide frequnecy info
+| 'display_freq' Show or Hide frequnecy info
*/
-$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
-$config['locator'] = "";
+$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
+$config['locator'] = "";
$config['display_freq'] = true;
/*
@@ -39,7 +39,7 @@ $config['display_freq'] = true;
|
| 'use_auth' False turns all authentication off, best used when setting up
| 'auth_table' MySQL Database Table defaults "users"
-| 'auth_mode' Minimum user level required 0 = anonymous, 1 = viewer,
+| 'auth_mode' Minimum user level required 0 = anonymous, 1 = viewer,
| 2 = editor, 3 = api user, 99 = owner
| 'auth_level[]' Defines level titles
*/
diff --git a/application/controllers/logbook.php b/application/controllers/logbook.php
index 49d148f6..20ca1288 100644
--- a/application/controllers/logbook.php
+++ b/application/controllers/logbook.php
@@ -23,9 +23,9 @@ class Logbook extends CI_Controller {
$config['full_tag_close'] = '';
$config['cur_tag_open'] = '';
$config['cur_tag_close'] = '';
-
+
$this->pagination->initialize($config);
-
+
//load the model and get results
$this->load->model('logbook_model');
$data['results'] = $this->logbook_model->get_qsos($config['per_page'],$this->uri->segment(3));
@@ -36,20 +36,20 @@ class Logbook extends CI_Controller {
$qra_position = $this->qra->qra2latlong($this->session->userdata('user_locator'));
$data['qra'] = "set";
$data['qra_lat'] = $qra_position[0];
- $data['qra_lng'] = $qra_position[1];
+ $data['qra_lng'] = $qra_position[1];
} else {
$data['qra'] = "none";
}
-
-
-
+
+
+
// load the view
$data['page_title'] = "Logbook";
$this->load->view('layout/header', $data);
$this->load->view('view_log/index');
$this->load->view('layout/footer');
-
+
}
/* Used to generate maps for displaying on /logbook/ */
@@ -70,7 +70,7 @@ class Logbook extends CI_Controller {
echo ",";
}
- if($row->COL_SAT_NAME != null) {
+ if($row->COL_SAT_NAME != null) {
echo "{\"lat\":\"".$stn_loc[0]."\",\"lng\":\"".$stn_loc[1]."\", \"html\":\"Callsign: ".$row->COL_CALL."
Date/Time: ".$row->COL_TIME_ON."
SAT: ".$row->COL_SAT_NAME."
Mode: ".$row->COL_MODE."\",\"label\":\"".$row->COL_CALL."\"}";
} else {
echo "{\"lat\":\"".$stn_loc[0]."\",\"lng\":\"".$stn_loc[1]."\", \"html\":\"Callsign: ".$row->COL_CALL."
Date/Time: ".$row->COL_TIME_ON."
Band: ".$row->COL_BAND."
Mode: ".$row->COL_MODE."\",\"label\":\"".$row->COL_CALL."\"}";
@@ -84,7 +84,7 @@ class Logbook extends CI_Controller {
FROM dxcc
WHERE prefix = SUBSTRING( \''.$row->COL_CALL.'\', 1, LENGTH( prefix ) )
ORDER BY LENGTH( prefix ) DESC
- LIMIT 1
+ LIMIT 1
');
foreach ($query->result() as $dxcc) {
@@ -100,19 +100,19 @@ class Logbook extends CI_Controller {
echo "]";
echo "}";
}
-
+
function view($id) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
$this->load->library('qra');
- $this->db->where('COL_PRIMARY_KEY', $id);
+ $this->db->where('COL_PRIMARY_KEY', $id);
$data['query'] = $this->db->get($this->config->item('table_name'));
-
+
$this->load->view('view_log/qso', $data);
}
-
+
function callsign_qra($qra) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
@@ -124,24 +124,24 @@ class Logbook extends CI_Controller {
} else {
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'));
+ $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($qra, $this->session->userdata('qrz_session_key'));
echo $callbook['gridsquare'];
-
- } else {
- // Lookup using hamio
- $this->load->library('hamio');
-
- $callbook = $this->hamio->callsign($qra);
- echo $callbook['gridsquare'];
+ } else {
+ // Lookup using hamli
+ $this->load->library('hamli');
+
+ $callbook = $this->hamli->callsign($qra);
+
+ echo $callbook['gridsquare'];
}
}
}
@@ -149,44 +149,44 @@ class Logbook extends CI_Controller {
function callsign_qth($callsign) {
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'));
+ $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'));
echo $callbook['city'];
-
- } else {
- // Lookup using hamio
- $this->load->library('hamio');
-
- $callbook = $this->hamio->callsign($callsign);
- echo $callbook['city'];
+ } else {
+ // Lookup using hamli
+ $this->load->library('hamli');
+
+ $callbook = $this->hamli->callsign($callsign);
+
+ echo $callbook['city'];
}
}
-
+
function callsign_iota($callsign) {
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'));
+ $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'));
echo $callbook['iota'];
-
+
}
}
-
+
function callsign_name($callsign) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
@@ -198,36 +198,36 @@ class Logbook extends CI_Controller {
} else {
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'));
+ $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'));
echo $callbook['name'];
} else {
- // Lookup using hamio
- $this->load->library('hamio');
-
- $callbook = $this->hamio->callsign($callsign);
+ // Lookup using hamli
+ $this->load->library('hamli');
- echo $callbook['name'];
+ $callbook = $this->hamli->callsign($callsign);
+
+ echo $callbook['name'];
}
}
}
-
+
function partial($id) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
-
- $this->db->like('COL_CALL', $id);
- $this->db->order_by("COL_TIME_ON", "desc");
+
+ $this->db->like('COL_CALL', $id);
+ $this->db->order_by("COL_TIME_ON", "desc");
$this->db->limit(16);
$query = $this->db->get($this->config->item('table_name'));
-
+
if ($query->num_rows() > 0)
{
echo "