Merge branch 'master' into configurable_modes

pull/499/head
Peter Goodhall 2020-08-18 16:22:26 +01:00 zatwierdzone przez GitHub
commit b5d1a7c96b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
26 zmienionych plików z 384 dodań i 99 usunięć

8
.htaccess.sample 100644
Wyświetl plik

@ -0,0 +1,8 @@
# If you want to hide 'index.php' from the URL, rename this file to '.htaccess' on your server
# Then change the following variable in /application/config/config.php
# $config['index_page'] = '';
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

Wyświetl plik

@ -82,7 +82,14 @@ class adif extends CI_Controller {
$this->load->model('adif_data');
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'));
// Used for exporting QSOs not previously exported to LoTW
if ($this->input->post('exportLotw') == 1) {
$exportLotw = true;
} else {
$exportLotw = false;
}
$data['qsos'] = $this->adif_data->export_custom($this->input->post('from'), $this->input->post('to'), $exportLotw);
$this->load->view('adif/data/exportall', $data);

Wyświetl plik

@ -346,6 +346,7 @@ class Awards extends CI_Controller {
}
$data['was_array'] = $this->was->get_was_array($bands, $postdata);
$data['was_summary'] = $this->was->get_was_summary();
// Render Page
$data['page_title'] = "Awards - WAS (Worked all states)";

Wyświetl plik

@ -4,14 +4,13 @@ class Backup extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
/* User Facing Links to Backup URLs */
public function index()
{
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$data['page_title'] = "Backup";

Wyświetl plik

@ -7,13 +7,13 @@ class Lotw extends CI_Controller {
{
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
}
private function loadFromFile($filepath)
{
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
// Figure out how we should be marking QSLs confirmed via LoTW
$query = $query = $this->db->query('SELECT lotw_rcvd_mark FROM config');
$q = $query->row();
@ -28,13 +28,14 @@ class Lotw extends CI_Controller {
$this->adif_parser->initialize();
$tableheaders = "<table>";
$tableheaders = "<table width=\"100%\">";
$tableheaders .= "<tr class=\"titles\">";
$tableheaders .= "<td>QSO Date</td>";
$tableheaders .= "<td>Call</td>";
$tableheaders .= "<td>Mode</td>";
$tableheaders .= "<td>LoTW QSL Received</td>";
$tableheaders .= "<td>Date LoTW Confirmed</td>";
$tableheaders .= "<td>State</td>";
$tableheaders .= "<td>Log Status</td>";
$tableheaders .= "<td>LoTW Status</td>";
$tableheaders .= "</tr>";
@ -76,7 +77,13 @@ class Lotw extends CI_Controller {
}
} else {
$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd']);
if (isset($record['state'])) {
$state = $record['state'];
} else {
$state = "";
}
$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state);
}
@ -86,6 +93,7 @@ class Lotw extends CI_Controller {
$table .= "<td>".$record['mode']."</td>";
$table .= "<td>".$record['qsl_rcvd']."</td>";
$table .= "<td>".$qsl_date."</td>";
$table .= "<td>".$state."</td>";
$table .= "<td>QSO Record: ".$status."</td>";
$table .= "<td>LoTW Record: ".$lotw_status."</td>";
$table .= "</tr>";
@ -107,6 +115,9 @@ class Lotw extends CI_Controller {
}
public function import() {
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$data['page_title'] = "LoTW ADIF Import";
$config['upload_path'] = './uploads/';
@ -192,6 +203,9 @@ class Lotw extends CI_Controller {
} // end function
public function export() {
$this->load->model('user_model');
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$data['page_title'] = "LoTW .TQ8 Upload";
$config['upload_path'] = './uploads/';

Wyświetl plik

@ -36,7 +36,7 @@ class Qrz extends CI_Controller {
}
} else {
echo "No station_id's with a QRZ API Key found";
log_message('info', "No station_id's with a QRZ API Key found");
log_message('error', "No station_id's with a QRZ API Key found");
}
}
@ -54,22 +54,38 @@ class Qrz extends CI_Controller {
* 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);
$errormessages=array();
if ($data['qsos']) {
foreach ($data['qsos'] as $qso) {
$adif = $this->logbook_model->create_adif_from_data($qso);
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif);
if ($result) {
if ($qso['COL_QRZCOM_QSO_UPLOAD_STATUS'] == 'M') {
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif, true);
} else {
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif);
}
if ($result['status'] == 'OK') {
$this->markqso($qso['COL_PRIMARY_KEY']);
$i++;
} else {
log_message('error', 'QRZ upload failed for qso: Call: ' . $qso['COL_CALL'] . ' Band: ' . $qso['COL_BAND'] . ' Mode: ' . $qso['COL_MODE'] . ' Time: ' . $qso['COL_TIME_ON']);
log_message('error', 'QRZ upload failed with the following message: ' .$result['message']);
$errormessages[] = $result['message'] . ' Call: ' . $qso['COL_CALL'] . ' Band: ' . $qso['COL_BAND'] . ' Mode: ' . $qso['COL_MODE'] . ' Time: ' . $qso['COL_TIME_ON'];
}
}
return $i;
$result['status'] = 'OK';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
} else {
return $i;
$result['status'] = 'Error';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
}
}
@ -111,18 +127,20 @@ class Qrz extends CI_Controller {
$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)) {
$result = $this->mass_upload_qsos($postData['station_id'], $qrz_api_key);
if ($result['status'] == 'OK') {
$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";
$data['infomessage'] = $result['count'] . " QSOs are now uploaded to QRZ.com";
$data['errormessages'] = $result['errormessages'];
echo json_encode($data);
} else {
$data['status'] = 'Error';
$data['info'] = 'Error, no QSOs to upload found';
$data['errormessages'] = $result['errormessages'];
echo json_encode($data);
}
}

Wyświetl plik

@ -60,6 +60,7 @@ class QSO extends CI_Controller {
$qso_data = array(
'start_date' => $this->input->post('start_date'),
'start_time' => $this->input->post('start_time'),
'time_stamp' => time(),
'band' => $this->input->post('band'),
'freq' => $this->input->post('freq_display'),
'freq_rx' => $this->input->post('freq_display_rx'),

Wyświetl plik

@ -52,7 +52,7 @@ class User extends CI_Controller {
$data['user_callsign'] = $this->input->post('user_callsign');
$data['user_locator'] = $this->input->post('user_locator');
$data['user_timezone'] = $this->input->post('user_timezone');
$this->load->view('user/add');
$this->load->view('user/add', $data);
} else {
$this->load->view('user/add', $data);
}
@ -88,7 +88,7 @@ class User extends CI_Controller {
$data['user_lastname'] = $this->input->post('user_lastname');
$data['user_callsign'] = $this->input->post('user_callsign');
$data['user_locator'] = $this->input->post('user_locator');
$this->load->view('user/add');
$this->load->view('user/add', $data);
$this->load->view('interface_assets/footer');
}
}

Wyświetl plik

@ -16,4 +16,6 @@ class Logbooks extends CI_Controller {
public function index()
{
echo 'Functions to come';
}
}
}

Wyświetl plik

@ -67,10 +67,9 @@ class adif_data extends CI_Model {
return $this->db->get();
}
function export_custom($from, $to) {
function export_custom($from, $to, $exportLotw = false) {
$this->load->model('stations');
$active_station_id = $this->stations->find_active();
$this->db->select(''.$this->config->item('table_name').'.*, station_profile.*');
$this->db->from($this->config->item('table_name'));
@ -87,6 +86,10 @@ class adif_data extends CI_Model {
$to = $to->format('Y-m-d');
$this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'");
}
if ($exportLotw) {
$this->db->where($this->config->item('table_name').".COL_LOTW_QSL_SENT != 'Y'");
}
$this->db->order_by($this->config->item('table_name').".COL_TIME_ON", "ASC");
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');

Wyświetl plik

@ -123,6 +123,7 @@ class Logbook_model extends CI_Model {
'COL_STATE' => trim($this->input->post('usa_state')),
'COL_SOTA_REF' => trim($this->input->post('sota_ref')),
'COL_DARC_DOK' => trim($this->input->post('darc_dok')),
'COL_NOTES' => $this->input->post('notes'),
);
$station_id = $this->input->post('station_profile');
@ -335,7 +336,8 @@ class Logbook_model extends CI_Model {
// Push qso to qrz if apikey is set
if ($apikey = $this->exists_qrz_api_key($data['station_id'])) {
$adif = $this->create_adif_from_data($data);
IF ($this->push_qso_to_qrz($apikey, $adif)) {
$result = $this->push_qso_to_qrz($apikey, $adif);
IF ($result['status'] == 'OK') {
$data['COL_QRZCOM_QSO_UPLOAD_STATUS'] = 'Y';
$data['COL_QRZCOM_QSO_UPLOAD_DATE'] = date("Y-m-d H:i:s", strtotime("now"));
}
@ -368,13 +370,17 @@ class Logbook_model extends CI_Model {
* Function uploads a QSO to QRZ with the API given.
* $adif contains a line with the QSO in the ADIF format. QSO ends with an <eor>
*/
function push_qso_to_qrz($apikey, $adif) {
function push_qso_to_qrz($apikey, $adif, $replaceoption = false) {
$url = 'http://logbook.qrz.com/api'; // TODO: Move this to database
$post_data['KEY'] = $apikey;
$post_data['ACTION'] = 'INSERT';
$post_data['ADIF'] = $adif;
if ($replaceoption) {
$post_data['OPTION'] = 'REPLACE';
}
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, true);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post_data);
@ -384,15 +390,20 @@ class Logbook_model extends CI_Model {
$content = curl_exec($ch);
if ($content){
if (stristr($content,'RESULT=OK')) {
return true;
if (stristr($content,'RESULT=OK') || stristr($content,'RESULT=REPLACE')) {
$result['status'] = 'OK';
return $result;
}
else {
return false;
$result['status'] = 'error';
$result['message'] = $content;
return $result;
}
}
if(curl_errno($ch)){
return false;
$result['status'] = 'error';
$result['message'] = 'Curl error: '. curl_errno($ch);
return $result;
}
curl_close($ch);
}
@ -564,6 +575,7 @@ class Logbook_model extends CI_Model {
'COL_CQZ' => $this->input->post('cqz'),
'COL_SAT_NAME' => $this->input->post('sat_name'),
'COL_SAT_MODE' => $this->input->post('sat_mode'),
'COL_NOTES' => $this->input->post('notes'),
'COL_QSLSDATE' => date('Y-m-d'),
'COL_QSLRDATE' => date('Y-m-d'),
'COL_QSL_SENT' => $this->input->post('qsl_sent'),
@ -1160,7 +1172,7 @@ class Logbook_model extends CI_Model {
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$query = $this->db->query('SELECT DISTINCT (COL_QSL_SENT) AS band, count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_SENT = "Y" GROUP BY band');
$query = $this->db->query('SELECT count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_SENT = "Y"');
$row = $query->row();
@ -1171,14 +1183,14 @@ class Logbook_model extends CI_Model {
}
}
/* Return total number of QSL Cards requested */
/* Return total number of QSL Cards requested for printing - that means "requested" or "queued" */
function total_qsl_requested() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$query = $this->db->query('SELECT DISTINCT (COL_QSL_SENT) AS band, count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_SENT = "R" GROUP BY band');
$query = $this->db->query('SELECT count(COL_QSL_SENT) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_SENT in ("Q", "R")');
$row = $query->row();
@ -1196,7 +1208,7 @@ class Logbook_model extends CI_Model {
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$query = $this->db->query('SELECT DISTINCT (COL_QSL_RCVD) AS band, count(COL_QSL_RCVD) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_RCVD = "Y" GROUP BY band');
$query = $this->db->query('SELECT count(COL_QSL_RCVD) AS count FROM '.$this->config->item('table_name').' WHERE station_id = '.$station_id.' AND COL_QSL_RCVD = "Y"');
$row = $query->row();
@ -1300,12 +1312,22 @@ class Logbook_model extends CI_Model {
}
}
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status) {
$data = array(
'COL_LOTW_QSLRDATE' => $qsl_date,
'COL_LOTW_QSL_RCVD' => $qsl_status,
'COL_LOTW_QSL_SENT' => 'Y'
);
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state) {
if($state != "") {
$data = array(
'COL_LOTW_QSLRDATE' => $qsl_date,
'COL_LOTW_QSL_RCVD' => $qsl_status,
'COL_LOTW_QSL_SENT' => 'Y',
'COL_STATE' => $state
);
} else {
$data = array(
'COL_LOTW_QSLRDATE' => $qsl_date,
'COL_LOTW_QSL_RCVD' => $qsl_status,
'COL_LOTW_QSL_SENT' => 'Y'
);
}
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
@ -1565,7 +1587,7 @@ class Logbook_model extends CI_Model {
// Sanitise TX_POWER
if (isset($record['tx_pwr'])){
$tx_pwr = filter_var($record['tx_pwr'],FILTER_SANITIZE_NUMBER_INT);
$tx_pwr = filter_var($record['tx_pwr'],FILTER_VALIDATE_FLOAT);
}else{
$tx_pwr = NULL;
}
@ -1862,7 +1884,6 @@ class Logbook_model extends CI_Model {
'COL_QSO_COMPLETE' => (!empty($record['qso_complete'])) ? $record['qso_complete'] : '',
'COL_QSO_DATE' => (!empty($record['qso_date'])) ? $record['qso_date'] : null,
'COL_QSO_DATE_OFF' => (!empty($record['qso_date_off'])) ? $record['qso_date_off'] : null,
'COL_QSO_RANDOM' => (!empty($record['qso_random'])) ? $record['qso_random'] : null,
'COL_QTH' => (!empty($record['qth'])) ? $record['qth'] : '',
'COL_QTH_INTL' => (!empty($record['qth_intl'])) ? $record['qth_intl'] : '',
'COL_REGION' => (!empty($record['region'])) ? $record['region'] : '',
@ -1883,7 +1904,7 @@ class Logbook_model extends CI_Model {
'COL_SOTA_REF' => (!empty($record['sota_ref'])) ? $record['sota_ref'] : '',
'COL_SRX' => (!empty($record['srx'])) ? $record['srx'] : null,
'COL_SRX_STRING' => (!empty($record['srx_string'])) ? $record['srx_string'] : '',
'COL_STATE' => (!empty($record['state'])) ? $record['state'] : '',
'COL_STATE' => (!empty($record['state'])) ? strtoupper($record['state']) : '',
'COL_STATION_CALLSIGN' => (!empty($record['station_callsign'])) ? $record['station_callsign'] : '',
'COL_STX' => (!empty($record['stx'])) ? $record['stx'] : null,
'COL_STX_STRING' => (!empty($record['stx_string'])) ? $record['stx_string'] : '',
@ -1956,6 +1977,18 @@ class Logbook_model extends CI_Model {
public function check_dxcc_table($call, $date){
$len = strlen($call);
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`')
->where('call', $call)
->where('(start <= ', $date)
->or_where('start is null)', NULL, false)
->where('(end >= ', $date)
->or_where('end is null)', NULL, false)
->get('dxcc_exceptions');
if ($dxcc_exceptions->num_rows() > 0){
$row = $dxcc_exceptions->row_array();
return array($row['adif'], $row['entity'], $row['cqz']);
}
// query the table, removing a character from the right until a match
for ($i = $len; $i > 0; $i--){
//printf("searching for %s\n", substr($call, 0, $i));
@ -1981,18 +2014,19 @@ class Logbook_model extends CI_Model {
public function dxcc_lookup($call, $date){
$len = strlen($call);
$this->db->where('call', $call);
$this->db->where('CURDATE() between start and end');
$query = $this->db->get('dxcc_exceptions');
$dxcc_exceptions = $this->db->select('`entity`, `adif`, `cqz`')
->where('call', $call)
->where('(start <= CURDATE()')
->or_where('start is null', NULL, false)
->where('end >= CURDATE()')
->or_where('end is null)', NULL, false)
->get('dxcc_exceptions');
if ($query->num_rows() > 0){
$row = $query->row_array();
return $row;
if ($dxcc_exceptions->num_rows() > 0){
$row = $dxcc_exceptions->row_array();
return $row;
} else {
// query the table, removing a character from the right until a match
for ($i = $len; $i > 0; $i--){

Wyświetl plik

@ -132,6 +132,39 @@ class was extends CI_Model {
}
}
/*
* Function gets worked and confirmed summary on each band on the active stationprofile
*/
function get_was_summary() {
$CI =& get_instance();
$CI->load->model('Stations');
$station_id = $CI->Stations->find_active();
$stateArray = explode(',', $this->stateString);
$states = array(); // Used for keeping track of which states that are not worked
$sql = "SELECT thcv.col_band, count(distinct thcv.col_state) as count, coalesce (cfmwas.count, 0) as cfmwas FROM " . $this->config->item('table_name') . " thcv";
$sql .= " left outer join (
select col_band, count(distinct col_state) as count from " . $this->config->item('table_name') . " thcv";
$sql .= " where station_id = " . $station_id;
$sql .= $this->addStateToQuery();
$sql .= " and (col_qsl_rcvd = 'Y' or col_lotw_qsl_rcvd = 'Y')
group by col_band";
$sql .= ") cfmwas on thcv.col_band = cfmwas.col_band ";
$sql .= " where station_id = " . $station_id;
$sql .= $this->addStateToQuery();
$sql .= " group by thcv.col_band order by thcv.col_band+0 desc";
$query = $this->db->query($sql);
return $query->result();
}
/*
* Function returns all worked, but not confirmed states
* $postdata contains data from the form, in this case Lotw or QSL are used

Wyświetl plik

@ -39,8 +39,8 @@
<div class="form-group row">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="markLotw" value="1" id="markLotw">
<label class="form-check-label" for="markLotw">Mark imported QSOs as uploaded to LoTW (use if ADIF does not contain this information)</label>
<input class="form-check-input" type="checkbox" name="markLotw" value="1" id="markLotwImport">
<label class="form-check-label" for="markLotwImport">Mark imported QSOs as uploaded to LoTW (use if ADIF does not contain this information)</label>
</div>
</div>
</div>
@ -101,8 +101,16 @@
<div class="form-group row">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="markLotw" value="1" id="markLotw">
<label class="form-check-label" for="markLotw">Mark exported QSOs as uploaded to LoTW</label>
<input class="form-check-input" type="checkbox" name="markLotw" value="1" id="markLotwExport">
<label class="form-check-label" for="markLotwExport">Mark exported QSOs as uploaded to LoTW</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="exportLotw" value="1" id="exportLotw">
<label class="form-check-label" for="exportLotw">Export QSOs not uploaded to LoTW</label>
</div>
</div>
</div>

Wyświetl plik

@ -143,11 +143,13 @@
</fieldset>
</form>
<?php
$i = 1;
if ($cq_array) {
echo '
<table class="table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<td>#</td>
<td>CQ Zone</td>';
foreach($bands as $band) {
echo '<td>' . $band . '</td>';
@ -157,6 +159,7 @@
<tbody>';
foreach ($cq_array as $cq => $value) { // Fills the table with the data
echo '<tr>
<td>' . $i++ . '</td>
<td>'. $cq .'</td>';
foreach ($value as $key) {
echo '<td style="text-align: center">' . $key . '</td>';

Wyświetl plik

@ -69,10 +69,12 @@
</form>
<?php
if ($was_array) {
$i = 1;
echo '
<table class="table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<td>#</td>
<td>State</td>';
foreach($bands as $band) {
echo '<td>' . $band . '</td>';
@ -80,16 +82,47 @@
echo '</tr>
</thead>
<tbody>';
foreach ($was_array as $was => $value) { // Fills the table with the data
echo '<tr>
<td>' . $i++ . '</td>
<td>'. $was .'</td>';
foreach ($value as $key) {
echo '<td style="text-align: center">' . $key . '</td>';
}
echo '</tr>';
}
echo '</tfoot></table></div>';
echo '</table>
<h1>Summary</h1>
<table class="table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr><td></td>';
foreach ($was_summary as $was) { // Fills the table with the data
echo '<td style="text-align: center">' . $was->col_band . '</td>';
}
echo '</tr>
</thead>
<tbody>
<tr><td>Total worked</td>';
foreach ($was_summary as $was) { // Fills the table with the data
echo '<td style="text-align: center">' . $was->count . '</td>';
}
echo '</tr><tr>
<td>Total confirmed</td>';
foreach ($was_summary as $was) { // Fills the table with the data
echo '<td style="text-align: center">' . $was->cfmwas . '</td>';
}
echo '</tr>
</table>
</div>';
}
else {
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Nothing found!</div>';

Wyświetl plik

@ -15,23 +15,29 @@
<?php $this->load->view('layout/messages'); ?>
<?php echo form_open_multipart('eqsl/import');?>
<table>
<tr>
<td><input type="radio" name="eqslimport" id="upload" value="upload" checked /> Upload a file</td>
<td>
<p>Upload the Exported ADIF file from eQSL from the <a href="http://eqsl.cc/qslcard/DownloadInBox.cfm" target="_blank">Download Inbox</a> page, to mark QSOs as confirmed on eQSL.</p>
<div class="form-check">
<input class="form-check-input" type="radio" name="eqslimport" id="upload" value="upload" checked />
<label class="form-check-label" for="exampleRadios1">
Upload File
</label>
<br><br>
<p>Upload the Exported ADIF file from eQSL from the <a href="http://eqsl.cc/qslcard/DownloadInBox.cfm" target="_blank">Download Inbox</a> page, to mark QSOs as confirmed on eQSL.</p>
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
<input type="file" name="userfile" size="20" />
</td>
</tr>
<tr>
<td><input type="radio" name="eqslimport" id="fetch" value="fetch" checked="checked"/> Pull eQSL data for me</td>
<td>
<p>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.</p>
</td>
</tr>
</table>
<input class="btn primary" type="submit" value="Import" />
</div>
<br><br>
<div class="form-check">
<input class="form-check-input" type="radio" name="eqslimport" id="fetch" value="fetch" checked="checked"/>
<label class="form-check-label" for="exampleRadios1">
Pull eQSL data for me
</label>
<p>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.</p>
</div>
<input class="btn btn-primary" type="submit" value="Import eQSL QSO Matches" />
</form>
</div>

Wyświetl plik

@ -9,6 +9,10 @@
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/leaflet/leaflet.js"></script>
<script type="text/javascript" src="<?php echo base_url() ;?>assets/js/radiohelpers.js"></script>
<script type="text/javascript">
var icon_dot_url = "<?php echo base_url();?>assets/images/dot.png";
</script>
<?php if ($this->uri->segment(1) == "adif") { ?>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script>
@ -529,10 +533,15 @@ $(document).on('change', 'input', function(){
// Set Map to Lat/Long it locator is not empty
if($('#locator').val() == "") {
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
markers.clearLayers();
var marker = L.marker([result.dxcc.lat, result.dxcc.long]);
mymap.setZoom(8);
mymap.panTo([result.dxcc.lat, result.dxcc.long]);
var marker = L.marker([result.dxcc.lat, result.dxcc.long], {icon: redIcon});
mymap.setZoom(8);
mymap.panTo([result.dxcc.lat, result.dxcc.long]);
markers.addLayer(marker).addTo(mymap);
}
}
@ -724,15 +733,19 @@ $(document).on('change', 'input', function(){
$('#ituz').val(result.dxcc.ituz);
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
// Set Map to Lat/Long
markers.clearLayers();
mymap.setZoom(8);
mymap.setZoom(8);
if (typeof result.latlng !== "undefined" && result.latlng !== false) {
var marker = L.marker([result.latlng[0], result.latlng[1]]);
var marker = L.marker([result.latlng[0], result.latlng[1]], {icon: redIcon});
mymap.panTo([result.latlng[0], result.latlng[1]]);
} else {
var marker = L.marker([result.dxcc.lat, result.dxcc.long]);
var marker = L.marker([result.dxcc.lat, result.dxcc.long], {icon: redIcon});
mymap.panTo([result.dxcc.lat, result.dxcc.long]);
}
@ -905,7 +918,12 @@ $(document).on('change', 'input', function(){
// Set Map to Lat/Long
markers.clearLayers();
if (typeof result !== "undefined") {
var marker = L.marker([result[0], result[1]]);
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
var marker = L.marker([result[0], result[1]], {icon: redIcon});
mymap.setZoom(8);
mymap.panTo([result[0], result[1]]);
}
@ -1040,7 +1058,13 @@ $(document).on('change', 'input', function(){
id: 'mapbox.streets'
}).addTo(mymap);
L.marker([lat,long]).addTo(mymap)
var redIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [18, 18], // size of the icon
});
L.marker([lat,long], {icon: redIcon}).addTo(mymap)
.bindPopup(callsign);
mymap.on('click', onMapClick);
@ -1361,6 +1385,12 @@ $(document).ready(function(){
<?php if ($this->uri->segment(1) == "qrz") { ?>
<script>
function ExportQrz(station_id) {
if ($(".alert").length > 0) {
$(".alert").remove();
}
if ($(".errormessages").length > 0) {
$(".errormessages").remove();
}
$(".ld-ext-right").addClass('running');
$(".ld-ext-right").prop('disabled', true);
var baseURL= "<?php echo base_url();?>";
@ -1382,6 +1412,22 @@ $(document).ready(function(){
else {
$(".card-body").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>' + data.info + '</div>');
}
if (data.errormessages.length > 0) {
$(".card-body").append('' +
'<div class="errormessages"><p>\n' +
' <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n' +
' Show error messages\n' +
' </button>\n' +
' </p>\n' +
' <div class="collapse" id="collapseExample">\n' +
' <div class="card card-body"><div class="errors"></div>\n' +
' </div>\n' +
' </div></div>');
$.each(data.errormessages, function(index, value) {
$(".errors").append('<li>' + value);
});
}
}
});
}

Wyświetl plik

@ -1,7 +1,7 @@
<div class="container lotw">
<h1>LOTW Import</h1>
<div class="card">
<div class="card-header">Import Options</div>
<div class="card-body">
@ -10,16 +10,20 @@
<?php echo form_open_multipart('lotw/import');?>
<div class="custom-control custom-radio">
<input type="radio" id="lotwimport" name="lotwimport" class="custom-control-input">
<label class="custom-control-label" for="lotwimport">Upload a file</label>
<p>Upload the Exported ADIF file from LoTW from the <a href="https://p1k.arrl.org/lotwuser/qsos?qsoscmd=adif" target="_blank">Download Report</a> Area, to mark QSOs as confirmed on LOTW.</p>
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
<div class="custom-file">
<input type="file" class="custom-file-input" id="adiffile" name="userfile" size="20" />
<label class="custom-file-label" for="adiffile">Choose file</label>
</div>
</div>
<div class="form-check">
<input type="radio" id="lotwimport" name="lotwimport" class="form-check-input">
<label class="form-check-label" for="lotwimport">Upload a file</label>
<p>Upload the Exported ADIF file from LoTW from the <a href="https://p1k.arrl.org/lotwuser/qsos?qsoscmd=adif" target="_blank">Download Report</a> Area, to mark QSOs as confirmed on LOTW.</p>
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
<div class="custom-file">
<input type="file" class="custom-file-input" id="adiffile" name="userfile" size="20" />
<label class="custom-file-label" for="adiffile">Choose file</label>
</div>
</div>
<br><br>
@ -48,9 +52,7 @@
<p class="form-text text-muted">Cloudlog will use the LoTW username and password stored in your user profile to download a report from LoTW for you. The report Cloudlog downloads will have all confirmations since chosen date, or since your last LoTW confirmation (fetched from your log), up until now.</p>
<p class="form-text text-muted"><span class="badge badge-info">Important</span> You must have QSOs in the logbook before this option works, it will not populate your log from empty based on LoTW QSOs yet.</p>
<input class="btn primary" type="submit" value="Import" />
<input class="btn btn-primary" type="submit" value="Import LoTW Matches" />
</form>
</div>

Wyświetl plik

@ -32,6 +32,7 @@
<a class="nav-item nav-link active" id="nav-qso-tab" data-toggle="tab" href="#nav-qso" role="tab" aria-controls="nav-qso" aria-selected="true">QSO</a>
<a class="nav-item nav-link" id="nav-satellites-tab" data-toggle="tab" href="#nav-satellites" role="tab" aria-controls="nav-awards" aria-selected="true">Sats</a>
<a class="nav-item nav-link" id="nav-awards-tab" data-toggle="tab" href="#nav-awards" role="tab" aria-controls="nav-awards" aria-selected="true">Awards</a>
<a class="nav-item nav-link" id="nav-notes-tab" data-toggle="tab" href="#nav-notes" role="tab" aria-controls="nav-notes" aria-selected="false">Notes</a>
<a class="nav-item nav-link" id="nav-qsl-tab" data-toggle="tab" href="#nav-qsl" role="tab" aria-controls="nav-qsl" aria-selected="false">QSL</a>
<a class="nav-item nav-link" id="nav-station-tab" data-toggle="tab" href="#nav-station" role="tab" aria-controls="nav-station" aria-selected="false">Station</a>
</div>
@ -336,6 +337,14 @@
</div>
</div>
<!-- Notes Panel Contents -->
<div class="tab-pane fade" id="nav-notes" role="tabpanel" aria-labelledby="nav-notes-tab">
<div class="form-group">
<label for="notes">Notes (for internal usage only)</label>
<textarea type="text" class="form-control" id="notes" name="notes" rows="10"><?php echo $qso->COL_NOTES; ?></textarea>
</div>
</div>
<!-- QSL Panel Contents -->
<div class="tab-pane fade" id="nav-qsl" role="tabpanel" aria-labelledby="nav-qsl-tab">
<ul class="nav nav-tabs" id="myTab" role="tablist">

Wyświetl plik

@ -24,6 +24,10 @@
<li class="nav-item">
<a class="nav-link" id="satellite-tab" data-toggle="tab" href="#satellite" role="tab" aria-controls="satellite" aria-selected="false">Satellite</a>
</li>
<li class="nav-item">
<a class="nav-link" id="notes-tab" data-toggle="tab" href="#notes" role="tab" aria-controls="notes" aria-selected="false">Notes</a>
</li>
<li class="nav-item">
<a class="nav-link" id="qsl-tab" data-toggle="tab" href="#qsl" role="tab" aria-controls="qsl" aria-selected="false">QSLing</a>
@ -38,12 +42,12 @@
<div class="form-row">
<div class="form-group col-md-6">
<label for="start_date">Date</label>
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if ($this->session->userdata('start_date') != NULL) {echo $this->session->userdata('start_date');} else {echo date('d-m-Y');} ?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
<input type="text" class="form-control form-control-sm input_date" name="start_date" id="start_date" value="<?php if (($this->session->userdata('start_date') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_date'); } else { echo date('d-m-Y');}?>" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?> >
</div>
<div class="form-group col-md-6">
<label for="start_time">Time</label>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if ($this->session->userdata('start_time') != NULL) {echo $this->session->userdata('start_time');} else {echo date('H:i');} ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?>>
<input type="text" class="form-control form-control-sm input_time" name="start_time" id="start_time" value="<?php if (($this->session->userdata('start_time') != NULL && ((time() - $this->session->userdata('time_stamp')) < 24 * 60 * 60))) { echo $this->session->userdata('start_time'); } else {echo date('H:i'); } ?>" size="7" <?php echo ($_GET['manual'] == 0 ? "disabled" : ""); ?>>
</div>
<?php if ( $_GET['manual'] == 0 ) { ?>
@ -108,6 +112,7 @@
</optgroup>
<optgroup label="Microwave">
<option value="6cm" <?php if($this->session->userdata('band') == "6cm") { echo "selected=\"selected\""; } ?>>6cm</option>
<option value="3cm" <?php if($this->session->userdata('band') == "3cm") { echo "selected=\"selected\""; } ?>>3cm</option>
</optgroup>
</select>
@ -347,6 +352,14 @@
</div>
</div>
<!-- Notes Panel Contents -->
<div class="tab-pane fade" id="notes" role="tabpanel" aria-labelledby="notes-tab">
<div class="form-group">
<label for="notes">Notes (for internal usage only)</label>
<textarea type="text" class="form-control" id="notes" name="notes" rows="10"></textarea>
</div>
</div>
<!-- QSL Tab -->
<div class="tab-pane fade" id="qsl" role="tabpanel" aria-labelledby="qsl-tab">

Wyświetl plik

@ -114,6 +114,19 @@
<option value="WI" <?php if($my_station_profile->state == "WI") { echo "selected"; } ?>>Wisconsin</option>
<option value="WV" <?php if($my_station_profile->state == "WV") { echo "selected"; } ?>>West Virginia</option>
<option value="WY" <?php if($my_station_profile->state == "WY") { echo "selected"; } ?>>Wyoming</option>
<option value="AB" <?php if($my_station_profile->state == "AB") { echo "selected"; } ?>>Alberta</option>
<option value="BC" <?php if($my_station_profile->state == "BC") { echo "selected"; } ?>>British Columbia</option>
<option value="MB" <?php if($my_station_profile->state == "MB") { echo "selected"; } ?>>Manitoba</option>
<option value="NB" <?php if($my_station_profile->state == "NB") { echo "selected"; } ?>>New Brunswick</option>
<option value="NL" <?php if($my_station_profile->state == "NL") { echo "selected"; } ?>>Newfoundland & Labrador</option>
<option value="NS" <?php if($my_station_profile->state == "NS") { echo "selected"; } ?>>Nova Scotia</option>
<option value="NT" <?php if($my_station_profile->state == "NT") { echo "selected"; } ?>>Northwest Territories</option>
<option value="NU" <?php if($my_station_profile->state == "NU") { echo "selected"; } ?>>Nunavut</option>
<option value="ON" <?php if($my_station_profile->state == "ON") { echo "selected"; } ?>>Ontario</option>
<option value="PE" <?php if($my_station_profile->state == "PE") { echo "selected"; } ?>>Prince Edward Island</option>
<option value="QC" <?php if($my_station_profile->state == "QC") { echo "selected"; } ?>>Quebec</option>
<option value="SK" <?php if($my_station_profile->state == "SK") { echo "selected"; } ?>>Saskatchewan</option>
<option value="YT" <?php if($my_station_profile->state == "YT") { echo "selected"; } ?>>Yukon</option>
</select>
<small id="StateHelp" class="form-text text-muted">Select Station State</small>
</div>

Wyświetl plik

@ -76,7 +76,10 @@
<div class="form-group">
<label>Timezone</label>
<?php echo form_dropdown('user_timezone', $timezones, 0); ?>
<?php
if(!isset($user_timezone)) { $user_timezone = 0; }
echo form_dropdown('user_timezone', $timezones, $user_timezone);
?>
</div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />

Wyświetl plik

@ -75,7 +75,7 @@
$CI->load->library('qra');
// Cacluate Distance
echo $CI->qra->distance($row->station_gridsquare, $row->COL_GRIDSQUARE, 'M');
echo $CI->qra->distance($row->station_gridsquare, $row->COL_GRIDSQUARE, $this->config->item('measurement_base'));
switch ($this->config->item('measurement_base')) {
case 'M':
echo "mi";

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 526 B

Wyświetl plik

@ -5,6 +5,11 @@ var ajaxRequest;
var plotlist;
var plotlayers=[];
var greenIcon = L.icon({
iconUrl: icon_dot_url,
iconSize: [10, 10], // size of the icon
});
function initmap(ShowGrid = 'No') {
// set up AJAX request
ajaxRequest=getXmlHttpObject();
@ -61,7 +66,7 @@ function stateChanged() {
removeMarkers();
for (i=0;i<plotlist.length;i++) {
var plotll = new L.LatLng(plotlist[i].lat,plotlist[i].lng, true);
var plotmark = new L.Marker(plotll);
var plotmark = new L.Marker(plotll, {icon: greenIcon});
plotmark.data=plotlist[i];
map.addLayer(plotmark);
plotmark.bindPopup("<h3>"+plotlist[i].label+"</h3>"+plotlist[i].html);

Wyświetl plik

@ -99,6 +99,18 @@
]
}
},
"CAS-3H":{
"Modes":{
"V/U":[
{
"Uplink_Mode":"FM",
"Uplink_Freq":"144350000",
"Downlink_Mode":"FM",
"Downlink_Freq":"437200000"
}
]
}
},
"CAS-4A":{
"Modes":{
"U/V":[
@ -123,6 +135,18 @@
]
}
},
"CAS-6":{
"Modes":{
"U/V":[
{
"Uplink_Mode":"LSB",
"Uplink_Freq":"435280000",
"Downlink_Mode":"USB",
"Downlink_Freq":"145925000"
}
]
}
},
"EO-88":{
"Modes":{
"U/V":[