这个提交包含在:
Peter Goodhall 2023-04-03 16:47:27 +01:00
当前提交 a12af00e52
共有 6 个文件被更改,包括 38 次插入16 次删除

查看文件

@ -9,7 +9,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Folder location for storing P12 certficiate files on the system
| Folder location for storing P12 certificate files on the system
|--------------------------------------------------------------------------
|
| This folder must be outside of your www root for security reasons

查看文件

@ -153,23 +153,23 @@ class Lotw extends CI_Controller {
}
// Check to see if certificate is already in the system
$new_certficiate = $this->LotwCert->find_cert($info['issued_callsign'], $dxcc, $this->session->userdata('user_id'));
$new_certificate = $this->LotwCert->find_cert($info['issued_callsign'], $dxcc, $this->session->userdata('user_id'));
if($new_certficiate == 0) {
if($new_certificate == 0) {
// New Certificate Store in Database
// Store Certificate Data into MySQL
$this->LotwCert->store_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $dxcc, $info['validFrom'], $info['validTo_Date'], $info['qso-first-date'], $info['qso-end-date'], $info['pem_key'], $info['general_cert']);
// Cert success flash message
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certficiate Imported.');
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certificate Imported.');
} else {
// Certficiate is in the system time to update
// Certificate is in the system time to update
$this->LotwCert->update_certficiate($this->session->userdata('user_id'), $info['issued_callsign'], $dxcc, $info['validFrom'], $info['validTo_Date'], $info['pem_key'], $info['general_cert']);
$this->LotwCert->update_certificate($this->session->userdata('user_id'), $info['issued_callsign'], $dxcc, $info['validFrom'], $info['validTo_Date'], $info['pem_key'], $info['general_cert']);
// Cert success flash message
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certficiate Updated.');
$this->session->set_flashdata('Success', $info['issued_callsign'].' Certificate Updated.');
}
@ -378,9 +378,9 @@ class Lotw extends CI_Controller {
$this->load->model('LotwCert');
$this->LotwCert->delete_certficiate($this->session->userdata('user_id'), $cert_id);
$this->LotwCert->delete_certificate($this->session->userdata('user_id'), $cert_id);
$this->session->set_flashdata('Success', 'Certficiate Deleted.');
$this->session->set_flashdata('Success', 'Certificate Deleted.');
redirect('/lotw/');
}

查看文件

@ -52,7 +52,7 @@ class LotwCert extends CI_Model {
$this->db->insert('lotw_certs', $data);
}
function update_certficiate($user_id, $callsign, $dxcc, $date_created, $date_expires, $cert_key, $general_cert) {
function update_certificate($user_id, $callsign, $dxcc, $date_created, $date_expires, $cert_key, $general_cert) {
$data = array(
'cert_dxcc' => $dxcc,
'date_created' => $date_created,
@ -67,7 +67,7 @@ class LotwCert extends CI_Model {
$this->db->update('lotw_certs', $data);
}
function delete_certficiate($user_id, $lotw_cert_id) {
function delete_certificate($user_id, $lotw_cert_id) {
$this->db->where('lotw_cert_id', $lotw_cert_id);
$this->db->where('user_id', $user_id);
$this->db->delete('lotw_certs');

查看文件

@ -544,13 +544,29 @@ document.onkeyup = function(e) {
function newpath(latlng1, latlng2, locator1, locator2) {
// If map is already initialized
var container = L.DomUtil.get('mapqrb');
var container = L.DomUtil.get('mapqrbcontainer');
if(container != null){
container._leaflet_id = null;
container.remove();
$("#mapqrb").append('<div id="mapqrbcontainer" style="Height: 500px"></div>');
}
var map = new L.Map('mapqrbcontainer', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
},
}).setView([30, 0], 1.5);
// Need to fix so that marker is placed at same place as end of line, but this only needs to be done when longitude is < -170
if (latlng2[1] < -170) {
latlng2[1] = parseFloat(latlng2[1])+360;
}
if (latlng1[1] < -170) {
latlng1[1] = parseFloat(latlng1[1])+360;
}
const map = new L.map('mapqrb').setView([30, 0], 1.5);
map.fitBounds([
[latlng1[0], latlng1[1]],
[latlng2[0], latlng2[1]]
@ -570,6 +586,7 @@ function newpath(latlng1, latlng2, locator1, locator2) {
map.addLayer(osm);
var marker = L.marker([latlng1[0], latlng1[1]], {closeOnClick: false, autoClose: false}).addTo(map).bindPopup(locator1);
var marker2 = L.marker([latlng2[0], latlng2[1]], {closeOnClick: false, autoClose: false}).addTo(map).bindPopup(locator2);
const multiplelines = [];

查看文件

@ -22,4 +22,4 @@
</div>
</form>
<div class="qrbResult"></div>
<div id="mapqrb" style="Height: 500px"></div>
<div id="mapqrb"><div id="mapqrbcontainer" style="Height: 500px"></div></div>

查看文件

@ -95,8 +95,13 @@ document.onkeyup = function (e) {
// CTRL-Enter logs QSO
} else if ((e.keyCode == 10 || e.keyCode == 13) && (e.ctrlKey || e.metaKey)) {
logQso();
// Enter in sent exchange logs QSO
} else if ((e.which == 13) && ($(document.activeElement).attr("id") == "exch_rcvd")) {
// Enter in received exchange logs QSO
} else if ((e.which == 13) && (
($(document.activeElement).attr("id") == "exch_rcvd")
|| ($(document.activeElement).attr("id") == "exch_gridsquare_r")
|| ($(document.activeElement).attr("id") == "exch_serial_r")
)
) {
logQso();
} else if (e.which == 27) {
reset_log_fields();