Merge remote-tracking branch 'upstream/dev' into publicSearch
这个提交包含在:
当前提交
dc1742f5ff
共有 74 个文件被更改,包括 2340 次插入 和 537 次删除
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 124;
|
||||
$config['migration_version'] = 128;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,9 @@ 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);
|
||||
$this->logbook_model->import($record, $obj['station_profile_id'], NULL, 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, 0, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
171
application/controllers/Hrdlog.php
普通文件
171
application/controllers/Hrdlog.php
普通文件
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
@ -87,22 +87,27 @@ class Labels extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
public function printids() {
|
||||
$ids = xss_clean(json_decode($this->input->post('id')));
|
||||
$this->load->model('labels_model');
|
||||
$result = $this->labels_model->export_printrequestedids($ids);
|
||||
|
||||
$this->prepareLabel($result, true);
|
||||
}
|
||||
|
||||
public function print($station_id) {
|
||||
$clean_id = xss_clean($station_id);
|
||||
|
||||
$this->load->model('labels_model');
|
||||
$result = $this->labels_model->export_printrequested($clean_id);
|
||||
|
||||
$this->prepareLabel($result);
|
||||
}
|
||||
|
||||
function prepareLabel($qsos, $jscall = false) {
|
||||
$this->load->model('labels_model');
|
||||
$label = $this->labels_model->getDefaultLabel();
|
||||
|
||||
// require_once('fpdf.php');
|
||||
// require('PDF_Label.php');
|
||||
// require_once APPPATH."/src/Label/PDF_Label.php";
|
||||
// require_once APPPATH."/src/Label/fpdf.php";
|
||||
|
||||
// Example of custom format
|
||||
// $pdf = new PDF_Label(array('paper-size'=>'A4', 'metric'=>'mm', 'marginLeft'=>1, 'marginTop'=>1, 'NX'=>2, 'NY'=>7, 'SpaceX'=>0, 'SpaceY'=>0, 'width'=>99, 'height'=>38, 'font-size'=>14));
|
||||
|
||||
|
||||
try {
|
||||
if ($label) {
|
||||
$pdf = new PDF_Label(array(
|
||||
|
|
@ -119,17 +124,29 @@ class Labels extends CI_Controller {
|
|||
'font-size' => $label->font_size
|
||||
));
|
||||
} else {
|
||||
$this->session->set_flashdata('error', 'You need to create a label and set it to be used for print.');
|
||||
redirect('labels');
|
||||
if ($jscall) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('message' => 'You need to create a label and set it to be used for print.'));
|
||||
return;
|
||||
} else {
|
||||
$this->session->set_flashdata('error', 'You need to create a label and set it to be used for print.');
|
||||
redirect('labels');
|
||||
}
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
$this->session->set_flashdata('error', 'Something went wrong! The label could not be generated. Check label size and font size.');
|
||||
redirect('labels');
|
||||
if ($jscall) {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array('message' => 'Something went wrong! The label could not be generated. Check label size and font size.'));
|
||||
return;
|
||||
} else {
|
||||
$this->session->set_flashdata('error', 'Something went wrong! The label could not be generated. Check label size and font size.');
|
||||
redirect('labels');
|
||||
}
|
||||
}
|
||||
define('FPDF_FONTPATH', './src/Label/font/');
|
||||
|
||||
|
||||
$pdf->AddPage();
|
||||
|
||||
|
||||
if ($label->font == 'DejaVuSans') {
|
||||
$pdf->AddFont($label->font,'','DejaVuSansMono.ttf',true);
|
||||
$pdf->SetFont($label->font);
|
||||
|
|
@ -137,13 +154,12 @@ class Labels extends CI_Controller {
|
|||
$pdf->AddFont($label->font);
|
||||
$pdf->SetFont($label->font);
|
||||
}
|
||||
|
||||
|
||||
if ($result->num_rows() > 0) {
|
||||
|
||||
if ($qsos->num_rows() > 0) {
|
||||
if ($label->qsos == 1) {
|
||||
$this->makeOneQsoLabel($result->result(), $pdf);
|
||||
$this->makeOneQsoLabel($qsos->result(), $pdf);
|
||||
} else {
|
||||
$this->makeMultiQsoLabel($result->result(), $pdf, $label->qsos);
|
||||
$this->makeMultiQsoLabel($qsos->result(), $pdf, $label->qsos);
|
||||
}
|
||||
} else {
|
||||
$this->session->set_flashdata('message', '0 QSOs found for print!');
|
||||
|
|
|
|||
|
|
@ -772,7 +772,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);
|
||||
|
|
@ -184,4 +193,32 @@ class Logbookadvanced extends CI_Controller {
|
|||
header("Content-Type: application/json");
|
||||
print json_encode($q);
|
||||
}
|
||||
}
|
||||
|
||||
function update_qsl_received() {
|
||||
$this->load->model('logbookadvanced_model');
|
||||
|
||||
$ids = xss_clean($this->input->post('id'));
|
||||
$user_id = (int)$this->session->userdata('user_id');
|
||||
$method = xss_clean($this->input->post('method'));
|
||||
$sent = xss_clean($this->input->post('sent'));
|
||||
|
||||
$status = $this->logbookadvanced_model->updateQslReceived($ids, $user_id, $method, $sent);
|
||||
|
||||
$data = $this->logbookadvanced_model->getQsosForAdif($ids, $user_id);
|
||||
|
||||
$results = $data->result('array');
|
||||
|
||||
$qsos = [];
|
||||
foreach ($results as $data) {
|
||||
$qsos[] = new QSO($data);
|
||||
}
|
||||
|
||||
$q = [];
|
||||
foreach ($qsos as $qso) {
|
||||
$q[] = $qso->toArray();
|
||||
}
|
||||
|
||||
header("Content-Type: application/json");
|
||||
print json_encode($q);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -475,6 +475,7 @@ class Lotw extends CI_Controller {
|
|||
$tableheaders .= "<td>IOTA</td>";
|
||||
$tableheaders .= "<td>Log Status</td>";
|
||||
$tableheaders .= "<td>LoTW Status</td>";
|
||||
$tableheaders .= "<td>Station ID</td>";
|
||||
$tableheaders .= "</tr>";
|
||||
|
||||
$table = "";
|
||||
|
|
@ -497,7 +498,7 @@ class Lotw extends CI_Controller {
|
|||
$record['qsl_rcvd'] = $config['lotw_rcvd_mark'];
|
||||
}
|
||||
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band']);
|
||||
$status = $this->logbook_model->import_check($time_on, $record['call'], $record['band'], $record['mode'], $record['station_callsign']);
|
||||
$skipNewQso = $this->input->post('importMissing'); // If import missing was checked
|
||||
|
||||
if($status[0] == "No Match" && $skipNewQso != NULL) {
|
||||
|
|
@ -505,7 +506,7 @@ class Lotw extends CI_Controller {
|
|||
$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
|
||||
$result = $this->logbook_model->import($record, $station_id, NULL, TRUE, NULL, NULL, NULL, true, false); // Create the Entry
|
||||
if ($result == "") {
|
||||
$lotw_status = 'QSO imported';
|
||||
} else {
|
||||
|
|
@ -550,7 +551,12 @@ 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);
|
||||
$station_id = $this->logbook_model->find_correct_station_id($record['station_callsign'], $record['my_gridsquare']);
|
||||
if ($station_id != NULL) {
|
||||
$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, $station_id);
|
||||
} else {
|
||||
$lotw_status = "No matching Grid/OP-Call (check Locations)";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -566,6 +572,7 @@ class Lotw extends CI_Controller {
|
|||
$table .= "<td>".$iota."</td>";
|
||||
$table .= "<td>QSO Record: ".$status[0]."</td>";
|
||||
$table .= "<td>LoTW Record: ".$lotw_status."</td>";
|
||||
$table .= "<td>".$station_id."</td>";
|
||||
$table .= "</tr>";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
@ -169,6 +181,7 @@ class User extends CI_Controller {
|
|||
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'); }
|
||||
$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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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)';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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'] = 'Всего сработано квадратов';
|
||||
|
|
@ -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 логин изменён на ';
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -127,4 +127,16 @@ class Labels_model extends CI_Model {
|
|||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function export_printrequestedids($ids) {
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.name as station_country');
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->join('dxcc_entities', 'station_profile.station_dxcc = dxcc_entities.adif');
|
||||
$this->db->where('station_profile.user_id', $this->session->userdata('user_id'));
|
||||
$this->db->where_in('COL_PRIMARY_KEY', $ids);
|
||||
$this->db->order_by("COL_DXCC", "ASC");
|
||||
$query = $this->db->get($this->config->item('table_name'));
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
|
@ -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';
|
||||
}
|
||||
|
|
@ -506,12 +510,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 +537,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 +563,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 +619,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 +744,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 +800,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 +1046,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';
|
||||
}
|
||||
|
|
@ -1311,6 +1421,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 +1498,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 +2615,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 +2636,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, $iota, $cnty, $cqz, $ituz, $station_id) {
|
||||
|
||||
$data = array(
|
||||
'COL_LOTW_QSLRDATE' => $qsl_date,
|
||||
|
|
@ -2517,6 +2665,7 @@ 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('station_id', $station_id);
|
||||
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
unset($data);
|
||||
|
|
@ -2587,9 +2736,10 @@ class Logbook_model extends CI_Model {
|
|||
* $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');
|
||||
|
|
@ -2928,12 +3078,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 +3206,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,
|
||||
|
|
@ -3771,7 +3930,7 @@ class Logbook_model extends CI_Model {
|
|||
*/
|
||||
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) . '%"';
|
||||
where station_callsign = "' . $station_callsign . '" and station_gridsquare = "' .$my_gridsquare. '"';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,11 +180,17 @@ class Logbookadvanced_model extends CI_Model {
|
|||
$order = $this->getSortorder($sortorder);
|
||||
|
||||
$sql = "
|
||||
SELECT *, 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
|
||||
|
|
@ -211,7 +265,25 @@ 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');
|
||||
}
|
||||
}
|
||||
|
||||
public function updateQslReceived($ids, $user_id, $method, $sent) {
|
||||
$this->load->model('user_model');
|
||||
|
||||
if(!$this->user_model->authorize(2)) {
|
||||
return array('message' => 'Error');
|
||||
} else {
|
||||
$data = array(
|
||||
'COL_QSLRDATE' => date('Y-m-d H:i:s'),
|
||||
'COL_QSL_RCVD' => $sent,
|
||||
'COL_QSL_RCVD_VIA' => $method
|
||||
);
|
||||
$this->db->where_in('COL_PRIMARY_KEY', json_decode($ids, true));
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
|
||||
return array('message' => 'OK');
|
||||
}
|
||||
}
|
||||
|
|
@ -263,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);
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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,8 +50,12 @@
|
|||
<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) { ?>
|
||||
|
|
@ -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">×</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">×</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">×</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>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@
|
|||
</div>
|
||||
<?php } ?>
|
||||
<div class="row">
|
||||
|
||||
<form id="searchForm" name="searchForm" action="<?php echo base_url()."index.php/logbookadvanced/search";?>" method="post">
|
||||
<div class="filterbody collapse">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label class="form-label" for="dateFrom">From</label>
|
||||
|
|
@ -53,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){
|
||||
|
|
@ -143,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>
|
||||
|
|
@ -165,37 +193,116 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-2 col-md-2 col-sm-3 col-xl">
|
||||
<label for="qsoResults"># Results</label>
|
||||
<select id="qsoResults" name="qsoResults" class="form-control form-control-sm">
|
||||
<option value="250">250</option>
|
||||
<option value="1000">1000</option>
|
||||
<option value="2500">2500</option>
|
||||
<option value="5000">5000</option>
|
||||
<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 col-md-3 col-sm-3 col-xl-1">
|
||||
<label> </label><br>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="searchButton">Search</button>
|
||||
<button type="reset" class="btn btn-sm btn-danger" id="resetButton">Reset</button>
|
||||
<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>
|
||||
</form>
|
||||
</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" id="btnUpdateFromCallbook">Update from Callbook</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" id="queueBureau">Queue Bureau</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" id="queueDirect">Queue Direct</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" id="queueElectronic">Queue Electronic</button>
|
||||
<button type="button" class="btn btn-sm btn-success" id="sentBureau">Sent Bureau</button>
|
||||
<button type="button" class="btn btn-sm btn-success" id="sentDirect">Sent Direct</button>
|
||||
<button type="button" class="btn btn-sm btn-success" id="sentElectronic">Sent Electronic</button>
|
||||
<button type="button" class="btn btn-sm btn-warning" id="dontSend">Not Sent</button>
|
||||
<button type="button" class="btn btn-sm btn-warning" id="notRequired">QSL Not Required</button>
|
||||
<button type="button" class="btn btn-sm btn-info" id="exportAdif">Create ADIF</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" 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>
|
||||
<select id="qsoResults" name="qsoResults" class="form-control form-control-sm mr-2">
|
||||
<option value="250">250</option>
|
||||
<option value="1000">1000</option>
|
||||
<option value="2500">2500</option>
|
||||
<option value="5000">5000</option>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-sm btn-primary mr-1" id="searchButton">Search</button>
|
||||
<button type="reset" class="btn btn-sm btn-danger mr-1" id="resetButton">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table style="width:100%" class="table-sm table table-bordered table-hover table-striped table-condensed text-center" id="qsoList">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -228,6 +335,4 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</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>
|
||||
|
|
@ -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); ?>" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
127
assets/js/leaflet/geocoding.js
普通文件
127
assets/js/leaflet/geocoding.js
普通文件
|
|
@ -0,0 +1,127 @@
|
|||
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');
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
};
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
function qsl_rcvd(id, method) {
|
||||
$(".ld-ext-right-r-"+method).addClass('running');
|
||||
$(".ld-ext-right-r-"+method).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qso/qsl_rcvd_ajax',
|
||||
type: 'post',
|
||||
|
|
@ -6,6 +8,8 @@ function qsl_rcvd(id, method) {
|
|||
'method': method
|
||||
},
|
||||
success: function(data) {
|
||||
$(".ld-ext-right-r-"+method).removeClass('running');
|
||||
$(".ld-ext-right-r-"+method).prop('disabled', false);
|
||||
if (data.message == 'OK') {
|
||||
$("#qsl_" + id).find("span:eq(1)").attr('class', 'qsl-green'); // Paints arrow green
|
||||
$(".qsl_rcvd_" + id).remove(); // removes choice from menu
|
||||
|
|
@ -39,6 +43,8 @@ function qsl_sent(id, method) {
|
|||
// Function: qsl_requested
|
||||
// Marks QSL card requested against the QSO.
|
||||
function qsl_requested(id, method) {
|
||||
$(".ld-ext-right-t-"+method).addClass('running');
|
||||
$(".ld-ext-right-t-"+method).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qso/qsl_requested_ajax',
|
||||
type: 'post',
|
||||
|
|
@ -46,6 +52,8 @@ function qsl_requested(id, method) {
|
|||
'method': method
|
||||
},
|
||||
success: function(data) {
|
||||
$(".ld-ext-right-t-"+method).removeClass('running');
|
||||
$(".ld-ext-right-t-"+method).prop('disabled', false);
|
||||
if (data.message == 'OK') {
|
||||
$("#qsl_" + id).find("span:eq(0)").attr('class', 'qsl-yellow'); // Paints arrow yellow
|
||||
}
|
||||
|
|
@ -59,6 +67,8 @@ function qsl_requested(id, method) {
|
|||
// Function: qsl_ignore
|
||||
// Marks QSL card ignore against the QSO.
|
||||
function qsl_ignore(id, method) {
|
||||
$(".ld-ext-right-ignore").addClass('running');
|
||||
$(".ld-ext-right-ignore").prop('disabled', true);
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qso/qsl_ignore_ajax',
|
||||
type: 'post',
|
||||
|
|
@ -66,6 +76,8 @@ function qsl_ignore(id, method) {
|
|||
'method': method
|
||||
},
|
||||
success: function(data) {
|
||||
$(".ld-ext-right-ignore").removeClass('running');
|
||||
$(".ld-ext-right-ignore").prop('disabled', false);
|
||||
if (data.message == 'OK') {
|
||||
$("#qsl_" + id).find("span:eq(0)").attr('class', 'qsl-grey'); // Paints arrow grey
|
||||
}
|
||||
|
|
@ -358,7 +370,7 @@ function validateLocator(locator) {
|
|||
}
|
||||
|
||||
// This displays the dialog with the form and it's where the resulttable is displayed
|
||||
function spawnLookupModal() {
|
||||
function spawnLookupModal(searchphrase, searchtype) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/lookup',
|
||||
type: 'post',
|
||||
|
|
@ -372,38 +384,22 @@ function spawnLookupModal() {
|
|||
onshown: function(dialog) {
|
||||
$('#quicklookuptype').change(function(){
|
||||
var type = $('#quicklookuptype').val();
|
||||
if (type == "dxcc") {
|
||||
$('#quicklookupdxcc').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "iota") {
|
||||
$('#quicklookupiota').show();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "vucc" || type == "sota" || type == "wwff") {
|
||||
$('#quicklookuptext').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
} else if (type == "cq") {
|
||||
$('#quicklookupcqz').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "was") {
|
||||
$('#quicklookupwas').show();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
}
|
||||
changeLookupType(type);
|
||||
});
|
||||
if (searchtype !== undefined) {
|
||||
$('#quicklookuptype').val(searchtype);
|
||||
if (searchtype == 'dxcc') {
|
||||
$("#quicklookupdxcc").val(searchphrase);
|
||||
} else if (searchtype == 'iota') {
|
||||
$("#quicklookupiota").val(searchphrase);
|
||||
} else if (searchtype == 'cq') {
|
||||
$("#quicklookupcqz").val(searchphrase);
|
||||
} else {
|
||||
$("#quicklookuptext").val(searchphrase);
|
||||
}
|
||||
changeLookupType(searchtype);
|
||||
getLookupResult(this.form);
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
label: 'Close',
|
||||
|
|
@ -416,6 +412,40 @@ function spawnLookupModal() {
|
|||
});
|
||||
}
|
||||
|
||||
function changeLookupType(type) {
|
||||
if (type == "dxcc") {
|
||||
$('#quicklookupdxcc').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "iota") {
|
||||
$('#quicklookupiota').show();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "vucc" || type == "sota" || type == "wwff") {
|
||||
$('#quicklookuptext').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
} else if (type == "cq") {
|
||||
$('#quicklookupcqz').show();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookupwas').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
} else if (type == "was") {
|
||||
$('#quicklookupwas').show();
|
||||
$('#quicklookupcqz').hide();
|
||||
$('#quicklookupiota').hide();
|
||||
$('#quicklookupdxcc').hide();
|
||||
$('#quicklookuptext').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// This function executes the call to the backend for fetching queryresult and displays the table in the dialog
|
||||
function getLookupResult() {
|
||||
$(".ld-ext-right").addClass('running');
|
||||
|
|
@ -457,3 +487,31 @@ function getDxccResult(dxcc, name) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function displayQsl(id) {
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qsl/viewQsl',
|
||||
type: 'post',
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
success: function (html) {
|
||||
BootstrapDialog.show({
|
||||
title: 'QSL Card',
|
||||
size: BootstrapDialog.SIZE_WIDE,
|
||||
cssClass: 'lookup-dialog',
|
||||
nl2br: false,
|
||||
message: html,
|
||||
onshown: function(dialog) {
|
||||
|
||||
},
|
||||
buttons: [{
|
||||
label: 'Close',
|
||||
action: function (dialogItself) {
|
||||
dialogItself.close();
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,10 +211,19 @@ $('#start_date').change(function() {
|
|||
$("#callsign").keyup(function () {
|
||||
var call = $(this).val();
|
||||
if (call.length >= 3) {
|
||||
$.get('lookup/scp/' + call.toUpperCase(), function (result) {
|
||||
$('.callsign-suggestions').text(result);
|
||||
highlight(call.toUpperCase());
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: 'lookup/scp',
|
||||
method: 'POST',
|
||||
data: {
|
||||
callsign: $(this).val().toUpperCase()
|
||||
},
|
||||
success: function(result) {
|
||||
$('.callsign-suggestions').text(result);
|
||||
highlight(call.toUpperCase());
|
||||
}
|
||||
});
|
||||
|
||||
checkIfWorkedBefore();
|
||||
var qTable = $('.qsotable').DataTable();
|
||||
qTable.search(call).draw();
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ function gridPlot(form) {
|
|||
sat: $("#sats").val(),
|
||||
},
|
||||
success: function (data) {
|
||||
$('.cohidden').show();
|
||||
$(".ld-ext-right").removeClass('running');
|
||||
$(".ld-ext-right").prop('disabled', false);
|
||||
$('#plot').prop("disabled", false);
|
||||
|
|
@ -89,6 +90,7 @@ function gridPlot(form) {
|
|||
legend.addTo(map);
|
||||
|
||||
var maidenhead = L.maidenhead().addTo(map);
|
||||
map.on('mousemove', onMapMove);
|
||||
},
|
||||
error: function (data) {
|
||||
},
|
||||
|
|
@ -142,4 +144,8 @@ function spawnGridsquareModal(loc_4char) {
|
|||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
gridPlot(this.form);
|
||||
})
|
||||
|
|
|
|||
59
assets/js/sections/hrdlog.js
普通文件
59
assets/js/sections/hrdlog.js
普通文件
|
|
@ -0,0 +1,59 @@
|
|||
$(function () {
|
||||
$('#datetimepicker5').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datetimepicker6').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
});
|
||||
|
||||
function ExportHrd(station_id) {
|
||||
if ($(".alert").length > 0) {
|
||||
$(".alert").remove();
|
||||
}
|
||||
if ($(".errormessages").length > 0) {
|
||||
$(".errormessages").remove();
|
||||
}
|
||||
$(".ld-ext-right").addClass('running');
|
||||
$(".ld-ext-right").prop('disabled', true);
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/hrdlog/upload_station',
|
||||
type: 'post',
|
||||
data: {'station_id': station_id},
|
||||
success: function (data) {
|
||||
$(".ld-ext-right").removeClass('running');
|
||||
$(".ld-ext-right").prop('disabled', false);
|
||||
if (data.status == 'OK') {
|
||||
$.each(data.info, function(index, value){
|
||||
$('#modcount'+value.station_id).html(value.modcount);
|
||||
$('#notcount'+value.station_id).html(value.notcount);
|
||||
$('#totcount'+value.station_id).html(value.totcount);
|
||||
});
|
||||
$(".card-body").append('<div class="alert alert-success" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' + data.infomessage + '</div>');
|
||||
}
|
||||
else {
|
||||
$(".card-body").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' + data.info + '</div>');
|
||||
}
|
||||
|
||||
if (data.errormessages.length > 0) {
|
||||
$(".card-body").append('' +
|
||||
'<div class="errormessages"><p>\n' +
|
||||
' <button class="btn btn-danger" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">\n' +
|
||||
' Show error messages\n' +
|
||||
' </button>\n' +
|
||||
' </p>\n' +
|
||||
' <div class="collapse" id="collapseExample">\n' +
|
||||
' <div class="card card-body"><div class="errors"></div>\n' +
|
||||
' </div>\n' +
|
||||
' </div></div>');
|
||||
$.each(data.errormessages, function(index, value) {
|
||||
$(".errors").append('<li>' + value);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -43,9 +43,9 @@ function updateRow(qso) {
|
|||
cells.eq(c++).html(qso.lotw);
|
||||
}
|
||||
cells.eq(c++).text(qso.qslMessage);
|
||||
cells.eq(c++).text(qso.dxcc);
|
||||
cells.eq(c++).html(qso.dxcc);
|
||||
cells.eq(c++).text(qso.state);
|
||||
cells.eq(c++).text(qso.cqzone);
|
||||
cells.eq(c++).html(qso.cqzone);
|
||||
cells.eq(c++).html(qso.iota);
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
|
@ -73,7 +73,7 @@ function loadQSOTable(rows) {
|
|||
var table = $('#qsoList').DataTable();
|
||||
|
||||
table.clear();
|
||||
|
||||
|
||||
for (i = 0; i < rows.length; i++) {
|
||||
let qso = rows[i];
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ function loadQSOTable(rows) {
|
|||
data.push(qso.state);
|
||||
data.push(qso.cqzone);
|
||||
data.push(qso.iota);
|
||||
|
||||
|
||||
let createdRow = table.row.add(data).index();
|
||||
table.rows(createdRow).nodes().to$().data('qsoID', qso.qsoID);
|
||||
table.row(createdRow).node().id = 'qsoID-' + qso.qsoID;
|
||||
|
|
@ -187,7 +187,16 @@ $(document).ready(function () {
|
|||
gridsquare: this.gridsquare.value,
|
||||
state: this.state.value,
|
||||
qsoresults: this.qsoResults.value,
|
||||
sats: this.sats.value
|
||||
sats: this.sats.value,
|
||||
cqzone: this.cqzone.value,
|
||||
lotwSent: this.lotwSent.value,
|
||||
lotwReceived: this.lotwReceived.value,
|
||||
eqslSent: this.eqslSent.value,
|
||||
eqslReceived: this.eqslReceived.value,
|
||||
qslvia: $('[name="qslviainput"]').val(),
|
||||
sota: this.sota.value,
|
||||
pota: this.pota.value,
|
||||
wwff: this.wwff.value,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
|
@ -348,6 +357,157 @@ $(document).ready(function () {
|
|||
$('#notRequired').click(function (event) {
|
||||
handleQsl('I','', 'notRequired');
|
||||
});
|
||||
$('#receivedBureau').click(function (event) {
|
||||
handleQslReceived('Y','B', 'receivedBureau');
|
||||
});
|
||||
$('#receivedDirect').click(function (event) {
|
||||
handleQslReceived('Y','D', 'receivedDirect');
|
||||
});
|
||||
|
||||
$('#searchGridsquare').click(function (event) {
|
||||
quickSearch('gridsquare');
|
||||
});
|
||||
|
||||
$('#searchState').click(function (event) {
|
||||
quickSearch('state');
|
||||
});
|
||||
|
||||
$('#searchIota').click(function (event) {
|
||||
quickSearch('iota');
|
||||
});
|
||||
|
||||
$('#searchDxcc').click(function (event) {
|
||||
quickSearch('dxcc');
|
||||
});
|
||||
|
||||
$('#searchCallsign').click(function (event) {
|
||||
quickSearch('dx');
|
||||
});
|
||||
|
||||
$('#searchCqZone').click(function (event) {
|
||||
quickSearch('cqzone');
|
||||
});
|
||||
|
||||
$('#searchMode').click(function (event) {
|
||||
quickSearch('mode');
|
||||
});
|
||||
|
||||
$('#searchBand').click(function (event) {
|
||||
quickSearch('band');
|
||||
});
|
||||
|
||||
$('#searchSota').click(function (event) {
|
||||
quickSearch('sota');
|
||||
});
|
||||
|
||||
$('#searchWwff').click(function (event) {
|
||||
quickSearch('wwff');
|
||||
});
|
||||
|
||||
$('#searchPota').click(function (event) {
|
||||
quickSearch('pota');
|
||||
});
|
||||
|
||||
function quickSearch(type) {
|
||||
var elements = $('#qsoList tbody input:checked');
|
||||
var nElements = elements.length;
|
||||
if (nElements == 0) {
|
||||
return;
|
||||
}
|
||||
if (nElements > 1) {
|
||||
BootstrapDialog.alert({
|
||||
title: 'WARNING',
|
||||
message: 'Only 1 row can be selected for Quickfilter!',
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
closable: false,
|
||||
draggable: false,
|
||||
callback: function (result) {
|
||||
}
|
||||
});
|
||||
}
|
||||
var offset = 0;
|
||||
|
||||
if (!$(".eqslconfirmation")[0]){
|
||||
offset--;
|
||||
}
|
||||
if (!$(".lotwconfirmation")[0]){
|
||||
offset--;
|
||||
}
|
||||
elements.each(function() {
|
||||
var currentRow = $(this).first().closest('tr');
|
||||
var col1 = '';
|
||||
switch (type) {
|
||||
case 'dxcc': var tdoffset = (offset + 16); col1 = currentRow.find("td:eq("+tdoffset+")").html(); col1 = col1.match(/\d/g); col1 = col1.join(""); break;
|
||||
case 'cqzone': var tdoffset = (offset + 18); col1 = currentRow.find("td:eq("+tdoffset+")").text(); break;
|
||||
case 'iota': var tdoffset = (offset + 19); col1 = currentRow.find("td:eq("+tdoffset+")").text(); col1 = col1.trim(); break;
|
||||
case 'state': var tdoffset = (offset + 17); col1 = currentRow.find("td:eq("+tdoffset+")").text(); break;
|
||||
case 'dx': col1 = currentRow.find("td:eq(3)").text(); col1 = col1.match(/^([^\s]+)/gm); break;
|
||||
case 'gridsquare': col1 = $(currentRow).find('#dxgrid').text(); col1 = col1.substring(0, 4); break;
|
||||
case 'sota': col1 = $(currentRow).find('#dxsota').text(); break;
|
||||
case 'wwff': col1 = $(currentRow).find('#dxwwff').text(); break;
|
||||
case 'pota': col1 = $(currentRow).find('#dxpota').text(); break;
|
||||
case 'mode': col1 = currentRow.find("td:eq(4)").text(); break;
|
||||
case 'band': col1 = currentRow.find("td:eq(7)").text(); col1 = col1.match(/\S\w*/); break;
|
||||
}
|
||||
if (col1.length == 0) return;
|
||||
$('#searchForm').trigger("reset");
|
||||
$("#"+type).val(col1);
|
||||
$('#searchForm').submit();
|
||||
});
|
||||
}
|
||||
|
||||
$('#printLabel').click(function (event) {
|
||||
var elements = $('#qsoList tbody input:checked');
|
||||
var nElements = elements.length;
|
||||
if (nElements == 0) {
|
||||
return;
|
||||
}
|
||||
$('#printLabel').prop("disabled", true);
|
||||
|
||||
var id_list=[];
|
||||
|
||||
elements.each(function() {
|
||||
let id = $(this).first().closest('tr').data('qsoID')
|
||||
id_list.push(id);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/labels/printids',
|
||||
type: 'post',
|
||||
data: {'id': JSON.stringify(id_list, null, 2) },
|
||||
xhr:function(){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.responseType= 'blob'
|
||||
return xhr;
|
||||
},
|
||||
success: function(data) {
|
||||
if(data){
|
||||
var file = new Blob([data], {type: 'application/pdf'});
|
||||
var fileURL = URL.createObjectURL(file);
|
||||
window.open(fileURL);
|
||||
}
|
||||
$.each(id_list, function(k, v) {
|
||||
unselectQsoID(this);
|
||||
});
|
||||
$('#printLabel').prop("disabled", false);
|
||||
},
|
||||
error: function (data) {
|
||||
BootstrapDialog.alert({
|
||||
title: 'ERROR',
|
||||
message: 'Something went wrong with label print. Go to labels and check if you have defined a label, and that it is set for print!',
|
||||
type: BootstrapDialog.TYPE_DANGER,
|
||||
closable: false,
|
||||
draggable: false,
|
||||
callback: function (result) {
|
||||
}
|
||||
});
|
||||
$.each(id_list, function(k, v) {
|
||||
unselectQsoID(this);
|
||||
});
|
||||
$('#printLabel').prop("disabled", false);
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$('#searchForm').on('reset', function(e) {
|
||||
setTimeout(function() {
|
||||
|
|
@ -386,6 +546,37 @@ $(document).ready(function () {
|
|||
});
|
||||
}
|
||||
|
||||
function handleQslReceived(sent, method, tag) {
|
||||
var elements = $('#qsoList tbody input:checked');
|
||||
var nElements = elements.length;
|
||||
if (nElements == 0) {
|
||||
return;
|
||||
}
|
||||
$('#'+tag).prop("disabled", true);
|
||||
var id_list=[];
|
||||
elements.each(function() {
|
||||
let id = $(this).first().closest('tr').data('qsoID')
|
||||
id_list.push(id);
|
||||
});
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/logbookadvanced/update_qsl_received',
|
||||
type: 'post',
|
||||
data: {'id': JSON.stringify(id_list, null, 2),
|
||||
'sent' : sent,
|
||||
'method' : method
|
||||
},
|
||||
success: function(data) {
|
||||
if (data !== []) {
|
||||
$.each(data, function(k, v) {
|
||||
updateRow(this);
|
||||
unselectQsoID(this.qsoID);
|
||||
});
|
||||
}
|
||||
$('#'+tag).prop("disabled", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#checkBoxAll').change(function (event) {
|
||||
if (this.checked) {
|
||||
$('#qsoList tbody tr').each(function (i) {
|
||||
|
|
|
|||
|
|
@ -774,12 +774,19 @@ $("#callsign").on("keypress", function(e) {
|
|||
// On Key up check and suggest callsigns
|
||||
$("#callsign").keyup(function() {
|
||||
if ($(this).val().length >= 3) {
|
||||
$('.callsign-suggest').show();
|
||||
$.get('lookup/scp/' + $(this).val().toUpperCase(), function(result) {
|
||||
$('.callsign-suggestions').text(result);
|
||||
});
|
||||
$('.callsign-suggest').show();
|
||||
$.ajax({
|
||||
url: 'lookup/scp',
|
||||
method: 'POST',
|
||||
data: {
|
||||
callsign: $(this).val().toUpperCase()
|
||||
},
|
||||
success: function(result) {
|
||||
$('.callsign-suggestions').text(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Reset QSO form Fields function
|
||||
function resetDefaultQSOFields() {
|
||||
|
|
|
|||
|
|
@ -7,14 +7,16 @@ RUN touch /usr/local/etc/php/conf.d/uploads.ini \
|
|||
&& echo "max_execution_time = 60" >> /usr/local/etc/php/conf.d/uploads.ini
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y git curl libxml2-dev libonig-dev
|
||||
RUN docker-php-ext-install mysqli
|
||||
RUN docker-php-ext-install mysqli mbstring xml
|
||||
#RUN docker-php-ext-install curl
|
||||
RUN docker-php-ext-install mbstring
|
||||
RUN docker-php-ext-install xml
|
||||
#RUN docker-php-ext-install openssl
|
||||
WORKDIR /var/www/html
|
||||
RUN rm -rf /var/www/html/docker/
|
||||
COPY ./ /var/www/html/
|
||||
RUN ls && rm -rf /var/www/html/docker/ \
|
||||
WORKDIR /var/www/html
|
||||
RUN cd /var/www/html \
|
||||
&& echo "Setting root as owner of the folder..." \
|
||||
&& chown -R root:root /var/www/html \
|
||||
&& echo "Setting permissions to the install folder" \
|
||||
&& chown -R root:www-data ./application/config/ \
|
||||
&& chown -R root:www-data ./application/logs/ \
|
||||
&& chown -R root:www-data ./assets/qslcard/ \
|
||||
|
|
@ -30,4 +32,7 @@ RUN ls && rm -rf /var/www/html/docker/ \
|
|||
&& chmod -R g+rw ./updates/ \
|
||||
&& chmod -R g+rw ./uploads/ \
|
||||
&& chmod -R g+rw ./images/eqsl_card_images/ \
|
||||
&& chmod -R g+rw ./assets/json/
|
||||
&& chmod -R g+rw ./assets/json/ \
|
||||
&& chmod 777 /var/www/html/install \
|
||||
&& echo "Make sure everything is fine" \
|
||||
&& dir -ls
|
||||
|
|
|
|||
|
|
@ -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.4";
|
||||
$config['directory'] = "%directory%";
|
||||
$config['callbook'] = "hamqth"; // Options are hamqth or qrz
|
||||
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ if($_POST) {
|
|||
|
||||
<fieldset>
|
||||
<legend>Configuration Settings</legend>
|
||||
<label for="directory">Directory</label><input type="text" id="directory" value="<?php echo str_replace("/install/", "", $_SERVER['REQUEST_URI']); ?>" class="input_text" name="directory" />
|
||||
<label for="websiteurl">Website URL</label><input type="text" id="websiteurl" value="<?php echo $_SERVER['REQUEST_SCHEME']; ?>://<?php echo $_SERVER['HTTP_HOST'].str_replace("/install/", "", $_SERVER['REQUEST_URI']); ?>" class="input_text" name="websiteurl" />
|
||||
<label for="directory">Directory</label><input type="text" id="directory" value="<?php echo str_replace("index.php", "", str_replace("/install/", "", $_SERVER['REQUEST_URI'])); ?>" class="input_text" name="directory" />
|
||||
<label for="websiteurl">Website URL</label><input type="text" id="websiteurl" value="<?php echo $_SERVER['REQUEST_SCHEME']; ?>://<?php echo str_replace("index.php", "", $_SERVER['HTTP_HOST'].str_replace("/install/", "", $_SERVER['REQUEST_URI'])); ?>" class="input_text" name="websiteurl" />
|
||||
<label for="locator">Default Gridsquare</label><input type="text" id="locator" value="IO91JS" class="input_text" name="locator" />
|
||||
</fieldset>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class QSO
|
|||
private string $dx;
|
||||
private string $mode;
|
||||
private string $submode;
|
||||
private string $band;
|
||||
private ?string $band;
|
||||
private string $bandRX;
|
||||
private string $rstR;
|
||||
private string $rstS;
|
||||
|
|
@ -45,6 +45,8 @@ class QSO
|
|||
private string $dxSigInfo;
|
||||
private string $dxDARCDOK;
|
||||
private string $dxSOTAReference;
|
||||
private string $dxPOTAReference;
|
||||
private string $dxWWFFReference;
|
||||
/** @var string[] */
|
||||
private string $dxVUCCGridsquares;
|
||||
private string $QSLMsg;
|
||||
|
|
@ -107,6 +109,8 @@ class QSO
|
|||
'COL_MY_SOTA_REF',
|
||||
'COL_MY_VUCC_GRIDS',
|
||||
'COL_SOTA_REF',
|
||||
'COL_POTA_REF',
|
||||
'COL_WWFF_REF',
|
||||
'COL_SUBMODE',
|
||||
'COL_VUCC_GRIDS',
|
||||
'COL_CQZ',
|
||||
|
|
@ -125,7 +129,7 @@ class QSO
|
|||
|
||||
$this->qsoID = $data['COL_PRIMARY_KEY'];
|
||||
|
||||
$CI =& get_instance();
|
||||
$CI =& get_instance();
|
||||
// Get Date format
|
||||
if($CI->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
|
|
@ -134,7 +138,7 @@ class QSO
|
|||
// Get Default date format from /config/cloudlog.php
|
||||
$custom_date_format = $CI->config->item('qso_date_format');
|
||||
}
|
||||
$this->qsoDateTime = date($custom_date_format . " H:i", strtotime($data['COL_TIME_ON']));
|
||||
$this->qsoDateTime = date($custom_date_format . " H:i", strtotime($data['COL_TIME_ON']));
|
||||
|
||||
$this->de = $data['COL_STATION_CALLSIGN'];
|
||||
$this->dx = $data['COL_CALL'];
|
||||
|
|
@ -171,6 +175,8 @@ class QSO
|
|||
$this->dxDARCDOK = $data['COL_DARC_DOK'] ?? '';
|
||||
|
||||
$this->dxSOTAReference = $data['COL_SOTA_REF'] ?? '';
|
||||
$this->dxPOTAReference = $data['COL_POTA_REF'] ?? '';
|
||||
$this->dxWWFFReference = $data['COL_WWFF_REF'] ?? '';
|
||||
|
||||
$this->dxVUCCGridsquares = $data['COL_VUCC_GRIDS'] ?? '';
|
||||
|
||||
|
|
@ -183,14 +189,14 @@ class QSO
|
|||
$this->QSLSent = ($data['COL_QSL_SENT'] === null) ? '' : $data['COL_QSL_SENT'];
|
||||
$this->QSLSentVia = ($data['COL_QSL_SENT_VIA'] === null) ? '' : $data['COL_QSL_SENT_VIA'];
|
||||
$this->QSLVia = ($data['COL_QSL_VIA'] === null) ? '' : $data['COL_QSL_VIA'];
|
||||
|
||||
|
||||
$this->qsl = $this->getQslString($data, $custom_date_format);
|
||||
$this->lotw = $this->getLotwString($data, $custom_date_format);
|
||||
$this->eqsl = $this->getEqslString($data, $custom_date_format);
|
||||
|
||||
$this->cqzone = ($data['COL_CQZ'] === null) ? '' : $data['COL_CQZ'];
|
||||
|
||||
$this->cqzone = ($data['COL_CQZ'] === null) ? '' : '<a href="javascript:spawnLookupModal('.$data['COL_CQZ'].',\'cq\');">'.$data['COL_CQZ'].'</a>';
|
||||
$this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE'];
|
||||
$this->dxcc = ($data['name'] === null) ? '- NONE -' : ucwords(strtolower($data['name']), "- (/");
|
||||
$this->dxcc = ($data['name'] === null) ? '- NONE -' : '<a href="javascript:spawnLookupModal('.$data['COL_DXCC'].',\'dxcc\');">'.ucwords(strtolower($data['name']), "- (/").'</a>';
|
||||
$this->iota = ($data['COL_IOTA'] === null) ? '' : $this->getIotaLink($data['COL_IOTA']);
|
||||
if (array_key_exists('end', $data)) {
|
||||
$this->end = ($data['end'] === null) ? null : DateTime::createFromFormat("Y-m-d", $data['end'], new DateTimeZone('UTC'));
|
||||
|
|
@ -227,7 +233,7 @@ class QSO
|
|||
*/
|
||||
function getQSLString($data, $custom_date_format): string
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI =& get_instance();
|
||||
|
||||
$qslstring = '<span ';
|
||||
|
||||
|
|
@ -250,11 +256,11 @@ class QSO
|
|||
break;
|
||||
}
|
||||
if ($data['COL_QSLSDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_QSLSDATE']);
|
||||
$qslstring .= " " .($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
$timestamp = strtotime($data['COL_QSLSDATE']);
|
||||
$qslstring .= " " .($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
} else {
|
||||
$qslstring .= "class=\"qsl-red";
|
||||
} else {
|
||||
$qslstring .= "class=\"qsl-red";
|
||||
}
|
||||
|
||||
if ($data['COL_QSL_SENT_VIA'] != "") {
|
||||
|
|
@ -272,7 +278,7 @@ class QSO
|
|||
$qslstring .= " (".$CI->lang->line('general_word_qslcard_electronic').")";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$qslstring .= '">▲</span><span ';
|
||||
|
||||
|
|
@ -295,10 +301,10 @@ class QSO
|
|||
break;
|
||||
}
|
||||
if ($data['COL_QSLRDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_QSLRDATE']);
|
||||
$qslstring .= " " .($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
$timestamp = strtotime($data['COL_QSLRDATE']);
|
||||
$qslstring .= " " .($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
$qslstring .= "class=\"qsl-red"; }
|
||||
if ($data['COL_QSL_RCVD_VIA'] != "") {
|
||||
switch ($data['COL_QSL_RCVD_VIA']) {
|
||||
|
|
@ -315,42 +321,45 @@ class QSO
|
|||
$qslstring .= " (".$CI->lang->line('general_word_qslcard_electronic').")";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$qslstring .= '">▼</span>';
|
||||
if ($data['qslcount'] != null) {
|
||||
$qslstring .= ' <a href="javascript:displayQsl('.$data['COL_PRIMARY_KEY'].');"><i class="fa fa-id-card"></i></a>';
|
||||
}
|
||||
return $qslstring;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
function getLotwString($data, $custom_date_format): string
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI =& get_instance();
|
||||
|
||||
$lotwstring = '<span ';
|
||||
|
||||
if ($data['COL_LOTW_QSL_SENT'] == "Y") {
|
||||
$lotwstring .= "data-original-title=\"" . $CI->lang->line('lotw_short')." ".$CI->lang->line('general_word_sent');
|
||||
if ($data['COL_LOTW_QSLSDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_LOTW_QSLSDATE']);
|
||||
$lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
$lotwstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
if ($data['COL_LOTW_QSL_SENT'] == "Y") {
|
||||
$lotwstring .= "data-original-title=\"" . $CI->lang->line('lotw_short')." ".$CI->lang->line('general_word_sent');
|
||||
if ($data['COL_LOTW_QSLSDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_LOTW_QSLSDATE']);
|
||||
$lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
$lotwstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$lotwstring .= ' class="lotw-' . (($data['COL_LOTW_QSL_SENT']=='Y') ? 'green' : 'red') . '">▲</span>';
|
||||
$lotwstring .= '<span ';
|
||||
|
||||
if ($data['COL_LOTW_QSL_RCVD'] == "Y") {
|
||||
$lotwstring .= "data-original-title=\"". $CI->lang->line('lotw_short') ." ". $CI->lang->line('general_word_received');
|
||||
|
||||
if ($data['COL_LOTW_QSLRDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_LOTW_QSLRDATE']);
|
||||
$lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
|
||||
$lotwstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
if ($data['COL_LOTW_QSL_RCVD'] == "Y") {
|
||||
$lotwstring .= "data-original-title=\"". $CI->lang->line('lotw_short') ." ". $CI->lang->line('general_word_received');
|
||||
|
||||
if ($data['COL_LOTW_QSLRDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_LOTW_QSLRDATE']);
|
||||
$lotwstring .= " ". ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
|
||||
}
|
||||
|
||||
$lotwstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$lotwstring .= ' class="lotw-' . (($data['COL_LOTW_QSL_RCVD']=='Y') ? 'green':'red') . '">▼</span>';
|
||||
|
||||
|
|
@ -362,32 +371,32 @@ class QSO
|
|||
*/
|
||||
function getEqslString($data, $custom_date_format): string
|
||||
{
|
||||
$CI =& get_instance();
|
||||
$CI =& get_instance();
|
||||
|
||||
$eqslstring = '<span ';
|
||||
|
||||
if ($data['COL_EQSL_QSL_SENT'] == "Y") {
|
||||
$eqslstring .= "data-original-title=\"".$CI->lang->line('eqsl_short')." ".$CI->lang->line('general_word_sent');
|
||||
|
||||
if ($data['COL_EQSL_QSLSDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_EQSL_QSLSDATE']);
|
||||
$eqslstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
|
||||
$eqslstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
if ($data['COL_EQSL_QSL_SENT'] == "Y") {
|
||||
$eqslstring .= "data-original-title=\"".$CI->lang->line('eqsl_short')." ".$CI->lang->line('general_word_sent');
|
||||
|
||||
if ($data['COL_EQSL_QSLSDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_EQSL_QSLSDATE']);
|
||||
$eqslstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
|
||||
$eqslstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$eqslstring .= ' class="eqsl-' . (($data['COL_EQSL_QSL_SENT'] =='Y') ? 'green':'red') . '">▲</span><span ';
|
||||
|
||||
if ($data['COL_EQSL_QSL_RCVD'] == "Y") {
|
||||
$eqslstring .= "data-original-title=\"".$CI->lang->line('eqsl_short')." ".$CI->lang->line('general_word_received');
|
||||
|
||||
if ($data['COL_EQSL_QSLRDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_EQSL_QSLRDATE']);
|
||||
$eqslstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
$eqslstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
if ($data['COL_EQSL_QSL_RCVD'] == "Y") {
|
||||
$eqslstring .= "data-original-title=\"".$CI->lang->line('eqsl_short')." ".$CI->lang->line('general_word_received');
|
||||
|
||||
if ($data['COL_EQSL_QSLRDATE'] != null) {
|
||||
$timestamp = strtotime($data['COL_EQSL_QSLRDATE']);
|
||||
$eqslstring .= " ".($timestamp!=''?date($custom_date_format, $timestamp):'');
|
||||
}
|
||||
$eqslstring .= "\" data-toggle=\"tooltip\"";
|
||||
}
|
||||
|
||||
$eqslstring .= ' class="eqsl-' . (($data['COL_EQSL_QSL_RCVD'] =='Y')?'green':'red') . '">';
|
||||
|
||||
|
|
@ -634,6 +643,22 @@ class QSO
|
|||
return $this->dxSOTAReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDxPOTAReference(): string
|
||||
{
|
||||
return $this->dxPOTAReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getWWFFReference(): string
|
||||
{
|
||||
return $this->dxWWFFReference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
|
|
@ -838,12 +863,18 @@ class QSO
|
|||
{
|
||||
$refs = [];
|
||||
if ($this->dxVUCCGridsquares !== '') {
|
||||
$refs[] = $this->dxVUCCGridsquares . ' ' .$this->getQrbLink($this->stationGridsquare, $this->dxVUCCGridsquares, $this->dxGridsquare);
|
||||
$refs[] = '<span id="dxgrid">' . $this->dxVUCCGridsquares . '</span> ' .$this->getQrbLink($this->stationGridsquare, $this->dxVUCCGridsquares, $this->dxGridsquare);
|
||||
} else if ($this->dxGridsquare !== '') {
|
||||
$refs[] = $this->dxGridsquare . ' ' .$this->getQrbLink($this->stationGridsquare, $this->dxVUCCGridsquares, $this->dxGridsquare);
|
||||
$refs[] = '<span id="dxgrid">' . $this->dxGridsquare . '</span> ' .$this->getQrbLink($this->stationGridsquare, $this->dxVUCCGridsquares, $this->dxGridsquare);
|
||||
}
|
||||
if ($this->dxSOTAReference !== '') {
|
||||
$refs[] = "SOTA:" . $this->dxSOTAReference;
|
||||
$refs[] = "SOTA: " . '<span id="dxsota">' . $this->dxSOTAReference. '</span>';
|
||||
}
|
||||
if ($this->dxPOTAReference !== '') {
|
||||
$refs[] = "POTA: " . '<span id="dxpota">' . $this->dxPOTAReference. '</span>';
|
||||
}
|
||||
if ($this->dxWWFFReference !== '') {
|
||||
$refs[] = "WWFF: " . '<span id="dxwwff">' . $this->dxWWFFReference. '</span>';
|
||||
}
|
||||
if ($this->dxSig !== '') {
|
||||
$refs[] = $this->dxSig . ":" . $this->dxSigInfo;
|
||||
|
|
@ -961,7 +992,7 @@ class QSO
|
|||
private function getIotaLink($iota) : string
|
||||
{
|
||||
if ($iota !== '') {
|
||||
return '<a href="https://www.iota-world.org/iotamaps/?grpref=' .$iota . '" target="_blank">' . $iota . '</a>';
|
||||
return '<a href="javascript:spawnLookupModal(\''.$iota.'\',\'iota\');">'.$iota.'</a> <a href="https://www.iota-world.org/iotamaps/?grpref=' .$iota . '" target="_blank"><i class="fas fa-globe"></i></a>';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用