Merge to create Version 2.4.5

这个提交包含在:
Peter Goodhall 2023-07-14 14:16:03 +01:00 提交者 GitHub
当前提交 3920b7990e
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 109 个文件被更改,包括 2841 次插入841 次删除

查看文件

@ -10,3 +10,5 @@ RewriteRule ^(.*)$ /index.php?/$1 "[L,QSA,B= ?,BNP]"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 "[L,QSA,B= ?,BNP]"
RedirectMatch 404 ^/\.git

查看文件

@ -46,6 +46,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), 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), Theo (PD9DP), Stefan (SM0RGM). Peter (G0ABI), Lou (KI5FTY), Michael (DG3NAB).
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), Theo (PD9DP), Stefan (SM0RGM). Peter (G0ABI), Lou (KI5FTY), Michael (DG3NAB), Dragan (4O4A), minorsecond, Emily (W7AYQ), Steve (M0SKM), Rob (M0VFC).
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)

查看文件

@ -14,7 +14,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
*/
$config['app_name'] = "Cloudlog";
$config['app_version'] = "2.4.3";
$config['app_version'] = "2.4.5";
$config['directory'] = "logbook";
$config['callbook'] = "hamqth"; // Options are hamqth or qrz
$config['datadir'] = null; // default to install directory

查看文件

@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 124;
$config['migration_version'] = 130;
/*
|--------------------------------------------------------------------------

查看文件

@ -206,7 +206,7 @@ class adif extends CI_Controller {
$custom_errors .= $this->logbook_model->import($record, $this->input->post('station_profile'),
$this->input->post('skipDuplicate'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), true, $this->input->post('operatorName'));
$this->input->post('skipDuplicate'), $this->input->post('markLotw'), $this->input->post('dxccAdif'), $this->input->post('markQrz'), $this->input->post('markHrd'), true, $this->input->post('operatorName'))."<br/>";
};

查看文件

@ -5,38 +5,7 @@ class API extends CI_Controller {
// Do absolutely nothing
function index()
{
}
/*
TODOs
- Search Callsign (Return Json)
- Add QSO return json
*/
function search_callsign($callsign) {
$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);
$this->db->or_like('COL_GRIDSQUARE', $callsign);
$query = $this->db->get($this->config->item('table_name'));
$results = array();
foreach ($query->result() as $result)
{
$results[] = $result;
}
header('Content-type: application/json');
//$arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
echo $_GET['jsoncallback'].'('.json_encode($results).')'; //assign resulting code to $_GET['jsoncallback].
//echo json_encode($results);
echo "nothing to see";
}
function help()
@ -158,6 +127,30 @@ class API extends CI_Controller {
}
}
function station_info($key) {
$this->load->model('api_model');
$this->load->model('stations');
header("Content-type: application/json");
if(substr($this->api_model->access($key),0,1) == 'r') { /* Checkpermission for _r_eading */
$this->api_model->update_last_used($key);
$userid = $this->api_model->key_userid($key);
$station_ids = array();
$stations=$this->stations->all_of_user($userid);
foreach ($stations->result() as $row) {
$result['station_id']=$row->station_id;
$result['station_profile_name']=$row->station_profile_name;
$result['station_gridsquare']=$row->station_gridsquare;
$result['station_callsign']=$row->station_callsign;;
$result['station_active']=$row->station_active;
array_push($station_ids, $result);
}
echo json_encode($station_ids);
} else {
http_response_code(401);
echo json_encode(['status' => 'failed', 'reason' => "missing or invalid api key"]);
}
}
// FUNCTION: search()
// Handle search requests
/*
@ -468,9 +461,7 @@ class API extends CI_Controller {
if(isset($obj['station_profile_id'])) {
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, false, false, true);
} else {
$this->logbook_model->import($record, 0, NULL, NULL, NULL, NULL, false, false, true);
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, NULL, NULL, NULL, NULL, false, false, true);
}
};

查看文件

@ -15,6 +15,7 @@ class eqsl extends CI_Controller {
$folder_name = "images/eqsl_card_images";
$data['storage_used'] = $this->sizeFormat($this->folderSize($folder_name));
// Render Page
$data['page_title'] = "eQSL Cards";
@ -29,6 +30,12 @@ class eqsl extends CI_Controller {
$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'); }
$this->load->model('stations');
$data['station_profile'] = $this->stations->all_of_user();
$active_station_id = $this->stations->find_active();
$station_profile = $this->stations->profile($active_station_id);
$data['active_station_info'] = $station_profile->row();
// Check if eQSL Nicknames have been defined
$this->load->model('eqslmethods_model');
$eqsl_locations = $this->eqslmethods_model->all_of_user_with_eqsl_nick_defined();
@ -71,29 +78,39 @@ class eqsl extends CI_Controller {
$eqsl_results[] = $this->eqslimporter->fetch($eqsl_password);
}
}
else
{
if ( ! $this->upload->do_upload())
{
$data['page_title'] = "eQSL Import";
$data['error'] = $this->upload->display_errors();
} elseif ($this->input->post('eqslimport') == 'upload') {
$station_id4upload=$this->input->post('station_profile');
if ($this->stations->check_station_is_accessible($station_id4upload)) {
$station_callsign=$this->stations->profile($station_id4upload)->row()->station_callsign;
if ( ! $this->upload->do_upload())
{
$data['page_title'] = "eQSL Import";
$data['error'] = $this->upload->display_errors();
$this->load->view('interface_assets/header', $data);
$this->load->view('eqsl/import');
$this->load->view('interface_assets/footer');
$this->load->view('interface_assets/header', $data);
$this->load->view('eqsl/import');
$this->load->view('interface_assets/footer');
return;
return;
} else {
$data = array('upload_data' => $this->upload->data());
$this->load->library('EqslImporter');
$this->eqslimporter->from_file('./uploads/'.$data['upload_data']['file_name'],$station_callsign);
$eqsl_results[] = $this->eqslimporter->import();
}
} else {
log_message('error',$station_id4upload." is not valid for user!");
}
else
{
$data = array('upload_data' => $this->upload->data());
} else {
$data['page_title'] = "eQSL Import";
$this->load->library('EqslImporter');
$this->eqslimporter->from_file('./uploads/'.$data['upload_data']['file_name']);
$this->load->view('interface_assets/header', $data);
$this->load->view('eqsl/import');
$this->load->view('interface_assets/footer');
$eqsl_results[] = $this->eqslimporter->import();
}
return;
}
$data['eqsl_results'] = $eqsl_results;

查看文件

@ -11,11 +11,17 @@ class Gridmap extends CI_Controller {
$this->load->model('bands');
$this->load->model('gridmap_model');
$this->load->model('stations');
$data['homegrid'] = explode(',', $this->stations->find_gridsquare());
$data['modes'] = $this->gridmap_model->get_worked_modes();
$data['bands'] = $this->bands->get_worked_bands();
$data['sats_available'] = $this->bands->get_worked_sats();
$data['user_gridmap_default_band'] = $this->session->userdata('user_gridmap_default_band');
$data['user_gridmap_confirmation'] = $this->session->userdata('user_gridmap_confirmation');
$data['layer'] = $this->optionslib->get_option('option_map_tile_server');
$data['attribution'] = $this->optionslib->get_option('option_map_tile_server_copyright');
@ -27,6 +33,7 @@ class Gridmap extends CI_Controller {
$footerData = [];
$footerData['scripts'] = [
'assets/js/leaflet/geocoding.js',
'assets/js/leaflet/L.MaidenheadColouredGridMap.js',
'assets/js/sections/gridmap.js?'
];
@ -175,4 +182,4 @@ class Gridmap extends CI_Controller {
header('Content-Type: application/json');
echo json_encode($data);
}
}
}

查看文件

@ -0,0 +1,171 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
Controller to interact with the hrdlog.net API
*/
class Hrdlog extends CI_Controller {
/*
* Upload QSO to hrdlog.net
* When called from the url cloudlog/hrdlog/upload, the function loops through all station_id's with a hrdlog code defined.
* All QSOs not previously uploaded, will then be uploaded, one at a time
*/
public function upload() {
$this->setOptions();
$this->load->model('logbook_model');
$station_ids = $this->logbook_model->get_station_id_with_hrdlog_code();
if ($station_ids) {
foreach ($station_ids as $station) {
$hrdlog_code = $station->hrdlog_code;
if($this->mass_upload_qsos($station->station_id, $hrdlog_code)) {
echo "QSOs have been uploaded to hrdlog.net.";
log_message('info', 'QSOs have been uploaded to hrdlog.net.');
} else{
echo "No QSOs found for upload.";
log_message('info', 'No QSOs found for upload.');
}
}
} else {
echo "No station profiles with a hrdlog Code found.";
log_message('error', "No station profiles with a hrdlog Code found.");
}
}
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 hrdlog.
* Adif is build for each qso, and then uploaded, one at a time
*/
function mass_upload_qsos($station_id, $hrdlog_code) {
$i = 0;
$data['qsos'] = $this->logbook_model->get_hrdlog_qsos($station_id);
$errormessages=array();
$CI =& get_instance();
$CI->load->library('AdifHelper');
if ($data['qsos']) {
foreach ($data['qsos']->result() as $qso) {
$adif = $CI->adifhelper->getAdifLine($qso);
if ($qso->COL_HRDLOG_QSO_UPLOAD_STATUS == 'M') {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_code, $qso->COL_STATION_CALLSIGN,$adif, true);
} else {
$result = $this->logbook_model->push_qso_to_hrdlog($hrdlog_code, $qso->COL_STATION_CALLSIGN,$adif);
}
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') || ($result['status'] == 'duplicate')) ){
$this->markqso($qso->COL_PRIMARY_KEY);
$i++;
} elseif ((substr($result['status'],0,11) == 'auth_error')) {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog upload failed with the following message: ' .$result['message']);
log_message('error', 'hrdlog upload stopped for Station_ID: ' .$station_id);
$errormessages[] = $result['message'] . 'Invalid HRDLog-Code, stopped at Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
break; /* If key is invalid, immediate stop syncing for more QSOs of this station */
} else {
log_message('error', 'hrdlog upload failed for qso: Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON);
log_message('error', 'hrdlog 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;
}
}
$result['status'] = 'OK';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
} else {
$result['status'] = 'Error';
$result['count'] = $i;
$result['errormessages'] = $errormessages;
return $result;
}
}
/*
* Function marks QSO with given primarykey as uploaded to hrdlog
*/
function markqso($primarykey) {
$this->logbook_model->mark_hrdlog_qsos_sent($primarykey);
}
/*
* Used for displaying the uid for manually selecting log for upload to hrdlog
*/
public function export() {
$this->load->model('stations');
$data['page_title'] = "HRDlog.net Logbook";
$data['station_profiles'] = $this->stations->all_of_user();
$data['station_profile'] = $this->stations->stations_with_hrdlog_code();
$this->load->view('interface_assets/header', $data);
$this->load->view('hrdlog/export');
$this->load->view('interface_assets/footer');
}
/*
* Used for ajax-function when selecting log for upload to hrdlog
*/
public function upload_station() {
$this->setOptions();
$this->load->model('stations');
$postData = $this->input->post();
$this->load->model('logbook_model');
$result = $this->logbook_model->exists_hrdlog_code($postData['station_id']);
$hrdlog_code = $result->hrdlog_code;
header('Content-type: application/json');
$result = $this->mass_upload_qsos($postData['station_id'], $hrdlog_code);
if ($result['status'] == 'OK') {
$stationinfo = $this->stations->stations_with_hrdlog_code();
$info = $stationinfo->result();
$data['status'] = 'OK';
$data['info'] = $info;
$data['infomessage'] = $result['count'] . " QSOs are now uploaded to hrdlog";
$data['errormessages'] = $result['errormessages'];
echo json_encode($data);
} else {
$data['status'] = 'Error';
$data['info'] = 'Error: No QSOs found to upload.';
$data['errormessages'] = $result['errormessages'];
echo json_encode($data);
}
}
public function mark_hrdlog() {
// 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_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
}
$this->load->view('interface_assets/header', $data);
$this->load->view('hrdlog/mark_hrdlog', $data);
$this->load->view('interface_assets/footer');
}
}

查看文件

@ -98,30 +98,15 @@ class Logbook extends CI_Controller {
$callsign = str_replace("-","/",$callsign);
// Check if callsign is an LOTW User
$lotw_member = "";
$lotw_file_name = "./updates/lotw_users.csv";
if (file_exists($lotw_file_name)) {
$f = fopen($lotw_file_name, "r");
$result = false;
while ($row = fgetcsv($f)) {
if ($row[0] == strtoupper($callsign)) {
$result = $row[0];
$lotw_member = "active";
break;
}
}
if($lotw_member != "active") {
$lotw_member = "not found";
}
fclose($f);
} else {
$lotw_member = "not found";
}
// Check Database for all other data
$this->load->model('logbook_model');
$lotw_days=$this->logbook_model->check_last_lotw($callsign);
if ($lotw_days != null) {
$lotw_member="active";
} else {
$lotw_member="not found";
}
$return = [
"callsign" => strtoupper($callsign),
@ -137,6 +122,7 @@ class Logbook extends CI_Controller {
"bearing" => "",
"workedBefore" => false,
"lotw_member" => $lotw_member,
"lotw_days" => $lotw_days,
"image" => "",
];
@ -772,7 +758,7 @@ class Logbook extends CI_Controller {
function querydb($id) {
$this->db->from($this->config->item('table_name'));
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
$this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC');
$this->db->join('dxcc_entities', 'dxcc_entities.adif = '.$this->config->item('table_name').'.COL_DXCC', 'left outer');
$this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer');
$this->db->group_start();
$this->db->like(''.$this->config->item('table_name').'.COL_CALL', $id);

查看文件

@ -1,4 +1,4 @@
<?php
<?php
use Cloudlog\QSLManager\QSO;
@ -47,10 +47,10 @@ class Logbookadvanced extends CI_Controller {
$pageData['dxccarray'] = $this->logbook_model->fetchDxcc();
$pageData['iotaarray'] = $this->logbook_model->fetchIota();
$pageData['sats'] = $this->bands->get_worked_sats();
$pageData['bands'] = $this->bands->get_worked_bands();
$CI =& get_instance();
$CI =& get_instance();
// Get Date format
if($CI->session->userdata('user_date_format')) {
// If Logged in and session exists
@ -104,8 +104,17 @@ class Logbookadvanced extends CI_Controller {
'propmode' => xss_clean($this->input->post('propmode')),
'gridsquare' => xss_clean($this->input->post('gridsquare')),
'state' => xss_clean($this->input->post('state')),
'cqzone' => xss_clean($this->input->post('cqzone')),
'qsoresults' => xss_clean($this->input->post('qsoresults')),
'sats' => xss_clean($this->input->post('sats')),
'lotwSent' => xss_clean($this->input->post('lotwSent')),
'lotwReceived' => xss_clean($this->input->post('lotwReceived')),
'eqslSent' => xss_clean($this->input->post('eqslSent')),
'eqslReceived' => xss_clean($this->input->post('eqslReceived')),
'qslvia' => xss_clean($this->input->post('qslvia')),
'sota' => xss_clean($this->input->post('sota')),
'pota' => xss_clean($this->input->post('pota')),
'wwff' => xss_clean($this->input->post('wwff')),
);
$qsos = [];
@ -170,7 +179,7 @@ class Logbookadvanced extends CI_Controller {
$data = $this->logbookadvanced_model->getQsosForAdif($ids, $user_id);
$results = $data->result('array');
$qsos = [];
foreach ($results as $data) {
$qsos[] = new QSO($data);
@ -198,7 +207,7 @@ class Logbookadvanced extends CI_Controller {
$data = $this->logbookadvanced_model->getQsosForAdif($ids, $user_id);
$results = $data->result('array');
$qsos = [];
foreach ($results as $data) {
$qsos[] = new QSO($data);
@ -212,4 +221,4 @@ class Logbookadvanced extends CI_Controller {
header("Content-Type: application/json");
print json_encode($q);
}
}
}

查看文件

@ -129,6 +129,12 @@ class Logbooks extends CI_Controller {
$this->load->view('logbooks/components/publicSlugInputValidation', $data);
}
public function save_publicsearch() {
$this->load->model('logbooks_model');
$returndata = $this->logbooks_model->save_public_search($this->input->post('public_search'), $this->input->post('logbook_id'));
echo "<div class=\"alert alert-success\" role=\"alert\">Public Search Setttings Saved</div>";
}
public function save_publicslug() {
$this->load->model('logbooks_model');

查看文件

@ -53,10 +53,9 @@ class Lookup extends CI_Controller {
$this->load->view('lookup/result', $data);
}
public function scp($call) {
if($call) {
$uppercase_callsign = strtoupper($call);
public function scp() {
if($_POST['callsign']) {
$uppercase_callsign = strtoupper($_POST['callsign']);
}
// SCP results from logbook

查看文件

@ -192,6 +192,9 @@ class Lotw extends CI_Controller {
*/
public function lotw_upload() {
$this->load->model('user_model');
$this->user_model->authorize(2);
// Fire OpenSSL missing error if not found
if (!extension_loaded('openssl')) {
echo "You must install php OpenSSL for LoTW functions to work";
@ -200,154 +203,165 @@ class Lotw extends CI_Controller {
// Get Station Profile Data
$this->load->model('Stations');
$station_profiles = $this->Stations->all();
if ($this->user_model->authorize(2)) {
$station_profiles = $this->Stations->all_of_user($this->session->userdata('user_id'));
$sync_user_id=$this->session->userdata('user_id');
} else {
$station_profiles = $this->Stations->all();
$sync_user_id=null;
}
// Array of QSO IDs being Uploaded
$qso_id_array = array();
// Build TQ8 Outputs
if ($station_profiles->num_rows() >= 1) {
if ($station_profiles->num_rows() >= 1) {
foreach ($station_profiles->result() as $station_profile)
{
foreach ($station_profiles->result() as $station_profile) {
// Get Certificate Data
$this->load->model('LotwCert');
$data['station_profile'] = $station_profile;
$data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign, $station_profile->station_dxcc);
// Get Certificate Data
$this->load->model('LotwCert');
$data['station_profile'] = $station_profile;
$data['lotw_cert_info'] = $this->LotwCert->lotw_cert_details($station_profile->station_callsign, $station_profile->station_dxcc);
// If Station Profile has no LOTW Cert continue on.
if(!isset($data['lotw_cert_info']->cert_dxcc_id)) {
continue;
}
// Check if LoTW certificate itself is valid
// Validty of QSO dates will be checked later
$current_date = date('Y-m-d H:i:s');
if ($current_date <= $data['lotw_cert_info']->date_created) {
echo $data['lotw_cert_info']->callsign.": LoTW certificate not valid yet!";
continue;
}
if ($current_date >= $data['lotw_cert_info']->date_expires) {
echo $data['lotw_cert_info']->callsign.": LoTW certificate expired!";
continue;
}
// Get QSOs
$this->load->model('Logbook_model');
$data['qsos'] = $this->Logbook_model->get_lotw_qsos_to_upload($data['station_profile']->station_id, $data['lotw_cert_info']->qso_start_date, $data['lotw_cert_info']->qso_end_date);
// Nothing to upload
if(empty($data['qsos']->result())){
echo $station_profile->station_callsign." (".$station_profile->station_profile_name.") No QSOs to Upload <br>";
continue;
}
foreach ($data['qsos']->result() as $temp_qso) {
array_push($qso_id_array, $temp_qso->COL_PRIMARY_KEY);
}
// Build File to save
$adif_to_save = $this->load->view('lotw_views/adif_views/adif_export', $data, TRUE);
// create folder to store upload file
if (!file_exists('./uploads/lotw')) {
mkdir('./uploads/lotw', 0775, true);
}
// Build Filename
$filename_for_saving = './uploads/lotw/'.preg_replace('/[^a-z0-9]+/', '-', strtolower($data['lotw_cert_info']->callsign))."-".date("Y-m-d-H-i-s")."-cloudlog.tq8";
$gzdata = gzencode($adif_to_save, 9);
$fp = fopen($filename_for_saving, "w");
fwrite($fp, $gzdata);
fclose($fp);
//The URL that accepts the file upload.
$url = 'https://lotw.arrl.org/lotw/upload';
//The name of the field for the uploaded file.
$uploadFieldName = 'upfile';
//The full path to the file that you want to upload
$filePath = realpath($filename_for_saving);
//Initiate cURL
$ch = curl_init();
//Set the URL
curl_setopt($ch, CURLOPT_URL, $url);
//Set the HTTP request to POST
curl_setopt($ch, CURLOPT_POST, true);
//Tell cURL to return the output as a string.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//If the function curl_file_create exists
if(function_exists('curl_file_create')){
//Use the recommended way, creating a CURLFile object.
$filePath = curl_file_create($filePath);
} else{
//Otherwise, do it the old way.
//Get the canonicalized pathname of our file and prepend
//the @ character.
$filePath = '@' . realpath($filePath);
//Turn off SAFE UPLOAD so that it accepts files
//starting with an @
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
}
//Setup our POST fields
$postFields = array(
$uploadFieldName => $filePath
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
//Execute the request
$result = curl_exec($ch);
//If an error occured, throw an exception
//with the error message.
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
$pos = strpos($result, "<!-- .UPL. accepted -->");
if ($pos === false) {
// Upload of TQ8 Failed for unknown reason
echo $station_profile->station_callsign." (".$station_profile->station_profile_name.") Upload Failed"."<br>";
} else {
// Upload of TQ8 was successfull
echo "Upload Successful - ".$filename_for_saving."<br>";
$this->LotwCert->last_upload($data['lotw_cert_info']->lotw_cert_id);
// Mark QSOs as Sent
foreach ($qso_id_array as $qso_number) {
$this->Logbook_model->mark_lotw_sent($qso_number);
}
}
// Delete TQ8 File - This is done regardless of whether upload was succcessful
unlink(realpath($filename_for_saving));
// If Station Profile has no LOTW Cert continue on.
if(!isset($data['lotw_cert_info']->cert_dxcc_id)) {
continue;
}
} else {
echo "No Station Profiles found to upload to LOTW";
// Check if LoTW certificate itself is valid
// Validty of QSO dates will be checked later
$current_date = date('Y-m-d H:i:s');
if ($current_date <= $data['lotw_cert_info']->date_created) {
echo $data['lotw_cert_info']->callsign.": LoTW certificate not valid yet!";
continue;
}
if ($current_date >= $data['lotw_cert_info']->date_expires) {
echo $data['lotw_cert_info']->callsign.": LoTW certificate expired!";
continue;
}
// Get QSOs
$this->load->model('Logbook_model');
$data['qsos'] = $this->Logbook_model->get_lotw_qsos_to_upload($data['station_profile']->station_id, $data['lotw_cert_info']->qso_start_date, $data['lotw_cert_info']->qso_end_date);
// Nothing to upload
if(empty($data['qsos']->result())){
if ($this->user_model->authorize(2)) { // Only be verbose if we have a session
echo $station_profile->station_callsign." (".$station_profile->station_profile_name.") No QSOs to Upload <br>";
}
continue;
}
foreach ($data['qsos']->result() as $temp_qso) {
array_push($qso_id_array, $temp_qso->COL_PRIMARY_KEY);
}
// Build File to save
$adif_to_save = $this->load->view('lotw_views/adif_views/adif_export', $data, TRUE);
// create folder to store upload file
if (!file_exists('./uploads/lotw')) {
mkdir('./uploads/lotw', 0775, true);
}
// Build Filename
$filename_for_saving = './uploads/lotw/'.preg_replace('/[^a-z0-9]+/', '-', strtolower($data['lotw_cert_info']->callsign))."-".date("Y-m-d-H-i-s")."-cloudlog.tq8";
$gzdata = gzencode($adif_to_save, 9);
$fp = fopen($filename_for_saving, "w");
fwrite($fp, $gzdata);
fclose($fp);
//The URL that accepts the file upload.
$url = 'https://lotw.arrl.org/lotw/upload';
//The name of the field for the uploaded file.
$uploadFieldName = 'upfile';
//The full path to the file that you want to upload
$filePath = realpath($filename_for_saving);
//Initiate cURL
$ch = curl_init();
//Set the URL
curl_setopt($ch, CURLOPT_URL, $url);
//Set the HTTP request to POST
curl_setopt($ch, CURLOPT_POST, true);
//Tell cURL to return the output as a string.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//If the function curl_file_create exists
if(function_exists('curl_file_create')){
//Use the recommended way, creating a CURLFile object.
$filePath = curl_file_create($filePath);
} else{
//Otherwise, do it the old way.
//Get the canonicalized pathname of our file and prepend
//the @ character.
$filePath = '@' . realpath($filePath);
//Turn off SAFE UPLOAD so that it accepts files
//starting with an @
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
}
//Setup our POST fields
$postFields = array(
$uploadFieldName => $filePath
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
//Execute the request
$result = curl_exec($ch);
//If an error occured, throw an exception
//with the error message.
if(curl_errno($ch)){
throw new Exception(curl_error($ch));
}
$pos = strpos($result, "<!-- .UPL. accepted -->");
if ($pos === false) {
// Upload of TQ8 Failed for unknown reason
echo $station_profile->station_callsign." (".$station_profile->station_profile_name.") Upload Failed"."<br>";
} else {
// Upload of TQ8 was successfull
echo "Upload Successful - ".$filename_for_saving."<br>";
$this->LotwCert->last_upload($data['lotw_cert_info']->lotw_cert_id);
// Mark QSOs as Sent
foreach ($qso_id_array as $qso_number) {
$this->Logbook_model->mark_lotw_sent($qso_number);
}
}
// Delete TQ8 File - This is done regardless of whether upload was succcessful
unlink(realpath($filename_for_saving));
}
} else {
echo "No Station Profiles found to upload to LOTW";
}
/*
| Download QSO Matches from LoTW
*/
*/
if ($this->user_model->authorize(2)) {
echo "<br><br>";
echo $this->lotw_download();
$sync_user_id=$this->session->userdata('user_id');
} else {
$sync_user_id=null;
}
echo $this->lotw_download($sync_user_id);
}
/*
@ -497,23 +511,9 @@ class Lotw extends CI_Controller {
$record['qsl_rcvd'] = $config['lotw_rcvd_mark'];
}
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band']);
$skipNewQso = $this->input->post('importMissing'); // If import missing was checked
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign']);
if($status[0] == "No Match" && $skipNewQso != NULL) {
$station_id = $this->logbook_model->find_correct_station_id($record['station_callsign'], $record['my_gridsquare']);
if ($station_id != NULL) {
$result = $this->logbook_model->import($record, $station_id, NULL, TRUE, NULL, NULL, true, false); // Create the Entry
if ($result == "") {
$lotw_status = 'QSO imported';
} else {
$lotw_status = $result;
}
}
} else {
if($status[0] == "Found") {
if (isset($record['state'])) {
$state = $record['state'];
} else {
@ -526,6 +526,12 @@ class Lotw extends CI_Controller {
$qsl_gridsquare = "";
}
if (isset($record['vucc_grids'])) {
$qsl_vucc_grids = $record['vucc_grids'];
} else {
$qsl_vucc_grids = "";
}
if (isset($record['iota'])) {
$iota = $record['iota'];
} else {
@ -550,23 +556,36 @@ class Lotw extends CI_Controller {
$ituz = "";
}
$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz);
$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $record['station_callsign']);
$table .= "<tr>";
$table .= "<td>".$record['station_callsign']."</td>";
$table .= "<td>".$time_on."</td>";
$table .= "<td>".$record['call']."</td>";
$table .= "<td>".$record['mode']."</td>";
$table .= "<td>".$record['qsl_rcvd']."</td>";
$table .= "<td>".$qsl_date."</td>";
$table .= "<td>".$state."</td>";
$table .= "<td>".($qsl_gridsquare != '' ? $qsl_gridsquare : $qsl_vucc_grids)."</td>";
$table .= "<td>".$iota."</td>";
$table .= "<td>QSO Record: ".$status[0]."</td>";
$table .= "<td>LoTW Record: ".$lotw_status."</td>";
$table .= "</tr>";
} else {
$table .= "<tr>";
$table .= "<td>".$record['station_callsign']."</td>";
$table .= "<td>".$time_on."</td>";
$table .= "<td>".$record['call']."</td>";
$table .= "<td>".$record['mode']."</td>";
$table .= "<td>".$record['qsl_rcvd']."</td>";
$table .= "<td></td>";
$table .= "<td></td>";
$table .= "<td></td>";
$table .= "<td></td>";
$table .= "<td>QSO Record: ".$status[0]."</td>";
$table .= "<td></td>";
$table .= "</tr>";
}
$table .= "<tr>";
$table .= "<td>".$record['station_callsign']."</td>";
$table .= "<td>".$time_on."</td>";
$table .= "<td>".$record['call']."</td>";
$table .= "<td>".$record['mode']."</td>";
$table .= "<td>".$record['qsl_rcvd']."</td>";
$table .= "<td>".$qsl_date."</td>";
$table .= "<td>".$state."</td>";
$table .= "<td>".$qsl_gridsquare."</td>";
$table .= "<td>".$iota."</td>";
$table .= "<td>QSO Record: ".$status[0]."</td>";
$table .= "<td>LoTW Record: ".$lotw_status."</td>";
$table .= "</tr>";
}
if ($table != "")
@ -578,17 +597,20 @@ class Lotw extends CI_Controller {
unlink($filepath);
if(isset($data['lotw_table_headers'])) {
if($display_view == TRUE) {
$data['page_title'] = "LoTW ADIF Information";
$this->load->view('interface_assets/header', $data);
$this->load->view('lotw/analysis');
$this->load->view('interface_assets/footer');
$this->load->model('user_model');
if ($this->user_model->authorize(2)) { // Only Output results if authorized User
if(isset($data['lotw_table_headers'])) {
if($display_view == TRUE) {
$data['page_title'] = "LoTW ADIF Information";
$this->load->view('interface_assets/header', $data);
$this->load->view('lotw/analysis');
$this->load->view('interface_assets/footer');
} else {
return $tableheaders.$table;
}
} else {
return $tableheaders.$table;
echo "Downloaded LoTW report contains no matches.";
}
} else {
echo "Downloaded LoTW report contains no matches.";
}
}
@ -601,21 +623,21 @@ class Lotw extends CI_Controller {
| downloading matching QSOs.
|
*/
function lotw_download() {
function lotw_download($sync_user_id = null) {
$this->load->model('user_model');
$this->load->model('logbook_model');
$query = $this->user_model->get_all_lotw_users();
if ($query->num_rows() >= 1) {
foreach ($query->result() as $user)
{
$results='';
foreach ($query->result() as $user) {
if ( ($sync_user_id != null) && ($sync_user_id != $user->user_id) ) { continue; }
$config['upload_path'] = './uploads/';
$file = $config['upload_path'] . 'lotwreport_download.adi';
if (file_exists($file) && ! is_writable($file)) {
return "Temporary download file ".$file." is not writable. Aborting!";
$result.= "Temporary download file ".$file." is not writable. Aborting!";
}
// Get credentials for LoTW
@ -634,7 +656,7 @@ class Lotw extends CI_Controller {
echo "You have not defined your ARRL LoTW credentials!";
}
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date()));
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date($user->user_id)));
// Build URL for LoTW report file
$lotw_url .= "?";
@ -646,18 +668,19 @@ class Lotw extends CI_Controller {
$lotw_url .= "$lotw_last_qsl_date";
if (! is_writable(dirname($file))) {
return "Temporary download directory ".dirname($file)." is not writable. Aborting!";
$results.= "Temporary download directory ".dirname($file)." is not writable. Aborting!";
continue;
}
file_put_contents($file, file_get_contents($lotw_url));
if (file_get_contents($file, false, null, 0, 39) != "ARRL Logbook of the World Status Report") {
return "LoTW downloading failed either due to it being down or incorrect logins.";
$results.= "LoTW downloading failed for User ".$data['user_lotw_name']." either due to it being down or incorrect logins.";
continue;
}
ini_set('memory_limit', '-1');
$results = $this->loadFromFile($file, false);
return $results;
$results.= $this->loadFromFile($file, false);
}
return $results;
} else {
return "No LOTW User details found to carry out matches.";
}
@ -707,7 +730,7 @@ class Lotw extends CI_Controller {
}
else {
// Query the logbook to determine when the last LoTW confirmation was
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date()));
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date($this->session->userdata['user_id'])));
}
// Build URL for LoTW report file

查看文件

@ -71,9 +71,15 @@ class Qrz extends CI_Controller {
$result = $this->logbook_model->push_qso_to_qrz($qrz_api_key, $adif);
}
if ($result['status'] == 'OK') {
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') && ($result['message'] == 'STATUS=FAIL&REASON=Unable to add QSO to database: duplicate&EXTENDED=')) ){
$this->markqso($qso->COL_PRIMARY_KEY);
$i++;
} elseif ( ($result['status']=='error') && (substr($result['message'],0,11) == 'STATUS=AUTH')) {
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']);
log_message('error', 'QRZ upload stopped for Station_ID: ' .$station_id);
$errormessages[] = $result['message'] . ' Call: ' . $qso->COL_CALL . ' Band: ' . $qso->COL_BAND . ' Mode: ' . $qso->COL_MODE . ' Time: ' . $qso->COL_TIME_ON;
break; /* If key is invalid, immediate stop syncing for more QSOs of this station */
} 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']);

查看文件

@ -66,11 +66,15 @@ class Qsl extends CI_Controller {
if (isset($_FILES['qslcardfront']) && $_FILES['qslcardfront']['name'] != "" && $_FILES['qslcardfront']['error'] == 0)
{
$result['front'] = $this->uploadQslCardFront($qsoid);
} else {
$result['front']['status'] = '';
}
if (isset($_FILES['qslcardback']) && $_FILES['qslcardback']['name'] != "" && $_FILES['qslcardback']['error'] == 0)
{
$result['back'] = $this->uploadQslCardBack($qsoid);
} else {
$result['back']['status'] = '';
}
header("Content-type: application/json");
@ -170,6 +174,13 @@ class Qsl extends CI_Controller {
echo json_encode($result);
}
function viewQsl() {
$cleanid = $this->security->xss_clean($this->input->post('id'));
$this->load->model('Qsl_model');
$data['qslimages'] = $this->Qsl_model->getQslForQsoId($cleanid);
$this->load->view('qslcard/qslcarousel', $data);
}
}
// Functions for storage, these need shifted to a libary to use across Cloudlog

查看文件

@ -78,82 +78,95 @@
}
function json($id)
{
function json($id) {
header('Content-Type: application/json');
$this->load->model('user_model');
$this->load->model('cat');
// Check if users logged in
$query = $this->cat->radio_status($id);
if($this->user_model->validate_session() == 0) {
// user is not logged in
// Return Json data
header('Content-Type: application/json');
echo json_encode(array(
"error" => "not_logged_in"
), JSON_PRETTY_PRINT);
} else {
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
header('Content-Type: application/json');
$this->load->model('cat');
$query = $this->cat->radio_status($id);
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row)
{
$frequency = $row->frequency;
$frequency = $row->frequency;
$frequency_rx = $row->frequency_rx;
$frequency_rx = $row->frequency_rx;
$power = $row->power;
$power = $row->power;
$prop_mode = $row->prop_mode;
$prop_mode = $row->prop_mode;
// Check Mode
$mode = strtoupper($row->mode);
if ($mode == "FMN") {
$mode = "FM";
}
if ($row->prop_mode == "SAT") {
// Get Satellite Name
if ($row->sat_name == "AO-07") {
$sat_name = "AO-7";
} elseif ($row->sat_name == "LILACSAT") {
$sat_name = "CAS-3H";
} else {
$sat_name = strtoupper($row->sat_name);
// Check Mode
$mode = strtoupper($row->mode);
if ($mode == "FMN") {
$mode = "FM";
}
// Get Satellite Mode
$sat_mode_uplink = $this->get_mode_designator($row->frequency);
$sat_mode_downlink = $this->get_mode_designator($row->frequency_rx);
if ($row->prop_mode == "SAT") {
// Get Satellite Name
if ($row->sat_name == "AO-07") {
$sat_name = "AO-7";
} elseif ($row->sat_name == "LILACSAT") {
$sat_name = "CAS-3H";
} else {
$sat_name = strtoupper($row->sat_name);
}
if (empty($sat_mode_uplink)) {
// Get Satellite Mode
$sat_mode_uplink = $this->get_mode_designator($row->frequency);
$sat_mode_downlink = $this->get_mode_designator($row->frequency_rx);
if (empty($sat_mode_uplink)) {
$sat_mode = "";
} elseif ($sat_mode_uplink !== $sat_mode_downlink) {
$sat_mode = $sat_mode_uplink."/".$sat_mode_downlink;
} else {
$sat_mode = $sat_mode_uplink;
}
} else {
$sat_name = "";
$sat_mode = "";
} elseif ($sat_mode_uplink !== $sat_mode_downlink) {
$sat_mode = $sat_mode_uplink."/".$sat_mode_downlink;
} else {
$sat_mode = $sat_mode_uplink;
}
} else {
$sat_name = "";
$sat_mode = "";
// Calculate how old the data is in minutes
$datetime1 = new DateTime("now", new DateTimeZone('UTC')); // Today's Date/Time
$datetime2 = new DateTime($row->timestamp, new DateTimeZone('UTC'));
$interval = $datetime1->diff($datetime2);
$minutes = $interval->days * 24 * 60;
$minutes += $interval->h * 60;
$minutes += $interval->i;
$updated_at = $minutes;
// Return Json data
echo json_encode(array(
"frequency" => $frequency,
"frequency_rx" => $frequency_rx,
"mode" => $mode,
"satmode" => $sat_mode,
"satname" => $sat_name,
"power" => $power,
"prop_mode" => $prop_mode,
"updated_minutes_ago" => $updated_at,
), JSON_PRETTY_PRINT);
}
// Calculate how old the data is in minutes
$datetime1 = new DateTime("now", new DateTimeZone('UTC')); // Today's Date/Time
$datetime2 = new DateTime($row->timestamp, new DateTimeZone('UTC'));
$interval = $datetime1->diff($datetime2);
$minutes = $interval->days * 24 * 60;
$minutes += $interval->h * 60;
$minutes += $interval->i;
$updated_at = $minutes;
// Return Json data
echo json_encode(array(
"frequency" => $frequency,
"frequency_rx" => $frequency_rx,
"mode" => $mode,
"satmode" => $sat_mode,
"satname" => $sat_name,
"power" => $power,
"prop_mode" => $prop_mode,
"updated_minutes_ago" => $updated_at,
), JSON_PRETTY_PRINT);
}
}
}

查看文件

@ -189,7 +189,7 @@ class Update extends CI_Controller {
gzclose($gz);
if (file_put_contents($this->make_update_path("cty.xml"), $data) === FALSE) {
$this->update_status("FAILED: Could not write to LoTW users file");
$this->update_status("FAILED: Could not write to cty.xml file");
return;
}

查看文件

@ -33,6 +33,7 @@ class User extends CI_Controller {
$this->load->model('user_model');
if(!$this->user_model->authorize(99)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$this->load->model('bands');
$this->load->library('form_validation');
$this->form_validation->set_rules('user_name', 'Username', 'required');
@ -46,6 +47,8 @@ class User extends CI_Controller {
$this->form_validation->set_rules('user_locator', 'Locator', 'callback_check_locator');
$this->form_validation->set_rules('user_timezone', 'Timezone', 'required');
$data['bands'] = $this->bands->get_user_bands();
// Get themes list
$data['themes'] = $this->user_model->getThemes();
@ -69,8 +72,8 @@ 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');
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_qth_lookup'] = $this->input->post('user_qth_lookup');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_wwff_lookup'] = $this->input->post('user_wwff_lookup');
@ -84,6 +87,9 @@ class User extends CI_Controller {
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
$data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload');
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
$this->load->view('user/add', $data);
} else {
$this->load->view('user/add', $data);
@ -116,7 +122,10 @@ class User extends CI_Controller {
$this->input->post('user_column5'),
$this->input->post('user_show_profile_image'),
$this->input->post('user_previous_qsl_type'),
$this->input->post('user_amsat_status_upload'))) {
$this->input->post('user_amsat_status_upload'),
$this->input->post('user_mastodon_url'),
$this->input->post('user_gridmap_default_band'),
($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : ''))) {
// Check for errors
case EUSERNAMEEXISTS:
$data['username_error'] = 'Username <b>'.$this->input->post('user_name').'</b> already in use!';
@ -144,8 +153,8 @@ 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');
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_measurement_base'] = $this->input->post('user_measurement_base');
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_qth_lookup'] = $this->input->post('user_qth_lookup');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_wwff_lookup'] = $this->input->post('user_wwff_lookup');
@ -159,6 +168,9 @@ class User extends CI_Controller {
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
$data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload');
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
$this->load->view('user/add', $data);
$this->load->view('interface_assets/footer');
}
@ -166,9 +178,10 @@ class User extends CI_Controller {
function edit() {
$this->load->model('user_model');
if((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
if ( ($this->session->userdata('user_id') == '') || ((!$this->user_model->authorize(99)) && ($this->session->userdata('user_id') != $this->uri->segment(3))) ) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
$query = $this->user_model->get_by_id($this->uri->segment(3));
$this->load->model('bands');
$this->load->library('form_validation');
$this->form_validation->set_rules('user_name', 'Username', 'required|xss_clean');
@ -183,6 +196,8 @@ class User extends CI_Controller {
$this->form_validation->set_rules('user_locator', 'Locator', 'callback_check_locator');
$this->form_validation->set_rules('user_timezone', 'Timezone', 'required');
$data['bands'] = $this->bands->get_user_bands();
// Get themes list
$data['themes'] = $this->user_model->getThemes();
@ -300,23 +315,23 @@ class User extends CI_Controller {
$data['user_eqsl_password'] = $q->user_eqsl_password;
}
if($this->input->post('user_measurement_base')) {
$data['user_measurement_base'] = $this->input->post('user_measurement_base', true);
} else {
$data['user_measurement_base'] = $q->user_measurement_base;
}
if($this->input->post('user_measurement_base')) {
$data['user_measurement_base'] = $this->input->post('user_measurement_base', true);
} else {
$data['user_measurement_base'] = $q->user_measurement_base;
}
if($this->input->post('user_date_format')) {
$data['user_date_format'] = $this->input->post('user_date_format', true);
} else {
$data['user_date_format'] = $q->user_date_format;
}
$data['user_date_format'] = $this->input->post('user_date_format', true);
} else {
$data['user_date_format'] = $q->user_date_format;
}
if($this->input->post('user_stylesheet')) {
$data['user_stylesheet'] = $this->input->post('user_stylesheet', true);
} else {
$data['user_stylesheet'] = $q->user_stylesheet;
}
if($this->input->post('user_stylesheet')) {
$data['user_stylesheet'] = $this->input->post('user_stylesheet', true);
} else {
$data['user_stylesheet'] = $q->user_stylesheet;
}
if($this->input->post('user_qth_lookup')) {
$data['user_qth_lookup'] = $this->input->post('user_qth_lookup', true);
@ -366,6 +381,24 @@ class User extends CI_Controller {
$data['user_amsat_status_upload'] = $q->user_amsat_status_upload;
}
if($this->input->post('user_mastodon_url')) {
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url', false);
} else {
$data['user_mastodon_url'] = $q->user_mastodon_url;
}
if($this->input->post('user_gridmap_default_band')) {
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band', false);
} else {
$data['user_gridmap_default_band'] = $q->user_gridmap_default_band;
}
if($this->input->post('user_gridmap_confirmation')) {
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
} else {
$data['user_gridmap_confirmation'] = $q->user_gridmap_confirmation;
}
if($this->input->post('user_column1')) {
$data['user_column1'] = $this->input->post('user_column1', true);
} else {
@ -436,7 +469,7 @@ class User extends CI_Controller {
$data['user_callsign'] = $this->input->post('user_callsign', true);
$data['user_locator'] = $this->input->post('user_locator', true);
$data['user_timezone'] = $this->input->post('user_timezone', true);
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_stylesheet'] = $this->input->post('user_stylesheet');
$data['user_qth_lookup'] = $this->input->post('user_qth_lookup');
$data['user_sota_lookup'] = $this->input->post('user_sota_lookup');
$data['user_wwff_lookup'] = $this->input->post('user_wwff_lookup');
@ -451,6 +484,9 @@ class User extends CI_Controller {
$data['user_show_profile_image'] = $this->input->post('user_show_profile_image');
$data['user_previous_qsl_type'] = $this->input->post('user_previous_qsl_type');
$data['user_amsat_status_upload'] = $this->input->post('user_amsat_status_upload');
$data['user_mastodon_url'] = $this->input->post('user_mastodon_url');
$data['user_gridmap_default_band'] = $this->input->post('user_gridmap_default_band');
$data['user_gridmap_confirmation'] = ($this->input->post('user_gridmap_confirmation_qsl') !== null ? 'Q' : '').($this->input->post('user_gridmap_confirmation_lotw') !== null ? 'L' : '').($this->input->post('user_gridmap_confirmation_eqsl') !== null ? 'E' : '');
$this->load->view('user/edit');
$this->load->view('interface_assets/footer');
}
@ -458,6 +494,7 @@ class User extends CI_Controller {
function profile() {
$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'); }
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
$q = $query->row();
$data['page_title'] = "Profile";

查看文件

@ -20,6 +20,9 @@ class Visitor extends CI_Controller {
elseif($method == "satellites") {
$this->satellites($method);
}
elseif($method == "search") {
$this->search($method);
}
else {
$this->index($method);
}
@ -452,4 +455,37 @@ class Visitor extends CI_Controller {
return false;
}
}
public function public_search_enabled($slug) {
$this->load->model('Logbooks_model');
$logbook_id = $this->Logbooks_model->public_slug_exists_logbook_id($slug);
if ($this->Logbooks_model->public_search_enabled($logbook_id) == 1) {
return true;
} else {
return false;
}
}
public function search() {
$callsign = trim($this->security->xss_clean($this->input->post('callsign')));
$public_slug = $this->security->xss_clean($this->input->post('public_slug'));
$this->load->model('publicsearch');
$data['page_title'] = "Public Search";
$data['callsign'] = $callsign;
$data['slug'] = $public_slug;
if ($callsign != '') {
$result = $this->publicsearch->search($public_slug, $callsign);
}
if (!empty($result) && $result->num_rows() > 0) {
$data['results'] = $result;
$this->load->view('visitor/layout/header', $data);
$this->load->view('public_search/result.php', $data);
$this->load->view('visitor/layout/footer');
} else {
$this->load->view('visitor/layout/header', $data);
$this->load->view('public_search/empty.php', $data);
$this->load->view('visitor/layout/footer');
}
}
}

查看文件

@ -31,7 +31,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Upload the Exported ADIF fi
$lang['lotw_upload_type_must_be_adi'] = 'Log files must have the file type .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Pull LoTW data for me';
$lang['lotw_import_missing_qsos_text'] = 'Import missing QSOs into the log. Call and gridsquare will be checked to try to find the correct profile to import the QSO into. If not found, the QSO will be skipped.';
$lang['lotw_report_download_overview_helptext'] ='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.';

查看文件

@ -33,7 +33,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = '下载从 LoTW <a href="htt
$lang['lotw_upload_type_must_be_adi'] = '日志文件的类型必须为 .adi';
$lang['lotw_pull_lotw_data_for_me'] = '为我拉取 LoTW 数据';
$lang['lotw_import_missing_qsos_text'] = '从日志中导入缺失的 QSO。为了导入 QSO, 呼号和网格将会被用来查找正确的属性。 如果没有找到,该 QSO 将被跳过。';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog 将会使用储存在你个人用户信息当中的 LoTW 用户名和密码从 LoTW 上为你下载报告。Cloudlog 下载的这份报告将会包括自你所选之日以来的或者你最后的 LoTW 确认信息(目前日志当中)以来的所有确认。';

查看文件

@ -30,7 +30,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Nahraj exportovaný soubor
$lang['lotw_upload_type_must_be_adi'] = 'Deník musí být ve formátu .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Stáhni data z LoTW';
$lang['lotw_import_missing_qsos_text'] = 'Importovat chybějící spojení do deníku. Bude zkontrolována značka a lokátor pro nalezní správného profilu pro import. Pokud nebude nalezeno, spojení bude přeskočeno.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog použije uživatelské jméno a heslo LoTW uložené ve vašem uživatelském profilu, aby vám stáhl datz LoTW.Stažen budu data od nastaveného datumu nebo od posledního stažení až do teď.';

查看文件

@ -32,7 +32,7 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Preferences';
$lang['account_timezone'] = 'Timezone';
$lang['account_date_format'] = 'Date Format';
$lang['account_measurement_preference'] = 'Measurement preference';
$lang['account_measurement_preferences'] = 'Measurement preference';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Select how you would like dates shown when logged into your account.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Choose which unit distances will be shown in';
@ -68,8 +68,8 @@ $lang['account_clublog_password'] = 'Club Log Password';
$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = 'The Email or Callsign you use to login to Club Log';
$lang['account_eqsl'] = 'eQSL';
$lang['account_eqsl_username'] = 'eQSL.cc Username';
$lang['account_eqsl_password'] = 'eQSL.cc Password';
$lang['account_eqslcc_username'] = 'eQSL.cc Username';
$lang['account_eqslcc_password'] = 'eQSL.cc Password';
$lang['account_save_account_changes'] = 'Save Account Changes';
$lang['account_create_account'] = 'Create Account';
@ -89,3 +89,9 @@ $lang['account_forgot_your_password'] = 'Forgot your password?';
$lang['account_login_to_cloudlog'] = 'Login to Cloudlog';
$lang['account_login'] = 'Login';
$lang['account_mastodon'] = 'Mastodonserver';
$lang['account_user_mastodon'] = 'URL of Mastodonserver';
$lang['account_gridmap_settings'] = 'Settings for Gridsquare Map';
$lang['account_gridmap_default_band'] = 'Default Band';

查看文件

@ -55,6 +55,7 @@ $lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_edit_qso'] = 'Edit QSO';
$lang['general_mark_qsl_rx_bureau'] = 'Mark QSL Received (Bureau)';
$lang['general_mark_qsl_rx_direct'] = 'Mark QSL Received (Direct)';
$lang['general_mark_qsl_rx_electronic'] = 'Mark QSL Received (Electronic)';
$lang['general_mark_qsl_tx_bureau'] = 'Mark QSL Sent (Bureau)';
$lang['general_mark_qsl_tx_direct'] = 'Mark QSL Sent (Direct)';
@ -138,4 +139,4 @@ $lang['northamerica'] = 'North America';
$lang['oceania'] = 'Oceania';
$lang['southamerica'] = 'South America';
$lang['gen_band_selection'] = 'Band selection';
$lang['gen_band_selection'] = 'Band selection';

查看文件

@ -34,7 +34,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Upload the Exported ADIF fi
$lang['lotw_upload_type_must_be_adi'] = 'Log files must have the file type .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Pull LoTW data for me';
$lang['lotw_import_missing_qsos_text'] = 'Import missing QSOs into the log. Call and gridsquare will be checked to try to find the correct profile to import the QSO into. If not found, the QSO will be skipped.';
$lang['lotw_report_download_overview_helptext'] = '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.';

查看文件

@ -75,6 +75,7 @@ $lang['menu_labels'] = 'Labels';
$lang['menu_logbook_of_the_world'] = 'Logbook of the World';
$lang['menu_eqsl_import_export'] = 'eQSL Import / Export';
$lang['menu_qrz_logbook'] = 'QRZ Logbook';
$lang['menu_hrd_logbook'] = 'HRDLog Logbook';
$lang['menu_qo_100_dx_club_upload'] = 'QO-100 Dx Club Upload';
$lang['menu_api_keys'] = 'API Keys';
$lang['menu_hardware_interfaces'] = 'Hardware Interfaces';

查看文件

@ -32,7 +32,7 @@ $lang['account_gridsquare'] = 'Gridsquare';
$lang['account_cloudlog_preferences'] = 'Cloudlog Asetukset';
$lang['account_timezone'] = 'Aikavyöhyke';
$lang['account_date_format'] = 'Päivämäärämuoto';
$lang['account_measurement_preference'] = 'Mittayksikkömuoto';
$lang['account_measurement_preferences'] = 'Mittayksikkömuoto';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Valitse, miten haluat päivämäärät näkyvän, kun olet kirjautunut tilillesi.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Valitse, mitä mittayksikkömuotoa käytetään';
@ -68,8 +68,8 @@ $lang['account_clublog_password'] = 'Club Log Salasana';
$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = 'Sähköposti tai kutsu, jota käytät kirjautuessasi Club Log:iin';
$lang['account_eqsl'] = 'eQSL';
$lang['account_eqsl_username'] = 'eQSL.cc Käyttäjänimi';
$lang['account_eqsl_password'] = 'eQSL.cc Salasana';
$lang['account_eqslcc_username'] = 'eQSL.cc Käyttäjänimi';
$lang['account_eqslcc_password'] = 'eQSL.cc Salasana';
$lang['account_save_account_changes'] = 'Tallenna käyttäjätilin muutokset';
$lang['account_create_account'] = 'Luo käyttäjätili';
@ -89,3 +89,6 @@ $lang['account_forgot_your_password'] = 'Salasana unohtunut?';
$lang['account_login_to_cloudlog'] = 'Kirjaudu Cloudlogiin';
$lang['account_login'] = 'Kirjaudu';
$lang['account_mastodon'] = 'Mastodonserver';
$lang['account_user_mastodon'] = 'URL of Mastodonserver';

查看文件

@ -34,7 +34,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Lataa ADIF-tiedosto LoTW:n
$lang['lotw_upload_type_must_be_adi'] = 'Lokitiedoston pitää olla ADI-tiedosto --> .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Lataa ja tuo LoTW:n data';
$lang['lotw_import_missing_qsos_text'] = 'Tuo yhteyslokistasi mahdollisesti puuttuvat yhteydet LoTW:n rekisteristä. Kutsu ja lokaattori tarkistetaan, jotta yhteydet sidotaan oikeaan asemaprofiiliin. Jos yhteyttä ei löydy, kusot jätetään tuomatta.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog käyttää profiiliisi tallennettuja LoTW:n käyttäjätietoja lokikoosteen lataamiseen. Lokikooste sisältää tähän päivään asti kaikki kuitatut yhteydet, alkaen valitsemastasi päivästä tai siitä päivästä kun olet viimeksi ne palvelusta ladannut .';

查看文件

@ -73,6 +73,7 @@ $lang['menu_print_requested_qsls'] = 'Tulosta pyydetyt QSL:t';
$lang['menu_logbook_of_the_world'] = 'Logbook of the World';
$lang['menu_eqsl_import_export'] = 'eQSL Tuonti / Vienti';
$lang['menu_qrz_logbook'] = 'QRZ Logi';
$lang['menu_hrd_logbook'] = 'HRDLog Logi';
$lang['menu_qo_100_dx_club_upload'] = 'QO-100 Dx Club Lähetys';
$lang['menu_api_keys'] = 'API Keys';
$lang['menu_hardware_interfaces'] = 'Hardware Interfaces';

查看文件

@ -30,7 +30,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Envoyer le fichier ADIF exp
$lang['lotw_upload_type_must_be_adi'] = 'Les fichiers de log doivent être au format .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Récuperer mes données LoTW';
$lang['lotw_import_missing_qsos_text'] = 'Importer les QSO manquants dans le log. Les indicatifs et gridsquare seront testés pour essayer de trouver le profil d\'importation correct. Les QSO seront ignorés si non trouvé.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog utilise le nom d\'utilisateur et mot de passe enregistré dans votre profil utilisateur pour télécharger les rapport depuis LoTw. Les rapports téléchargés seront confirmés depuis la date de votre dernière confirmation (extraite de vos log) jusqu\'à aujourd\'hui';

查看文件

@ -32,7 +32,7 @@ $lang['account_gridsquare'] = 'Planquadrat';
$lang['account_cloudlog_preferences'] = 'Cloudlog Einstellungen';
$lang['account_timezone'] = 'Zeitzone';
$lang['account_date_format'] = 'Datumsformat';
$lang['account_measurement_preference'] = 'Entfernungsformat';
$lang['account_measurement_preferences'] = 'Entfernungsformat';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Wähle, wie Datumsfelder angezeigt werden sollen, wenn du eingeloggt bist.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Wähle, in welcher Einheit Entfernungen angezeigt werden sollen.';
@ -68,8 +68,8 @@ $lang['account_clublog_password'] = 'Club Log Passwort';
$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = 'Die Emailadresse oder Rufzeichen, das für den Club Log Login verwendet wird';
$lang['account_eqsl'] = 'eQSL';
$lang['account_eqsl_username'] = 'eQSL.cc Benutzername';
$lang['account_eqsl_password'] = 'eQSL.cc Passwort';
$lang['account_eqslcc_username'] = 'eQSL.cc Benutzername';
$lang['account_eqslcc_password'] = 'eQSL.cc Passwort';
$lang['account_save_account_changes'] = 'Speichere Kontoänderungen';
$lang['account_create_account'] = 'Konto anlegen';
@ -89,3 +89,9 @@ $lang['account_forgot_your_password'] = 'Passwort vergessen?';
$lang['account_login_to_cloudlog'] = 'Anmeldung bei Cloudlog';
$lang['account_login'] = 'Anmeldung';
$lang['account_mastodon'] = 'Mastodonserver';
$lang['account_user_mastodon'] = 'URL des Mastodonservers';
$lang['account_gridmap_settings'] = 'Einstellung der Planquadratkarte';
$lang['account_gridmap_default_band'] = 'Standardband';

查看文件

@ -55,6 +55,7 @@ $lang['general_word_lotw'] = 'Logbook of the World';
$lang['general_edit_qso'] = 'QSO bearbeiten';
$lang['general_mark_qsl_rx_bureau'] = 'Markiere QSL erhalten (Büro)';
$lang['general_mark_qsl_rx_direct'] = 'Markiere QSL erhalten (Direkt)';
$lang['general_mark_qsl_rx_electronic'] = 'Markiere QSL erhalten (Elektronisch)';
$lang['general_mark_qsl_tx_bureau'] = 'Markiere QSL gesendet (Büro)';
$lang['general_mark_qsl_tx_direct'] = 'Markiere QSL gesendet (Direkt)';

查看文件

@ -34,7 +34,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Lade die exportierte ADIF-D
$lang['lotw_upload_type_must_be_adi'] = 'Logdateien müssen den Dateityp .adi haben';
$lang['lotw_pull_lotw_data_for_me'] = 'Lade LoTW-Daten für mich';
$lang['lotw_import_missing_qsos_text'] = 'Importiere fehlende QSOs in das Log. Rufzeichzeichen und Locator werden geprüft, um das passende Profil zu erkennen, in das importiert werden soll. Kann das nicht gefunden werden, wird das QSO übersprungen.';
$lang['lotw_report_download_overview_helptext'] = 'Cloudlog nutzt Benutzername und Passwort, welche in Deinem Benutzerprofil gespeichert sind, um einen Report vom LoTW zu laden. Der Report, den Cloudlog lädt, enthält alle Bestätigungen seit dem gewählten Datum oder seit der letzen LoTW-Bestätigung (wird aus Deinem Log extrahiert) bis jetzt.';
@ -59,4 +58,4 @@ $lang['lotw_cert_expiring'] = 'Mindestens eines deiner LoTW Zertifikate läuft b
$lang['lotw_cert_expired'] = 'Mindestens eines deiner LoTW Zertifikate ist abgelaufen!';
// Lotw User
$lang['lotw_user'] = 'Diese Station nutzt LoTW. Der letzte Upload war am';
$lang['lotw_user'] = 'Diese Station nutzt LoTW. Der letzte Upload war am';

查看文件

@ -75,6 +75,7 @@ $lang['menu_labels'] = 'Etiketten';
$lang['menu_logbook_of_the_world'] = 'Logbook of the World';
$lang['menu_eqsl_import_export'] = 'eQSL Import / Export';
$lang['menu_qrz_logbook'] = 'QRZ Logbuch';
$lang['menu_hrd_logbook'] = 'HRDLog Logbuch';
$lang['menu_qo_100_dx_club_upload'] = 'QO-100 Dx Club Upload';
$lang['menu_api_keys'] = 'API-Schlüssel';
$lang['menu_hardware_interfaces'] = 'Hardware-Schnittstellen';

查看文件

@ -34,7 +34,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Μεταφορτώστε τ
$lang['lotw_upload_type_must_be_adi'] = 'Τα αρχεία καταγραφής πρέπει να έχουν τον τύπο αρχείου .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Τραβήξτε δεδομένα LoTW για μένα';
$lang['lotw_import_missing_qsos_text'] = 'Εισαγάγετε QSO που λείπουν στο αρχείο καταγραφής. Η κλήση και το τετράγωνο πλέγματος θα ελεγχθούν για να βρεθεί το σωστό προφίλ για εισαγωγή του QSO. Εάν δεν βρεθεί, το QSO θα παραλειφθεί.';
$lang['lotw_report_download_overview_helptext'] = 'Το Cloudlog θα χρησιμοποιήσει το όνομα χρήστη και τον κωδικό πρόσβασης LoTW που είναι αποθηκευμένα στο προφίλ χρήστη σας για να πραγματοποιήσει λήψη μιας αναφοράς από το LoTW για εσάς. Οι λήψεις αναφοράς Cloudlog θα έχουν όλες τις επιβεβαιώσεις από την επιλεγμένη ημερομηνία ή από την τελευταία επιβεβαίωση LoTW (που ελήφθη από το αρχείο καταγραφής σας), μέχρι τώρα.';

查看文件

@ -33,7 +33,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Carica il file ADIF Esporta
$lang['lotw_upload_type_must_be_adi'] = 'I file di log devono essere di tipo .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Ottieni dati da LoTW per me';
$lang['lotw_import_missing_qsos_text'] = 'Importa i QSO mancanti nel log. Nominativi e quadratone verranno controllati per cercare di trovare il profilo corretto in cui importare il QSO. Se non viene trovato, il QSO verrà saltato.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog userà il nome utente e password LoTW memorizzato nel tuo profilo per scaricare un report da LoTW per te. Il report scaricato da Cloudlog avrà tutte le conferme fino alla data scelta, o fino alla ultima conferma su LoTW (recuperato dal tuo log), fino ad ora.';

查看文件

@ -31,7 +31,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Wyślij pobrany plik ADIF z
$lang['lotw_upload_type_must_be_adi'] = 'Pliki logu muszą mieć rozszerzenie .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Pobierz dane z LOTW za mnie';
$lang['lotw_import_missing_qsos_text'] = 'Wyślij brakujące łączności do logu. Znak i lokator będą sprawdzone, aby dopasować odpowiedni profil do wgrania łączności. jeśli nie zostaną znalezione, łączność będzie pominięta.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog będzie używał loginu i hasła podanego w profilu, aby pobierać raporty z LOTW.Raport będzie zawierał wszystkie potwierdzenia od wybranej daty, lub ostatniej potwierdzonej łączności z LOTW (wybranej z logiu), do teraz.';

查看文件

@ -32,7 +32,7 @@ $lang['account_gridsquare'] = 'QTH локатор';
$lang['account_cloudlog_preferences'] = 'Настройки Cloudlog';
$lang['account_timezone'] = 'Часовой пояс';
$lang['account_date_format'] = 'Формат даты';
$lang['account_measurement_preference'] = 'Единицы измерения';
$lang['account_measurement_preferences'] = 'Единицы измерения';
$lang['account_select_how_you_would_like_dates_shown_when_logged_into_your_account'] = 'Выберите представление даты для отображения в вашем аккаунте.';
$lang['account_choose_which_unit_distances_will_be_shown_in'] = 'Выберите единицы измерения расстояния';
@ -68,8 +68,8 @@ $lang['account_clublog_password'] = 'Пароль';
$lang['account_the_email_or_callsign_you_use_to_login_to_club_log'] = 'Емэйл или позывной, которые вы используете для логина в Club Log';
$lang['account_eqsl'] = 'eQSL';
$lang['account_eqsl_username'] = 'Логин';
$lang['account_eqsl_password'] = 'Пароль';
$lang['account_eqslcc_username'] = 'Логин';
$lang['account_eqslcc_password'] = 'Пароль';
$lang['account_save_account_changes'] = 'Сохранить изменения';
$lang['account_create_account'] = 'Создать аккаунт';
@ -89,3 +89,6 @@ $lang['account_forgot_your_password'] = 'Забыли пароль?';
$lang['account_login_to_cloudlog'] = 'Вход в Cloudlog';
$lang['account_login'] = 'Вход';
$lang['account_mastodon'] = 'Mastodonserver';
$lang['account_user_mastodon'] = 'URL of Mastodonserver';

查看文件

@ -59,6 +59,7 @@ $lang['general_mark_qsl_rx_bureau'] = 'Отметить QSL полученной
$lang['general_mark_qsl_rx_direct'] = 'Отметить QSL полученной (напрямую)';
$lang['general_mark_qsl_tx_bureau'] = 'Отметить QSL отправленной (через бюро)';
$lang['general_mark_qsl_tx_direct'] = 'Отметить QSL отправленой (напрямую)';
$lang['general_mark_qsl_rx_electronic'] = 'Отметить QSL полученной (электронно)';
$lang['general_delete_qso'] = 'Удалить QSO';
@ -111,6 +112,7 @@ $lang['gen_hamradio_iota'] = 'IOTA';
$lang['gen_hamradio_sota'] = 'SOTA';
$lang['gen_hamradio_pota'] = 'POTA';
$lang['gen_hamradio_gridsquare'] = 'Квадрат';
$lang['gen_hamradio_distance'] = 'Дистанция';
$lang['gen_hamradio_operator'] = 'Оператор';
$lang['gen_hamradio_sig'] = 'Sig';

查看文件

@ -2,14 +2,25 @@
defined('BASEPATH') OR exit('No direct script access allowed');
$lang['gridsquares_gridsquare_map'] = 'Выбор диапазона';
$lang['gridsquares_gridsquare_map'] = 'Карта квадратов';
$lang['gridsquares_confirmed_is_green'] = 'Подтверждённые окрашены зелёным';
$lang['gridsquares_worked_but_not_confirmed_is_red'] = 'Сработанные, но не подтверждённые — красным';
$lang['gridsquares_worked_but_not_confirmed_is_red'] = 'Сработанные, но не подтверждённые окрвшены красным';
$lang['gridsquares_activated_but_not_confirmed_is_red'] = 'Активированные, но не подтверждённые окрашены красным';
$lang['gridsquares_this_map_does_not_include_satellite_internet_or_repeater_qsos'] = 'На этой карте не отображены QSO, проведённые через спутники, интернет или репитеры';
$lang['gridsquares_grid_squares'] = 'квадрат(/-а/-ов)';
$lang['gridsquares_total_count'] = 'Всего';
$lang['gridsquares_band'] = 'Диапазон';
$lang['gridsquares_mode'] = 'Вид излучения';
$lang['gridsquares_sat'] = 'Спутник';
$lang['gridsquares_confirmation'] = 'Подтверждение';
$lang['gridsquares_button_plot'] = 'Отобразить';
$lang['gridsquares_gridsquares'] = 'Квадраты';
$lang['gridsquares_gridsquares_confirmed'] = 'Подтверждёно квадратов';
$lang['gridsquares_gridsquares_not_confirmed'] = 'Неподтверждёно квадратов';
$lang['gridsquares_gridsquares_total_worked'] = 'Всего сработано квадратов';

查看文件

@ -34,7 +34,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Загрузить эксп
$lang['lotw_upload_type_must_be_adi'] = 'Файлы журнала должны быть с расширением .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Подтянуть мои данные из LoTW';
$lang['lotw_import_missing_qsos_text'] = 'Импортировать недостаюющие QSO в журнал. Позывной и QTH-локатор будут проверены с целью определения подходящего профиля для импорта QSO. Если профиль не будет идентифицирован, QSO будет пропущено.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog использует логин и пароль для LoTW, сохранённые в вашем профиле, для того чтобы скачивать ваши журналы с LoTW. Журнал, скачанный в Cloudlog будет содержать все подтверждения, начиная с выбранной даты, или начиная с последнего подтверждения в LoTW (загруженного из вашего журнала), до настоящего момента.';
// Buttons

查看文件

@ -21,6 +21,7 @@ $lang['menu_notes'] = 'Заметки';
$lang['menu_analytics'] = 'Аналитика';
$lang['menu_statistics'] = 'Статистика';
$lang['menu_gridsquares'] = 'Квадраты';
$lang['menu_gridmap'] = 'Карта квадратов';
$lang['menu_activated_gridsquares'] = 'Активированные квадраты';
$lang['menu_gridsquare_activators'] = 'Активаторы квадратов';
$lang['menu_distances_worked'] = 'Сработанные дистанции';
@ -70,12 +71,14 @@ $lang['menu_sota_csv_export'] = 'Экспорт SOTA CSV';
$lang['menu_cabrillo_export'] = 'Экспорт Cabrillo';
$lang['menu_oqrs_requests'] = 'Запросы OQRS';
$lang['menu_print_requested_qsls'] = 'Распечатать запрошенные QSL';
$lang['menu_labels'] = 'Наклейки';
$lang['menu_logbook_of_the_world'] = 'Logbook of the World';
$lang['menu_eqsl_import_export'] = 'Импорт / экспорт eQSL';
$lang['menu_qrz_logbook'] = 'QRZ Logbook';
$lang['menu_hrd_logbook'] = 'HRDLog Logbook';
$lang['menu_qo_100_dx_club_upload'] = 'Загрузка в QO-100 Dx Club';
$lang['menu_api_keys'] = 'ключи API';
$lang['menu_hardware_interfaces'] = 'Аппаратные интерфейсы';
$lang['menu_help'] = 'Помощь';
$lang['menu_forum'] = 'Форум';
$lang['menu_logout'] = 'Выход';
$lang['menu_logout'] = 'Выход';

查看文件

@ -32,6 +32,8 @@ $lang['options_radio_timeout_warning_changed_to'] = 'Значение тайма
$lang['options_email'] = 'Емэйл';
$lang['options_outgoing_protocol'] = 'Протокол отправки емэйл';
$lang['options_smtp_encryption'] = 'Шифрование SMTP';
$lang['options_email_address'] = 'Адрес электронной почты';
$lang['options_email_sender_name'] = 'Имя отправителя';
$lang['options_smtp_host'] = 'SMTP хост';
$lang['options_smtp_port'] = 'SMTP порт';
$lang['options_smtp_username'] = 'SMTP логин';
@ -40,6 +42,8 @@ $lang['options_crlf'] = 'CRLF';
$lang['options_newline'] = 'Newline';
$lang['options_outgoing_email_protocol_changed_to'] = 'Протокол отправки емэйл изменён на ';
$lang['options_smtp_encryption_changed_to'] = 'Шифрование SMTP изменено на ';
$lang['options_email_address_changed_to'] = 'Адрес электронной почты изменён на ';
$lang['options_email_sender_name_changed_to'] = 'Имя отправителя изменено на ';
$lang['options_smtp_host_changed_to'] = 'SMTP хост изменён на ';
$lang['options_smtp_port_changed_to'] = 'SMTP порт изменён на ';
$lang['options_smtp_username_changed_to'] = 'SMTP логин изменён на ';

查看文件

@ -31,7 +31,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Suba el archivo ADIF export
$lang['lotw_upload_type_must_be_adi'] = 'Los archivos de registro deben ser del tipo .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Extraer los datos LoTW por mí';
$lang['lotw_import_missing_qsos_text'] = 'Importar los QSOs faltantes en el registro. El indicativo y el <i>gridsquare</i> serán comprobados a fin de encontrar el perfil correcto para importar el QSO. Si no fueran encontrados, el QSO será omitido.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog usará el usuario y contraseña de LoTW guardado en su perfil para descargar un informe de LoTW por usted. El informe contendrá todas las confirmaciones desde la fecha elegida o desde su última confirmación LoTW hasta ahora.';

查看文件

@ -33,7 +33,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'Ladda upp exporterad ADIF f
$lang['lotw_upload_type_must_be_adi'] = 'Loggfil måste vara av format .adi';
$lang['lotw_pull_lotw_data_for_me'] = 'Hämta LoTW data';
$lang['lotw_import_missing_qsos_text'] = 'Importera saknade QSOs till loggen. Signal och lokator kommer att kontrolleras för att försöka hitta rätt profil att importera QSOt till. Om inget QSO hittas kommer det att ignoreras.';
$lang['lotw_report_download_overview_helptext'] = 'Cloudlog använder LoTW användarnamn och lösenord som är sparat i din användarprofil för att ladda ner repport från LoTW. Rapporten Cloudlog kommer att ladda ner kommer att ha alla bekräftelser sedan valt datum, eller sedan din senaste LoTW-bekräftelse (hämtad från din logg), fram till nu.';

查看文件

@ -33,7 +33,6 @@ $lang['lotw_upload_exported_adif_file_from_lotw'] = 'LoTW\'den Dışa Aktarılan
$lang['lotw_upload_type_must_be_adi'] = 'Günlük dosyaları .adi dosya tipine sahip olmalıdır';
$lang['lotw_pull_lotw_data_for_me'] = 'Benim için LoTW verilerini çek';
$lang['lotw_import_missing_qsos_text'] = 'Eksik QSO\'ları günlüğe aktarın. QSO\'nun içe aktarılacağı doğru profili bulmaya çalışmak için çağrı ve gridsquare kontrol edilecektir. Bulunamazsa, QSO atlanacaktır.';
$lang['lotw_report_download_overview_helptext'] ='Cloudlog, sizin için LoTW\'den bir rapor indirmek için kullanıcı profilinizde kayıtlı LoTW kullanıcı adını ve şifreyi kullanacak. Cloudlog indirmeleri raporu, seçilen tarihten itibaren veya son LoTW onayınızdan (günlüğünüzden alınır) bu yana şimdiye kadarki tüm onaylara sahip olacaktır.';

查看文件

@ -42,7 +42,6 @@ class AdifHelper {
'FORCE_INIT',
'GRIDSQUARE',
'HEADING',
'HRDLOG_QSO_UPLOAD_STATUS',
'IOTA',
'ITUZ',
'K_INDEX',
@ -64,6 +63,7 @@ class AdifHelper {
'PRECEDENCE',
'PROP_MODE',
'PUBLIC_KEY',
'HRDLOG_QSO_UPLOAD_STATUS',
'QRZCOM_QSO_UPLOAD_STATUS',
'QSLMSG',
'QSL_RCVD',

查看文件

@ -36,8 +36,9 @@ class EqslImporter
$this->qth_nickname = $qth;
}
public function from_file($adif_file) {
public function from_file($adif_file,$station_callsign) {
$this->init('ADIF upload', $adif_file);
$this->callsign=$station_callsign;
}
// generate a sanitized file name from a callsign and a QTH nickname
@ -136,6 +137,7 @@ class EqslImporter
$query = $this->CI->db->query('SELECT eqsl_rcvd_mark FROM config');
$q = $query->row();
$config['eqsl_rcvd_mark'] = $q->eqsl_rcvd_mark;
$station_callsign=$this->callsign;
$this->CI->adif_parser->load_from_file($this->adif_file);
$this->CI->adif_parser->initialize();
@ -154,14 +156,14 @@ class EqslImporter
$record['qsl_sent'] = $config['eqsl_rcvd_mark'];
}
$status = $this->CI->logbook_model->import_check($time_on, $record['call'], $record['band']);
$status = $this->CI->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'],$station_callsign);
$qsoid = 0;
if ($status[0] == "Found") {
$qsoid = $status[1];
$dupe = $this->CI->eqslmethods_model->eqsl_dupe_check($time_on, $record['call'], $record['band'], $config['eqsl_rcvd_mark']);
$dupe = $this->CI->eqslmethods_model->eqsl_dupe_check($time_on, $record['call'], $record['band'], $record['mode'],$config['eqsl_rcvd_mark'],$station_callsign);
if ($dupe == false) {
$updated += 1;
$eqsl_status = $this->CI->eqslmethods_model->eqsl_update($time_on, $record['call'], $record['band'], $config['eqsl_rcvd_mark']);
$eqsl_status = $this->CI->eqslmethods_model->eqsl_update($time_on, $record['call'], $record['band'], $record['mode'], $config['eqsl_rcvd_mark'],$station_callsign);
} else {
$dupes += 1;
$eqsl_status = "Already received an eQSL for this QSO.";

查看文件

@ -0,0 +1,21 @@
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Migration_lotw_enddates extends CI_Migration
{
public function up()
{
if ($this->db->table_exists('lotw_certs')) {
$sql = 'UPDATE lotw_certs SET qso_end_date = DATE_ADD(qso_end_date, INTERVAL 24*60*60 -1 SECOND) WHERE TIME(qso_end_date) = "00:00:00";';
$this->db->query($sql);
}
}
public function down()
{
if ($this->db->table_exists('lotw_certs')) {
$sql = 'UPDATE lotw_certs SET qso_end_date = DATE_SUB(qso_end_date, INTERVAL 24*60*60 -1 SECOND) WHERE TIME(qso_end_date) = "23:59:59";';
$this->db->query($sql);
}
}
}

查看文件

@ -0,0 +1,30 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Migration_mastodon_url
*
* Creates a varchar column for the Mastodon-URL of the User
*/
class Migration_mastodon_url extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('user_mastodon_url', 'users')) {
$fields = array(
'user_mastodon_url varchar(32) default NULL',
);
$this->dbforge->add_column('users', $fields, 'user_column5');
}
}
public function down()
{
$this->dbforge->drop_column('users', 'user_mastodon_url');
}
}

查看文件

@ -0,0 +1,42 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_add_hrdlog_fields extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('hrdlogrealtime', 'station_profile')) {
$fields = array(
'hrdlogrealtime tinyint(1)'
);
$this->dbforge->add_column('station_profile', $fields);
}
if (!$this->db->field_exists('hrdlog_code', 'station_profile')) {
$fields = array(
'hrdlog_code varchar(20) DEFAULT NULL',
);
$this->dbforge->add_column('station_profile', $fields);
}
if ( (!$this->db->field_exists('COL_HRDLOG_QSO_UPLOAD_DATE', $this->config->item('table_name'))) &&
(!$this->db->field_exists('COL_HRDLOG_QSO_UPLOAD_STATUS', $this->config->item('table_name')))) {
$fields = array(
'COL_HRDLOG_QSO_UPLOAD_DATE datetime default NULL',
'COL_HRDLOG_QSO_UPLOAD_STATUS varchar(10) default NULL'
);
$this->dbforge->add_column($this->config->item('table_name'), $fields);
}
}
public function down()
{
if ($this->db->field_exists('hrdlogrealtime', 'station_profile')) {
$this->dbforge->drop_column('station_profile', 'hrdlogrealtime');
}
if ($this->db->field_exists('hrdlog_code', 'station_profile')) {
$this->dbforge->drop_column('station_profile', 'hrdlog_code');
}
}
}

查看文件

@ -0,0 +1,43 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Migration_user_default_map_settings
*
* Creates user account settings for choosing default map
* and QSL type for Gridmap view
*/
class Migration_user_default_map_settings extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('user_gridmap_default_band', 'users')) {
$fields = array(
'user_gridmap_default_band varchar(10) default NULL',
);
$this->dbforge->add_column('users', $fields);
}
if (!$this->db->field_exists('user_gridmap_confirmation', 'users')) {
$fields = array(
'user_gridmap_confirmation varchar(3) default NULL',
);
$this->dbforge->add_column('users', $fields);
}
$data = array(
'user_gridmap_default_band' => 'All',
'user_gridmap_confirmation' => 'QL',
);
$this->db->update('users', $data);
}
public function down()
{
$this->dbforge->drop_column('users', 'user_gridmap_default_band');
$this->dbforge->drop_column('users', 'user_gridmap_confirmation');
}
}

查看文件

@ -0,0 +1,28 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This adds an option to enable public search per logbook
*/
class Migration_add_public_search_option extends CI_Migration {
public function up()
{
if (!$this->db->field_exists('public_search', 'station_logbooks')) {
$fields = array(
'public_search integer DEFAULT 0 AFTER public_slug',
);
$this->dbforge->add_column('station_logbooks', $fields);
}
}
public function down()
{
if ($this->db->field_exists('public_search', 'logbooks')) {
$this->dbforge->drop_column('logbooks', 'public_search');
}
}
}

查看文件

@ -0,0 +1,25 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This migration creates a table called options which will hold global options needed within cloudlog
* removing the need for lots of configuration files.
*/
class Migration_add_version_to_config extends CI_Migration {
public function up()
{
$data = array(
array('option_name' => "version", 'option_value' => "2.4.5", 'autoload' => "yes"),
);
$this->db->insert_batch('options', $data);
}
public function down()
{
// No option to down
}
}

查看文件

@ -156,7 +156,7 @@ class Eqslmethods_model extends CI_Model {
// Update a QSO with eQSL QSL info
// We could also probably use this use this: http://eqsl.cc/qslcard/VerifyQSO.txt
// http://www.eqsl.cc/qslcard/ImportADIF.txt
function eqsl_update($datetime, $callsign, $band, $qsl_status) {
function eqsl_update($datetime, $callsign, $band, $mode, $qsl_status,$station_callsign) {
$data = array(
'COL_EQSL_QSLRDATE' => date('Y-m-d H:i:s'), // eQSL doesn't give us a date, so let's use current
'COL_EQSL_QSL_RCVD' => $qsl_status
@ -165,7 +165,9 @@ class Eqslmethods_model extends CI_Model {
$this->db->where('COL_TIME_ON >= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL -15 MINUTE )');
$this->db->where('COL_TIME_ON <= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL 15 MINUTE )');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_STATION_CALLSIGN', $station_callsign);
$this->db->where('COL_BAND', $band);
$this->db->where('COL_MODE', $mode);
$this->db->update($this->config->item('table_name'), $data);
@ -173,12 +175,14 @@ class Eqslmethods_model extends CI_Model {
}
// Determine if we've already received an eQSL for this QSO
function eqsl_dupe_check($datetime, $callsign, $band, $qsl_status) {
function eqsl_dupe_check($datetime, $callsign, $band, $mode, $qsl_status,$station_callsign) {
$this->db->select('COL_EQSL_QSLRDATE');
$this->db->where('COL_TIME_ON >= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL -15 MINUTE )');
$this->db->where('COL_TIME_ON <= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL 15 MINUTE )');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->where('COL_MODE', $mode);
$this->db->where('COL_STATION_CALLSIGN', $station_callsign);
$this->db->where('COL_EQSL_QSL_RCVD', $qsl_status);
$this->db->limit(1);

查看文件

@ -252,6 +252,10 @@ class Logbook_model extends CI_Model {
$data['COL_MY_GRIDSQUARE'] = strtoupper(trim($station['station_gridsquare']));
}
if ($this->exists_hrdlog_code($station_id)) {
$data['COL_HRDLOG_QSO_UPLOAD_STATUS'] = 'N';
}
if ($this->exists_qrz_api_key($station_id)) {
$data['COL_QRZCOM_QSO_UPLOAD_STATUS'] = 'N';
}
@ -292,6 +296,16 @@ class Logbook_model extends CI_Model {
$this->add_qso($data, $skipexport = false);
}
public function check_last_lotw($call){ // Fetch difference in days when $call has last updated LotW
$sql="select datediff(now(),lastupload) as DAYS from lotw_users where callsign = ?"; // Use binding to prevent SQL-injection
$query = $this->db->query($sql, $call);
$row = $query->row();
if (isset($row)) {
return($row->DAYS);
}
}
public function check_station($id){
$this->db->select('station_profile.*, dxcc_entities.name as station_country');
@ -506,12 +520,26 @@ class Logbook_model extends CI_Model {
$this->upload_amsat_status($data);
}
// No point in fetching qrz api key and qrzrealtime setting if we're skipping the export
// No point in fetching hrdlog code or qrz api key and qrzrealtime setting if we're skipping the export
if (!$skipexport) {
$result = $this->exists_qrz_api_key($data['station_id']);
// Push qso to qrz if apikey is set, and realtime upload is enabled, and we're not importing an adif-file
$result = $this->exists_hrdlog_code($data['station_id']);
// Push qso to hrdlog if code is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->hrdlog_code) && $result->hrdlogrealtime == 1) {
$CI =& get_instance();
$CI->load->library('AdifHelper');
$qso = $this->get_qso($last_id)->result();
$adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_hrdlog($result->hrdlog_code, $data['COL_STATION_CALLSIGN'], $adif);
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') || ($result['status'] == 'duplicate') || ($result['status'] == 'auth_error') )){
$this->mark_hrdlog_qsos_sent($last_id);
}
}
$result = ''; // Empty result from previous hrdlog-attempt for safety
$result = $this->exists_qrz_api_key($data['station_id']);
// Push qso to qrz if apikey is set, and realtime upload is enabled, and we're not importing an adif-file
if (isset($result->qrzapikey) && $result->qrzrealtime == 1) {
$CI =& get_instance();
$CI->load->library('AdifHelper');
@ -519,7 +547,7 @@ class Logbook_model extends CI_Model {
$adif = $CI->adifhelper->getAdifLine($qso[0]);
$result = $this->push_qso_to_qrz($result->qrzapikey, $adif);
if ($result['status'] == 'OK') {
if ( ($result['status'] == 'OK') || ( ($result['status'] == 'error') && ($result['message'] == 'STATUS=FAIL&REASON=Unable to add QSO to database: duplicate&EXTENDED=')) ){
$this->mark_qrz_qsos_sent($last_id);
}
}
@ -545,6 +573,24 @@ class Logbook_model extends CI_Model {
}
}
/*
* Function checks if a HRDLog Code exists in the table with the given station id
*/
function exists_hrdlog_code($station_id) {
$sql = 'select hrdlog_code, hrdlogrealtime from station_profile
where station_id = ' . $station_id;
$query = $this->db->query($sql);
$result = $query->row();
if ($result) {
return $result;
} else {
return false;
}
}
/*
* Function checks if a QRZ API Key exists in the table with the given station id
*/
@ -583,6 +629,59 @@ class Logbook_model extends CI_Model {
}
}
/*
* Function uploads a QSO to HRDLog with the API given.
* $adif contains a line with the QSO in the ADIF format. QSO ends with an <EOR>
*/
function push_qso_to_hrdlog($apikey, $station_callsign, $adif, $replaceoption = false) {
$url = 'https://robot.hrdlog.net/newentry.aspx';
$post_data['Code'] = $apikey;
if ($replaceoption) {
$post_data['Cmd'] = 'UPDATE';
$post_data['ADIFKey'] = $adif;
}
$post_data['ADIFData'] = $adif;
$post_data['Callsign'] = $station_callsign;
$post_encoded=http_build_query($post_data);
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, true);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post_encoded);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
$content = curl_exec($ch);
if ($content){
if (stristr($content,'<insert>1')) {
$result['status'] = 'OK';
return $result;
} elseif (stristr($content,'<insert>0')) {
$result['status'] = 'duplicate';
$result['message'] = $content;
return $result;
} elseif (stristr($content,'Unknown user</error>')) {
$result['status'] = 'auth_error';
$result['message'] = $content;
return $result;
} else {
$result['status'] = 'error';
$result['message'] = $content;
return $result;
}
}
if(curl_errno($ch)){
$result['status'] = 'error';
$result['message'] = 'Curl error: '. curl_errno($ch);
return $result;
}
curl_close($ch);
}
/*
* 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>
@ -655,6 +754,23 @@ class Logbook_model extends CI_Model {
return $response === 200;
}
/*
* Function marks QSOs as uploaded to HRDLog.
* $primarykey is the unique id for that QSO in the logbook
*/
function mark_hrdlog_qsos_sent($primarykey) {
$data = array(
'COL_HRDLOG_QSO_UPLOAD_DATE' => date("Y-m-d H:i:s", strtotime("now")),
'COL_HRDLOG_QSO_UPLOAD_STATUS' => 'Y',
);
$this->db->where('COL_PRIMARY_KEY', $primarykey);
$this->db->update($this->config->item('table_name'), $data);
return true;
}
/*
* Function marks QSOs as uploaded to QRZ.
* $primarykey is the unique id for that QSO in the logbook
@ -694,10 +810,10 @@ class Logbook_model extends CI_Model {
$sat_name = '';
if ($data['COL_SAT_NAME'] == 'AO-7') {
if ($data['COL_BAND'] == '2m' && $data['COL_BAND_RX'] == '10m') {
$sat_name = '[A]_AO-7';
$sat_name = 'AO-7[A]';
}
if ($data['COL_BAND'] == '70cm' && $data['COL_BAND_RX'] == '2m') {
$sat_name = '[B]_AO-7';
$sat_name = 'AO-7[B]';
}
} else if ($data['COL_SAT_NAME'] == 'QO-100') {
$sat_name = 'QO-100_NB';
@ -940,6 +1056,10 @@ class Logbook_model extends CI_Model {
'COL_CNTY' => $uscounty
);
if ($this->exists_hrdlog_code($data['station_id'])) {
$data['COL_HRDLOG_QSO_UPLOAD_STATUS'] = 'M';
}
if ($this->exists_qrz_api_key($data['station_id'])) {
$data['COL_QRZCOM_QSO_UPLOAD_STATUS'] = 'M';
}
@ -1204,7 +1324,8 @@ class Logbook_model extends CI_Model {
$data = array(
'COL_QSLSDATE' => date('Y-m-d H:i:s'),
'COL_QSL_SENT' => 'R'
'COL_QSL_SENT' => 'R',
'COL_QSL_SENT_VIA' => $method
);
$this->db->where('COL_PRIMARY_KEY', $qso_id);
@ -1311,6 +1432,23 @@ class Logbook_model extends CI_Model {
return $this->db->get();
}
/*
* Function returns the QSOs from the logbook, which have not been either marked as uploaded to hrdlog, or has been modified with an edit
*/
function get_hrdlog_qsos($station_id){
$sql = 'select *, dxcc_entities.name as station_country from ' . $this->config->item('table_name') . ' thcv ' .
' left join station_profile on thcv.station_id = station_profile.station_id' .
' left outer join dxcc_entities on thcv.col_my_dxcc = dxcc_entities.adif' .
' where thcv.station_id = ' . $station_id .
' and (COL_HRDLOG_QSO_UPLOAD_STATUS is NULL
or COL_HRDLOG_QSO_UPLOAD_STATUS = ""
or COL_HRDLOG_QSO_UPLOAD_STATUS = "M"
or COL_HRDLOG_QSO_UPLOAD_STATUS = "N")';
$query = $this->db->query($sql);
return $query;
}
/*
* Function returns the QSOs from the logbook, which have not been either marked as uploaded to qrz, or has been modified with an edit
*/
@ -1371,6 +1509,25 @@ class Logbook_model extends CI_Model {
return $this->db->query($sql);
}
/*
* Function returns all the station_id's with HRDLOG Code
*/
function get_station_id_with_hrdlog_code() {
$sql = 'select station_id, hrdlog_code from station_profile
where coalesce(hrdlog_code, "") <> ""';
$query = $this->db->query($sql);
$result = $query->result();
if ($result) {
return $result;
}
else {
return null;
}
}
/*
* Function returns all the station_id's with QRZ API Key's
*/
@ -2469,13 +2626,15 @@ class Logbook_model extends CI_Model {
}
/* Used to check if the qso is already in the database */
function import_check($datetime, $callsign, $band) {
function import_check($datetime, $callsign, $band, $mode, $station_callsign) {
$this->db->select('COL_PRIMARY_KEY, COL_TIME_ON, COL_CALL, COL_BAND');
$this->db->where('COL_TIME_ON >= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL -15 MINUTE )');
$this->db->where('COL_TIME_ON <= DATE_ADD(DATE_FORMAT("'.$datetime.'", \'%Y-%m-%d %H:%i\' ), INTERVAL 15 MINUTE )');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_STATION_CALLSIGN', $station_callsign);
$this->db->where('COL_BAND', $band);
$this->db->where('COL_MODE', $mode);
$query = $this->db->get($this->config->item('table_name'));
@ -2488,7 +2647,7 @@ class Logbook_model extends CI_Model {
}
}
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz) {
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $qsl_vucc_grids, $iota, $cnty, $cqz, $ituz, $station_callsign) {
$data = array(
'COL_LOTW_QSLRDATE' => $qsl_date,
@ -2517,48 +2676,39 @@ class Logbook_model extends CI_Model {
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->where('COL_STATION_CALLSIGN', $station_callsign);
$this->db->update($this->config->item('table_name'), $data);
unset($data);
if($qsl_gridsquare != "") {
if($qsl_gridsquare != "" || $qsl_vucc_grids != "") {
$data = array(
'COL_GRIDSQUARE' => $qsl_gridsquare,
'COL_DISTANCE' => 0
);
$this->db->select('station_profile.station_gridsquare as station_gridsquare');
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->join('station_profile', $this->config->item('table_name').'.station_id = station_profile.station_id', 'left outer');
$this->db->limit(1);
$query = $this->db->get($this->config->item('table_name'));
$row = $query->row();
if (isset($row)) {
$station_gridsquare = $row->station_gridsquare;
$this->db->select('station_profile.station_gridsquare as station_gridsquare');
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->join('station_profile', $this->config->item('table_name').'.station_id = station_profile.station_id', 'left outer');
$this->db->limit(1);
$query = $this->db->get($this->config->item('table_name'));
$row = $query->row();
$station_gridsquare = '';
if (isset($row)) {
$station_gridsquare = $row->station_gridsquare;
}
$this->load->library('Qra');
$data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_gridsquare, 'K');
if ($qsl_gridsquare != "") {
$data['COL_GRIDSQUARE'] = $qsl_gridsquare;
$data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_gridsquare, 'K');
} elseif ($qsl_vucc_grids != "") {
$data['COL_VUCC_GRIDS'] = $qsl_vucc_grids;
$data['COL_DISTANCE'] = $this->qra->distance($station_gridsquare, $qsl_vucc_grids, 'K');
}
$this->db->where('date_format(COL_TIME_ON, \'%Y-%m-%d %H:%i\') = "'.$datetime.'"');
$this->db->where('COL_CALL', $callsign);
$this->db->where('COL_BAND', $band);
$this->db->group_start();
$this->db->where('COL_VUCC_GRIDS');
$this->db->or_where('COL_VUCC_GRIDS', '');
$this->db->group_end();
if(strlen($qsl_gridsquare) > 4) {
$this->db->group_start();
$this->db->where('COL_GRIDSQUARE', "");
$this->db->or_where('COL_GRIDSQUARE', substr($qsl_gridsquare, 0, 4));
if(strlen($qsl_gridsquare) > 6) {
$this->db->or_where('COL_GRIDSQUARE', substr($qsl_gridsquare, 0, 6));
}
$this->db->group_end();
} else {
$this->db->where('COL_GRIDSQUARE', "");
}
$this->db->update($this->config->item('table_name'), $data);
}
@ -2566,30 +2716,29 @@ class Logbook_model extends CI_Model {
return "Updated";
}
function lotw_last_qsl_date() {
$this->db->select('COL_LOTW_QSLRDATE');
$this->db->where('COL_LOTW_QSLRDATE IS NOT NULL');
$this->db->order_by("COL_LOTW_QSLRDATE", "desc");
$this->db->limit(1);
function lotw_last_qsl_date($user_id) {
$sql="SELECT MAX(COALESCE(COL_LOTW_QSLRDATE, '1900-01-01 00:00:00')) MAXDATE
FROM ".$this->config->item('table_name')." INNER JOIN station_profile ON (".$this->config->item('table_name').".station_id = station_profile.station_id)
WHERE station_profile.user_id=".$user_id." and COL_LOTW_QSLRDATE is not null";
$query = $this->db->query($sql);
$row = $query->row();
$query = $this->db->get($this->config->item('table_name'));
$row = $query->row();
if (isset($row)) {
return $row->MAXDATE;
}
if (isset($row)) {
return $row->COL_LOTW_QSLRDATE;
}
return '1900-01-01 00:00:00.000';
}
return '1900-01-01 00:00:00.000';
}
/*
* $skipDuplicate - used in ADIF import to skip duplicate checking when importing QSOs
* $markLoTW - used in ADIF import to mark QSOs as exported to LoTW when importing QSOs
* $dxccAdif - used in ADIF import to determine if DXCC From ADIF is used, or if Cloudlog should try to guess
* $markQrz - used in ADIF import to mark QSOs as exported to QRZ Logbook when importing QSOs
* $markHrd - used in ADIF import to mark QSOs as exported to HRDLog.net Logbook when importing QSOs
* $skipexport - used in ADIF import to skip the realtime upload to QRZ Logbook when importing QSOs from ADIF
*/
function import($record, $station_id = "0", $skipDuplicate = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $skipexport = false, $operatorName = false, $apicall = false) {
function import($record, $station_id = "0", $skipDuplicate = false, $markLotw = false, $dxccAdif = false, $markQrz = false, $markHrd = false,$skipexport = false, $operatorName = false, $apicall = false) {
// be sure that station belongs to user
$CI =& get_instance();
$CI->load->model('Stations');
@ -2597,6 +2746,12 @@ class Logbook_model extends CI_Model {
return 'Station not accessible<br>';
}
$station_profile=$CI->Stations->profile_clean($station_id);
$station_profile_call=$station_profile->station_callsign;
if (($station_id != 0) && ($record['station_callsign'] != $station_profile_call)) { // Check if station_call from import matches profile ONLY when submitting via GUI.
return "Wrong station_callsign ".$record['station_callsign']." while importing QSO with ".$record['call']." for ".$station_profile_call;
}
$CI =& get_instance();
$CI->load->library('frequency');
$my_error = "";
@ -2928,12 +3083,19 @@ class Logbook_model extends CI_Model {
$operatorName = (!empty($record['operator'])) ? $record['operator'] : '';
}
// If user checked to mark QSOs as uploaded to QRZ Logbook, or else we try to find info in ADIF import.
// If user checked to mark QSOs as uploaded to QRZ or HRDLog Logbook, or else we try to find info in ADIF import.
if ($markHrd != null) {
$input_hrdlog_qso_upload_status = 'Y';
$input_hrdlog_qso_upload_date = $date = date("Y-m-d H:i:s", strtotime("now"));
}
if ($markQrz != null) {
$input_qrzcom_qso_upload_status = 'Y';
$input_qrzcom_qso_upload_date = $date = date("Y-m-d H:i:s", strtotime("now"));
}
else {
$input_hrdlog_qso_upload_date = (!empty($record['hrdlog_qso_upload_date'])) ? $record['hrdlog_qso_upload_date'] : null;
$input_hrdlog_qso_upload_status = (!empty($record['hrdlog_qso_upload_status'])) ? $record['hrdlog_qso_upload_status'] : '';
$input_qrzcom_qso_upload_date = (!empty($record['qrzcom_qso_upload_date'])) ? $record['qrzcom_qso_upload_date'] : null;
$input_qrzcom_qso_upload_status = (!empty($record['qrzcom_qso_upload_status'])) ? $record['qrzcom_qso_upload_status'] : '';
}
@ -3049,6 +3211,8 @@ class Logbook_model extends CI_Model {
'COL_PRECEDENCE' => (!empty($record['precedence'])) ? $record['precedence'] : '',
'COL_PROP_MODE' => (!empty($record['prop_mode'])) ? $record['prop_mode'] : '',
'COL_PUBLIC_KEY' => (!empty($record['public_key'])) ? $record['public_key'] : '',
'COL_HRDLOG_QSO_UPLOAD_DATE' => $input_hrdlog_qso_upload_date,
'COL_HRDLOG_QSO_UPLOAD_STATUS' => $input_hrdlog_qso_upload_status,
'COL_QRZCOM_QSO_UPLOAD_DATE' => $input_qrzcom_qso_upload_date,
'COL_QRZCOM_QSO_UPLOAD_STATUS' => $input_qrzcom_qso_upload_status,
'COL_QSL_RCVD' => $input_qsl_rcvd,
@ -3763,28 +3927,6 @@ class Logbook_model extends CI_Model {
return $query->result();
}
/*
* This function tries to locate the correct station_id used for importing QSOs from the downloaded LoTWreport
* $station_callsign is the call listed for the qso in lotwreport
* $my_gridsquare is the gridsquare listed for the qso in lotwreport
* Returns station_id if found
*/
function find_correct_station_id($station_callsign, $my_gridsquare) {
$sql = 'select station_id from station_profile
where station_callsign = "' . $station_callsign . '" and station_gridsquare like "%' . substr($my_gridsquare,0, 4) . '%"';
$query = $this->db->query($sql);
$result = $query->row();
if ($result) {
return $result->station_id;
}
else {
return null;
}
}
function get_lotw_qsos_to_upload($station_id, $start_date, $end_date) {
$this->db->select('COL_PRIMARY_KEY,COL_CALL, COL_BAND, COL_BAND_RX, COL_TIME_ON, COL_RST_RCVD, COL_RST_SENT, COL_MODE, COL_SUBMODE, COL_FREQ, COL_FREQ_RX, COL_GRIDSQUARE, COL_SAT_NAME, COL_PROP_MODE, COL_LOTW_QSL_SENT, station_id');

查看文件

@ -56,6 +56,24 @@ class Logbookadvanced_model extends CI_Model {
$binding[] = $searchCriteria['qslReceived'];
}
if ($searchCriteria['lotwSent'] !== '') {
$conditions[] = "COL_LOTW_QSL_SENT = ?";
$binding[] = $searchCriteria['lotwSent'];
}
if ($searchCriteria['lotwReceived'] !== '') {
$conditions[] = "COL_LOTW_QSL_RCVD = ?";
$binding[] = $searchCriteria['lotwReceived'];
}
if ($searchCriteria['eqslSent'] !== '') {
$conditions[] = "COL_EQSL_QSL_SENT = ?";
$binding[] = $searchCriteria['eqslSent'];
}
if ($searchCriteria['eqslReceived'] !== '') {
$conditions[] = "COL_EQSL_QSL_RCVD = ?";
$binding[] = $searchCriteria['eqslReceived'];
}
if ($searchCriteria['iota'] !== '') {
$conditions[] = "COL_IOTA = ?";
$binding[] = $searchCriteria['iota'];
@ -71,6 +89,31 @@ class Logbookadvanced_model extends CI_Model {
$binding[] = $searchCriteria['state'];
}
if ($searchCriteria['cqzone'] !== '') {
$conditions[] = "COL_CQZ = ?";
$binding[] = $searchCriteria['cqzone'];
}
if ($searchCriteria['qslvia'] !== '') {
$conditions[] = "COL_QSL_VIA like ?";
$binding[] = $searchCriteria['qslvia'].'%';
}
if ($searchCriteria['sota'] !== '') {
$conditions[] = "COL_SOTA_REF like ?";
$binding[] = $searchCriteria['sota'].'%';
}
if ($searchCriteria['pota'] !== '') {
$conditions[] = "COL_POTA_REF like ?";
$binding[] = $searchCriteria['pota'].'%';
}
if ($searchCriteria['wwff'] !== '') {
$conditions[] = "COL_WWFF_REF like ?";
$binding[] = $searchCriteria['wwff'].'%';
}
if ($searchCriteria['gridsquare'] !== '') {
$conditions[] = "(COL_GRIDSQUARE like ? or COL_VUCC_GRIDS like ?)";
$binding[] = '%' . $searchCriteria['gridsquare'] . '%';
@ -101,6 +144,11 @@ class Logbookadvanced_model extends CI_Model {
INNER JOIN station_profile ON qsos.station_id=station_profile.station_id
LEFT OUTER JOIN dxcc_entities ON qsos.col_dxcc=dxcc_entities.adif
LEFT OUTER JOIN lotw_users ON qsos.col_call=lotw_users.callsign
LEFT OUTER JOIN (
select count(*) as qslcount, qsoid
from qsl_images
group by qsoid
) x on qsos.COL_PRIMARY_KEY = x.qsoid
WHERE station_profile.user_id = ?
$where
ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc
@ -110,12 +158,12 @@ class Logbookadvanced_model extends CI_Model {
$data = $this->db->query($sql, $binding);
$results = $data->result('array');
$qsos = [];
foreach ($results as $data) {
$qsos[] = new QSO($data);
}
return $qsos;
}
@ -132,12 +180,17 @@ class Logbookadvanced_model extends CI_Model {
$order = $this->getSortorder($sortorder);
$sql = "
SELECT qsos.*, d2.*, lotw_users.*, station_profile.*, dxcc_entities.name AS station_country
SELECT qsos.*, d2.*, lotw_users.*, station_profile.*, x.qslcount, dxcc_entities.name AS station_country
FROM " . $this->config->item('table_name') . " qsos
INNER JOIN station_profile ON qsos.station_id = station_profile.station_id
LEFT OUTER JOIN dxcc_entities ON qsos.COL_MY_DXCC = dxcc_entities.adif
LEFT OUTER JOIN dxcc_entities d2 ON qsos.COL_DXCC = d2.adif
LEFT OUTER JOIN lotw_users ON qsos.col_call=lotw_users.callsign
LEFT OUTER JOIN (
select count(*) as qslcount, qsoid
from qsl_images
group by qsoid
) x on qsos.COL_PRIMARY_KEY = x.qsoid
WHERE station_profile.user_id = ?
$where
$order
@ -212,7 +265,7 @@ class Logbookadvanced_model extends CI_Model {
);
$this->db->where_in('COL_PRIMARY_KEY', json_decode($ids, true));
$this->db->update($this->config->item('table_name'), $data);
return array('message' => 'OK');
}
}
@ -230,7 +283,7 @@ class Logbookadvanced_model extends CI_Model {
);
$this->db->where_in('COL_PRIMARY_KEY', json_decode($ids, true));
$this->db->update($this->config->item('table_name'), $data);
return array('message' => 'OK');
}
}
@ -282,19 +335,19 @@ class Logbookadvanced_model extends CI_Model {
$CI =& get_instance();
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$modes = array();
$this->db->select('distinct col_mode, coalesce(col_submode, "") col_submode', FALSE);
$this->db->where_in('station_id', $logbooks_locations_array);
$this->db->order_by('col_mode, col_submode', 'ASC');
$query = $this->db->get($this->config->item('table_name'));
foreach($query->result() as $mode){
if ($mode->col_submode == null || $mode->col_submode == "") {
array_push($modes, $mode->col_mode);

查看文件

@ -210,6 +210,16 @@ class Logbooks_model extends CI_Model {
}
}
function save_public_search($public_search, $logbook_id) {
$data = array(
'public_search' => xss_clean($public_search),
);
$this->db->where('user_id', $this->session->userdata('user_id'));
$this->db->where('logbook_id', xss_clean($logbook_id));
$this->db->update('station_logbooks', $data);
}
function save_public_slug($public_slug, $logbook_id) {
$data = array(
'public_slug' => xss_clean($public_slug),
@ -322,5 +332,14 @@ class Logbooks_model extends CI_Model {
return 0;
}
}
function public_search_enabled($logbook_id) {
$this->db->select('public_search');
$this->db->where('logbook_id', $logbook_id);
$query = $this->db->get('station_logbooks');
return $query->result_array()[0]['public_search'];
}
}
?>

查看文件

@ -6,7 +6,7 @@ class LotwCert extends CI_Model {
|--------------------------------------------------------------------------
| Function: lotw_certs
|--------------------------------------------------------------------------
|
|
| Returns all lotw_certs for a selected user via the $user_id parameter
|
*/
@ -17,7 +17,7 @@ class LotwCert extends CI_Model {
$this->db->join('dxcc_entities','lotw_certs.cert_dxcc_id = dxcc_entities.adif','left');
$this->db->order_by('cert_dxcc', 'ASC');
$query = $this->db->get('lotw_certs');
return $query;
}
@ -46,7 +46,7 @@ class LotwCert extends CI_Model {
'date_created' => $date_created,
'date_expires' => $date_expires,
'qso_start_date' => $qso_start_date,
'qso_end_date' => $qso_end_date,
'qso_end_date' => $qso_end_date . ' 23:59:59',
'cert_key' => $cert_key,
'cert' => $general_cert,
);
@ -60,7 +60,7 @@ class LotwCert extends CI_Model {
'date_created' => $date_created,
'date_expires' => $date_expires,
'qso_start_date' => $qso_start_date,
'qso_end_date' => $qso_end_date,
'qso_end_date' => $qso_end_date . ' 23:59:59',
'cert_key' => $cert_key,
'cert' => $general_cert
);
@ -90,9 +90,9 @@ class LotwCert extends CI_Model {
return "Updated";
}
function empty_table($table) {
$this->db->empty_table($table);
$this->db->empty_table($table);
}
function lotw_cert_expired($user_id, $date) {

查看文件

@ -15,6 +15,8 @@ class Pota extends CI_Model {
$bandslots = $this->bands->get_worked_bands('pota');
if(!$bandslots) return null;
$this->db->where_in("station_id", $logbooks_locations_array);
$this->db->where_in("col_band", $bandslots);
$this->db->order_by("COL_POTA_REF", "ASC");

查看文件

@ -0,0 +1,38 @@
<?php
class Publicsearch extends CI_Model {
function search($slug, $callsign) {
if ($this->public_search_enabled($slug)) {
$userid = $this->get_userid_for_slug($slug);
$this->db->like('COL_CALL', $callsign);
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
$this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer');
$this->db->where('station_profile.user_id', $userid);
$this->db->order_by('COL_TIME_ON', 'DESC');
$query = $this->db->get($this->config->item('table_name'));
return $query;
}
return false;
}
function get_userid_for_slug($slug) {
$this->db->select('user_id');
$this->db->where('public_slug', $slug);
$query = $this->db->get('station_logbooks');
return $query->result_array()[0]['user_id'];
}
function public_search_enabled($slug) {
$this->db->select('public_search');
$this->db->where('public_slug', $slug);
$query = $this->db->get('station_logbooks');
if ($query->result_array()[0]['public_search'] == 1) {
return true;
}
return false;
}
}
?>

查看文件

@ -15,6 +15,8 @@ class Sota extends CI_Model {
$bandslots = $this->bands->get_worked_bands('sota');
if(!$bandslots) return null;
$this->db->where_in("station_id", $logbooks_locations_array);
$this->db->where_in("col_band", $bandslots);
$this->db->order_by("COL_SOTA_REF", "ASC");

查看文件

@ -23,9 +23,12 @@ class Stations extends CI_Model {
return $this->db->get();
}
function all_of_user() {
function all_of_user($userid = null) {
if ($userid == null) {
$userid=$this->session->userdata('user_id'); // Fallback to session-uid, if userid is omitted
}
$this->db->select('station_profile.*, dxcc_entities.name as station_country, dxcc_entities.end as dxcc_end');
$this->db->where('user_id', $this->session->userdata('user_id'));
$this->db->where('user_id', $userid);
$this->db->join('dxcc_entities','station_profile.station_dxcc = dxcc_entities.adif','left outer');
return $this->db->get('station_profile');
}
@ -88,9 +91,11 @@ class Stations extends CI_Model {
'station_cq' => xss_clean($this->input->post('station_cq', true)),
'station_itu' => xss_clean($this->input->post('station_itu', true)),
'state' => $state,
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)),
'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)),
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
'oqrs' => xss_clean($this->input->post('oqrs', true)),
'oqrs_email' => xss_clean($this->input->post('oqrsemail', true)),
'oqrs_text' => xss_clean($this->input->post('oqrstext', true)),
@ -130,8 +135,10 @@ class Stations extends CI_Model {
'station_itu' => xss_clean($this->input->post('station_itu', true)),
'state' => $state,
'eqslqthnickname' => xss_clean($this->input->post('eqslnickname', true)),
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
'hrdlog_code' => xss_clean($this->input->post('hrdlog_code', true)),
'hrdlogrealtime' => xss_clean($this->input->post('hrdlogrealtime', true)),
'qrzapikey' => xss_clean($this->input->post('qrzapikey', true)),
'qrzrealtime' => xss_clean($this->input->post('qrzrealtime', true)),
'oqrs' => xss_clean($this->input->post('oqrs', true)),
'oqrs_email' => xss_clean($this->input->post('oqrsemail', true)),
'oqrs_text' => xss_clean($this->input->post('oqrstext', true)),
@ -339,6 +346,35 @@ class Stations extends CI_Model {
}
}
function stations_with_hrdlog_code() {
$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_HRDLOG_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_HRDLOG_QSO_UPLOAD_STATUS, '') = ''
or COL_HRDLOG_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_HRDLOG_QSO_UPLOAD_STATUS = 'Y'
group by station_id
) as totc on station_profile.station_id = totc.station_id
where coalesce(station_profile.hrdlog_code, '') <> ''
and station_profile.user_id = " . $this->session->userdata('user_id');
$query = $this->db->query($sql);
return $query;
}
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
@ -372,14 +408,14 @@ class Stations extends CI_Model {
$sql="
SELECT station_profile.station_id, station_profile.station_profile_name, station_profile.station_callsign, notc.c notcount, totc.c totcount
FROM station_profile
INNER JOIN (
LEFT OUTER JOIN (
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
FROM %s qsos
LEFT JOIN webadif ON qsos.COL_PRIMARY_KEY = webadif.qso_id
WHERE webadif.qso_id IS NULL AND qsos.COL_SAT_NAME = 'QO-100'
GROUP BY qsos.station_id
) notc ON station_profile.station_id = notc.station_id
INNER JOIN (
LEFT JOIN (
SELECT qsos.station_id, COUNT(qsos.COL_PRIMARY_KEY) c
FROM %s qsos
WHERE qsos.COL_SAT_NAME = 'QO-100'

查看文件

@ -123,7 +123,8 @@ class User_Model extends CI_Model {
function add($username, $password, $email, $type, $firstname, $lastname, $callsign, $locator, $timezone,
$measurement, $user_date_format, $user_stylesheet, $user_qth_lookup, $user_sota_lookup, $user_wwff_lookup,
$user_pota_lookup, $user_show_notes, $user_column1, $user_column2, $user_column3, $user_column4, $user_column5,
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload) {
$user_show_profile_image, $user_previous_qsl_type, $user_amsat_status_upload, $user_mastodon_url,
$user_gridmap_default_band, $user_gridmap_confirmation) {
// Check that the user isn't already used
if(!$this->exists($username)) {
$data = array(
@ -152,6 +153,9 @@ class User_Model extends CI_Model {
'user_show_profile_image' => xss_clean($user_show_profile_image),
'user_previous_qsl_type' => xss_clean($user_previous_qsl_type),
'user_amsat_status_upload' => xss_clean($user_amsat_status_upload),
'user_mastodon_url' => xss_clean($user_mastodon_url),
'user_gridmap_default_band' => xss_clean($user_gridmap_default_band),
'user_gridmap_confirmation' => xss_clean($user_gridmap_confirmation),
);
// Check the password is valid
@ -208,6 +212,9 @@ class User_Model extends CI_Model {
'user_show_profile_image' => xss_clean($fields['user_show_profile_image']),
'user_previous_qsl_type' => xss_clean($fields['user_previous_qsl_type']),
'user_amsat_status_upload' => xss_clean($fields['user_amsat_status_upload']),
'user_mastodon_url' => xss_clean($fields['user_mastodon_url']),
'user_gridmap_default_band' => xss_clean($fields['user_gridmap_default_band']),
'user_gridmap_confirmation' => (isset($fields['user_gridmap_confirmation_qsl']) ? 'Q' : '').(isset($fields['user_gridmap_confirmation_lotw']) ? 'L' : '').(isset($fields['user_gridmap_confirmation_eqsl']) ? 'E' : ''),
);
// Check to see if the user is allowed to change user levels
@ -328,6 +335,9 @@ class User_Model extends CI_Model {
'user_column5' => isset($u->row()->user_column5) ? $u->row()->user_column5: 'Country',
'user_previous_qsl_type' => isset($u->row()->user_previous_qsl_type) ? $u->row()->user_previous_qsl_type: 0,
'user_amsat_status_upload' => isset($u->row()->user_amsat_status_upload) ? $u->row()->user_amsat_status_upload: 0,
'user_mastodon_url' => $u->row()->user_mastodon_url,
'user_gridmap_default_band' => $u->row()->user_gridmap_default_band,
'user_gridmap_confirmation' => $u->row()->user_gridmap_confirmation,
'active_station_logbook' => $u->row()->active_station_logbook,
);

查看文件

@ -15,6 +15,8 @@ class Wwff extends CI_Model {
$bandslots = $this->bands->get_worked_bands('wwff');
if(!$bandslots) return null;
$this->db->where_in("station_id", $logbooks_locations_array);
$this->db->where_in("col_band", $bandslots);
$this->db->order_by("COL_WWFF_REF", "ASC");

查看文件

@ -59,6 +59,16 @@
</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="markHrd" value="1" id="markHrdImport">
<label class="form-check-label" for="markHrdImport">Mark imported QSOs as uploaded to HRDLog.net Logbook</label>
</div>
<div class="small form-text text-muted">Select if ADIF being imported does not contain this information.</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-10">
<div class="form-check-inline">

查看文件

@ -22,8 +22,8 @@ function echo_table_col($row, $name) {
$ci =& get_instance();
switch($name) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '</td>'; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))); if ($row->end != NULL) echo ' <span class="badge badge-danger">'.$ci->lang->line('gen_hamradio_deleted_dxcc').'</span>' . '</td>'; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;

查看文件

@ -11,7 +11,7 @@
<table width="100%">
<tr>
<td>Version</td>
<td><?php echo $this->config->item('app_version')."\n"; ?></td>
<td><?php echo $this->optionslib->get_option('version')."\n"; ?></td>
</tr>
<tr>
<td>Language</td>
@ -38,6 +38,11 @@
<td>PHP Version</td>
<td><?php echo phpversion(); ?></td>
</tr>
<tr>
<td>MySQL Version</td>
<td><?php echo $this->db->version(); ?></td>
</tr>
</table>
</div>
</div>
@ -169,6 +174,8 @@
$commitDate = trim(exec('git log --pretty="%ci" -n1 HEAD'));
$line = trim(exec('git log -n 1 --pretty=%D HEAD'));
$pieces = explode(', ', $line);
$lastFetch = trim(exec('stat -c %Y .git/FETCH_HEAD'));
$dt = new DateTime("@$lastFetch");
if (isset($pieces[1])) {
$remote = substr($pieces[1], 0, strpos($pieces[1], '/'));
$branch = substr($pieces[1], strpos($pieces[1], '/')+1);
@ -225,6 +232,12 @@
<?php } ?>
</td>
</tr>
<tr>
<td>Last Fetch</td>
<td>
<?php echo $dt->format(\DateTime::RFC850); ?>
</td>
</tr>
</table>
</table>
</div>

查看文件

@ -29,10 +29,18 @@
<label class="form-check-label" for="exampleRadios1">
Import from file...
</label>
<br><br>
<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" />
<br/><br/>
<p>Choose Station(location) eQSL File belongs to:</p>
<select name="station_profile" class="custom-select mb-2 mr-sm-2" style="width: 20%;">
<option value="0">Select Station Location</option>
<?php foreach ($station_profile->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>" <?php if ($station->station_id == $this->stations->find_active()) { echo " selected =\"selected\""; } ?>>Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name.") eQSL: ".$station->eqslqthnickname; ?></option>
<?php } ?>
</select>
</div>
<br><br>

查看文件

@ -6,9 +6,9 @@
padding: 6px 8px;
font: 14px Arial, Helvetica, sans-serif;
background: white;
background: rgba(255, 255, 255, 0.8);
line-height: 24px;
color: #555;
border-radius: 10px;
}
.legend h4 {
text-align: center;
@ -25,7 +25,19 @@
height: 18px;
float: left;
margin: 0 8px 0 0;
opacity: 0.7;
}
.coordinates {
justify-content: center;
align-items: stretch;
}
.cohidden {
display:none;
}
#latDeg, #lngDeg {
width: 170px;
}
#locator, #distance, #bearing {
width: 120px;
}
</style>
<div class="container">
@ -38,13 +50,17 @@
<label class="my-1 mr-2" for="band"><?php echo lang('gridsquares_band'); ?></label>
<select class="custom-select my-1 mr-sm-2" id="band">
<option value="All">All</option>
<?php foreach($bands as $band) {
echo '<option value="' . $band . '"' . '>' . $band . '</option>'."\n";
<?php foreach($bands as $band) {
echo '<option value="'.$band.'"';
if ($user_gridmap_default_band == $band) {
echo ' selected="selected"';
}
echo '>'.$band.'</option>'."\n";
} ?>
</select>
<?php if (count($sats_available) != 0) { ?>
<label class="my-1 mr-2" for="distplot_sats"><?php echo lang('gridsquares_sat'); ?></label>
<select class="custom-select my-1 mr-sm-2" id="sats" disabled>
<select class="custom-select my-1 mr-sm-2" id="sats" <?php if ($user_gridmap_default_band != "SAT") { ?>disabled<?php } ?>>
<option value="All">All</option>
<?php foreach($sats_available as $sat) {
echo '<option value="' . $sat . '"' . '>' . $sat . '</option>'."\n";
@ -67,15 +83,27 @@
<label class="my-1 mr-2"><?php echo lang('gridsquares_confirmation'); ?></label>
<div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="qsl" id="qsl" checked>
<?php echo '<input class="form-check-input" type="checkbox" name="qsl" id="qsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'Q') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="qsl">QSL</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="lotw" id="lotw" checked>
<?php echo '<input class="form-check-input" type="checkbox" name="lotw" id="lotw"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'L') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="lotw">LoTW</label>
</div>
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="eqsl" id="eqsl">
<?php echo '<input class="form-check-input" type="checkbox" name="eqsl" id="eqsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) {
echo ' checked' ;
}
echo '>'; ?>
<label class="form-check-label" for="eqsl">eQSL</label>
</div>
</div>
@ -94,14 +122,27 @@
<div id="gridmapcontainer">
<div id="gridsquare_map" style="width: 100%; height: 800px"></div>
</div>
<div class="coordinates d-flex">
<div class="cohidden">Latitude: </div>
<div class="cohidden col-auto text-success font-weight-bold" id="latDeg"></div>
<div class="cohidden">Longitude: </div>
<div class="cohidden col-auto text-success font-weight-bold" id="lngDeg"></div>
<div class="cohidden">Gridsquare: </div>
<div class="cohidden col-auto text-success font-weight-bold" id="locator"></div>
<div class="cohidden">Distance: </div>
<div class="cohidden col-auto text-success font-weight-bold" id="distance"></div>
<div class="cohidden">Bearing: </div>
<div class="cohidden col-auto text-success font-weight-bold" id="bearing"></div>
</div>
<script>var gridsquaremap = true;
<?php
echo 'var jslayer ="' . $layer .'";';
echo "var jsattribution ='" . $attribution . "';";
echo "var homegrid ='" . strtoupper($homegrid[0]) . "';";
echo 'var gridsquares_gridsquares = "' . $gridsquares_gridsquares . '";';
echo 'var gridsquares_gridsquares_confirmed = "' . $gridsquares_gridsquares_confirmed . '";';
echo 'var gridsquares_gridsquares_not_confirmed = "' . $gridsquares_gridsquares_not_confirmed . '";';
echo 'var gridsquares_gridsquares_total_worked = "' . $gridsquares_gridsquares_total_worked . '";';
?>
</script>
</script>

查看文件

@ -0,0 +1,96 @@
<div class="container adif">
<h2><?php echo $page_title; ?></h2>
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs pull-right" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="export-tab" data-toggle="tab" href="#export" role="tab" aria-controls="import" aria-selected="true">Upload Logbook</a>
</li>
<li class="nav-item">
<a class="nav-link" id="mark-tab" data-toggle="tab" href="#mark" role="tab" aria-controls="export" aria-selected="false">Mark QSOs</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="tab-pane active" id="export" role="tabpanel" aria-labelledby="export-tab">
<p>Here you can see and upload all QSOs which have not been previously uploaded to a HRDLog logbook.</p>
<p>You need to set a HRDLog Logbook API Code in your station profile. Only station profiles with an API Key set are displayed.</p>
<p>The Code can be demanded at <a href="http://www.hrdlog.net/EditUser.aspx" target="new" class="link">http://www.hrdlog.net/EditUser.aspx</a></p>
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
<?php
if ($station_profile->result()) {
echo '
<table class="table table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr>
<td>Profile name</td>
<td>Station callsign</td>
<td>Edited QSOs not uploaded</td>
<td>Total QSOs not uploaded</td>
<td>Total QSOs uploaded</td>
<td>Actions</td>
</thead>
<tbody>';
foreach ($station_profile->result() as $station) { // Fills the table with the data
echo '<tr>';
echo '<td>' . $station->station_profile_name . '</td>';
echo '<td>' . $station->station_callsign . '</td>';
echo '<td id ="modcount'.$station->station_id.'">' . $station->modcount . '</td>';
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
echo '<td><button id="HrdlogUpload" type="button" name="HrdlogUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportHrd('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
}
echo '</tfoot></table>';
}
else {
echo '<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Nothing found!</div>';
}
?>
</div>
<div class="tab-pane fade" id="mark" role="tabpanel" aria-labelledby="home-tab">
<form class="form" action="<?php echo site_url('hrdlog/mark_hrdlog'); ?>" method="post" enctype="multipart/form-data">
<select name="station_profile" class="custom-select mb-4 mr-sm-4" style="width: 30%;">
<option disabled value="0">Select Station Location</option>
<?php foreach ($station_profiles->result() as $station) { ?>
<option <?php if ($station->station_active) { echo "selected "; } ?>value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>
<p class="card-text">From date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker5" data-target-input="nearest">
<input name="from" type="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker1"/>
<div class="input-group-append" data-target="#datetimepicker5" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<p class="card-text">To date:</p>
<div class="row">
<div class="input-group date col-md-3" id="datetimepicker6" data-target-input="nearest">
<input name="to" "totype="text" placeholder="DD/MM/YYYY" class="form-control datetimepicker-input" data-target="#datetimepicker2"/>
<div class="input-group-append" data-target="#datetimepicker6" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
<br>
<button type="submit" class="btn-sm btn-primary" value="Export">Mark QSOs as exported to HRDLog Logbook</button>
</form>
</div>
</div>
</div>
</div>
</div>

查看文件

@ -0,0 +1,22 @@
<div class="container">
<br>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
<p><?php echo $this->session->flashdata('message'); ?></p>
</div>
<?php } ?>
<div class="card">
<div class="card-header">
QSOs marked
</div>
<div class="card-body">
<h3 class="card-title">Yay, it's done!</h3>
<p class="card-text">The QSOs are marked as exported to HRDLog Logbook.</p>
</div>
</div>
</div>

查看文件

@ -71,7 +71,7 @@ function load_was_map() {
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/continents.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "adif" || $this->uri->segment(1) == "qrz" || $this->uri->segment(1) == "webadif") { ?>
<?php if ($this->uri->segment(1) == "adif" || $this->uri->segment(1) == "qrz" || $this->uri->segment(1) == "hrdlog" ||$this->uri->segment(1) == "webadif") { ?>
<!-- Javascript used for ADIF Import and Export Areas -->
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js"></script>
@ -1235,97 +1235,110 @@ $(document).on('keypress',function(e) {
<script>
// Javascript for controlling rig frequency.
var updateFromCAT = function() {
if($('select.radios option:selected').val() != '0') {
radioID = $('select.radios option:selected').val();
$.getJSON( "radio/json/" + radioID, function( data ) {
/* {
"frequency": "2400210000",
"frequency_rx": "10489710000",
"mode": "SSB",
"satmode": "S/X",
"satname": "QO-100"
"power": "20"
"prop_mode": "SAT"
} */
$('#frequency').val(data.frequency);
$("#band").val(frequencyToBand(data.frequency));
if (data.frequency_rx != "") {
$('#frequency_rx').val(data.frequency_rx);
$("#band_rx").val(frequencyToBand(data.frequency_rx));
}
var updateFromCAT = function() {
if($('select.radios option:selected').val() != '0') {
radioID = $('select.radios option:selected').val();
$.getJSON( "radio/json/" + radioID, function( data ) {
/* {
"frequency": "2400210000",
"frequency_rx": "10489710000",
"mode": "SSB",
"satmode": "S/X",
"satname": "QO-100"
"power": "20"
"prop_mode": "SAT",
"error": "not_logged_id" // optional, reserved for errors
} */
if (data.error) {
if (data.error == 'not_logged_in') {
$(".radio_cat_state" ).remove();
if($('.radio_login_error').length == 0) {
$('.qso_panel').prepend('<div class="alert alert-danger radio_login_error" role="alert"><i class="fas fa-broadcast-tower"></i> You\'re not logged it. Please <a href="<?php echo base_url();?>">login</a></div>');
}
}
// Put future Errorhandling here
} else {
if($('.radio_login_error').length != 0) {
$(".radio_login_error" ).remove();
}
$('#frequency').val(data.frequency);
$("#band").val(frequencyToBand(data.frequency));
if (data.frequency_rx != "") {
$('#frequency_rx').val(data.frequency_rx);
$("#band_rx").val(frequencyToBand(data.frequency_rx));
}
old_mode = $(".mode").val();
$(".mode").val(data.mode);
old_mode = $(".mode").val();
$(".mode").val(data.mode);
if (old_mode !== $(".mode").val()) {
// Update RST on mode change via CAT
setRst($(".mode").val());
}
$("#sat_name").val(data.satname);
$("#sat_mode").val(data.satmode);
if(data.power != null && data.power != 0) {
$("#transmit_power").val(data.power);
}
$("#selectPropagation").val(data.prop_mode);
if (old_mode !== $(".mode").val()) {
// Update RST on mode change via CAT
setRst($(".mode").val());
}
$("#sat_name").val(data.satname);
$("#sat_mode").val(data.satmode);
if(data.power != null && data.power != 0) {
$("#transmit_power").val(data.power);
}
$("#selectPropagation").val(data.prop_mode);
// Display CAT Timeout warning based on the figure given in the config file
var minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
// Display CAT Timeout warning based on the figure given in the config file
var minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
if(data.updated_minutes_ago > minutes) {
$(".radio_cat_state" ).remove();
if($('.radio_timeout_error').length == 0) {
$('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert"><i class="fas fa-broadcast-tower"></i> Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>');
} else {
$('.radio_timeout_error').html('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.');
}
} else {
$(".radio_timeout_error" ).remove();
text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+(Math.round(parseInt(data.frequency)/100)/10000).toFixed(4)+' MHz';
if(data.mode != null) {
text = text+'<span style="margin-left:10px"></span>'+data.mode;
}
if(data.power != null && data.power != 0) {
text = text+'<span style="margin-left:10px"></span>'+data.power+' W';
}
if(data.prop_mode != null && data.prop_mode != '') {
text = text+'<span style="margin-left:10px"></span>('+data.prop_mode;
if (data.prop_mode == 'SAT') {
text = text+' '+data.satname;
}
}
if(data.frequency_rx != null && data.frequency_rx != 0) {
text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+(Math.round(parseInt(data.frequency_rx)/1000)/1000).toFixed(3)+' MHz)';
}
if (! $('#radio_cat_state').length) {
$('.qso_panel').prepend('<div aria-hidden="true"><div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div></div>');
} else {
$('#radio_cat_state').html(text);
}
}
if(data.updated_minutes_ago > minutes) {
$(".radio_cat_state" ).remove();
if($('.radio_timeout_error').length == 0) {
$('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert"><i class="fas fa-broadcast-tower"></i> Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>');
} else {
$('.radio_timeout_error').html('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.');
}
} else {
$(".radio_timeout_error" ).remove();
text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+(Math.round(parseInt(data.frequency)/100)/10000).toFixed(4)+' MHz';
if(data.mode != null) {
text = text+'<span style="margin-left:10px"></span>'+data.mode;
}
if(data.power != null && data.power != 0) {
text = text+'<span style="margin-left:10px"></span>'+data.power+' W';
}
if(data.prop_mode != null && data.prop_mode != '') {
text = text+'<span style="margin-left:10px"></span>('+data.prop_mode;
if (data.prop_mode == 'SAT') {
text = text+' '+data.satname;
}
}
if(data.frequency_rx != null && data.frequency_rx != 0) {
text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+(Math.round(parseInt(data.frequency_rx)/1000)/1000).toFixed(3)+' MHz)';
}
if (! $('#radio_cat_state').length) {
$('.qso_panel').prepend('<div aria-hidden="true"><div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div></div>');
} else {
$('#radio_cat_state').html(text);
}
}
}
});
}
};
});
}
};
// Update frequency every three second
setInterval(updateFromCAT, 3000);
// Update frequency every three second
setInterval(updateFromCAT, 3000);
// If a radios selected from drop down select radio update.
$('.radios').change(updateFromCAT);
// If a radios selected from drop down select radio update.
$('.radios').change(updateFromCAT);
// If no radio is selected clear data
$( ".radios" ).change(function() {
if ($(".radios option:selected").val() == 0) {
$("#sat_name").val("");
$("#sat_mode").val("");
$("#frequency").val("");
$("#frequency_rx").val("");
$("#band_rx").val("");
$("#selectPropagation").val($("#selectPropagation option:first").val());
$(".radio_timeout_error" ).remove();
}
});
// If no radio is selected clear data
$( ".radios" ).change(function() {
if ($(".radios option:selected").val() == 0) {
$("#sat_name").val("");
$("#sat_mode").val("");
$("#frequency").val("");
$("#frequency_rx").val("");
$("#band_rx").val("");
$("#selectPropagation").val($("#selectPropagation option:first").val());
$(".radio_timeout_error" ).remove();
}
});
</script>
<?php } ?>
@ -1702,6 +1715,9 @@ $(document).ready(function(){
</script>
<?php } ?>
<?php if ($this->uri->segment(1) == "hrdlog") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/hrdlog.js"></script>
<?php } ?>
<?php if ($this->uri->segment(1) == "qrz") { ?>
<script src="<?php echo base_url(); ?>assets/js/sections/qrzlogbook.js"></script>
<?php } ?>
@ -2007,7 +2023,7 @@ $(document).ready(function(){
success: function (dataofconfirm) {
$(".edit-dialog").modal('hide');
$(".qso-dialog").modal('hide');
<?php if ($this->uri->segment(1) != "search" && $this->uri->segment(2) != "filter" && $this->uri->segment(1) != "qso") { ?>location.reload();<?php } ?>
<?php if ($this->uri->segment(1) != "search" && $this->uri->segment(2) != "filter" && $this->uri->segment(1) != "qso" && $this->uri->segment(1) != "logbookadvanced") { ?>location.reload();<?php } ?>
},
error: function(xhr, status, error) {
console.log(xhr.responseText);
@ -2398,7 +2414,7 @@ function viewEqsl(picture, callsign) {
$("#qslcardfront").val(null);
}
} else {
} else if (data.status.front.status != '') {
$("#qslupload").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Front QSL Card:' +
data.status.front.error +
'</div>');
@ -2436,7 +2452,7 @@ function viewEqsl(picture, callsign) {
$(".carouselExampleIndicators").carousel();
$("#qslcardback").val(null);
}
} else {
} else if (data.status.back.status != '') {
$("#qslupload").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>\nBack QSL Card: ' +
data.status.back.error +
'</div>');

查看文件

@ -260,6 +260,7 @@ $oqrs_requests = $CI->oqrs_model->oqrs_requests($location_list);
<a class="dropdown-item" href="<?php echo site_url('eqsl/import');?>" title="eQSL import / export"><i class="fas fa-sync"></i> <?php echo lang('menu_eqsl_import_export'); ?></a>
<a class="dropdown-item" href="<?php echo site_url('hrdlog/export');?>" title="Upload to HRDLog.net logbook"><i class="fas fa-sync"></i> <?php echo lang('menu_hrd_logbook'); ?></a>
<a class="dropdown-item" href="<?php echo site_url('qrz/export');?>" title="Upload to QRZ.com logbook"><i class="fas fa-sync"></i> <?php echo lang('menu_qrz_logbook'); ?></a>
<a class="dropdown-item" href="<?php echo site_url('webadif/export');?>" title="Upload to webADIF"><i class="fas fa-sync"></i> <?php echo lang('menu_qo_100_dx_club_upload'); ?></a>

查看文件

@ -55,7 +55,7 @@
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="dxcc">DXCC</label>
<select class="form-control form-control-sm" id="dxcc" name="dxcc">
<option value="">-</option>
<option value="">-</option>
<option value="0">- NONE - (e.g. /MM, /AM)</option>
<?php
foreach($dxccarray as $dxcc){
@ -145,6 +145,32 @@
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="cqzone">CQ Zone</label>
<select id="cqzone" name="cqzone" class="form-control form-control-sm">
<option value="">All</option>
<?php
for ($i = 1; $i<=40; $i++) {
echo '<option value="'. $i . '">'. $i .'</option>';
}
?>
?>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="sota">SOTA</label>
<input type="text" name="sota" id="sota" class="form-control form-control-sm" value="">
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="wwff">WWFF</label>
<input type="text" name="wwff" id="wwff" class="form-control form-control-sm" value="">
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label class="form-label" for="pota">POTA</label>
<input type="text" name="pota" id="pota" class="form-control form-control-sm" value="">
</div>
</div>
<div class="form-row">
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslSent">QSL Sent</label>
<select id="qslSent" name="qslSent" class="form-control form-control-sm">
<option value="">All</option>
@ -166,33 +192,103 @@
<option value="V">Verified</option>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="lotwSent">LoTW Sent</label>
<select id="lotwSent" name="lotwSent" class="form-control form-control-sm">
<option value="">All</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="R">Requested</option>
<option value="Q">Queued</option>
<option value="I">Ignore/Invalid</option>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="lotwReceived">LoTW Received</label>
<select id="lotwReceived" name="lotwReceived" class="form-control form-control-sm">
<option value="">All</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="R">Requested</option>
<option value="I">Ignore/Invalid</option>
<option value="V">Verified</option>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="eqslSent">eQSL Sent</label>
<select id="eqslSent" name="eqslSent" class="form-control form-control-sm">
<option value="">All</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="R">Requested</option>
<option value="Q">Queued</option>
<option value="I">Ignore/Invalid</option>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="eqslReceived">eQSL Received</label>
<select id="eqslReceived" name="eqslReceived" class="form-control form-control-sm">
<option value="">All</option>
<option value="Y">Yes</option>
<option value="N">No</option>
<option value="R">Requested</option>
<option value="I">Ignore/Invalid</option>
<option value="V">Verified</option>
</select>
</div>
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
<label for="qslvia">QSL Via</label>
<datalist id="qslvia" name="qslvia">
<option value="">All</option>
<option value="B">Bureau</option>
<option value="D">Direct</option>
<option value="E">Electronic</option>
<option value="M">Manager</option>
</datalist>
<input type="search" list="qslvia" name="qslviainput" class="custom-select custom-select-sm">
</div>
</div>
</div>
<div class="actionbody collapse">
<div class="mb-2">
<span class="h6">With selected :</span>
<button type="button" class="btn btn-sm btn-primary mr-1" id="btnUpdateFromCallbook">Update from Callbook</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueBureau">Queue Bureau</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueDirect">Queue Direct</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueElectronic">Queue Electronic</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentBureau">Sent Bureau</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentDirect">Sent Direct</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentElectronic">Sent Electronic</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="dontSend">Not Sent</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="notRequired">QSL Not Required</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="receivedBureau">Received (bureau)</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="receivedDirect">Received (direct)</button>
<button type="button" class="btn btn-sm btn-info mr-1" id="exportAdif">Create ADIF</button>
<button type="button" class="btn btn-sm btn-info mr-1" id="printLabel">Print Label</button>
<button type="button" class="btn btn-sm btn-danger mr-1" id="deleteQsos">Delete</button>
</div>
</div>
<div class="quickfilterbody collapse">
<div class="mb-2">
<span class="h6">With selected :</span>
<button type="button" class="btn btn-sm btn-primary mr-1" id="btnUpdateFromCallbook">Update from Callbook</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueBureau">Queue Bureau</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueDirect">Queue Direct</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="queueElectronic">Queue Electronic</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentBureau">Sent Bureau</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentDirect">Sent Direct</button>
<button type="button" class="btn btn-sm btn-success mr-1" id="sentElectronic">Sent Electronic</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="dontSend">Not Sent</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="notRequired">QSL Not Required</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="receivedBureau">Received (bureau)</button>
<button type="button" class="btn btn-sm btn-warning mr-1" id="receivedDirect">Received (direct)</button>
<button type="button" class="btn btn-sm btn-info mr-1" id="exportAdif">Create ADIF</button>
<button type="button" class="btn btn-sm btn-info mr-1" id="printLabel">Print Label</button>
<button type="button" class="btn btn-sm btn-danger mr-1" id="deleteQsos">Delete</button>
<span id="infoBox"></span>
<span class="h6">Quick search with selected :</span>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchCallsign">Search Callsign</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchDxcc">Search DXCC</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchIota">Search IOTA</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchState">Search State</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchGridsquare">Search Gridsquare</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchCqZone">Search CQ Zone</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchMode">Search Mode</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchBand">Search Band</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchSota">Search SOTA</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchWwff">Search WWFF</button>
<button type="button" class="btn btn-sm btn-primary mr-1" id="searchPota">Search POTA</button>
</div>
</div>
</div>
<div class="form-row pt-2">
<div class="form-group form-inline col-lg d-flex flex-row justify-content-center align-items-center">
<button type="button" class="btn btn-sm btn-primary mr-1" data-toggle="collapse" data-target=".quickfilterbody">Quickfilters</button>
<button type="button" class="btn btn-sm btn-primary mr-1" data-toggle="collapse" data-target=".filterbody">Filters</button>
<button type="button" class="btn btn-sm btn-primary mr-1" data-toggle="collapse" data-target=".actionbody">Actions</button>
<label for="qsoResults" class="mr-2"># Results</label>
@ -239,4 +335,4 @@
<tbody>
</tbody>
</table>
</div>
</div>

查看文件

@ -68,6 +68,18 @@
Visit Public Page <a href="<?php echo site_url('visitor'); ?>/<?php echo $station_logbook_details->public_slug; ?>" target="_blank"><?php echo site_url('visitor'); ?>/<?php echo $station_logbook_details->public_slug; ?></a>
</div>
<?php } ?>
<form style="display: inline;">
<input type="hidden" name="logbook_id" value="<?php echo $station_logbook_details->logbook_id; ?>">
<p>Enabling public search function offers a search input box on the public logbook page accessed via public slug. Search only covers this logbook.</p>
<label for="public_search">Public search enabled</label>
<select class="custom-select" id="public_search" name="public_search" hx-post="<?php echo site_url('logbooks/save_publicsearch/'); ?>" hx-target="#publicSearchForm" hx-trigger="change">
<option value="1" <?php if ($station_logbook_details->public_search == 1) { echo " selected =\"selected\""; } ?>><?php echo lang('general_word_yes'); ?></option>
<option value="0" <?php if ($station_logbook_details->public_search == 0) { echo " selected =\"selected\""; } ?>><?php echo lang('general_word_no'); ?></option>
</select>
</form>
<p>
<div id="publicSearchForm">
</div>
</div>
</div>
</div>

查看文件

@ -36,6 +36,7 @@
<th scope="col">Edit</th>
<th scope="col">Delete</th>
<th scope="col">Link</th>
<th scope="col">Public Search</th>
</tr>
</thead>
<tbody>
@ -65,6 +66,13 @@
<a target="_blank" href="<?php echo site_url('visitor')."/".$row->public_slug; ?>" class="btn btn-outline-primary btn-sm" ><i class="fas fa-globe" title="View Public Page for <?php echo $row->logbook_name;?> Logbook"></i> </a>
<?php } ?>
</td>
<td>
<?php if ($row->public_search == 1) {
echo "<span class=\"badge badge-success\">Enabled</span>";
} else {
echo "<span class=\"badge badge-dark\">Disabled</span>";
} ?>
</td>
</tr>
<?php } ?>
</tbody>

查看文件

@ -41,14 +41,6 @@
</div>
</div>
<br/>
<div class="form-group row" style="display: none">
<div class="col-md-10">
<div class="form-check-inline">
<input class="form-check-input" type="checkbox" name="importMissing" value="1" id="importMissing">
<label class="form-check-label" for="importMissing"><?php echo lang('lotw_import_missing_qsos_text'); ?></label>
</div>
</div>
</div>
<p class="form-text text-muted"><?php echo lang('lotw_report_download_overview_helptext'); ?></p>

查看文件

@ -59,15 +59,12 @@
</select>
<small id="themeHelp" class="form-text text-muted"><?php echo lang('options_global_theme_choice_this_is_used_when_users_arent_logged_in'); ?></small>
</div>
<div class="form-group">
<label for="globalSearch"><?php echo lang('options_public_search_bar'); ?></label>
<select class="custom-select" id="globalSearch" name="globalSearch" aria-describedby="globalSearchHelp" required>
<select class="custom-select" id="globalSearch" name="globalSearch" style="display: none;">
<option value='true' <?php if($this->optionslib->get_option('global_search') == "true") { echo "selected=\"selected\""; } ?>>Enabled</option>
<option value='false' <?php if($this->optionslib->get_option('global_search') == "false") { echo "selected=\"selected\""; } ?>>Disabled</option>
</select>
<small id="globalSearchHelp" class="form-text text-muted"><?php echo lang('options_this_allows_non_logged_in_users_to_access_the_search_functions'); ?></small>
</div>
<div class="form-group">
<label for="dashboardBanner"><?php echo lang('options_dashboard_notification_banner'); ?></label>

查看文件

@ -0,0 +1,4 @@
<div class="container publicsearch">
<h1>Results <small class="text-muted">Searching for <?php echo str_replace("0","&Oslash;",strtoupper($callsign)); ?></small></h1>
<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>Nothing found!</div>
</div>

查看文件

@ -0,0 +1,76 @@
<div class="container publicsearch">
<h1>Results <small class="text-muted">Searching for <?php echo str_replace("0","&Oslash;",strtoupper($callsign)); ?></small></h1>
<div class="card text-center">
<div class="card-body">
<?php
if ($results) { ?>
<div class="table-responsive">
<table style="width:100%" id="publicsearchtable" class="publicsearchtable table table-sm table-striped table-hover">
<thead>
<tr class="titles">
<th><?php echo lang('general_word_date'); ?></th>
<th><?php echo lang('gen_hamradio_call'); ?></th>
<th><?php echo lang('gen_hamradio_mode'); ?></th>
<th><?php echo lang('gen_hamradio_band'); ?></th>
<th>Station Callsign</th>
</tr>
</thead>
<tbody>
<?php $i = 0;
foreach ($results->result() as $row) {
echo '<tr class="tr'.($i & 1).'">'; ?>
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($this->config->item('qso_date_format'), $timestamp); ?></td>
<td>
<?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?>
</td>
<td>
<?php echo $row->COL_SUBMODE==null ? $row->COL_MODE : $row->COL_SUBMODE; ?>
</td>
<td>
<?php if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); } ?>
</td>
<td>
<?php echo $row->station_callsign; ?>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table></div>
<?php } ?>
<?php if (isset($this->pagination)){ ?>
<?php
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['attributes'] = ['class' => 'page-link'];
$config['first_link'] = false;
$config['last_link'] = false;
$config['first_tag_open'] = '<li class="page-item">';
$config['first_tag_close'] = '</li>';
$config['prev_link'] = '&laquo';
$config['prev_tag_open'] = '<li class="page-item">';
$config['prev_tag_close'] = '</li>';
$config['next_link'] = '&raquo';
$config['next_tag_open'] = '<li class="page-item">';
$config['next_tag_close'] = '</li>';
$config['last_tag_open'] = '<li class="page-item">';
$config['last_tag_close'] = '</li>';
$config['cur_tag_open'] = '<li class="page-item active"><a href="#" class="page-link">';
$config['cur_tag_close'] = '<span class="sr-only">(current)</span></a></li>';
$config['num_tag_open'] = '<li class="page-item">';
$config['num_tag_close'] = '</li>';
$this->pagination->initialize($config);
?>
<?php echo $this->pagination->create_links(); ?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>

查看文件

@ -21,7 +21,7 @@
<div class="tab-pane active" id="export" role="tabpanel" aria-labelledby="export-tab">
<p>Here you can see and upload all QSOs which have not been previously uploaded to a QRZ logbook.</p>
<p>You need to set a QRZ Logbook API key in your station profile. Only station profiles with an API Key set are displayed.</p>
<p><span class="badge badge-warning">Warning</span>This might take a while as QSO uploads are processed sequentially.</p>
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
<?php
if ($station_profile->result()) {
@ -61,9 +61,9 @@
<form class="form" action="<?php echo site_url('qrz/mark_qrz'); ?>" method="post" enctype="multipart/form-data">
<select name="station_profile" class="custom-select mb-4 mr-sm-4" style="width: 30%;">
<option value="0">Select Station Location</option>
<option disabled value="0">Select Station Location</option>
<?php foreach ($station_profiles->result() as $station) { ?>
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<option <?php if ($station->station_active) { echo "selected "; } ?>value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
<?php } ?>
</select>
<p><span class="badge badge-warning">Warning</span> If a date range is not selected then all QSOs will be marked!</p>

查看文件

@ -0,0 +1,38 @@
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$i = 0;
foreach ($qslimages as $image) {
echo '<li data-target="#carouselExampleIndicators" data-slide-to="' . $i . '"';
if ($i == 0) {
echo 'class="active"';
}
$i++;
echo '></li>';
}
?>
</ol>
<div class="carousel-inner">
<?php
$i = 1;
foreach ($qslimages as $image) {
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
if ($i == 1) {
echo ' active';
}
echo '">';
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/qslcard/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
echo '</div>';
}
?>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>

查看文件

@ -65,7 +65,7 @@
<div class="form-group col-md-9">
<label for="callsign"><?php echo lang('gen_hamradio_callsign'); ?></label>
<input type="text" class="form-control" id="callsign" name="callsign" required>
<small id="callsign_info" class="badge badge-secondary"></small> <small id="lotw_info" class="badge badge-light"></small>
<small id="callsign_info" class="badge badge-secondary"></small> <small id="lotw_info" class="badge badge-success"></small>
</div>
<div class="form-group col-md-3 align-self-center">
<small id="qrz_info" class="badge badge-secondary"></small>

查看文件

@ -130,8 +130,8 @@ $ci =& get_instance();
switch($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
@ -142,13 +142,13 @@ $ci =& get_instance();
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR); break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
}
echo '</td>';
switch($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
@ -159,14 +159,14 @@ $ci =& get_instance();
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR); break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
}
echo '</td>';
switch($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
@ -177,13 +177,13 @@ $ci =& get_instance();
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR); break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
}
echo '</td>';
switch($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
@ -194,13 +194,13 @@ $ci =& get_instance();
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR); break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
}
echo '</td>';
switch($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5')) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA); break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
@ -211,7 +211,7 @@ $ci =& get_instance();
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
case 'State': echo '<td>' . ($row->COL_STATE); break;
case 'Operator': echo '<td>' . ($row->COL_OPERATOR); break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
}
echo '</td>';
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>

查看文件

@ -249,6 +249,20 @@
<small id="eqslhelp" class="form-text text-muted">eQSL QTH Nickname.</small>
</div>
<div class="form-row">
<div class="form-group col-sm-6"> <label for="hrdlog_code">HRDLog.net Logbook API Key</label>
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp">
<small id="hrdlog_codeHelp" class="form-text text-muted">Find your API key on <a href="http://www.hrdlog.net/EditUser.aspx" target="_blank">HRDLog Userprofile</a></small>
</div>
<div class="form-group col-sm-6">
<label for="hrdlogrealtime">HRDLog.net Logbook Realtime Upload</label> <select class="custom-select" id="hrdlogrealtime" name="hrdlogrealtime">
<option value="1">Yes</option>
<option value="0" selected>No</option>
</select>
</div>
</div>
<div class="alert alert-warning" role="alert">
QRZ.com Logbook Requires Paid Subscription
</div>

查看文件

@ -371,6 +371,27 @@
</div>
</div>
<div class="row">
<div class="col-md">
<div class="card">
<h5 class="card-header">HRDLog.net</h5>
<div class="card-body">
<div class="form-group">
<label for="webadifApiKey">HRDLog.net API Code</label>
<input type="text" class="form-control" name="hrdlog_code" id="hrdlog_code" aria-describedby="hrdlog_codeHelp" value="<?php if(set_value('hrdlog_code') != "") { echo set_value('hrdlog_code'); } else { echo $my_station_profile->hrdlog_code; } ?>">
<small id="hrdlog_codeHelp" class="form-text text-muted">Create your API Code on <a href="http://www.hrdlog.net/EditUser.aspx" target="_blank">HRDLog.net Userprofile page</a></small>
</div>
<div class="form-group">
<label for="hrdlogrealtime">HRDLog.net Realtime Upload</label>
<select class="custom-select" id="hrdlogrealtime" name="hrdlogrealtime">
<option value="1" <?php if ($my_station_profile->hrdlogrealtime == 1) { echo " selected =\"selected\""; } ?>>Yes</option>
<option value="0" <?php if ($my_station_profile->hrdlogrealtime == 0) { echo " selected =\"selected\""; } ?>>No</option>
</select>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md">
<div class="card">

查看文件

@ -514,6 +514,73 @@
</div>
</div>
</div>
<div class="col-md">
<div class="card">
<div class="card-header">
<?php echo lang('account_mastodon'); ?>
</div>
<div class="card-body">
<div class="form-group">
<label><?php echo lang('account_user_mastodon'); ?></label>
<input class="form-control" type="text" name="user_mastodon_url" value="<?php if(isset($user_mastodon_url)) { echo $user_mastodon_url; } ?>" />
<div class="small form-text text-muted">Main URL of your Mastodon server, e.g. <a href="https://radiosocial.de/" target="_blank">https://radiosocial.de</a></div></td>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md">
<div class="card">
<div class="card-header">
<?php echo lang('account_gridmap_settings'); ?>
</div>
<div class="card-body">
<div class="form-group">
<label for="user_gridmap_default_band"><?php echo lang('account_gridmap_default_band'); ?></label>
<select id="user_gridmap_default_band" class="form-control form-control-sm" name="user_gridmap_default_band">
<option value="All">All</option>;
<?php foreach($bands as $band) {
echo '<option value="'.$band.'"';
if (isset($user_gridmap_default_band) && $user_gridmap_default_band == $band) {
echo ' selected';
}
echo '>'.$band.'</option>'."\n";
} ?>
</select>
</div>
<div class="form-group">
<label class="my-1 mr-2"><?php echo lang('gridsquares_confirmation'); ?></label>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_qsl" id="user_gridmap_confirmation_qsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'Q') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_qsl">QSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_lotw" id="user_gridmap_confirmation_lotw"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'L') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_lotw">LoTW</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_eqsl" id="user_gridmap_confirmation_eqsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_eqsl">eQSL</label>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />

查看文件

@ -476,7 +476,7 @@
<div class="col-md-6">
<div class="card">
<div class="card-header">
<?php echo lang('account_previous_qsl_type'); ?>
<?php echo lang('account_qrzcom_hamqthcom_images'); ?>
</div>
<div class="card-body">
<div class="form-group">
@ -512,7 +512,73 @@
</div>
</div>
</div>
<div class="col-md">
<div class="card">
<div class="card-header">
<?php echo lang('account_mastodon'); ?>
</div>
<div class="card-body">
<div class="form-group">
<label><?php echo lang('account_user_mastodon'); ?></label>
<input class="form-control" type="text" name="user_mastodon_url" value="<?php if(isset($user_mastodon_url)) { echo $user_mastodon_url; } ?>" />
<div class="small form-text text-muted">Main URL of your Mastodon server, e.g. <a href="https://radiosocial.de/" target="_blank">https://radiosocial.de</a></div></td>
</div>
</div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md">
<div class="card">
<div class="card-header">
<?php echo lang('account_gridmap_settings'); ?>
</div>
<div class="card-body">
<div class="form-group">
<label for="user_gridmap_default_band"><?php echo lang('account_gridmap_default_band'); ?></label>
<select id="user_gridmap_default_band" class="form-control form-control-sm" name="user_gridmap_default_band">
<option value="All">All</option>;
<?php foreach($bands as $band) {
echo '<option value="'.$band.'"';
if ($user_gridmap_default_band == $band) {
echo ' selected="selected"';
}
echo '>'.$band.'</option>'."\n";
} ?>
</select>
</div>
<div class="form-group">
<label class="my-1 mr-2"><?php echo lang('gridsquares_confirmation'); ?></label>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_qsl" id="user_gridmap_confirmation_qsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'Q') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_qsl">QSL</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_lotw" id="user_gridmap_confirmation_lotw"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'L') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_lotw">LoTW</label>
</div>
<div class="form-check-inline">
<?php echo '<input class="form-check-input" type="checkbox" name="user_gridmap_confirmation_eqsl" id="user_gridmap_confirmation_eqsl"';
if (isset($user_gridmap_confirmation) && strpos($user_gridmap_confirmation, 'E') !== false) {
echo ' checked';
}
echo '>'; ?>
<label class="form-check-label" for="user_gridmap_confirmation_eqsl">eQSL</label>
</div>
</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />

查看文件

@ -23,8 +23,8 @@ function echo_table_col($row, $name) {
$ci =& get_instance();
switch($name) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td>' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td>' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->name==null?"- NONE -":$row->name))); if ($row->end != null) echo ' <span class="badge badge-danger">'.$ci->lang->line('gen_hamradio_deleted_dxcc').'</span>' . '</td>'; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
@ -32,8 +32,8 @@ function echo_table_col($row, $name) {
case 'POTA': echo '<td>' . ($row->COL_POTA_REF) . '</td>'; break;
case 'Grid': echo '<td>'; echoQrbCalcLink($row->station_gridsquare, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
case 'Distance':echo '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . '&nbsp;km' : '') . '</td>'; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank"><span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$row->COL_SAT_NAME.'</span></a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'. strtolower($row->COL_BAND).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo '<span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank"><span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$row->COL_SAT_NAME.'</span></a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'. strtolower($row->COL_BAND).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-toggle="tooltip" data-original-title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
case 'State': echo '<td>' . ($row->COL_STATE) . '</td>'; break;
case 'Operator':echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;
case 'Location':echo '<td>' . ($row->station_profile_name) . '</td>'; break;

查看文件

@ -407,6 +407,7 @@
?>
<div style="display: inline-block;"><a class="btn btn-primary twitter-share-button" target="_blank" href="https://twitter.com/intent/tweet?text=<?php echo $twitter_string; ?>"><i class="fab fa-twitter"></i> Tweet</a></div>
<?php if($this->session->userdata('user_mastodon_url') != null) { echo '<div style="display: inline-block;"><a class="btn btn-primary twitter-share-button" target="_blank" href="'.$this->session->userdata('user_mastodon_url').'/share?text='.$twitter_string.'"><i class="fab fa-mastodon"></i> Toot</a></div>'; } ?>
</div>
</div>
@ -508,70 +509,61 @@
<p><div class="alert alert-warning" role="alert"><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?>B.</div></p>
<form class="form" id="fileinfo" name="fileinfo" enctype="multipart/form-data">
<fieldset>
<div class="row">
<div class="col-md">
<fieldset>
<div class="form-group">
<label for="qslcardfront"><?php echo lang('qslcard_upload_front'); ?></label>
<input class="form-control-file" type="file" id="qslcardfront" name="qslcardfront" accept="image/*" >
<div class="form-group">
<label for="qslcardfront"><?php echo lang('qslcard_upload_front'); ?></label>
<input class="form-control-file" type="file" id="qslcardfront" name="qslcardfront" accept="image/*" >
</div>
<input type="hidden" class="form-control" id="qsoinputid" name="qsoid" value="<?php echo $row->COL_PRIMARY_KEY; ?>">
<button type="button" onclick="uploadQsl();" id="button1id" name="button1id" class="btn btn-primary"><?php echo lang('qslcard_upload_button'); ?></button>
</div>
<div class="col-md">
<div class="form-group">
<label for="qslcardback"><?php echo lang('qslcard_upload_back'); ?></label>
<input class="form-control-file" type="file" id="qslcardback" name="qslcardback" accept="image/*">
</div>
</fieldset>
</div>
<div class="form-group">
<label for="qslcardback"><?php echo lang('qslcard_upload_back'); ?></label>
<input class="form-control-file" type="file" id="qslcardback" name="qslcardback" accept="image/*">
</div>
<input type="hidden" class="form-control" id="qsoinputid" name="qsoid" value="<?php echo $row->COL_PRIMARY_KEY; ?>">
<button type="button" onclick="uploadQsl();" id="button1id" name="button1id" class="btn btn-primary"><?php echo lang('qslcard_upload_button'); ?></button>
</fieldset>
</div>
</form>
<p>
<div class="row">
<div class="col-md">
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B');" id="qslrxb" name="qslrxb" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-B"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_bureau'); ?> <div class="ld ld-ring ld-spin"></div></button>
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D');" id="qslrxd" name="qslrxd" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-D"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_direct'); ?> <div class="ld ld-ring ld-spin"></div></button>
<button type="button" onclick="qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'E');" id="qslrxe" name="qslrxe" class="btn btn-sm btn-success ld-ext-right ld-ext-right-r-E"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_electronic'); ?> <div class="ld ld-ring ld-spin"></div></button>
</div>
</div>
<p>
<div class="row">
<div class="col-md">
<button type="button" onclick="qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B');" id="qsltxb" name="qsltxb" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-t-B"><i class="fas fa-envelope"></i> Mark QSL Card Requested (Bureau) <div class="ld ld-ring ld-spin"></div></button>
<button type="button" onclick="qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D');" id="qsltxd" name="qsltxd" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-t-D"><i class="fas fa-envelope"></i> Mark QSL Card Requested (Direct) <div class="ld ld-ring ld-spin"></div></button>
<button type="button" onclick="qsl_ignore(<?php echo $row->COL_PRIMARY_KEY; ?>, 'I');" id="qsltxi" name="qsltxi" class="btn btn-sm btn-warning ld-ext-right ld-ext-right-ignore"><i class="fas fa-envelope"></i> Mark QSL Card Not Required <div class="ld ld-ring ld-spin"></div></button>
</div>
</div>
</div>
<div class="tab-pane fade" id="qslcard" role="tabpanel" aria-labelledby="table-tab">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$i = 0;
foreach ($qslimages as $image) {
echo '<li data-target="#carouselExampleIndicators" data-slide-to="' . $i . '"';
if ($i == 0) {
echo 'class="active"';
}
$i++;
echo '></li>';
}
?>
</ol>
<div class="carousel-inner">
<?php
$i = 1;
foreach ($qslimages as $image) {
echo '<center><div class="carousel-item carouselimageid_' . $image->id;
if ($i == 1) {
echo ' active';
}
echo '">';
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/qslcard/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
echo '</div></center>';
}
?>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<?php $this->load->view('qslcard/qslcarousel', $qslimages); ?>
</div>
<div class="tab-pane fade" id="eqslcard" role="tabpanel" aria-labelledby="table-tab">
<?php
echo '<img class="d-block" src="' . base_url() . '/images/eqsl_card_images/' . $row->eqsl_image_file .'" alt="QSL picture #'. $i++.'">';
if ($row->eqsl_image_file != null) {
echo '<img class="d-block" src="' . base_url() . '/images/eqsl_card_images/' . $row->eqsl_image_file .'" alt="QSL picture #'. $i++.'">';
}
?>
</div>
<?php

查看文件

@ -20,8 +20,8 @@ function echo_table_col($row, $name) {
$ci =& get_instance();
switch($name) {
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '</td>'; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo '<span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_STX_STRING . '</span>';} echo '</td>'; break;
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-toggle="tooltip" data-original-title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge badge-light">' . $row->COL_SRX_STRING . '</span>';} echo '</td>'; break;
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))) . '</td>'; break;
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
@ -50,7 +50,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
<!-- Map -->
<div id="map" style="width: 100%; height: 350px"></div>
<div style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
<div id="container" style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
<!-- Log Data -->
<div class="row logdata">
@ -231,3 +231,5 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
</div>
</div>
<div id="partial_view"></div>

查看文件

@ -23,7 +23,8 @@
</script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('map_tile_server');?>"></script> <script type="text/javascript">
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
@ -35,7 +36,7 @@
var q_lat = 40.313043;
var q_lng = -32.695312;
<?php } ?>
<?php if(isset($slug)) { ?>
var qso_loc = '<?php echo site_url('visitor/map/'.$slug);?>';
<?php } ?>
@ -47,8 +48,9 @@
<?php } else { ?>
var grid = "No";
<?php } ?>
console.log("lets go");
<?php if ($this->uri->segment(2) != "search" && $this->uri->segment(2) != "satellites") { ?>
initmap(grid);
<?php } ?>
});
@ -199,5 +201,76 @@
<?php } ?>
<?php } ?>
</script>
<?php if ($this->CI->public_search_enabled($slug) || $this->session->userdata('user_type') >= 2) { ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datatables.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/datetime-moment.js"></script>
<script>
<?php switch($this->config->item('qso_date_format')) {
case 'd/m/y': $usethisformat = 'D/MM/YY';break;
case 'd/m/Y': $usethisformat = 'D/MM/YYYY';break;
case 'm/d/y': $usethisformat = 'MM/D/YY';break;
case 'm/d/Y': $usethisformat = 'MM/D/YYYY';break;
case 'd.m.Y': $usethisformat = 'D.MM.YYYY';break;
case 'y/m/d': $usethisformat = 'YY/MM/D';break;
case 'Y-m-d': $usethisformat = 'YYYY-MM-D';break;
case 'M d, Y': $usethisformat = 'MMM D, YYYY';break;
case 'M d, y': $usethisformat = 'MMM D, YY';break;
default: $usethisformat = 'YYYY-MM-D';
} ?>
$.fn.dataTable.moment('<?php echo $usethisformat ?>');
$.fn.dataTable.ext.buttons.clear = {
className: 'buttons-clear',
action: function ( e, dt, node, config ) {
dt.search('').draw();
}
};
$('#publicsearchtable').DataTable({
"pageLength": 25,
responsive: false,
ordering: true,
"scrollY": "500px",
"scrollCollapse": true,
"paging": true,
"scrollX": true,
"order": [ 0, 'desc' ],
dom: 'Bfrtip',
buttons: [
{
extend: 'csv',
text: 'CSV'
},
{
extend: 'clear',
text: 'Clear'
}
]
});
// change color of csv-button if dark mode is chosen
if (isDarkModeTheme()) {
$('[class*="buttons"]').css("color", "white");
}
</script>
<script type="text/javascript">
$(function () {
$(document).on('shown.bs.tooltip', function (e) {
setTimeout(function () {
$(e.target).tooltip('hide');
}, 3000);
});
});
function validateForm() {
let x = document.forms["searchForm"]["callsign"].value;
if (x.trim() == "") {
$('#searchcall').tooltip('show')
return false;
}
}
</script>
<?php } ?>
</body>
</html>

查看文件

@ -9,6 +9,7 @@
<?php if($this->optionslib->get_theme()) { ?>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/<?php echo $this->optionslib->get_theme();?>/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/general.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/visitor.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/selectize.bootstrap4.css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/bootstrap-dialog.css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/<?php echo $this->optionslib->get_theme();?>/overrides.css">
@ -71,6 +72,18 @@
</li>
<?php } ?>
</ul>
<div style="paddling-left: 0.5rem; padding-right: 0.5rem"></div>
<?php if (!empty($slug)) {
$this->CI =& get_instance();
if ($this->CI->public_search_enabled($slug) || $this->session->userdata('user_type') >= 2) { ?>
<form method="post" name="searchForm" action="<?php echo site_url('visitor/search'); ?>" onsubmit="return validateForm()" class="form-inline">
<input class="form-control mr-sm-2" id="searchcall" type="search" name="callsign" placeholder="<?php echo lang('menu_search_text'); ?>" <?php if (isset($callsign) && $callsign != '') { echo 'value="'.strtoupper($callsign).'"'; } ?> aria-label="Search" data-toogle="tooltip" data-placement="bottom" data-original-title="Please enter a callsign!">
<input type="hidden" name="public_slug" value="<?php echo $slug; ?>">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> <?php echo lang('menu_search_button'); ?></button>
</form>
<?php }
} ?>
</div>
</div>
</nav>

查看文件

@ -24,6 +24,11 @@
<?php
if ($station_profile->result()) {
$queuedqsos = 0;
foreach ($station_profile->result() as $count) { // Fills the table with the data
$queuedqsos += $count->notcount;
}
if ($queuedqsos > 0) {
?>
<p>You need to set a QO-100 Dx Club API key in your station profile. Only station profiles with an API Key are displayed.</p>
<p><span class="badge badge-warning">Warning</span> This might take a while as QSO uploads are processed sequentially.</p>
@ -41,15 +46,25 @@
</thead>
<tbody>';
foreach ($station_profile->result() as $station) { // Fills the table with the data
echo '<tr>';
echo '<td>' . $station->station_profile_name . '</td>';
echo '<td>' . $station->station_callsign . '</td>';
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
if ($station->notcount != null) {
echo '<tr>';
echo '<td>' . $station->station_profile_name . '</td>';
echo '<td>' . $station->station_callsign . '</td>';
echo '<td id ="notcount'.$station->station_id.'">' . $station->notcount . '</td>';
echo '<td id ="totcount'.$station->station_id.'">' . $station->totcount . '</td>';
echo '<td><button id="webadifUpload" type="button" name="webadifUpload" class="btn btn-primary btn-sm ld-ext-right" onclick="ExportWebADIF('. $station->station_id .')"><i class="fas fa-cloud-upload-alt"></i> Upload<div class="ld ld-ring ld-spin"></div></button></td>';
echo '</tr>';
}
}
echo '</tfoot></table>';
} else {
?>
<div class="alert alert-success">
There are currently no outstanding QSOs that need to be uploaded to the QO-100 Dx Club's API.<br />
Go ahead and turn on your QO-100 station!
</div>
<?php
}
}
else {

查看文件

@ -69,6 +69,9 @@
# Upload QSOs to LoTW if certs have been provided every hour. <br>
0 */1 * * * curl --silent <?php echo site_url();?>/lotw/lotw_upload &>/dev/null <br>
<br>
# Upload QSOs to HRDLog.net Logbook (ignore cron job if this integration is not required) <br>
0 */6 * * * curl --silent <?php echo site_url();?>/hrdlog/upload &>/dev/null <br>
<br>
# Upload QSOs to QRZ Logbook (ignore cron job if this integration is not required) <br>
0 */6 * * * curl --silent <?php echo site_url();?>/qrz/upload &>/dev/null <br>
<br>
@ -153,4 +156,4 @@
<br><br>
</div>
</div>

查看文件

@ -42,6 +42,11 @@ thead > tr > td {
padding-top: 15px;
}
.publicsearch {
padding-top: 15px;
max-width: 540px;
}
.search {
padding-top: 15px;
}

3
assets/css/visitor.css 普通文件
查看文件

@ -0,0 +1,3 @@
#searchcall:focus {
text-transform: uppercase;
}

查看文件

@ -0,0 +1,167 @@
const isValidLocatorString = locatorString => locatorString.match(/^[A-Ra-r][A-Ra-r]\d\d[A-Xa-x][A-Xa-x]/) !== null;
const charToNumber = char => char.toUpperCase().charCodeAt(0) - CHAR_CODE_OFFSET;
const numberToChar = number => String.fromCharCode(number + CHAR_CODE_OFFSET);
const CHAR_CODE_OFFSET = 65;
const degToRad = deg => (deg % 360) * Math.PI / 180;
const radToDeg = rad => (rad / Math.PI *180) % 360;
const isValidPoint = (lat, lng) => (lat >= -90 && lat <= 90) && (lng >= -180 && lng <= 180);
function ConvertDDToDMS(lat, lng) {
var LatLng = [];
if (lng < -180) {
lng = lng + 360;
}
if (lng > 180) {
lng = lng - 360;
}
LatLng['latDeg'] = (lat < 0 ? "S" : "N") + " " + pad((0 |(lat < 0 ? (lat = -lat) : lat)), 2) + "° " + pad(0 | (((lat += 1e-9) % 1) * 60),2) + "' " + ((0 | (((lat * 60) % 1) * 6000)) / 100) + "\"";
LatLng['lngDeg'] = (lng < 0 ? "W" : "E") + " " + pad((0 | (lng < 0 ? (lng = -lng) : lng)), 3) + "° " + pad(0 | (((lng += 1e-9) % 1) * 60),2) + "' " + ((0 | (((lng * 60) % 1) * 6000)) / 100) + "\"";
return LatLng;
}
function pad(n, width, z) {
z = z || '0';
n = n + '';
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
}
const latLngToLocator = (lat, lng) => {
if (lng < -180) {
lng = lng + 360;
}
if (lng > 180) {
lng = lng - 360;
}
if (!isValidPoint(lat, lng)) {
throw new Error('Input is not a valid coordinate');
}
const longitude = lng + 180;
const latitude = lat + 90;
const fieldLng = numberToChar(Math.floor(longitude / 20));
const fieldLat = numberToChar(Math.floor(latitude / 10));
const squareLng = Math.floor(longitude % 20 / 2);
const squareLat = Math.floor(latitude % 10);
const subsquareLng = numberToChar(Math.floor((longitude % 20 % 2) * 12)).toLowerCase();
const subsquareLat = numberToChar((latitude % 10 - squareLat) * 24).toLowerCase();
return fieldLng + fieldLat + squareLng + squareLat + subsquareLng + subsquareLat;
};
function onMapMove(event) {
var LatLng = event.latlng;
var lat = LatLng.lat;
var lng = LatLng.lng;
var LatLng2 = ConvertDDToDMS(lat, lng);
$('#latDeg').html(LatLng2.latDeg);
$('#lngDeg').html(LatLng2.lngDeg);
var locator = latLngToLocator(lat,lng);
$('#locator').html(locator);
var distance = bearingDistance(homegrid, locator);
$('#bearing').html(distance.deg + ' deg');
$('#distance').html(Math.round(distance.km * 10) / 10 + ' km');
};
function onMapClick(event) {
var LatLng = event.latlng;
var lat = LatLng.lat;
var lng = LatLng.lng;
var locator = latLngToLocator(lat,lng);
var fromCoords = locatorToLatLng(homegrid);
var marker = L.marker([fromCoords[0], fromCoords[1]], {closeOnClick: false, autoClose: false}).addTo(map).bindPopup(homegrid);
var result = bearingDistance(homegrid, locator);
var distance = Math.round(result.km * 10) / 10 + ' km';
var bearing = Math.round(result.deg * 10) / 10 + ' deg';
var popupmessage = '<div class="popup">' +
'From gridsquare: ' + homegrid + '<br />To gridsquare: ' + locator +'<br />Distance: ' + distance+ '<br />Bearing: ' + bearing +
'</div>';
const multiplelines = [];
multiplelines.push(
new L.LatLng(fromCoords[0], fromCoords[1]),
new L.LatLng(lat, lng)
)
if (lng < -170) {
lng = parseFloat(lng) + 360;
}
var marker2 = L.marker([lat, lng], {closeOnClick: false, autoClose: false}).addTo(map);
marker2.bindTooltip(popupmessage);
const geodesic = L.geodesic(multiplelines, {
weight: 3,
opacity: 1,
color: 'red',
wrap: false,
steps: 100
}).addTo(map);
};
const bearingDistance = (from, to) => {
const fromCoords = locatorToLatLng(from);
const toCoords = locatorToLatLng(to);
const dLat = degToRad(toCoords[0] - fromCoords[0]);
const dLon = degToRad(toCoords[1] - fromCoords[1]);
const fromLat = degToRad(fromCoords[0]);
const toLat = degToRad(toCoords[0]);
const a = Math.pow(Math.sin(dLat / 2), 2) + Math.pow(Math.sin(dLon / 2), 2) * Math.cos(fromLat) * Math.cos(toLat);
const b = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
const y = (dLon) * Math.cos(fromLat) * Math.cos(toLat);
const x = Math.sin(toLat) - Math.sin(fromLat) * Math.cos(b);
let az = Math.atan2(y, x);
if (az < 0) {
az += 2 * Math.PI;
}
return {
km: b * 6371,
deg: calcAngle(fromCoords, toCoords)
};
};
var calcAngle = function (p1, p2) {
var lat1 = p1[0] / 180 * Math.PI;
var lat2 = p2[0] / 180 * Math.PI;
var lng1 = p1[1] / 180 * Math.PI;
var lng2 = p2[1] / 180 * Math.PI;
var y = Math.sin(lng2-lng1) * Math.cos(lat2);
var x = Math.cos(lat1)*Math.sin(lat2) - Math.sin(lat1)*Math.cos(lat2)*Math.cos(lng2-lng1);
var brng = (Math.atan2(y, x) * 180 / Math.PI + 360).toFixed(0);
return (brng % 360);
}
const locatorToLatLng = (locatorString) => {
locatorString += 'll'; // append subsquare in case is 4 chars long... If not, is ignored.
if (!isValidLocatorString(locatorString)) {
throw new Error('Input is not valid locator string');
}
const fieldLng = charToNumber(locatorString[0]) * 20;
const fieldLat = charToNumber(locatorString[1]) * 10;
const squareLng = Number.parseInt(locatorString[2]) * 2;
const squareLat = Number.parseInt(locatorString[3]);
const subsquareLng = (charToNumber(locatorString[4]) + 0.5) / 12;
const subsquareLat = (charToNumber(locatorString[5]) + 0.5) / 24;
return [
fieldLat + squareLat + subsquareLat - 90,
fieldLng + squareLng + subsquareLng - 180
];
};

某些文件未显示,因为此 diff 中更改的文件太多 显示更多