Skip to content

Commit 2df091f

Browse files
HB9HILabarrauAndreasK79Christoph Kottkeint2001
authored
Release v1.1 (wavelog#120)
* config file for directory userdata * userdir for eqsl * change name to userdata * userdata for qsl * fix name on comment * add generic function file * remove model class on view, use generic function * Re-added forum link * add stations_id to eqsl functions * remove 'v' in Version Dialog * Update README.md added Link to demo instance * Update index.php * We should be MIT Conform * [Debug] Added information about when files were last updated, and links to update * Added custom data format * Remove leftover-index * Migration * Check if index is there * [LBA] Can disable maidenhead overlay * paths libary * Dev (#2) * Added Windows, MariaDB and PHP-Versions * Release 1.0 * Re-added forum link * add stations_id to eqsl functions * remove 'v' in Version Dialog * Update README.md added Link to demo instance * Update index.php * We should be MIT Conform * [Debug] Added information about when files were last updated, and links to update * Added custom data format * Remove leftover-index * Migration * Check if index is there * [LBA] Can disable maidenhead overlay --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: Andreas <6977712+AndreasK79@users.noreply.github.com> Co-authored-by: Christoph Kottke <dg0tm@darc.de> Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> * [eQSL] only locations with a eQSL nickname should be displayed (wavelog#74) * only locations with a eQSL nickname should be displayed in the dropdown under eQSL Import * add proper error message * improve usability --------- Co-authored-by: Christoph Kottke <dg0tm@darc.de> * html fixes * show flashdata if no station has eqsl nick * removed openssl check, not required * accumulate stats language * multilanguage support * prettier * Prevent leaking data out of other station_location * moved qrg to first tab * Fix a PHP 8.1 deprecated bug. * [Contesting] Fix for table qso count * Fixed error when data was empty. Also clear table before inserting again. * Refactor to get the table to load * Need to clear datatable when session is deleted * Prevent Racecondition * Fixed a few null-checks which will fail on fresh accounts * Allow for longer gridsquare in station profile * Show IOTA/SOTA ref on station location tab * [LBA] Fixed mapping of selected QSOs * Trying to convert the QSO-Post to an ajax call PHP/Part * JS Part * Dev (#3) * Added Windows, MariaDB and PHP-Versions * Release 1.0 * Re-added forum link * add stations_id to eqsl functions * remove 'v' in Version Dialog * Update README.md added Link to demo instance * Update index.php * We should be MIT Conform * [Debug] Added information about when files were last updated, and links to update * Added custom data format * Remove leftover-index * Migration * Check if index is there * [LBA] Can disable maidenhead overlay * [eQSL] only locations with a eQSL nickname should be displayed (wavelog#74) * only locations with a eQSL nickname should be displayed in the dropdown under eQSL Import * add proper error message * improve usability --------- Co-authored-by: Christoph Kottke <dg0tm@darc.de> * html fixes * show flashdata if no station has eqsl nick * removed openssl check, not required * accumulate stats language * multilanguage support * prettier * Prevent leaking data out of other station_location * moved qrg to first tab * Fix a PHP 8.1 deprecated bug. * [Contesting] Fix for table qso count * Fixed error when data was empty. Also clear table before inserting again. * Refactor to get the table to load * Need to clear datatable when session is deleted * Prevent Racecondition * Fixed a few null-checks which will fail on fresh accounts * Allow for longer gridsquare in station profile * Show IOTA/SOTA ref on station location tab * [LBA] Fixed mapping of selected QSOs --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: Andreas <6977712+AndreasK79@users.noreply.github.com> Co-authored-by: Christoph Kottke <dg0tm@darc.de> Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> Co-authored-by: dg0tm <schieberjunge@gmx.net> * First POC * Handling of AJAX result (started) * Change qso-save to ajax-return * Added notification and reloading of QSO-Table * JS-Part * Set Focus to qso after (successful) log * Resetting timers (successful) * Info is now shown / faded * Small adjustments * More Beauty * Make consequent use of SIG-References from station_profile * Delete application/views/welcome directory Leftovers. Security Flaw! * Update Dashboard.php Remove redir to welcome * Delete application/controllers/Welcome.php security flaw * Hint for 8.3. friendly Usertest * Update config.sample.php default should be commented out * [LBA] Checkbox to turn on/off path lines in map * Styling for pathlines-checkbox * [LBA] Checkbox tweaks * updated comment in config.php (sample and installer) * Removed popup regarding unsaved changes (wasn't functional at all) * Added locking for sending a qso twice * added spinner to save button * Also include SIG and SIG_INFO * [Logbook] Removed profiler * [LBA] Added fitbounds to map * [LBA] Added CQ Zone overlay * Make clearer that overview filters on logbook rather than locations * baesURL has a trailing slash already * active logbook hint * Update .gitignore added userdata * [LBA] ITU zone overlay * Minor wording * [LBA] Added custom mapping icons * [LBA] Path line follows icon color * [LBA] Added icon anchoring * [LBA] Added easyprint for easy map saving * [LBA] Added default colors when icon settings does not exist in db * Check refs before trimming them * [LBA] Fixed another default issue with markers and colors * Removed dangerous functions where User can accidently shift profiles * Rmoeve more unused leftovers from 1.0 to 2.0. * Header refactoring (wavelog#110) * splitted up header * resorted header menu * main rebuild * header behaviour hover * dropdown toggle rotate * fix case where landscape is small menu and portrait normal view * submenu thirdparty services * removed custom maps from the header * matching search bar * border * matched border to themes * [Custom Map] Removed code * [Gridmap] Broke map by accident. Thanks @phl0 for poke. * Optical support for SAT directions and elevation * [LBA] Added coordinates at the bottom of the map * Align numbers and arrows * Reset RST after saving via AJAX * Cfd export (wavelog#117) * Added CFD Export for toplist.darc.de to Wavelog --------- Co-authored-by: phl0 <github@florian-wolters.de> * special thx to contributors * tag 1.1 * typo --------- Co-authored-by: abarrau <hesky378@gmail.com> Co-authored-by: Andreas <6977712+AndreasK79@users.noreply.github.com> Co-authored-by: Christoph Kottke <dg0tm@darc.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> Co-authored-by: dg0tm <schieberjunge@gmx.net>
1 parent ba762a9 commit 2df091f

File tree

130 files changed

+2230
-1584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2230
-1584
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/updates/clublog_scp.txt
1313
/assets/qslcard/*
1414
/assets/js/sections/custom.js
15+
/userdata/*
1516
.idea/*
1617
.DS_Store
1718
sync.sh

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://demo.wavelog.org
2424
## Requirements
2525
* Linux based Operating System (Windows stack may also work)
2626
* Apache (Nginx should work)
27-
* PHP Version 7.4 up to PHP 8.2
27+
* PHP Version 7.4 up to PHP 8.2 (PHP 8.3. in friendly Usertest)
2828
* MySQL or MariaDB (MySQL 5.7 or higher // MariaDB 10.1 or higher)
2929

3030
Notes
@@ -42,6 +42,9 @@ Wavelog-support can be reached by creating an issue here at github. If you've an
4242

4343
## Contributing
4444

45+
Special thanks to our contributors, who are part of Wavelog by improving code!
46+
@abarrau, @dg0tm
47+
4548
If you would like to contribute in any way to Wavelog, it is most appreciated. This has been developed in free time, help coding new features or writing documentation is always useful.
4649

4750
Please note that Wavelog was built using [Codeigniter](https://www.codeigniter.com/docs) version 3 and uses Bootstrap 5 for the user CSS framework documentation is available for this when building components.

application/config/autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
5353
*/
5454

55-
$autoload['libraries'] = array('database', 'session', 'curl', 'OptionsLib', 'Frequency');
55+
$autoload['libraries'] = array('database', 'session', 'curl', 'OptionsLib', 'Paths', 'Frequency');
5656

5757

5858
/*

application/config/config.sample.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,16 @@
663663
| Array: array('10.0.1.200', '192.168.5.0/24')
664664
*/
665665
$config['proxy_ips'] = '';
666+
667+
/*
668+
|--------------------------------------------------------------------------
669+
| Users Data Directory Options
670+
|--------------------------------------------------------------------------
671+
|
672+
| 'userdata' Name of principal/centralized data folder
673+
|
674+
| If you are a contributor to Wavelog you perhaps should add this folder path to .gitignore
675+
|
676+
*/
677+
678+
// $config['userdata'] = "userdata";

application/config/migration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
|
2323
*/
2424

25-
$config['migration_version'] = 178;
25+
$config['migration_version'] = 180;
2626

2727
/*
2828
|--------------------------------------------------------------------------

application/controllers/Accumulated.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
<?php
2-
defined('BASEPATH') OR exit('No direct script access allowed');
2+
defined('BASEPATH') or exit('No direct script access allowed');
33

4-
class Accumulated extends CI_Controller {
4+
class Accumulated extends CI_Controller
5+
{
56

67
function __construct()
78
{
89
parent::__construct();
910

1011
$this->load->model('user_model');
11-
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
12+
if (!$this->user_model->authorize(2)) {
13+
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
14+
redirect('dashboard');
15+
}
1216
}
1317

1418
public function index()
1519
{
1620
// Render Page
17-
$data['page_title'] = "Accumulated Statistics";
21+
$data['page_title'] = $this->lang->line('menu_accumulated_statistics');
1822

1923
$this->load->model('bands');
2024

@@ -32,7 +36,8 @@ public function index()
3236
/*
3337
* Used for ajax-call in javascript to fetch the data and insert into table and chart
3438
*/
35-
public function get_accumulated_data(){
39+
public function get_accumulated_data()
40+
{
3641
//load model
3742
$this->load->model('accumulate_model');
3843
$band = $this->input->post('Band');
@@ -45,5 +50,4 @@ public function get_accumulated_data(){
4550
header('Content-Type: application/json');
4651
echo json_encode($data);
4752
}
48-
49-
}
53+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2+
3+
/*
4+
5+
Provides outputted cfd files for use with Google Map services
6+
All maps are stored within /cfd in the root directory
7+
8+
*/
9+
10+
class Cfdexport extends CI_Controller {
11+
12+
public function index() {
13+
$this->load->model('user_model');
14+
$this->load->model('modes');
15+
$this->load->model('logbook_model');
16+
$this->load->model('bands');
17+
18+
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
19+
20+
$data['page_title'] = "CFD Export";
21+
22+
$this->load->view('interface_assets/header', $data);
23+
$this->load->view('cfd/index');
24+
$this->load->view('interface_assets/footer');
25+
}
26+
27+
public function export() {
28+
$this->load->model('user_model');
29+
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
30+
$this->load->model('logbook_model');
31+
$this->load->model('dxcc');
32+
33+
// Parameters
34+
$fromdate = xss_clean($this->input->post('from'));
35+
$todate = xss_clean($this->input->post('to'));
36+
37+
$this->load->library('frequency');
38+
// Get QSOs with Valid QRAs
39+
$qsos = $this->logbook_model->cfd_get_all_qsos($fromdate, $todate);
40+
$output=strtoupper($this->session->userdata('user_callsign'))."\n";
41+
$output.='--------------------------------------------------------------
42+
MostWanted 1.42 - Overview Confirmed Entities
43+
(M=Mixed C=CW F=Fone R=Rest)
44+
==============================================================
45+
46+
Entity \ MHz: ALL 1.8 3.5 7 10 14 18 21 24 28 50
47+
-------------------------------------------------------------------------------------------------------'."\n";
48+
49+
$dxcc_list=[]; // Prepare Array
50+
foreach ($qsos->result() as $row) { // Loop through entities which are cnfmd
51+
$nominal=$this->frequency->defaultFrequencies[$row->band]['NOMINAL'];
52+
$dxcc_list[$row->prefix]['name']=$row->name;
53+
if ($row->cnfmd >=1) { $dxcc_list[$row->prefix][$nominal][$row->mode]=$row->mode; }
54+
}
55+
$dxccs=$this->dxcc->list_current('prefix');
56+
foreach ($dxccs->result() as $dxcc) { // Loop through ALL active entities
57+
$vals=$dxcc_list[$dxcc->prefix] ?? []; // Set current Entity
58+
$output .= str_pad($dxcc->prefix,6," ")." ".str_pad(substr($dxcc->name,0,30),30,".")." ";
59+
$allm=0;
60+
$allc=0;
61+
$allf=0;
62+
$allr=0;
63+
$bandachievements='';
64+
foreach ($this->frequency->defaultFrequencies as $band => $attribs) { // Loop through Bands
65+
if (($attribs['NOMINAL'] <= 50) && ($attribs['NOMINAL'] != 5)) { // Check Every Band for cnfm state
66+
if ($vals[$attribs['NOMINAL']] ?? '' != '') { $bandachievements .= 'M'; $allm++; } else { $bandachievements .= '-'; }
67+
if ($vals[$attribs['NOMINAL']]['C'] ?? '' == 'C') { $bandachievements .= 'C'; $allc++; } else { $bandachievements .= '-'; }
68+
if ($vals[$attribs['NOMINAL']]['F'] ?? '' == 'F') { $bandachievements .= 'F'; $allf++; } else { $bandachievements .= '-'; }
69+
if ($vals[$attribs['NOMINAL']]['R'] ?? '' == 'R') { $bandachievements .= 'R'; $allr++; } else { $bandachievements .= '-'; }
70+
$bandachievements .= ' ';
71+
}
72+
}
73+
// Prepeare ALL Column
74+
if ($allm >0) { $output.='M'; } else { $output.='-'; }
75+
if ($allc >0) { $output.='C'; } else { $output.='-'; }
76+
if ($allf >0) { $output.='F'; } else { $output.='-'; }
77+
if ($allr >0) { $output.='R'; } else { $output.='-'; }
78+
$output .= ' '.$bandachievements."\n";
79+
}
80+
81+
header("Content-Disposition: attachment; filename=\"".strtoupper($this->session->userdata('user_callsign')).".CFD\"");
82+
echo $output;
83+
84+
}
85+
}

application/controllers/Dashboard.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ public function index()
1414
// LoTW infos
1515
$this->load->model('LotwCert');
1616

17-
if($this->optionslib->get_option('version2_trigger') == "false") {
18-
redirect('welcome');
19-
}
20-
2117
// Check if users logged in
2218

2319
if($this->user_model->validate_session() == 0) {

application/controllers/Eqsl.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ function __construct() {
1212
public function index() {
1313

1414
$this->lang->load('qslcard');
15-
$folder_name = "images/eqsl_card_images";
15+
$this->load->model('eqsl_images');
16+
$folder_name = $this->eqsl_images->get_imagePath('p');
1617
$data['storage_used'] = $this->sizeFormat($this->folderSize($folder_name));
1718

1819

1920
// Render Page
2021
$data['page_title'] = "eQSL Cards";
2122

22-
$this->load->model('eqsl_images');
23+
2324
$data['qslarray'] = $this->eqsl_images->eqsl_qso_list();
2425

2526
$this->load->view('interface_assets/header', $data);
@@ -40,8 +41,7 @@ public function import() {
4041
$this->load->model('eqslmethods_model');
4142
$eqsl_locations = $this->eqslmethods_model->all_of_user_with_eqsl_nick_defined();
4243
if($eqsl_locations->num_rows() == 0) {
43-
show_error("eQSL Nicknames in Station Profiles aren't defined");
44-
exit;
44+
$this->session->set_flashdata('error', 'eQSL Nicknames in Station Profiles aren\'t defined!');
4545
}
4646

4747
ini_set('memory_limit', '-1');
@@ -74,10 +74,11 @@ public function import() {
7474
$this->eqslimporter->from_callsign_and_QTH(
7575
$eqsl_location['station_callsign'],
7676
$eqsl_location['eqslqthnickname'],
77-
$config['upload_path']
77+
$config['upload_path'],
78+
$eqsl_location['station_id']
7879
);
7980

80-
$eqsl_results[] = $this->eqslimporter->fetch($eqsl_password,$eqsl_force_from_date);
81+
$eqsl_results[] = $this->eqslimporter->fetch($eqsl_password, $eqsl_force_from_date);
8182
}
8283
} elseif ($this->input->post('eqslimport') == 'upload') {
8384
$station_id4upload=$this->input->post('station_profile');
@@ -97,7 +98,7 @@ public function import() {
9798
$data = array('upload_data' => $this->upload->data());
9899

99100
$this->load->library('EqslImporter');
100-
$this->eqslimporter->from_file('./uploads/'.$data['upload_data']['file_name'],$station_callsign);
101+
$this->eqslimporter->from_file('./uploads/'.$data['upload_data']['file_name'], $station_callsign, $station_id4upload);
101102

102103
$eqsl_results[] = $this->eqslimporter->import();
103104
}
@@ -129,8 +130,7 @@ public function export() {
129130
// Check if eQSL Nicknames have been defined
130131
$this->load->model('stations');
131132
if($this->stations->are_eqsl_nicks_defined() == 0) {
132-
show_error('eQSL Nicknames in Station Profiles arent defined');
133-
exit;
133+
$this->session->set_flashdata('error', 'eQSL Nicknames in Station Profiles aren\'t defined!');
134134
}
135135

136136
ini_set('memory_limit', '-1');
@@ -547,13 +547,13 @@ function image($id) {
547547
}
548548
echo $content;
549549
$filename = uniqid().'.jpg';
550-
if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
550+
if (file_put_contents($this->Eqsl_images->get_imagePath('p') .'/'. $filename, $content) !== false) {
551551
$this->Eqsl_images->save_image($id, $filename);
552552
}
553553
}
554554
} else {
555555
header('Content-Type: image/jpg');
556-
$image_url = base_url('images/eqsl_card_images/'.$this->Eqsl_images->get_image($id));
556+
$image_url = base_url($this->Eqsl_images->get_imagePath() .'/'. $this->Eqsl_images->get_image($id));
557557
header('Location: ' . $image_url);
558558
}
559559

@@ -608,7 +608,7 @@ function bulk_download_image($id) {
608608
return $error;
609609
}
610610
$filename = uniqid().'.jpg';
611-
if (file_put_contents('images/eqsl_card_images/' . '/'.$filename, $content) !== false) {
611+
if (file_put_contents($this->Eqsl_images->get_imagePath('p') .'/'. $filename, $content) !== false) {
612612
$this->Eqsl_images->save_image($id, $filename);
613613
}
614614
}
@@ -728,7 +728,8 @@ public function downloadUser($userid, $username, $password) {
728728
$this->eqslimporter->from_callsign_and_QTH(
729729
$eqsl_location['station_callsign'],
730730
$eqsl_location['eqslqthnickname'],
731-
$config['upload_path']
731+
$config['upload_path'],
732+
$eqsl_location['station_id']
732733
);
733734

734735
$eqsl_results[] = $this->eqslimporter->fetch($password);

application/controllers/Hrdlog.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ public function mark_hrdlog() {
165165

166166
$this->load->model('logbook_model');
167167

168-
foreach ($data['qsos']->result() as $qso)
168+
if (isset($data['qsos'])) {
169+
foreach ($data['qsos']->result() as $qso)
169170
{
170-
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
171-
}
171+
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
172+
}
173+
}
172174

173175
$this->load->view('interface_assets/header', $data);
174176
$this->load->view('hrdlog/mark_hrdlog', $data);

0 commit comments

Comments
 (0)