Merge branch 'dev' of https://github.com/magicbug/Cloudlog into dev
这个提交包含在:
当前提交
76470fd970
共有 45 个文件被更改,包括 556 次插入 和 124 次删除
37
.github/workflows/push-docker-hub.yml
vendored
普通文件
37
.github/workflows/push-docker-hub.yml
vendored
普通文件
|
|
@ -0,0 +1,37 @@
|
|||
name: Push Docker image to the Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
# Pattern matched against refs/tags
|
||||
tags:
|
||||
- '*' # Push events to every tag not containing
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions-ecosystem/action-get-latest-tag@v1
|
||||
id: get-latest-tag
|
||||
- name: Print latest tag
|
||||
run: echo ${{ steps.get-latest-tag.outputs.tag }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_IMAGENAME }}:${{ steps.get-latest-tag.outputs.tag }},${{ secrets.DOCKERHUB_IMAGENAME }}:latest
|
||||
|
|
@ -8,17 +8,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'app_name' Name of the App 'Cloudlog'
|
||||
| 'app_version' Set by the dev team.
|
||||
| 'app_version' Set by the dev team.
|
||||
| 'directory' directory where cloudlog is installed eg "logger"
|
||||
| 'callbook' Selects which Callbook lookup to use defaults "hamqth" but supports "qrz"
|
||||
*/
|
||||
|
||||
$config['app_name'] = "Cloudlog";
|
||||
$config['app_version'] = "2.4.2";
|
||||
$config['app_version'] = "2.4.3";
|
||||
$config['directory'] = "logbook";
|
||||
|
||||
$config['callbook'] = "hamqth"; // Options are hamqth or qrz
|
||||
|
||||
$config['datadir'] = null; // default to install directory
|
||||
|
||||
/*
|
||||
|
|
@ -27,8 +25,8 @@ $config['datadir'] = null; // default to install directory
|
|||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| 'table_name' SQL table where log can be found
|
||||
| 'locator' Default locator used to calculate bearings/distance
|
||||
| 'display_freq' Show or Hide frequnecy info
|
||||
| 'locator' Default locator used to calculate bearings/distance
|
||||
| 'display_freq' Show or Hide frequnecy info
|
||||
*/
|
||||
|
||||
$config['table_name'] = "TABLE_HRD_CONTACTS_V01";
|
||||
|
|
@ -42,11 +40,12 @@ $config['display_freq'] = true;
|
|||
|
|
||||
| 'qrz_username' QRZ.com user login
|
||||
| 'qrz_password' QRZ.com user password
|
||||
| 'use_fullname' Get full names from QRZ, may not be GDPR compliant
|
||||
*/
|
||||
|
||||
$config['qrz_username'] = "";
|
||||
$config['qrz_password'] = "";
|
||||
|
||||
$config['use_fullname'] = false;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -59,7 +58,6 @@ $config['qrz_password'] = "";
|
|||
$config['hamqth_username'] = "";
|
||||
$config['hamqth_password'] = "";
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication
|
||||
|
|
@ -67,7 +65,7 @@ $config['hamqth_password'] = "";
|
|||
|
|
||||
| 'use_auth' False turns all authentication off, best used when setting up
|
||||
| 'auth_table' MySQL Database Table defaults "users"
|
||||
| 'auth_mode' Minimum user level required 0 = anonymous, 1 = viewer,
|
||||
| 'auth_mode' Minimum user level required 0 = anonymous, 1 = viewer,
|
||||
| 2 = editor, 3 = api user, 99 = owner
|
||||
| 'auth_level[]' Defines level titles
|
||||
*/
|
||||
|
|
@ -568,6 +566,7 @@ $config['compress_output'] = FALSE;
|
|||
*/
|
||||
$config['time_reference'] = 'UTC';
|
||||
date_default_timezone_set($config['time_reference']);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Rewrite PHP Short Tags
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE;
|
|||
| be upgraded / downgraded to.
|
||||
|
|
||||
*/
|
||||
$config['migration_version'] = 122;
|
||||
$config['migration_version'] = 123;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -114,6 +114,13 @@ class Dashboard extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
function radio_display_component() {
|
||||
$this->load->model('cat');
|
||||
|
||||
$data['radio_status'] = $this->cat->recent_status();
|
||||
$this->load->view('components/radio_display_table', $data);
|
||||
}
|
||||
|
||||
function map() {
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class eqsl extends CI_Controller {
|
|||
public function index() {
|
||||
|
||||
$this->lang->load('qslcard');
|
||||
$folder_name = "assets/qslcard";
|
||||
$folder_name = "images/eqsl_card_images";
|
||||
$data['storage_used'] = $this->sizeFormat($this->folderSize($folder_name));
|
||||
|
||||
// Render Page
|
||||
|
|
|
|||
|
|
@ -814,6 +814,42 @@ class Logbook extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
function search_lotw_unconfirmed($station_id) {
|
||||
$station_id = $this->security->xss_clean($station_id);
|
||||
|
||||
$this->load->model('user_model');
|
||||
|
||||
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
|
||||
|
||||
$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;
|
||||
}
|
||||
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
|
||||
$sql = 'select COL_CALL, COL_MODE, COL_SUBMODE, station_callsign, COL_SAT_NAME, COL_BAND, COL_TIME_ON, lotw_users.lastupload from ' . $this->config->item('table_name') .
|
||||
' join station_profile on ' . $this->config->item('table_name') . '.station_id = station_profile.station_id
|
||||
join lotw_users on ' . $this->config->item('table_name') . '.col_call = lotw_users.callsign
|
||||
where ' . $this->config->item('table_name') .'.station_id in ('. $location_list . ')';
|
||||
|
||||
if ($station_id != 'All') {
|
||||
$sql .= ' and station_profile.station_id = ' . $station_id;
|
||||
}
|
||||
|
||||
$sql .= " and COL_LOTW_QSL_RCVD <> 'Y' and " . $this->config->item('table_name') . ".COL_TIME_ON < lotw_users.lastupload";
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
$data['qsos'] = $query;
|
||||
|
||||
$this->load->view('search/lotw_unconfirmed_result.php', $data);
|
||||
|
||||
}
|
||||
|
||||
function search_incorrect_cq_zones($station_id) {
|
||||
$station_id = $this->security->xss_clean($station_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,11 +49,35 @@ class Logbookadvanced extends CI_Controller {
|
|||
$pageData['sats'] = $this->bands->get_worked_sats();
|
||||
|
||||
$pageData['bands'] = $this->bands->get_worked_bands();
|
||||
|
||||
|
||||
$CI =& get_instance();
|
||||
// Get Date format
|
||||
if($CI->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
$pageData['custom_date_format'] = $CI->session->userdata('user_date_format');
|
||||
} else {
|
||||
// Get Default date format from /config/cloudlog.php
|
||||
$pageData['custom_date_format'] = $CI->config->item('qso_date_format');
|
||||
}
|
||||
|
||||
switch ($pageData['custom_date_format']) {
|
||||
case "d/m/y": $pageData['custom_date_format'] = 'DD/MM/YY'; break;
|
||||
case "d/m/Y": $pageData['custom_date_format'] = 'DD/MM/YYYY'; break;
|
||||
case "m/d/y": $pageData['custom_date_format'] = 'MM/DD/YY'; break;
|
||||
case "m/d/Y": $pageData['custom_date_format'] = 'MM/DD/YYYY'; break;
|
||||
case "d.m.Y": $pageData['custom_date_format'] = 'DD.MM.YYYY'; break;
|
||||
case "y/m/d": $pageData['custom_date_format'] = 'YY/MM/DD'; break;
|
||||
case "Y-m-d": $pageData['custom_date_format'] = 'YYYY-MM-DD'; break;
|
||||
case "M d, Y": $pageData['custom_date_format'] = 'MMM DD, YYYY'; break;
|
||||
case "M d, y": $pageData['custom_date_format'] = 'MMM DD, YY'; break;
|
||||
default: $pageData['custom_date_format'] = 'DD/MM/YYYY';
|
||||
}
|
||||
|
||||
$footerData = [];
|
||||
$footerData['scripts'] = [
|
||||
'assets/js/moment.min.js',
|
||||
'assets/js/tempusdominus-bootstrap-4.min.js',
|
||||
'assets/js/datetime-moment.js',
|
||||
'assets/js/sections/logbookadvanced.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/logbookadvanced.js"))
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -538,7 +538,19 @@ class Lotw extends CI_Controller {
|
|||
$cnty = "";
|
||||
}
|
||||
|
||||
$lotw_status = $this->logbook_model->lotw_update($time_on, $record['call'], $record['band'], $qsl_date, $record['qsl_rcvd'], $state, $qsl_gridsquare, $iota, $cnty);
|
||||
if (isset($record['cqz'])) {
|
||||
$cqz = $record['cqz'];
|
||||
} else {
|
||||
$cqz = "";
|
||||
}
|
||||
|
||||
if (isset($record['ituz'])) {
|
||||
$ituz = $record['ituz'];
|
||||
} else {
|
||||
$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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,18 @@ class Search extends CI_Controller {
|
|||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
// Searches for unconfirmed Lotw QSOs where QSO partner has uploaded to LoTW after the QSO date
|
||||
public function lotw_unconfirmed() {
|
||||
$this->load->model('stations');
|
||||
|
||||
$data['station_profile'] = $this->stations->all_of_user();
|
||||
$data['page_title'] = "QSOs unconfirmed on LoTW, but the callsign has uploaded to LoTW after QSO date";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('search/lotw_unconfirmed');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
function json_result() {
|
||||
if(isset($_POST['search'])) {
|
||||
$result = $this->fetchQueryResult($_POST['search'], false);
|
||||
|
|
|
|||
|
|
@ -287,9 +287,6 @@ class Update extends CI_Controller {
|
|||
}
|
||||
|
||||
public function download_lotw_users() {
|
||||
|
||||
|
||||
|
||||
$contents = file_get_contents('https://lotw.arrl.org/lotw-user-activity.csv', true);
|
||||
|
||||
if($contents === FALSE) {
|
||||
|
|
@ -306,6 +303,47 @@ class Update extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
public function lotw_users() {
|
||||
$mtime = microtime();
|
||||
$mtime = explode(" ",$mtime);
|
||||
$mtime = $mtime[1] + $mtime[0];
|
||||
$starttime = $mtime;
|
||||
|
||||
$file = 'https://lotw.arrl.org/lotw-user-activity.csv';
|
||||
|
||||
$handle = fopen($file, "r");
|
||||
if ($handle === FALSE) {
|
||||
echo "Something went wrong with fetching the LoTW uses file";
|
||||
return;
|
||||
}
|
||||
$this->db->empty_table("lotw_users");
|
||||
$i = 0;
|
||||
$data = fgetcsv($handle,1000,",");
|
||||
do {
|
||||
if ($data[0]) {
|
||||
$lotwdata[$i]['callsign'] = $data[0];
|
||||
$lotwdata[$i]['lastupload'] = $data[1] . ' ' . $data[2];
|
||||
if (($i % 2000) == 0) {
|
||||
$this->db->insert_batch('lotw_users', $lotwdata);
|
||||
unset($lotwdata);
|
||||
// echo 'Record ' . $i . '<br />';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} while ($data = fgetcsv($handle,1000,","));
|
||||
fclose($handle);
|
||||
|
||||
$this->db->insert_batch('lotw_users', $lotwdata);
|
||||
|
||||
$mtime = microtime();
|
||||
$mtime = explode(" ",$mtime);
|
||||
$mtime = $mtime[1] + $mtime[0];
|
||||
$endtime = $mtime;
|
||||
$totaltime = ($endtime - $starttime);
|
||||
echo "This page was created in ".$totaltime." seconds <br />";
|
||||
echo "Records inserted: " . $i . " <br/>";
|
||||
}
|
||||
|
||||
public function lotw_check() {
|
||||
$f = fopen('./updates/lotw_users.csv', "r");
|
||||
$result = false;
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Logbooks extends CI_Controller {
|
||||
|
||||
/* Controls ADIF Import/Export Functions */
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
echo 'Functions to come';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,9 +11,12 @@ class Visitor extends CI_Controller {
|
|||
if($method == "config") {
|
||||
$this->$method();
|
||||
}
|
||||
elseif($method == "map") {
|
||||
elseif($method == "map") {
|
||||
$this->map($method);
|
||||
}
|
||||
elseif($method == "radio_display_component") {
|
||||
$this->radio_display_component($method);
|
||||
}
|
||||
elseif($method == "satellites") {
|
||||
$this->satellites($method);
|
||||
}
|
||||
|
|
@ -126,6 +129,13 @@ class Visitor extends CI_Controller {
|
|||
}
|
||||
}
|
||||
|
||||
public function radio_display_component() {
|
||||
$this->load->model('cat');
|
||||
|
||||
$data['radio_status'] = $this->cat->recent_status();
|
||||
$this->load->view('components/radio_display_table', $data);
|
||||
}
|
||||
|
||||
public function map() {
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
|
|||
|
|
@ -57,3 +57,6 @@ $lang['lotw_confirmed'] = 'This QSO is confirmed on LoTW';
|
|||
// LoTW Expiry
|
||||
$lang['lotw_cert_expiring'] = 'At least one of your LoTW certificates is about to expire!';
|
||||
$lang['lotw_cert_expired'] = 'At least one of your LoTW certificates is expired!';
|
||||
|
||||
// Lotw User
|
||||
$lang['lotw_user'] = 'This station uses LoTW. The last upload was';
|
||||
|
|
|
|||
|
|
@ -57,3 +57,6 @@ $lang['lotw_confirmed'] = 'Dieses QSO wurde via LoTW bestätigt am';
|
|||
// LoTW Expiry
|
||||
$lang['lotw_cert_expiring'] = 'Mindestens eines deiner LoTW Zertifikate läuft bald ab!';
|
||||
$lang['lotw_cert_expired'] = 'Mindestens eines deiner LoTW Zertifikate ist abgelaufen!';
|
||||
|
||||
// Lotw User
|
||||
$lang['lotw_user'] = 'Diese Station nutzt LoTW. Der letzte Upload war am';
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_lotw_users extends CI_Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->table_exists('lotw_users')) {
|
||||
$this->dbforge->add_field(array(
|
||||
'id' => array(
|
||||
'type' => 'INT',
|
||||
'constraint' => 20,
|
||||
'unsigned' => TRUE,
|
||||
'auto_increment' => TRUE,
|
||||
'unique' => TRUE
|
||||
),
|
||||
'callsign' => array(
|
||||
'type' => 'VARCHAR',
|
||||
'constraint' => 32,
|
||||
'unsigned' => TRUE,
|
||||
),
|
||||
'lastupload' => array(
|
||||
'type' => 'datetime',
|
||||
)
|
||||
));
|
||||
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
|
||||
$this->dbforge->create_table('lotw_users');
|
||||
|
||||
$this->db->query("ALTER TABLE lotw_users ADD INDEX `callsign` (`callsign`)");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->table_exists('lotw_users')) {
|
||||
$this->dbforge->drop_table('lotw_users');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,8 +10,7 @@ class adif_data extends CI_Model {
|
|||
if (strpos($this->api_model->access($api_key), 'r') !== false) {
|
||||
$this->api_model->update_last_used($api_key);
|
||||
$user_id = $this->api_model->key_userid($api_key);
|
||||
$active_station_logbook = $CI->logbooks_model->find_active_station_logbook_from_userid($user_id);
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($active_station_logbook);
|
||||
$logbooks_locations_array = $this->list_station_locations($user_id);
|
||||
}
|
||||
} else {
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
|
@ -27,6 +26,22 @@ class adif_data extends CI_Model {
|
|||
return $query;
|
||||
}
|
||||
|
||||
function list_station_locations($user_id) {
|
||||
$this->db->where('user_id', $user_id);
|
||||
$query = $this->db->get('station_profile');
|
||||
|
||||
if ($query->num_rows() == 0) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$locations_array = array();
|
||||
foreach ($query->result() as $row) {
|
||||
array_push($locations_array, $row->station_id);
|
||||
}
|
||||
|
||||
return $locations_array;
|
||||
}
|
||||
|
||||
function export_printrequested($station_id = NULL) {
|
||||
$this->load->model('stations');
|
||||
$active_station_id = $this->stations->find_active();
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class Eqsl_images extends CI_Model {
|
|||
function eqsl_qso_list() {
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->db->select('qso_id, COL_CALL, COL_MODE, , COL_SUBMODE, COL_TIME_ON, COL_BAND, COL_SAT_NAME, image_file');
|
||||
$this->db->select('COL_PRIMARY_KEY, qso_id, COL_CALL, COL_MODE, , COL_SUBMODE, COL_TIME_ON, COL_BAND, COL_SAT_NAME, image_file');
|
||||
$this->db->join($this->config->item('table_name'), 'qso_id = COL_PRIMARY_KEY', 'left outer');
|
||||
$this->db->join('station_profile', $this->config->item('table_name').'.station_id = station_profile.station_id', 'left outer');
|
||||
$this->db->where_in('station_profile.station_id', $logbooks_locations_array);
|
||||
|
|
|
|||
|
|
@ -1295,13 +1295,13 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
|
||||
function get_qso($id) {
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, dxcc_entities_2.name as station_country, dxcc_entities_2.end as station_end');
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file');
|
||||
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left');
|
||||
$this->db->join('dxcc_entities as dxcc_entities_2', 'station_profile.station_dxcc = dxcc_entities_2.adif', 'left outer');
|
||||
$this->db->join('eQSL_images', $this->config->item('table_name').'.COL_PRIMARY_KEY = eQSL_images.qso_id', 'left outer');
|
||||
$this->db->join('lotw_users', $this->config->item('table_name').'.COL_CALL = lotw_users.callsign', 'left outer');
|
||||
$this->db->where('COL_PRIMARY_KEY', $id);
|
||||
|
||||
return $this->db->get();
|
||||
|
|
@ -2484,7 +2484,7 @@ class Logbook_model extends CI_Model {
|
|||
}
|
||||
}
|
||||
|
||||
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty) {
|
||||
function lotw_update($datetime, $callsign, $band, $qsl_date, $qsl_status, $state, $qsl_gridsquare, $iota, $cnty, $cqz, $ituz) {
|
||||
|
||||
$data = array(
|
||||
'COL_LOTW_QSLRDATE' => $qsl_date,
|
||||
|
|
@ -2502,6 +2502,14 @@ class Logbook_model extends CI_Model {
|
|||
$data['COL_CNTY'] = $cnty;
|
||||
}
|
||||
|
||||
if($cqz != "") {
|
||||
$data['COL_CQZ'] = $cqz;
|
||||
}
|
||||
|
||||
if($ituz != "") {
|
||||
$data['COL_ITUZ'] = $ituz;
|
||||
}
|
||||
|
||||
$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);
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ class Logbookadvanced_model extends CI_Model {
|
|||
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_dxcc=dxcc_entities.adif
|
||||
LEFT OUTER JOIN lotw_users ON qsos.col_call=lotw_users.callsign
|
||||
WHERE station_profile.user_id = ?
|
||||
$where
|
||||
ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@
|
|||
<h5>Export Satellite-Only QSOs</h5>
|
||||
<p><a href="<?php echo site_url('adif/exportsat'); ?>" title="Export All Satellite Contacts" target="_blank" class="btn-sm btn-primary">Export All Satellite QSOs</a></p>
|
||||
|
||||
<p><a href="<?php echo site_url('adif/exportsatlotw'); ?>" title="Export All Satellite QSOS Confirmed on LoTW" target="_blank" class="btn-sm btn-primary">Export All Satellite QSOs Confirmed on LoTW</a></p>
|
||||
<p><a href="<?php echo site_url('adif/exportsatlotw'); ?>" title="Export All Satellite QSOs Confirmed on LoTW" target="_blank" class="btn-sm btn-primary">Export All Satellite QSOs Confirmed on LoTW</a></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?php if($radio_status->num_rows()) { ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($radio_status->result_array() as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['radio']; ?></td>
|
||||
<td>
|
||||
<?php if($row['prop_mode'] == 'SAT') { ?>
|
||||
<?php echo $row['sat_name']; ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } ?>
|
||||
|
|
@ -180,6 +180,7 @@
|
|||
<!-- Past QSO Box -->
|
||||
<div class="card log">
|
||||
<div class="card-header"><h5 class="card-title"><?php echo lang('contesting_title_contest_logbook'); ?></h5></div>
|
||||
<p>
|
||||
|
||||
<table style="width:100%" class="table-sm table qsotable table-bordered table-hover table-striped table-condensed text-center">
|
||||
<thead>
|
||||
|
|
|
|||
|
|
@ -160,29 +160,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
|
||||
<?php if($radio_status->num_rows()) { ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($radio_status->result_array() as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['radio']; ?></td>
|
||||
<td>
|
||||
<?php if($row['prop_mode'] == 'SAT') { ?>
|
||||
<?php echo $row['sat_name']; ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } ?>
|
||||
<div id="radio_display" hx-get="<?php echo site_url('visitor/radio_display_component'); ?>" hx-trigger="load, every 5s"></div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
foreach ($qslarray->result() as $qsl) {
|
||||
echo '<tr>';
|
||||
echo '<td style=\'text-align: center\'>' . $qsl->COL_CALL . '</td>';
|
||||
echo '<td style=\'text-align: center\'><a id="edit_qso" href="javascript:displayQso('.$qsl->COL_PRIMARY_KEY.')">' . $qsl->COL_CALL . '</a></td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
echo $qsl->COL_SUBMODE==null?$qsl->COL_MODE:$qsl->COL_SUBMODE;
|
||||
echo '</td>';
|
||||
|
|
|
|||
|
|
@ -816,6 +816,29 @@ function findduplicates(){
|
|||
});
|
||||
}
|
||||
|
||||
function findlotwunconfirmed(){
|
||||
event.preventDefault();
|
||||
$('#partial_view').load(base_url+"index.php/logbook/search_lotw_unconfirmed/"+$("#station_id").val(), function() {
|
||||
$('.qsolist').DataTable({
|
||||
"pageLength": 25,
|
||||
responsive: false,
|
||||
ordering: false,
|
||||
"scrollY": "500px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv'
|
||||
]
|
||||
});
|
||||
// change color of csv-button if dark mode is chosen
|
||||
if (isDarkModeTheme()) {
|
||||
$(".buttons-csv").css("color", "white");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function findincorrectcqzones() {
|
||||
event.preventDefault();
|
||||
$('#partial_view').load(base_url+"index.php/logbook/search_incorrect_cq_zones/"+$("#station_id").val(), function() {
|
||||
|
|
@ -2732,6 +2755,8 @@ function viewEqsl(picture, callsign) {
|
|||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
"ordering": true,
|
||||
"order": [ 2, 'desc' ],
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
<script type="text/javascript">
|
||||
/*
|
||||
*
|
||||
* Define custom date format
|
||||
*
|
||||
*/
|
||||
var custom_date_format = "<?php echo $custom_date_format ?>";
|
||||
</script>
|
||||
|
||||
<div class="container-fluid qso_manager pt-3 pl-4 pr-4">
|
||||
<?php if ($this->session->flashdata('message')) { ?>
|
||||
<!-- Display Message -->
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<a class="btn btn-outline-success btn-sm float-right" href="<?php echo site_url('/lotw/cert_upload'); ?>" role="button"><i class="fas fa-cloud-upload-alt"></i> <?php echo lang('lotw_btn_upload_certificate'); ?></a><i class="fab fa-expeditedssl"></i> <?php echo lang('lotw_title_available_cert'); ?>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="lotw-cert-list">
|
||||
<?php if(isset($error)) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo $error; ?>
|
||||
|
|
@ -122,7 +122,11 @@
|
|||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p><a class="btn btn-outline-success" href="<?php echo site_url('lotw/lotw_upload'); ?>"><?php echo lang('lotw_btn_manual_sync'); ?></a></p>
|
||||
<button class="btn btn-outline-success" hx-get="<?php echo site_url('lotw/lotw_upload'); ?>" hx-target="#lotw_manual_results">
|
||||
<?php echo lang('lotw_btn_manual_sync'); ?>
|
||||
</button>
|
||||
|
||||
<div id="lotw_manual_results"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/duplicates'); ?>">Duplicate QSOs</a>
|
||||
</li>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo site_url('search/incorrect_cq_zones'); ?>">Incorrect CQ Zones</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>">QSOs unconfirmed on LoTW</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo site_url('search/duplicates'); ?>">Duplicate QSOs</a>
|
||||
</li>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>">Incorrect CQ Zones</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>">QSOs unconfirmed on LoTW</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/duplicates'); ?>">Duplicate QSOs</a>
|
||||
</li>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>">Incorrect CQ Zones</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>">QSOs unconfirmed on LoTW</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
<div class="container search">
|
||||
|
||||
<h1>
|
||||
Search
|
||||
<small class="text-muted">Ready to find a QSO?</small>
|
||||
</h1>
|
||||
|
||||
<div class="card text-center">
|
||||
<div class="card-header">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search'); ?>">Search</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/filter'); ?>">Advanced Search</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/duplicates'); ?>">Duplicate QSOs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link " href="<?php echo site_url('search/incorrect_cq_zones'); ?>">Incorrect CQ Zones</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="<?php echo site_url('search/lotw_unconfirmed'); ?>">QSOs unconfirmed on LoTW</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
The search displays QSOs which are unconfirmed on LoTW, but the callsign worked has uploaded to LoTW after your QSO date.<br/><br />
|
||||
<form method="post" action="" id="search_box" name="test">
|
||||
<div class="form-group row">
|
||||
<label for="callsign" class="col-sm-2 col-form-label">Station location:</label>
|
||||
<select id="station_id" name="station_profile" class="custom-select col-sm-3 mb-3 mr-sm-3">
|
||||
<option value="All">All</option>
|
||||
<?php foreach ($station_profile->result() as $station) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>">Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name; ?>)</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="col-sm-2">
|
||||
<button onclick="findlotwunconfirmed();" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="partial_view"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
if ($qsos->result() != NULL) {
|
||||
echo '<table style="width:100%" class="qsolist table-sm table-bordered table-hover table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style=\'text-align: center\'>'.lang('gen_hamradio_callsign').'</th>
|
||||
<th style=\'text-align: center\'>Date / time</th>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_mode') . '</th>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_band') . '</th>
|
||||
<th style=\'text-align: center\'>Last LoTW upload</th>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_station') . '</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
|
||||
// Get Date format
|
||||
if($this->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
$custom_date_format = $this->session->userdata('user_date_format');
|
||||
} else {
|
||||
// Get Default date format from /config/cloudlog.php
|
||||
$custom_date_format = $this->config->item('qso_date_format');
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
foreach ($qsos->result() as $qso) {
|
||||
echo '<tr>';
|
||||
echo '<td style=\'text-align: center\'><form id="searchcall_'.$i.'" method="POST" action="'.site_url('search'). '"><input type="hidden" value="'. strtoupper($qso->COL_CALL) .'" name="callsign"><a href="javascript:$(\'#searchcall_'.$i++.'\').submit()">' . $qso->COL_CALL . '</a></form></td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qso->COL_TIME_ON . '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; echo $qso->COL_SUBMODE==null?$qso->COL_MODE:$qso->COL_SUBMODE; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>'; if($qso->COL_SAT_NAME != null) { echo $qso->COL_SAT_NAME; } else { echo strtolower($qso->COL_BAND); }; echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $qso->lastupload . '</td>';
|
||||
echo '<td style=\'text-align: center\'><span class="badge badge-light">' . $qso->station_callsign . '</span></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
echo '<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>No QSOs with outstanding LoTW upload were found.</div>';
|
||||
}
|
||||
?>
|
||||
|
|
@ -19,6 +19,9 @@
|
|||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/incorrect_cq_zones'); ?>">Incorrect CQ Zones</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo site_url('search/lotw_unconfirmed'); ?>">QSOs unconfirmed on LoTW</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ $ci =& get_instance();
|
|||
$custom_date_format = $this->config->item('qso_date_format');
|
||||
}
|
||||
?>
|
||||
<?php echo '<tr class="tr'.($i & 1).'" id ="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
<?php echo '<tr class="tr'.($i & 1).'" id="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
|
|
@ -207,7 +207,7 @@ $ci =& get_instance();
|
|||
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
|
||||
|
||||
<?php
|
||||
echo '<td style=\'text-align: center\' class="qsl">';
|
||||
echo '<td id="qsl_'.$row->COL_PRIMARY_KEY.'" style=\'text-align: center\' class="qsl">';
|
||||
echo '<span ';
|
||||
if ($row->COL_QSL_SENT != "N") {
|
||||
if ($row->COL_QSLSDATE != null) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
// Get Default date format from /config/cloudlog.php
|
||||
$custom_date_format = $this->config->item('qso_date_format');
|
||||
}
|
||||
echo '<tr class="tr'.($i & 1).'" id ="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
echo '<tr class="tr'.($i & 1).'" id="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
|
|
@ -109,7 +109,7 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
echo_table_col($row, $this->session->userdata('user_column5'));
|
||||
|
||||
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
|
||||
<td class="qsl">
|
||||
<td id="qsl_<?php echo $row->COL_PRIMARY_KEY; ?>" class="qsl">
|
||||
<span <?php if ($row->COL_QSL_SENT != "N") {
|
||||
switch ($row->COL_QSL_SENT) {
|
||||
case "Y":
|
||||
|
|
|
|||
|
|
@ -353,6 +353,9 @@
|
|||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
<?php if($row->lotwuser != null) { ?>
|
||||
<br /><p><?php echo lang('lotw_user'); ?> <?php $timestamp = strtotime($row->lastupload); echo date($custom_date_format, $timestamp); $timestamp = strtotime($row->lastupload); echo " at ".date('H:i', $timestamp);?> UTC.</p>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_LOTW_QSL_RCVD == "Y") { ?>
|
||||
<h3><?php echo lang('lotw_short'); ?></h3>
|
||||
|
|
@ -388,7 +391,7 @@
|
|||
$hashtags .= " #IOTA ".$row->COL_IOTA;
|
||||
}
|
||||
if($row->COL_SOTA_REF != null) {
|
||||
$hashtags .= " #SOTA ".$row->COL_SOTA_EF;
|
||||
$hashtags .= " #SOTA ".$row->COL_SOTA_REF;
|
||||
}
|
||||
if($row->COL_POTA_REF != null) {
|
||||
$hashtags .= " #POTA ".$row->COL_POTA_REF;
|
||||
|
|
|
|||
|
|
@ -116,29 +116,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
<div class="col-sm-4">
|
||||
<div class="table-responsive">
|
||||
|
||||
<?php if($radio_status->num_rows()) { ?>
|
||||
<div id="radio_display" hx-get="<?php echo site_url('visitor/radio_display_component'); ?>" hx-trigger="load, every 5s"></div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($radio_status->result_array() as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['radio']; ?></td>
|
||||
<td>
|
||||
<?php if($row['radio'] == "SatPC32" || $row['radio'] == "CloudLogCATQt") { ?>
|
||||
<?php echo $row['sat_name']; ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
|
|
|
|||
|
|
@ -436,4 +436,8 @@ div#station_logbooks_linked_table_paginate {
|
|||
.w-qsl{
|
||||
max-height: calc(100vh - 270px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#lotw_manual_results {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ function qsl_rcvd(id, method) {
|
|||
},
|
||||
success: function(data) {
|
||||
if (data.message == 'OK') {
|
||||
$("#qso_" + id).find("td:eq(8)").find("span:eq(1)").attr('class', 'qsl-green'); // Paints arrow green
|
||||
$("#qsl_" + id).find("span:eq(1)").attr('class', 'qsl-green'); // Paints arrow green
|
||||
$(".qsl_rcvd_" + id).remove(); // removes choice from menu
|
||||
}
|
||||
else {
|
||||
|
|
@ -26,7 +26,7 @@ function qsl_sent(id, method) {
|
|||
},
|
||||
success: function(data) {
|
||||
if (data.message == 'OK') {
|
||||
$("#qso_" + id).find("td:eq(8)").find("span:eq(0)").attr('class', 'qsl-green'); // Paints arrow green
|
||||
$("#qsl_" + id).find("span:eq(0)").attr('class', 'qsl-green'); // Paints arrow green
|
||||
$(".qsl_sent_" + id).remove(); // removes choice from menu
|
||||
}
|
||||
else {
|
||||
|
|
@ -47,7 +47,7 @@ function qsl_requested(id, method) {
|
|||
},
|
||||
success: function(data) {
|
||||
if (data.message == 'OK') {
|
||||
$("#qso_" + id).find("td:eq(8)").find("span:eq(0)").attr('class', 'qsl-yellow'); // Paints arrow green
|
||||
$("#qsl_" + id).find("span:eq(0)").attr('class', 'qsl-yellow'); // Paints arrow yellow
|
||||
}
|
||||
else {
|
||||
$(".bootstrap-dialog-message").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>');
|
||||
|
|
@ -67,7 +67,7 @@ function qsl_ignore(id, method) {
|
|||
},
|
||||
success: function(data) {
|
||||
if (data.message == 'OK') {
|
||||
$("#qso_" + id).find("td:eq(8)").find("span:eq(0)").attr('class', 'qsl-grey'); // Paints arrow grey
|
||||
$("#qsl_" + id).find("span:eq(0)").attr('class', 'qsl-grey'); // Paints arrow grey
|
||||
}
|
||||
else {
|
||||
$(".bootstrap-dialog-message").append('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>You are not allowed to update QSL status!</div>');
|
||||
|
|
|
|||
|
|
@ -528,7 +528,21 @@ function restoreContestSession(data) {
|
|||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
order: [0, 'desc']
|
||||
order: [0, 'desc'],
|
||||
"columnDefs": [
|
||||
{
|
||||
"render": function ( data, type, row ) {
|
||||
return pad(row[8],3);
|
||||
},
|
||||
"targets" : 8
|
||||
},
|
||||
{
|
||||
"render": function ( data, type, row ) {
|
||||
return pad(row[9],3);
|
||||
},
|
||||
"targets" : 9
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -538,3 +552,8 @@ function restoreContestSession(data) {
|
|||
$("#exch_serial_s").val("1");
|
||||
}
|
||||
}
|
||||
|
||||
function pad (str, max) {
|
||||
str = str.toString();
|
||||
return str.length < max ? pad("0" + str, max) : str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ function updateRow(qso) {
|
|||
let c = 1;
|
||||
cells.eq(c++).text(qso.qsoDateTime);
|
||||
cells.eq(c++).text(qso.de);
|
||||
cells.eq(c++).html('<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>');
|
||||
cells.eq(c++).html('<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>' + (qso.callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + '">L</small>'));
|
||||
cells.eq(c++).text(qso.mode);
|
||||
cells.eq(c++).text(qso.rstS);
|
||||
cells.eq(c++).text(qso.rstR);
|
||||
|
|
@ -58,6 +58,7 @@ function loadQSOTable(rows) {
|
|||
});
|
||||
|
||||
uninitialized.each(function() {
|
||||
$.fn.dataTable.moment(custom_date_format + ' HH:mm');
|
||||
$(this).DataTable({
|
||||
searching: false,
|
||||
responsive: false,
|
||||
|
|
@ -66,7 +67,6 @@ function loadQSOTable(rows) {
|
|||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
"order": [ 1, 'desc' ],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ function loadQSOTable(rows) {
|
|||
data.push('<div class="form-check"><input class="form-check-input" type="checkbox" /></div>');
|
||||
data.push(qso.qsoDateTime);
|
||||
data.push(qso.de);
|
||||
data.push('<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>');
|
||||
data.push('<a id="edit_qso" href="javascript:displayQso('+qso.qsoID+')">'+qso.dx+'</a>' + (qso.callsign == '' ? '' : ' <small id="lotw_info" class="badge badge-success" data-toggle="tooltip" data-original-title="LoTW User. Last upload was ' + qso.lastupload + ' ">L</small>'));
|
||||
data.push(qso.mode);
|
||||
data.push(qso.rstS);
|
||||
data.push(qso.rstR);
|
||||
|
|
|
|||
33
docker/Dockerfile
普通文件
33
docker/Dockerfile
普通文件
|
|
@ -0,0 +1,33 @@
|
|||
FROM php:7.4-apache
|
||||
RUN touch /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo “file_uploads = On” >> /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo “memory_limit = 64M” >> /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo “upload_max_filesize = 64M” >> /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo “post_max_size = 64M” >> /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 curl
|
||||
RUN docker-php-ext-install mbstring
|
||||
RUN docker-php-ext-install xml
|
||||
#RUN docker-php-ext-install openssl
|
||||
WORKDIR /var/www/html
|
||||
COPY ./ /var/www/html/
|
||||
RUN ls && rm -rf /var/www/html/docker/ \
|
||||
&& chown -R root:www-data ./application/config/ \
|
||||
&& chown -R root:www-data ./application/logs/ \
|
||||
&& chown -R root:www-data ./assets/qslcard/ \
|
||||
&& chown -R root:www-data ./backup/ \
|
||||
&& chown -R root:www-data ./updates/ \
|
||||
&& chown -R root:www-data ./uploads/ \
|
||||
&& chown -R root:www-data ./images/eqsl_card_images/ \
|
||||
&& chown -R root:www-data ./assets/json/ \
|
||||
&& chmod -R g+rw ./application/config/ \
|
||||
&& chmod -R g+rw ./application/logs/ \
|
||||
&& chmod -R g+rw ./assets/qslcard/ \
|
||||
&& chmod -R g+rw ./backup/ \
|
||||
&& chmod -R g+rw ./updates/ \
|
||||
&& chmod -R g+rw ./uploads/ \
|
||||
&& chmod -R g+rw ./images/eqsl_card_images/ \
|
||||
&& chmod -R g+rw ./assets/json/
|
||||
18
docker/docker-compose.yml
普通文件
18
docker/docker-compose.yml
普通文件
|
|
@ -0,0 +1,18 @@
|
|||
version: ‘3.4’
|
||||
|
||||
services:
|
||||
cloudlog:
|
||||
image: cloudlog
|
||||
container_name: cloudlog
|
||||
volumes:
|
||||
- cloudlog-config:/var/www/html/application/config
|
||||
- cloudlog-backup:/var/www/html/application/backup
|
||||
- cloudlog-uploads:/var/www/html/application/uploads
|
||||
ports:
|
||||
- 8086:80
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
cloudlog-config:
|
||||
cloudlog-backup:
|
||||
cloudlog-uploads:
|
||||
|
|
@ -14,7 +14,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||
*/
|
||||
|
||||
$config['app_name'] = "Cloudlog";
|
||||
$config['app_version'] = "2.4.2";
|
||||
$config['app_version'] = "2.4.3";
|
||||
$config['directory'] = "%directory%";
|
||||
$config['callbook'] = "hamqth"; // Options are hamqth or qrz
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use DomainException;
|
|||
class QSO
|
||||
{
|
||||
private string $qsoID;
|
||||
private DateTime $qsoDateTime;
|
||||
private string $qsoDateTime;
|
||||
private string $de;
|
||||
private string $dx;
|
||||
private string $mode;
|
||||
|
|
@ -59,6 +59,9 @@ class QSO
|
|||
private string $qsl;
|
||||
private string $lotw;
|
||||
private string $eqsl;
|
||||
/** Lotw callsign info **/
|
||||
private string $callsign;
|
||||
private string $lastupload;
|
||||
|
||||
/**
|
||||
* @param array $data Does no validation, it's assumed to be a row from the database in array format
|
||||
|
|
@ -120,7 +123,16 @@ class QSO
|
|||
|
||||
$this->qsoID = $data['COL_PRIMARY_KEY'];
|
||||
|
||||
$this->qsoDateTime = DateTime::createFromFormat("Y-m-d H:i:s", $data['COL_TIME_ON'], new DateTimeZone("UTC"));
|
||||
$CI =& get_instance();
|
||||
// Get Date format
|
||||
if($CI->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
$custom_date_format = $CI->session->userdata('user_date_format');
|
||||
} else {
|
||||
// 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->de = $data['COL_STATION_CALLSIGN'];
|
||||
$this->dx = $data['COL_CALL'];
|
||||
|
|
@ -167,16 +179,6 @@ 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'];
|
||||
|
||||
$CI =& get_instance();
|
||||
// Get Date format
|
||||
if($CI->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
$custom_date_format = $CI->session->userdata('user_date_format');
|
||||
} else {
|
||||
// Get Default date format from /config/cloudlog.php
|
||||
$custom_date_format = $CI->config->item('qso_date_format');
|
||||
}
|
||||
|
||||
$this->qsl = $this->getQslString($data, $custom_date_format);
|
||||
$this->lotw = $this->getLotwString($data, $custom_date_format);
|
||||
|
|
@ -184,13 +186,16 @@ class QSO
|
|||
|
||||
$this->cqzone = ($data['COL_CQZ'] === null) ? '' : $data['COL_CQZ'];
|
||||
$this->state = ($data['COL_STATE'] === null) ? '' :$data['COL_STATE'];
|
||||
$this->dxcc = ($data['name'] === null) ? '- NONE -' :$data['name'];
|
||||
$this->dxcc = ($data['name'] === null) ? '- NONE -' : ucwords(strtolower($data['name']), "- (/");
|
||||
$this->iota = ($data['COL_IOTA'] === null) ? '' :$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'));
|
||||
} else {
|
||||
$this->end = null;
|
||||
}
|
||||
$this->callsign = ($data['callsign'] === null) ? '' :$data['callsign'];
|
||||
$this->lastupload = ($data['lastupload'] === null) ? '' : date($custom_date_format . " H:i", strtotime($data['lastupload']));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -408,7 +413,7 @@ class QSO
|
|||
/**
|
||||
* @return DateTime
|
||||
*/
|
||||
public function getQsoDateTime(): DateTime
|
||||
public function getQsoDateTime(): string
|
||||
{
|
||||
return $this->qsoDateTime;
|
||||
}
|
||||
|
|
@ -749,7 +754,7 @@ class QSO
|
|||
{
|
||||
return [
|
||||
'qsoID' => $this->qsoID,
|
||||
'qsoDateTime' => $this->qsoDateTime->format("Y-m-d H:i"),
|
||||
'qsoDateTime' => $this->qsoDateTime,
|
||||
'de' => $this->de,
|
||||
'dx' => $this->dx,
|
||||
'mode' => $this->getFormattedMode(),
|
||||
|
|
@ -769,6 +774,8 @@ class QSO
|
|||
'cqzone' => $this->getCqzone(),
|
||||
'iota' => $this->getIOTA(),
|
||||
'end' => $this->end === null ? null : $this->end->format("Y-m-d"),
|
||||
'callsign' => $this->callsign,
|
||||
'lastupload' => $this->lastupload,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
正在加载…
在新工单中引用