diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index b7353733..79b0646e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -1,20 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
---
+**This is for reporting bugs with the code, if this issue is regarding setting up on your local server please use the forum see readme for details**
+
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
-Steps to reproduce the behavior:
+Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-**Expected behavior**
+**Expected behaviour**
A clear and concise description of what you expected to happen.
**Screenshots**
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 066b2d92..ff87b84d 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,9 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
---
+**This is for reporting bugs with the code, if this issue is regarding setting up on your local server please use the forum see readme for details**
+
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
diff --git a/README.md b/README.md
index e8c53eeb..1b218cf4 100644
--- a/README.md
+++ b/README.md
@@ -6,43 +6,24 @@ Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
## Requirements
* Linux based Operating System
-* Apache (Nignx should work)
+* Apache (Nginx should work)
* PHP (Version 7 or higher) & MySQL
-You will also needthe following PHP modules installed
-
-php-curl, php-mbstrings, php-xml
-
## Versions
-* Master - Current working copy (Commit wise frozen till v2 is ready for release, unless bug fixes needed)
-* cloudlog-v2 - This is the current development copy, while to work on bringing multiclient to Cloudlog without breaking users stable coplies, master now has a freeze on it.
+* **Master** - Current working branch
+* cloudlog-v2 - This is the current development copy, while to work on bringing multiclient to Cloudlog without breaking users stable copies.
## Setup
-You can set up the basics of Cloudlog by opening /install in your browser. Please note theres an issue with the demo account creation (password invalid) so after this process you must disable auth via the config.php file and manually create yourself a user in till this issue is fixed.
-
-More information can be found in the [wiki](https://github.com/magicbug/Cloudlog/wiki).
+Installation information can be found on the [wiki](https://github.com/magicbug/Cloudlog/wiki).
Cloudlog now has a [Change Log](https://github.com/magicbug/Cloudlog/wiki/Change-Log) to go along with the commit history please consult this when updating.
## Support
-Cloudlog support is handled via Issues on GitHub.
+Cloudlog has two support systems for code issues use Github issues, however if you have general issues with setting up your server please use our general discussion forum [https://forum.cloudlog.co.uk](https://forum.cloudlog.co.uk).
-## CAT Control
-
-Cloudlog supports pushing radio information just like you would with a desktop operating system this is via a desktop app called [CloudlogCAT](https://github.com/magicbug/CloudlogCAT/releases) this application uses Omni-Rig thus supports most of the radios on the market.
-
-If you use Linux, Mac or just hate Omni-Rig then Tobias (DL4TMA) has made a script called [cloudlog-rigctl-interface](https://github.com/Manawyrm/cloudlog-rigctl-interface) this interfaces rigctl to Cloudlogs CAT API. This script requires PHP-CLI to be installed. If you would like a pure Bash version, Tony (G0WFV) has you covered with [CloudlogBashCat](https://github.com/g0wfv/CloudlogBashCat) which also synchronises Cloudlog with rigctld.
-
-## SatPC32 Interface
-
-If your into satellite operations I have written a application [SatPC32 to Cloud Interface](https://github.com/magicbug/SatPC32-To-Cloudlog) which allows automatic population of satellite fields, Cloudlog just sees this as another radio interface.
-
-## QSL Card Labels
-
-I've started building out some scripts to generate labels for sticking on QSL Cards, at the moment it supports 24 label sheets, but theres no reason for it not to support more, these can be found at [Cloudlog-Labels](https://github.com/magicbug/cloudlog-labels)
## Want Cloudlog Hosting?
@@ -50,9 +31,9 @@ If you would prefer not to setup Cloudlog yourself [magicbug](https://magicbug.c
## Contributing
-If you would like to contributing in anyway to Cloudlog then its most appreciated, this has been developed in free time, help coding new features or writing documentation is always useful.
+If you would like to contribute in any way to Cloudlog, it is most appreciated. This has been developed in free time, help coding new features or writing documentation is always useful.
-Please note that Cloudlog was built using [Codeigniter](https://www.codeigniter.com/docs) version 3 and uses Bootstrap 4 for the user CSS framework documentation is available for this when building components.
+Please note that Cloudlog was built using [Codeigniter](https://www.codeigniter.com/docs) version 3 and uses Bootstrap 4 for the user CSS framework documentation is available for this when building components, code will also only be accepted for PR with comments.
## Credits
@@ -62,6 +43,6 @@ Thanks to Andy (VE7CXZ), Gavin (M1BXF), Graham (W5ISP), Robert (M0VFC), Corby (K
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)
+Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ).
-If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commerical work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall) or become a [Patreon](https://www.patreon.com/2m0sql)
+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) or become a [Patreon](https://www.patreon.com/2m0sql)
diff --git a/application/controllers/Api.php b/application/controllers/Api.php
index cf9344aa..29a5fc3e 100644
--- a/application/controllers/Api.php
+++ b/application/controllers/Api.php
@@ -16,7 +16,7 @@ class API extends CI_Controller {
function search_callsign($callsign) {
- $this->db->select('COL_PRIMARY_KEY, COL_CALL, COL_MODE, COL_BAND, COL_COUNTRY, COL_FREQ, COL_GRIDSQUARE, COL_RST_RCVD, COL_RST_SENT, COL_SAT_MODE, COL_SAT_NAME');
+ $this->db->select('COL_PRIMARY_KEY, COL_CALL, COL_MODE, COL_SUBMODE, COL_BAND, COL_COUNTRY, COL_FREQ, COL_GRIDSQUARE, COL_RST_RCVD, COL_RST_SENT, COL_SAT_MODE, COL_SAT_NAME');
//$this->db->select("DATE_FORMAT(COL_TIME_ON, '%H:%i') AS time_on", FALSE );
//$this->db->select("DATE_FORMAT(COL_TIME_ON, '%d/%c/%Y') AS date_on", FALSE );
$this->db->like('COL_CALL', $callsign);
diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php
index 38bd6694..acb8f870 100755
--- a/application/controllers/Logbook.php
+++ b/application/controllers/Logbook.php
@@ -380,7 +380,7 @@ class Logbook extends CI_Controller {
$html = "";
- $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
+ $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
$this->db->from($this->config->item('table_name'));
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
@@ -418,7 +418,10 @@ class Logbook extends CI_Controller {
} else {
$html .= "
".$row->COL_BAND."
";
}
- $html .= "
".$row->COL_MODE."
";
+ if ($row->COL_SUBMODE==null)
+ $html .= "
".$row->COL_MODE."
";
+ else
+ $html .= "
".$row->COL_SUBMODE."
";
$html .= "
";
$html .= "COL_QSL_SENT) {
@@ -483,7 +486,7 @@ class Logbook extends CI_Controller {
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
- $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
+ $this->db->select(''.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_RST_RCVD, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_NAME, '.$this->config->item('table_name').'.COL_COUNTRY, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_SAT_NAME, '.$this->config->item('table_name').'.COL_GRIDSQUARE, '.$this->config->item('table_name').'.COL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_RCVD, '.$this->config->item('table_name').'.COL_EQSL_QSL_SENT, '.$this->config->item('table_name').'.COL_QSL_SENT, '.$this->config->item('table_name').'.COL_STX, '.$this->config->item('table_name').'.COL_STX_STRING, '.$this->config->item('table_name').'.COL_SRX, '.$this->config->item('table_name').'.COL_SRX_STRING, '.$this->config->item('table_name').'.COL_LOTW_QSL_SENT, '.$this->config->item('table_name').'.COL_LOTW_QSL_RCVD, '.$this->config->item('table_name').'.COL_VUCC_GRIDS, station_profile.*');
$this->db->from($this->config->item('table_name'));
diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php
index dd2b190d..52c2b9ad 100644
--- a/application/controllers/Qrz.php
+++ b/application/controllers/Qrz.php
@@ -11,14 +11,13 @@ class Qrz extends CI_Controller {
$this->config->load('config');
}
- // Upload QSO to QRZ.com
+ /*
+ * Upload QSO to QRZ.com
+ * When called from the url cloudlog/qrz/upload, the function loops through all station_id's with a qrz api key defined.
+ * All QSOs not previously uploaded, will then be uploaded, one at a time
+ */
public function upload() {
-
- $this->config->load('config');
- ini_set('memory_limit', '-1');
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
+ $this->setOptions();
$this->load->model('logbook_model');
@@ -27,7 +26,13 @@ class Qrz extends CI_Controller {
if ($station_ids) {
foreach ($station_ids as $station_id) {
$qrz_api_key = $this->logbook_model->exists_qrz_api_key($station_id);
- $this->mass_upload_qsos($station_id, $qrz_api_key);
+ if($this->mass_upload_qsos($station_id, $qrz_api_key)) {
+ echo "QSOs has been uploaded to QRZ.com.";
+ log_message('info', 'QSOs has been uploaded to QRZ.com.');
+ } else{
+ echo "No QSOs found for upload.";
+ log_message('info', 'No QSOs found for upload.');
+ }
}
} else {
echo "No station_id's with a QRZ API Key found";
@@ -36,7 +41,21 @@ class Qrz extends CI_Controller {
}
+ function setOptions() {
+ $this->config->load('config');
+ ini_set('memory_limit', '-1');
+ ini_set('display_errors', 1);
+ ini_set('display_startup_errors', 1);
+ error_reporting(E_ALL);
+ }
+
+ /*
+ * Function gets all QSOs from given station_id, that are not previously uploaded to qrz.
+ * Adif is build for each qso, and then uploaded, one at a time
+ */
function mass_upload_qsos($station_id, $qrz_api_key) {
+
+ $i = 0;
$data['qsos'] = $this->logbook_model->get_qrz_qsos($station_id);
if ($data['qsos']) {
@@ -45,17 +64,66 @@ class Qrz extends CI_Controller {
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif);
if ($result) {
$this->markqso($qso['COL_PRIMARY_KEY']);
+ $i++;
}
}
- echo "QSOs has been uploaded to QRZ.com.";
- log_message('info', 'QSOs has been uploaded to QRZ.com.');
+ return $i;
} else {
- echo "No QSOs found for upload.";
- log_message('info', 'No QSOs found for upload.');
+ return $i;
}
}
+ /*
+ * Function marks QSO with given primarykey as uploaded to qrz
+ */
function markqso($primarykey) {
$this->logbook_model->mark_qrz_qsos_sent($primarykey);
}
-}
+
+ /*
+ * Used for displaying the uid for manually selecting log for upload to qrz
+ */
+ public function export() {
+ $this->load->model('stations');
+
+ $data['page_title'] = "QRZ.com Export";
+
+ $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');
+ $this->load->view('interface_assets/footer');
+ }
+
+ /*
+ * Used for ajax-function when selecting log for upload to qrz
+ */
+ public function upload_station() {
+ $this->setOptions();
+ $this->load->model('stations');
+ $postData = $this->input->post();
+
+ $this->load->model('logbook_model');
+ $qrz_api_key = $this->logbook_model->exists_qrz_api_key($postData['station_id']);
+
+ header('Content-type: application/json');
+ if ($i = $this->mass_upload_qsos($postData['station_id'], $qrz_api_key)) {
+
+ $stationinfo = $this->stations->stations_with_qrz_api_key();
+ $info = $stationinfo->result();
+
+ $data['status'] = 'OK';
+ $data['info'] = $info;
+ $data['infomessage'] = $i . " QSOs are now uploaded to QRZ.com";
+ echo json_encode($data);
+ } else {
+ $data['status'] = 'Error';
+ $data['info'] = 'Error, no QSOs to upload found';
+ echo json_encode($data);
+ }
+ }
+}
\ No newline at end of file
diff --git a/application/libraries/Frequency.php b/application/libraries/Frequency.php
index f5c52843..7051596c 100644
--- a/application/libraries/Frequency.php
+++ b/application/libraries/Frequency.php
@@ -1,6 +1,14 @@
>>>>>> 2ea3233ee2a0eae45f596e44c6841846cc2b1a7b
public $defaultFrequencies = array(
'160m'=>array(
'SSB'=>"1900000",
diff --git a/application/libraries/Qra.php b/application/libraries/Qra.php
index 01578128..2da16a6b 100644
--- a/application/libraries/Qra.php
+++ b/application/libraries/Qra.php
@@ -2,14 +2,26 @@
class Qra {
- // Name: QRA
+ /*
+ * Class Description: QRA handles manipulation of the Gridsquares used within amateur radio
+ *
+ * Units of measurement are the following
+ *
+ * Info: Distance Function
+ *
+ * M = Miles
+ * K = Kilometers
+ * N = Nautical Miles
+ */
+
+ // Name: qra2latlong
// Task: convert qra to lat/long
-
function qra2latlong($strQRA)
{
return qra2latlong($strQRA);
}
+ // calculate the bearing between two squares
function bearing($tx, $rx, $unit = 'M') {
$my = qra2latlong($tx);
$stn = qra2latlong($rx);
@@ -18,16 +30,27 @@ class Qra {
return $bearing;
}
+
+ /*
+ * Function: calculate the distance between two gridsqaures
+ *
+ * Inputs are QRA's TX and TX and the unit
+ *
+ */
+ function distance($tx, $rx, $unit = 'M') {
+ // Calc LatLongs
+ $my = qra2latlong($tx);
+ $stn = qra2latlong($rx);
+
+ // Feed in Lat Longs plus the unit type
+ $total_distance = distance($my[0], $my[1], $stn[0], $stn[1], $unit);
+
+ // Return the distance
+ return $total_distance;
+ }
}
-/*
- Info: Distance Function
-
- M = Miles
- K = Kilometers
- N = Nautical Miles
-*/
function distance($lat1, $lon1, $lat2, $lon2, $unit = 'M') {
$theta = $lon1 - $lon2;
diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php
index b28f5d52..5deeedfc 100755
--- a/application/models/Logbook_model.php
+++ b/application/models/Logbook_model.php
@@ -612,7 +612,7 @@ class Logbook_model extends CI_Model {
/* Return last 10 QSOs */
function last_ten() {
- $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
+ $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
$this->db->order_by("COL_TIME_ON", "desc");
$this->db->limit(10);
@@ -621,7 +621,7 @@ class Logbook_model extends CI_Model {
/* Show custom number of qsos */
function last_custom($num) {
- $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
+ $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
$this->db->order_by("COL_TIME_ON", "desc");
$this->db->limit($num);
@@ -850,7 +850,7 @@ class Logbook_model extends CI_Model {
function get_qrz_qsos($station_id){
$sql = 'select * from ' . $this->config->item('table_name') .
' where station_id = ' . $station_id .
- ' and (COL_QRZCOM_QSO_UPLOAD_STATUS = NULL
+ ' and (COL_QRZCOM_QSO_UPLOAD_STATUS is NULL
or COL_QRZCOM_QSO_UPLOAD_STATUS = ""
or COL_QRZCOM_QSO_UPLOAD_STATUS = "M"
or COL_QRZCOM_QSO_UPLOAD_STATUS = "N")';
@@ -885,7 +885,7 @@ class Logbook_model extends CI_Model {
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
- $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING');
+ $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_STX_STRING, COL_SRX_STRING');
$this->db->where("station_id", $station_id);
$this->db->order_by("COL_TIME_ON", "desc");
$this->db->limit($num);
@@ -896,7 +896,7 @@ class Logbook_model extends CI_Model {
/* Get All QSOs with a Valid Grid */
function kml_get_all_qsos() {
- $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_GRIDSQUARE');
+ $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME, COL_GRIDSQUARE');
$this->db->where('COL_GRIDSQUARE != \'null\'');
$query = $this->db->get($this->config->item('table_name'));
@@ -904,7 +904,7 @@ class Logbook_model extends CI_Model {
}
function get_date_qsos($date) {
- $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
+ $this->db->select('COL_CALL, COL_BAND, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_NAME, COL_COUNTRY, COL_PRIMARY_KEY, COL_SAT_NAME');
$this->db->order_by("COL_TIME_ON", "desc");
$start = $date." 00:00:00";
$end = $date." 23:59:59";
@@ -1406,7 +1406,7 @@ class Logbook_model extends CI_Model {
// Show all QSOs we need to send to eQSL
function eqsl_not_yet_sent() {
- $this->db->select('station_profile.*, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_COMMENT, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_PROP_MODE');
+ $this->db->select('station_profile.*, '.$this->config->item('table_name').'.COL_PRIMARY_KEY, '.$this->config->item('table_name').'.COL_TIME_ON, '.$this->config->item('table_name').'.COL_CALL, '.$this->config->item('table_name').'.COL_MODE, '.$this->config->item('table_name').'.COL_SUBMODE, '.$this->config->item('table_name').'.COL_BAND, '.$this->config->item('table_name').'.COL_COMMENT, '.$this->config->item('table_name').'.COL_RST_SENT, '.$this->config->item('table_name').'.COL_PROP_MODE');
$this->db->from('station_profile');
$this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id AND station_profile.eqslqthnickname != ""','left');
$this->db->where($this->config->item('table_name').'.COL_EQSL_QSL_SENT !=', 'Y');
diff --git a/application/models/Stations.php b/application/models/Stations.php
index b13d1472..e5110a8e 100644
--- a/application/models/Stations.php
+++ b/application/models/Stations.php
@@ -190,6 +190,34 @@ class Stations extends CI_Model {
}
}
+ function stations_with_qrz_api_key() {
+ $sql = "select station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, modc.modcount, notc.notcount, totc.totcount
+ from station_profile
+ left outer join (
+ select count(*) modcount, station_id
+ from ". $this->config->item('table_name') .
+ " where COL_QRZCOM_QSO_UPLOAD_STATUS = 'M'
+ group by station_id
+ ) as modc on station_profile.station_id = modc.station_id
+ left outer join (
+ select count(*) notcount, station_id
+ from " . $this->config->item('table_name') .
+ " where (coalesce(COL_QRZCOM_QSO_UPLOAD_STATUS, '') = ''
+ or COL_QRZCOM_QSO_UPLOAD_STATUS = 'N')
+ group by station_id
+ ) as notc on station_profile.station_id = notc.station_id
+ left outer join (
+ select count(*) totcount, station_id
+ from " . $this->config->item('table_name') .
+ " where COL_QRZCOM_QSO_UPLOAD_STATUS = 'Y'
+ group by station_id
+ ) as totc on station_profile.station_id = totc.station_id
+ where coalesce(station_profile.qrzapikey, '') <> ''";
+ $query = $this->db->query($sql);
+
+ return $query;
+ }
+
}
?>
\ No newline at end of file
diff --git a/application/views/backup/exportall.php b/application/views/backup/exportall.php
index 9b06cce6..1520795a 100644
--- a/application/views/backup/exportall.php
+++ b/application/views/backup/exportall.php
@@ -4,6 +4,6 @@
result() as $qso) { //print_r($qso);?>
- COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_FREQ != "0") { ?>COL_FREQ); ?>>COL_FREQ; ?>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('Hi', $time_on); ?>>COL_TIME_OFF); $new_off = date('Hi', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>
+ COL_CALL); ?>>COL_CALL; ?>COL_BAND); ?>>COL_BAND; ?>COL_MODE); ?>>COL_MODE; ?>COL_SUBMODE) { ?>COL_SUBMODE); ?>>COL_SUBMODE; ?>COL_FREQ != "0") { ?>COL_FREQ); ?>>COL_FREQ; ?>COL_TIME_ON); $new_date = date('Ymd', $date_on); ?>>COL_TIME_ON); $new_on = date('Hi', $time_on); ?>>COL_TIME_OFF); $new_off = date('Hi', $time_off); ?>>COL_RST_RCVD); ?>>COL_RST_RCVD; ?>COL_RST_SENT); ?>>COL_RST_SENT; ?>COL_QSL_RCVD); ?>>COL_QSL_RCVD; ?>COL_QSL_SENT); ?>>COL_QSL_SENT; ?>COL_COUNTRY); ?>>COL_COUNTRY; ?>COL_GRIDSQUARE != "") { ?>COL_GRIDSQUARE); ?>>COL_GRIDSQUARE; ?>COL_SAT_NAME) { ?>COL_SAT_MODE); ?>>COL_SAT_MODE; ?>COL_SAT_NAME); ?>>COL_SAT_NAME; ?>COL_PROP_MODE) { ?>COL_PROP_MODE); ?>>COL_PROP_MODE; ?>COL_NAME) { ?>COL_NAME); ?>>COL_NAME; ?>COL_COMMENT) { ?>COL_COMMENT); ?>>COL_COMMENT; ?>
\ No newline at end of file
diff --git a/application/views/dashboard/index.php b/application/views/dashboard/index.php
index 276f52f9..4d79401f 100644
--- a/application/views/dashboard/index.php
+++ b/application/views/dashboard/index.php
@@ -58,7 +58,7 @@
COL_CALL)); ?>
Cloudlog will use the eQSL username and password stored in your user profile to download confirmations from eQSL for you. We will only download confirmations received since your last eQSL confirmed QSO.