Porównaj commity

...

32 Commity

Autor SHA1 Wiadomość Data
Patrick Burns 19a95cecf5
Merge 96ed12cd89 into fd3ba41d26 2024-04-12 10:47:02 -07:00
Peter Goodhall fd3ba41d26 Switch to local htmx library instead of CDN 2024-04-12 14:59:04 +01:00
Peter Goodhall 5b70a1b61b
Merge pull request #3069 from Ciemon/patch-8
Update pota.txt
2024-04-10 17:47:29 +01:00
Peter Goodhall d7c6dbd29f Fixes #3056 Stopping invalid callsigns when creating station locations 2024-04-10 17:39:33 +01:00
Peter Goodhall 04ba3e733b another lower case ci 2024-04-10 17:24:50 +01:00
Peter Goodhall f297618cb0 Update search_result_ajax.php 2024-04-10 17:20:06 +01:00
Peter Goodhall f46b550917 Added another change to load library 2024-04-10 17:00:53 +01:00
Peter Goodhall dc5dd22766 try catch frequency on null 2024-04-10 16:34:39 +01:00
Peter Goodhall c7718d675c Impliments HTMX for the user delete so that you never leave the main table display 2024-04-10 15:15:54 +01:00
Peter Goodhall 0bc7f44e26 fixes issues with card enabling when creating new user 2024-04-10 15:04:07 +01:00
Peter Goodhall 3fe5159489 fixes user_eqsl_qth_nickname error when creating a new user 2024-04-10 14:51:10 +01:00
Ciemon b551ba3a30
Update pota.txt
After changes made to park naming in the POTA programme this update provides a sorted list of the latest park numbers from POTA.
2024-04-10 08:37:12 +01:00
Peter Goodhall 99e958d48c fixed typo 2024-04-09 14:24:30 +01:00
Peter Goodhall d77bb118ea fixed migration file name 2024-04-09 14:21:48 +01:00
Peter Goodhall e44ea531cc
Merge pull request #3026 from DJ3CE/dxped_config
Make dxped-url configurable
2024-04-09 14:20:46 +01:00
Peter Goodhall 18e46ad7a1
Merge pull request #3067 from patrickrb/fix-visitor-pagination-links
Fix visitor pagination links
2024-04-09 14:14:00 +01:00
Patrick Burns 5dcebe82a6 fix visitor pagination links 2024-04-08 19:47:37 -05:00
Peter Goodhall 96fdf31588
Merge pull request #3063 from patrickrb/sstv-directory-fixes
SSTV directory fixes
2024-04-08 11:05:10 +01:00
Patrick Burns 365671322b added sstvimages directory to repo along w/ matching index.html from other image asset directories. Also added some error handling onto the new storage_helper function to check if the directory exists before reading it 2024-04-07 12:08:18 -05:00
DJ3CE f03ad1d0b0 Switch dxped-url config to options-table 2024-04-04 19:50:53 +02:00
Patrick Burns 96ed12cd89 Merge branch 'dev' into dockerize-for-development 2024-04-03 16:25:24 -05:00
Patrick Burns 58d8705774 Merge branch 'dev' into dockerize-for-development 2024-04-01 20:49:33 -05:00
Patrick Burns 236e86f7a8 Merge branch 'dockerize-for-development' of github.com:patrickrb/Cloudlog into dockerize-for-development 2024-03-29 09:20:50 -05:00
Patrick Burns ab119a1f5d add a bit more details about the importance of docker-compose service names 2024-03-29 09:20:14 -05:00
Patrick Burns b9483d910e add a special note about the db service name in docker-compose 2024-03-29 09:18:25 -05:00
Patrick Burns b926cb68d4 updated sample to the correct defaults for docker-compose 2024-03-28 19:57:02 -05:00
Patrick Burns 5b2c04f6d5 pre-populate the install config inputs with the .env values if they exist 2024-03-28 17:49:59 -05:00
Patrick Burns 0d9924a49c bump php version to 7.4 to meet minimums 2024-03-28 17:43:43 -05:00
Patrick Burns 8e63c3a694 undo some errant changes to the readme 2024-03-28 17:31:55 -05:00
Patrick Burns 7345289b86 fix formatting issue in readme markdown 2024-03-28 17:26:42 -05:00
Patrick Burns 671e34157f dockerize the app so i can develop easier on my work machine 2024-03-28 17:22:55 -05:00
DJ3CE 07ba06d104 Make dxped-url configurable 2024-03-27 11:33:16 +01:00
22 zmienionych plików z 55491 dodań i 39736 usunięć

6
.env.sample 100644
Wyświetl plik

@ -0,0 +1,6 @@
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_DATABASE=cloudlog
MYSQL_USER=cloudlog
MYSQL_PASSWORD=cloudlogpassword
MYSQL_HOST=db
MYSQL_PORT=3306

1
.gitignore vendored
Wyświetl plik

@ -18,3 +18,4 @@
sync.sh
*.p12
*.swp
.env

29
Dockerfile 100644
Wyświetl plik

@ -0,0 +1,29 @@
# Use the official image for PHP and Apache
FROM php:7.4-apache
# Set the working directory to /var/www/html
WORKDIR /var/www/html
# Install system dependencies, including git and libxml2
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libpng-dev \
libonig-dev \
default-mysql-client \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install gd \
&& docker-php-ext-install mbstring \
&& docker-php-ext-install zip \
&& docker-php-ext-install xml \
&& a2enmod rewrite
# Expose port 80
EXPOSE 80

Wyświetl plik

@ -11,24 +11,58 @@ Core Contributors: 2M0SQL ([@magicbug](https://github.com/magicbug)), LA8AJA ([@
Website: [http://www.cloudlog.co.uk](http://www.cloudlog.co.uk)
## Requirements
* Linux based Operating System
* Apache (Nginx should work)
* PHP Version 7.4 (PHP 8.2 works)
* MySQL (MySQL 5.7 or higher)
- Linux based Operating System
- Apache (Nginx should work)
- PHP Version 7.4 (PHP 8.2 works)
- MySQL (MySQL 5.7 or higher)
Notes
* If you want to log microwave QSOs you will need to use a 64bit operating system.
* We do not provide Docker support, however you are free to use it if you wish but we will not handle support.
- If you want to log microwave QSOs you will need to use a 64bit operating system.
- We do not provide Docker support, however you are free to use it if you wish but we will not handle support.
## Setup
Installation information can be found on the [wiki](https://github.com/magicbug/Cloudlog/wiki).
# Docker Development Environment
This guide provides instructions for setting up a local development environment using Docker and Docker Compose. Please note that this setup is not recommended for production use.
## Prerequisites
Before you begin, you need to install Docker and Docker Compose. You can download them using the following links:
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/)
## Configuration
1. Copy the `.env.sample` file to `.env`:
```bash
cp .env.sample .env
```
2. Open the `.env` file and update the values to match your setup. The values from the `.env` file will be used to populate the database connection details on the install page. You should not need to change these unless your setup requires different values.
**Note:** Docker Compose creates a network for your application, and each service (container) in the Docker Compose file can reach each other via the service name. This is why the `DB_HOST` value in the `.env` file and on the install page should match the service name of the database in the `docker-compose.yml` file. For example, if the database service in `docker-compose.yml` is defined as `db`, then `DB_HOST` should be set as 'db'. This allows the application to communicate with the database service on its internal docker network.
## Starting the Development Environment
To start the development environment, run the following command in your terminal:
```bash
docker-compose up
```
## Support
Cloudlog has two support systems for code issues use Github issues, however if you have general issues with setting up your server please use our general discussion forum [https://github.com/magicbug/Cloudlog/discussions](https://github.com/magicbug/Cloudlog/discussions).
## Security Vulnerabilities
If you discover a security vulnerability within Cloudlog, please send an e-mail to Peter Goodhall, 2M0SQL via [peter@magicbug.co.uk](mailto:peter@magicbug.co.uk). All security vulnerabilities will be promptly addressed.
## Want Cloudlog Hosting?
@ -53,4 +87,4 @@ Cloudlog is supported by Patreon and donations via PayPal, thanks to the followi
Paul (M0TZO), Tim (G4VXE), Paul (N8HM), Michelle (W5NYV), Mitchell (AD0HJ), Dan (M0TCB), Martin (DK3ML), Juan Carlos (EA5WA), Iain (M0PCB), Charlie (GM1TGY), Ondrej (OK1CDJ), Trystan (G0KAY), Oliver (DL6KBG), Volkmar Schirmer, Jordan (M0PIR), Thomas Ziegler, Mathis (DB9MAT), Ken (VE3HLS), Tyler (WL7T), Jeremy Taylor, Ben Kuhn, Eric Thresher, Michael Cullen, Juuso (OH1JW), Anthony Castiglia, Fernando Ramirez-Ferrer, Robert Dixon, Mark Percival, Julia (KV1V), Timo Tomasini, Ant (NU1U), Christopher Williams, Danny Barnes, Vic, Tom (M0LTE), smurphboy, Lars (SM0TGU), Theo (PD9DP), Stefan (SM0RGM). Peter (G0ABI), Lou (KI5FTY), Michael (DG3NAB), Dragan (4O4A), minorsecond, Emily (W7AYQ), Steve (M0SKM), Rob (M0VFC), Doug (WA6L), Petr (OK1PKR), Fabian (HB9HIL), Daniel (OK2VLK), John (M5JFS).
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)
If you'd like to donate to Cloudlog to help allow @magicbug spend less time doing commercial work and more time coding Cloudlog then you can donate via [PayPal](https://paypal.me/PGoodhall), [Github Sponsor](https://github.com/sponsors/magicbug) or become a [Patreon](https://www.patreon.com/2m0sql)

Wyświetl plik

@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 176;
$config['migration_version'] = 177;
/*
|--------------------------------------------------------------------------

Wyświetl plik

@ -59,6 +59,61 @@ class User extends CI_Controller {
$data['timezones'] = $this->user_model->timezones();
$data['language'] = 'english';
// Set defaults
$data['dashboard_upcoming_dx_card'] = false;
$data['dashboard_qslcard_card'] = false;
$data['dashboard_eqslcard_card'] = false;
$data['dashboard_lotw_card'] = false;
$data['dashboard_vuccgrids_card'] = false;
$dashboard_options = $this->user_options_model->get_options('dashboard')->result();
foreach ($dashboard_options as $item) {
$option_name = $item->option_name;
$option_key = $item->option_key;
$option_value = $item->option_value;
if ($option_name == 'dashboard_upcoming_dx_card' && $option_key == 'enabled') {
if($item->option_value == 'true') {
$data['dashboard_upcoming_dx_card'] = true;
} else {
$data['dashboard_upcoming_dx_card'] = false;
}
}
if ($option_name == 'dashboard_qslcards_card' && $option_key == 'enabled') {
if($item->option_value == 'true') {
$data['dashboard_qslcard_card'] = true;
} else {
$data['dashboard_qslcard_card'] = false;
}
}
if ($option_name == 'dashboard_eqslcards_card' && $option_key == 'enabled') {
if($item->option_value == 'true') {
$data['dashboard_eqslcard_card'] = true;
} else {
$data['dashboard_eqslcard_card'] = false;
}
}
if ($option_name == 'dashboard_lotw_card' && $option_key == 'enabled') {
if($item->option_value == 'true') {
$data['dashboard_lotw_card'] = true;
} else {
$data['dashboard_lotw_card'] = false;
}
}
if ($option_name == 'dashboard_vuccgrids_card' && $option_key == 'enabled') {
if($item->option_value == 'true') {
$data['dashboard_vuccgrids_card'] = true;
} else {
$data['dashboard_vuccgrids_card'] = false;
}
}
}
if ($this->form_validation->run() == FALSE) {
$data['page_title'] = "Add User";
$data['measurement_base'] = $this->config->item('measurement_base');
@ -757,6 +812,37 @@ class User extends CI_Controller {
$this->load->view('interface_assets/footer');
}
/**
* Deletes a user by their ID.
*
* This function first loads the 'user_model'. It then checks if the current user has the authorization level of 99.
* If not, it sets a flash message and redirects the user to the dashboard.
*
* If the user is authorized, it gets the user to be deleted by their ID from the URI segment 3.
* It then calls the 'delete' function from the 'user_model' with the user ID as a parameter.
*
* If the 'delete' function executes successfully, it sets the HTTP status code to 200.
* If the 'delete' function fails, it sets the HTTP status code to 500.
*
* @param int $id The ID of the user to delete.
*/
function delete_new($id) {
$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'); }
$query = $this->user_model->get_by_id($this->uri->segment(3));
// call $this->user_model->delete and if no errors return true
if ($this->user_model->delete($id)) {
// request responds with a 200 status code and empty content
$this->output->set_status_header(200);
} else {
// request responds with a 500 status code and empty content
$this->output->set_status_header(500);
}
}
function delete() {
$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'); }

Wyświetl plik

@ -82,7 +82,7 @@ class Visitor extends CI_Controller {
$config['base_url'] = base_url().'index.php/visitor/'. $public_slug . '/index';
$config['total_rows'] = $this->logbook_model->total_qsos($logbooks_locations_array);
$config['per_page'] = '25';
$config['num_links'] = $this->logbook_model->total_qsos($logbooks_locations_array) / 25;
$config['num_links'] = 6;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['attributes'] = ['class' => 'page-link'];

Wyświetl plik

@ -30,7 +30,7 @@ class Workabledxcc extends CI_Controller
public function dxcclist()
{
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
$json = file_get_contents($this->optionslib->get_option('dxped_url'));
// Decode the JSON data into a PHP array
$dataResult = json_decode($json, true);

Wyświetl plik

@ -2,22 +2,26 @@
if (!function_exists('folderSize')) {
function folderSize($dir){
$count_size = 0;
$count = 0;
$dir_array = scandir($dir);
foreach($dir_array as $key=>$filename){
if($filename!=".." && $filename!="."){
if(is_dir($dir."/".$filename)){
$new_foldersize = folderSize($dir."/".$filename);
$count_size = $count_size+ $new_foldersize;
}else if(is_file($dir."/".$filename)){
$count_size = $count_size + filesize($dir."/".$filename);
$count++;
if (is_dir($dir)) {
$count_size = 0;
$count = 0;
$dir_array = scandir($dir);
foreach($dir_array as $key=>$filename){
if($filename!=".." && $filename!="."){
if(is_dir($dir."/".$filename)){
$new_foldersize = folderSize($dir."/".$filename);
$count_size = $count_size+ $new_foldersize;
}else if(is_file($dir."/".$filename)){
$count_size = $count_size + filesize($dir."/".$filename);
$count++;
}
}
}
return $count_size;
} else {
return 0;
}
return $count_size;
}
}
}
if (!function_exists('sizeFormat')) {

Wyświetl plik

@ -0,0 +1,25 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* This migration adds a dxped_url-key to the options table, to configure
* the endpoint, from where the dxpedition-data is being loaded.
*/
class Migration_add_dxped_url_option extends CI_Migration {
public function up()
{
$data = array(
array('option_name' => "dxped_url", 'option_value' => "https://cdn.cloudlog.org/read_ng3k_dxped_list.php", 'autoload' => "yes"),
);
$this->db->insert_batch('options', $data);
}
public function down()
{
// No option to down
}
}

Wyświetl plik

@ -185,7 +185,8 @@ class User_Model extends CI_Model {
'user_qso_end_times' => xss_clean($user_qso_end_times),
'user_quicklog' => xss_clean($user_quicklog),
'user_quicklog_enter' => xss_clean($user_quicklog_enter),
'language' => xss_clean($language)
'language' => xss_clean($language),
'user_eqsl_qth_nickname' => "",
);
// Check the password is valid

Wyświetl plik

@ -5,7 +5,7 @@ class Workabledxcc_model extends CI_Model
public function GetThisWeek()
{
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
$json = file_get_contents($this->optionslib->get_option('dxped_url'));
// Step 2: Convert the JSON data to an array.
$data = json_decode($json, true);

Wyświetl plik

@ -47,7 +47,7 @@
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/eqslcharcounter.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/sections/version_dialog.js"></script>
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
<script src="<?php echo base_url(); ?>assets/js/htmx.min.js"></script>
<script>
// Reinitialize tooltips after new content has been loaded

Wyświetl plik

@ -1,35 +1,85 @@
<?php
function echo_table_header_col($name) {
switch($name) {
case 'Mode': echo lang('gen_hamradio_mode'); break;
case 'RSTS': echo lang('gen_hamradio_rsts'); break;
case 'RSTR': echo lang('gen_hamradio_rstr'); break;
case 'Country': echo lang('general_word_country'); break;
case 'IOTA': echo lang('gen_hamradio_iota'); break;
case 'SOTA': echo lang('gen_hamradio_sota'); break;
case 'WWFF': echo lang('gen_hamradio_wwff'); break;
case 'POTA': echo lang('gen_hamradio_pota'); break;
case 'State': echo lang('gen_hamradio_state'); break;
case 'Grid': echo lang('gen_hamradio_gridsquare'); break;
case 'Distance': echo lang('gen_hamradio_distance'); break;
case 'Band': echo lang('gen_hamradio_band'); break;
case 'Frequency': echo lang('gen_hamradio_frequency'); break;
case 'Operator': echo lang('gen_hamradio_operator'); break;
case 'Location': echo lang('cloudlog_station_profile'); break;
case 'Name': echo lang('general_word_name'); break;
}
}
function echo_table_col($row, $name) {
switch($name) {
function echo_table_header_col($name)
{
switch ($name) {
case 'Mode':
echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE;
echo lang('gen_hamradio_mode');
break;
case 'RSTS':
echo $row->COL_RST_SENT; if ($row->COL_STX) { echo ' <span data-bs-toggle="tooltip" title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_STX); echo '</span>';} if ($row->COL_STX_STRING) { echo ' <span data-bs-toggle="tooltip" title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_STX_STRING . '</span>';};
echo lang('gen_hamradio_rsts');
break;
case 'RSTR':
echo $row->COL_RST_RCVD; if ($row->COL_SRX) { echo ' <span data-bs-toggle="tooltip" title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">'; printf("%03d", $row->COL_SRX); echo '</span>';} if ($row->COL_SRX_STRING) { echo ' <span data-bs-toggle="tooltip" title="'.($row->COL_CONTEST_ID!=""?$row->COL_CONTEST_ID:"n/a").'" class="badge text-bg-light">' . $row->COL_SRX_STRING . '</span>';};
echo lang('gen_hamradio_rstr');
break;
case 'Country':
echo lang('general_word_country');
break;
case 'IOTA':
echo lang('gen_hamradio_iota');
break;
case 'SOTA':
echo lang('gen_hamradio_sota');
break;
case 'WWFF':
echo lang('gen_hamradio_wwff');
break;
case 'POTA':
echo lang('gen_hamradio_pota');
break;
case 'State':
echo lang('gen_hamradio_state');
break;
case 'Grid':
echo lang('gen_hamradio_gridsquare');
break;
case 'Distance':
echo lang('gen_hamradio_distance');
break;
case 'Band':
echo lang('gen_hamradio_band');
break;
case 'Frequency':
echo lang('gen_hamradio_frequency');
break;
case 'Operator':
echo lang('gen_hamradio_operator');
break;
case 'Location':
echo lang('cloudlog_station_profile');
break;
case 'Name':
echo lang('general_word_name');
break;
}
}
function echo_table_col($row, $name)
{
switch ($name) {
case 'Mode':
echo $row->COL_SUBMODE == null ? $row->COL_MODE : $row->COL_SUBMODE;
break;
case 'RSTS':
echo $row->COL_RST_SENT;
if ($row->COL_STX) {
echo ' <span data-bs-toggle="tooltip" title="' . ($row->COL_CONTEST_ID != "" ? $row->COL_CONTEST_ID : "n/a") . '" class="badge text-bg-light">';
printf("%03d", $row->COL_STX);
echo '</span>';
}
if ($row->COL_STX_STRING) {
echo ' <span data-bs-toggle="tooltip" title="' . ($row->COL_CONTEST_ID != "" ? $row->COL_CONTEST_ID : "n/a") . '" class="badge text-bg-light">' . $row->COL_STX_STRING . '</span>';
};
break;
case 'RSTR':
echo $row->COL_RST_RCVD;
if ($row->COL_SRX) {
echo ' <span data-bs-toggle="tooltip" title="' . ($row->COL_CONTEST_ID != "" ? $row->COL_CONTEST_ID : "n/a") . '" class="badge text-bg-light">';
printf("%03d", $row->COL_SRX);
echo '</span>';
}
if ($row->COL_SRX_STRING) {
echo ' <span data-bs-toggle="tooltip" title="' . ($row->COL_CONTEST_ID != "" ? $row->COL_CONTEST_ID : "n/a") . '" class="badge text-bg-light">' . $row->COL_SRX_STRING . '</span>';
};
break;
case 'Country':
echo ucwords(strtolower(($row->COL_COUNTRY)));
@ -47,13 +97,17 @@ function echo_table_col($row, $name) {
echo ($row->COL_POTA_REF);
break;
case 'Grid':
echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE;
echo strlen($row->COL_GRIDSQUARE) == 0 ? $row->COL_VUCC_GRIDS : $row->COL_GRIDSQUARE;
break;
case 'Distance':
echo ($row->COL_DISTANCE ? $row->COL_DISTANCE . '&nbsp;km' : '');
break;
case 'Band':
if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); };
if ($row->COL_SAT_NAME != null) {
echo $row->COL_SAT_NAME;
} else {
echo strtolower($row->COL_BAND);
};
break;
case 'State':
echo ($row->COL_STATE);
@ -62,7 +116,26 @@ function echo_table_col($row, $name) {
echo ($row->COL_OPERATOR);
break;
case 'Frequency':
if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'; if ($row->COL_FREQ != null) { echo ' <span data-bs-toggle="tooltip" title="'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'">'.$row->COL_SAT_NAME.'</span>'; } else { echo $row->COL_SAT_NAME; } echo '</a></td>'; } else { if ($row->COL_FREQ != null) { echo ' <span data-bs-toggle="tooltip" title="'.$row->COL_BAND.'">'.$ci->frequency->hz_to_mhz($row->COL_FREQ).'</span>'; } else { echo strtolower($row->COL_BAND); } };
$CI =& get_instance();
$CI->load->library('frequency');
if ($row->COL_SAT_NAME != null) {
echo '<a href="https://db.satnogs.org/search/?q=' . $row->COL_SAT_NAME . '" target="_blank">';
if ($row->COL_FREQ != null && $CI->frequency->hz_to_mhz($row->COL_FREQ) != null) {
echo ' <span data-bs-toggle="tooltip" title="' . $CI->frequency->hz_to_mhz($row->COL_FREQ) . '">' . $row->COL_SAT_NAME . '</span>';
} else {
echo $row->COL_SAT_NAME;
}
echo '</a></td>';
} else {
if ($row->COL_FREQ != null && $CI->frequency->hz_to_mhz($row->COL_FREQ) != null) {
echo ' <span data-bs-toggle="tooltip" title="' . $row->COL_BAND . '">' . $CI->frequency->hz_to_mhz($row->COL_FREQ) . '</span>';
} else {
echo strtolower($row->COL_BAND);
}
}
break;
case 'State':
echo ($row->COL_STATE);
@ -74,7 +147,7 @@ function echo_table_col($row, $name) {
echo ($row->station_profile_name);
break;
case 'Name':
echo ($row->COL_NAME);
echo ($row->COL_NAME);
break;
default:
echo '(unknown col)';
@ -82,323 +155,331 @@ function echo_table_col($row, $name) {
}
?>
<div class="table-responsive">
<table style="width:100%" class="table table-sm tablewas table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr class="titles">
<th><?php echo lang('general_word_date'); ?></th>
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<th><?php echo lang('general_word_time'); ?></th>
<?php } ?>
<th><?php echo lang('gen_hamradio_call'); ?></th>
<?php
$ci =& get_instance();
echo '<th>';
echo_table_header_col($this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5'));
echo '</th>';
<table style="width:100%" class="table table-sm tablewas table-bordered table-hover table-striped table-condensed text-center">
<thead>
<tr class="titles">
<th><?php echo lang('general_word_date'); ?></th>
<?php if (($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
<th><?php echo lang('general_word_time'); ?></th>
<?php } ?>
<th><?php echo lang('gen_hamradio_call'); ?></th>
<?php
$ci = &get_instance();
echo '<th>';
echo_table_header_col($this->session->userdata('user_column1') == "" ? 'Mode' : $this->session->userdata('user_column1'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column2') == "" ? 'RSTS' : $this->session->userdata('user_column2'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column3') == "" ? 'RSTR' : $this->session->userdata('user_column3'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column4') == "" ? 'Band' : $this->session->userdata('user_column4'));
echo '</th>';
echo '<th>';
echo_table_header_col($this->session->userdata('user_column5') == "" ? 'Country' : $this->session->userdata('user_column5'));
echo '</th>';
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<th>QSL</th>
<?php if($this->session->userdata('user_eqsl_name') != "") { ?>
<th>eQSL</th>
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<th>QSL</th>
<?php if ($this->session->userdata('user_eqsl_name') != "") { ?>
<th>eQSL</th>
<?php } ?>
<?php if ($this->session->userdata('user_lotw_name') != "") { ?>
<th>LoTW</th>
<?php } ?>
<?php if ($this->session->userdata('hasQrzKey') != "") { ?>
<th>QRZ</th>
<?php } ?>
<?php } ?>
<?php if($this->session->userdata('user_lotw_name') != "") { ?>
<th>LoTW</th>
<?php } ?>
<?php if($this->session->userdata('hasQrzKey') != "") { ?>
<th>QRZ</th>
<?php } ?>
<?php } ?>
<th><?php echo lang('gen_hamradio_station'); ?></th>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<th></th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php $i = 0; foreach ($results->result() as $row) { ?>
<?php if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<th></th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php $i = 0;
foreach ($results->result() as $row) { ?>
<?php
<?php
// Get Date format
if($this->session->userdata('user_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');
}
?>
<?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>
<?php } ?>
<td>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","&Oslash;",strtoupper($row->COL_CALL)); ?></a>
</td>
<?php
echo '<td>';
echo_table_col($row, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column5')==""?'Country':$this->session->userdata('user_column5'));
echo '</td>';
if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<?php
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) {
$timestamp = ' '.date($custom_date_format, strtotime($row->COL_QSLSDATE));
} else {
$timestamp = '';
}
switch ($row->COL_QSL_SENT) {
case "Y":
echo "class=\"qsl-green\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_sent').$timestamp;
break;
case "Q":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_queued').$timestamp;
break;
case "R":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_requested').$timestamp;
break;
case "I":
echo "class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_invalid_ignore').$timestamp;
break;
default:
echo "class=\"qsl-red";
break;
}
} else { echo "class=\"qsl-red"; }
if ($row->COL_QSL_SENT_VIA != "") {
switch ($row->COL_QSL_SENT_VIA) {
case "B":
echo " (".lang('general_word_qslcard_bureau').")";
break;
case "D":
echo " (".lang('general_word_qslcard_direct').")";
break;
case "M":
echo " (".lang('general_word_qslcard_via').": ".($row->COL_QSL_VIA!="" ? $row->COL_QSL_VIA:"n/a").")";
break;
case "E":
echo " (".lang('general_word_qslcard_electronic').")";
break;
}
}
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_QSL_RCVD != "N") {
if ($row->COL_QSLRDATE != null) {
$timestamp = ' '.date($custom_date_format, strtotime($row->COL_QSLRDATE));
} else {
$timestamp = '';
}
switch ($row->COL_QSL_RCVD) {
case "Y":
echo "class=\"qsl-green\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_received').$timestamp;
break;
case "Q":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_queued').$timestamp;
break;
case "R":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_requested').$timestamp;
break;
case "I":
echo "class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"".lang('general_word_invalid_ignore').$timestamp;
break;
default:
echo "class=\"qsl-red";
break;
}
} else { echo "class=\"qsl-red"; }
if ($row->COL_QSL_RCVD_VIA != "") {
switch ($row->COL_QSL_RCVD_VIA) {
case "B":
echo " (".lang('general_word_qslcard_bureau').")";
break;
case "D":
echo " (".lang('general_word_qslcard_direct').")";
break;
case "M":
echo " (Manager)";
break;
case "E":
echo " (".lang('general_word_qslcard_electronic').")";
break;
}
}
echo '">&#9660;</span>';
?>
<?php if ($this->session->userdata('user_eqsl_name') != ""){
echo '<td style=\'text-align: center\' class="eqsl">';
echo '<span ';
if ($row->COL_EQSL_QSL_SENT == "Y") {
echo "title=\"".lang('eqsl_short')." ".lang('general_word_sent');
if ($row->COL_EQSL_QSLSDATE != null) {
$timestamp = strtotime($row->COL_EQSL_QSLSDATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="eqsl-';
echo ($row->COL_EQSL_QSL_SENT=='Y')?'green':'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_EQSL_QSL_RCVD == "Y") {
echo "title=\"".lang('eqsl_short')." ".lang('general_word_received');
if ($row->COL_EQSL_QSLRDATE != null) {
$timestamp = strtotime($row->COL_EQSL_QSLRDATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="eqsl-';
echo ($row->COL_EQSL_QSL_RCVD=='Y')?'green':'red';
echo '">';
if($row->COL_EQSL_QSL_RCVD =='Y') {
echo '<a style="color: green" href="';
echo site_url("eqsl/image/".$row->COL_PRIMARY_KEY);
echo '" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>';
} else {
echo '&#9660;';
}
echo '</span>';
echo '</td>';
} ?>
<?php if($this->session->userdata('user_lotw_name') != "") {
echo '<td style=\'text-align: center\' class="lotw">';
echo '<span ';
if ($row->COL_LOTW_QSL_SENT == "Y") {
echo "title=\"".lang('lotw_short')." ".lang('general_word_sent');
if ($row->COL_LOTW_QSLSDATE != null) {
$timestamp = strtotime($row->COL_LOTW_QSLSDATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="lotw-';
echo ($row->COL_LOTW_QSL_SENT=='Y')?'green':'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_LOTW_QSL_RCVD == "Y") {
echo "title=\"".lang('lotw_short')." ".lang('general_word_received');
if ($row->COL_LOTW_QSLRDATE != null) {
$timestamp = strtotime($row->COL_LOTW_QSLRDATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="lotw-';
echo ($row->COL_LOTW_QSL_RCVD=='Y')?'green':'red';
echo '">&#9660;</span>';
echo '</td>';
} ?>
<?php if($this->session->userdata('hasQrzKey') != "") {
echo '<td style=\'text-align: center\' class="qrz">';
echo '<span ';
if ($row->COL_QRZCOM_QSO_UPLOAD_STATUS == "Y") {
echo "title=\"QRZ ".lang('general_word_sent');
if ($row->COL_QRZCOM_QSO_UPLOAD_DATE != null) {
$timestamp = strtotime($row->COL_QRZCOM_QSO_UPLOAD_DATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="qrz-';
echo ($row->COL_QRZCOM_QSO_UPLOAD_STATUS=='Y')?'green':'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_QRZCOM_QSO_DOWNLOAD_STATUS == "Y") {
echo "title=\"QRZ ".lang('general_word_received');
if ($row->COL_QRZCOM_QSO_DOWNLOAD_DATE != null) {
$timestamp = strtotime($row->COL_QRZCOM_QSO_DOWNLOAD_DATE);
echo " ".($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="qrz-';
echo ($row->COL_QRZCOM_QSO_DOWNLOAD_STATUS=='Y')?'green':'red';
echo '">&#9660;</span>';
echo '</td>';
} ?>
<?php } ?>
<?php if(isset($row->station_callsign)) { ?>
<td>
<span class="badge text-bg-light"><?php echo $row->station_callsign; ?></span>
</td>
<?php } ?>
<?php if(($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<?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>
<?php } ?>
<td>
<div class="dropdown">
<a class="btn btn-sm btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-cog"></i>
</a>
<div class="dropdown-menu menuOnResultTab" aria-labelledby="dropdownMenuLink" data-qsoid="qso_<?php echo $row->COL_PRIMARY_KEY; ?>">
<a class="dropdown-item" id="edit_qso" href="javascript:qso_edit(<?php echo $row->COL_PRIMARY_KEY; ?>)"><i class="fas fa-edit"></i> <?php echo lang('general_edit_qso'); ?></a>
<?php if($row->COL_QSL_SENT !='Y') { ?>
<div class="qsl_sent_<?php echo $row->COL_PRIMARY_KEY; ?>">
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qsl_sent(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B')" ><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_tx_bureau'); ?></a>
<a class="dropdown-item" href="javascript:qsl_sent(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_tx_direct'); ?></a>
</div>
<?php } ?>
<?php if($row->COL_QSL_RCVD !='Y') { ?>
<div class="qsl_rcvd_<?php echo $row->COL_PRIMARY_KEY; ?>">
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B')" ><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_bureau'); ?></a>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_direct'); ?></a>
<a class="dropdown-item" href="javascript:qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i><?php echo lang('general_mark_qsl_requested'); ?></a>
<a class="dropdown-item" href="javascript:qsl_ignore(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')" ><i class="fas fa-envelope"></i><?php echo lang('general_mark_qsl_not_required'); ?></a>
</div>
<?php } ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://www.qrz.com/db/<?php echo $row->COL_CALL; ?>" target="_blank"><i class="fas fa-question"></i><?php echo lang('general_lookup_qrz'); ?></a>
<a class="dropdown-item" href="https://www.hamqth.com/<?php echo $row->COL_CALL; ?>" target="_blank"><i class="fas fa-question"></i><?php echo lang('general_lookup_hamqth'); ?></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qso_delete(<?php echo $row->COL_PRIMARY_KEY; ?>, '<?php echo $row->COL_CALL; ?>')"><i class="fas fa-trash-alt"></i> <?php echo lang('general_delete_qso'); ?></a>
</div>
</div>
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0", "&Oslash;", strtoupper($row->COL_CALL)); ?></a>
</td>
<?php } ?>
</tr>
<?php $i++; } ?>
</tbody>
<?php
echo '<td>';
echo_table_col($row, $this->session->userdata('user_column1') == "" ? 'Mode' : $this->session->userdata('user_column1'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column2') == "" ? 'RSTS' : $this->session->userdata('user_column2'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column3') == "" ? 'RSTR' : $this->session->userdata('user_column3'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column4') == "" ? 'Band' : $this->session->userdata('user_column4'));
echo '</td><td>';
echo_table_col($row, $this->session->userdata('user_column5') == "" ? 'Country' : $this->session->userdata('user_column5'));
echo '</td>';
if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<?php
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) {
$timestamp = ' ' . date($custom_date_format, strtotime($row->COL_QSLSDATE));
} else {
$timestamp = '';
}
switch ($row->COL_QSL_SENT) {
case "Y":
echo "class=\"qsl-green\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_sent') . $timestamp;
break;
case "Q":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_queued') . $timestamp;
break;
case "R":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_requested') . $timestamp;
break;
case "I":
echo "class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_invalid_ignore') . $timestamp;
break;
default:
echo "class=\"qsl-red";
break;
}
} else {
echo "class=\"qsl-red";
}
if ($row->COL_QSL_SENT_VIA != "") {
switch ($row->COL_QSL_SENT_VIA) {
case "B":
echo " (" . lang('general_word_qslcard_bureau') . ")";
break;
case "D":
echo " (" . lang('general_word_qslcard_direct') . ")";
break;
case "M":
echo " (" . lang('general_word_qslcard_via') . ": " . ($row->COL_QSL_VIA != "" ? $row->COL_QSL_VIA : "n/a") . ")";
break;
case "E":
echo " (" . lang('general_word_qslcard_electronic') . ")";
break;
}
}
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_QSL_RCVD != "N") {
if ($row->COL_QSLRDATE != null) {
$timestamp = ' ' . date($custom_date_format, strtotime($row->COL_QSLRDATE));
} else {
$timestamp = '';
}
switch ($row->COL_QSL_RCVD) {
case "Y":
echo "class=\"qsl-green\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_received') . $timestamp;
break;
case "Q":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_queued') . $timestamp;
break;
case "R":
echo "class=\"qsl-yellow\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_requested') . $timestamp;
break;
case "I":
echo "class=\"qsl-grey\" data-bs-toggle=\"tooltip\" title=\"" . lang('general_word_invalid_ignore') . $timestamp;
break;
default:
echo "class=\"qsl-red";
break;
}
} else {
echo "class=\"qsl-red";
}
if ($row->COL_QSL_RCVD_VIA != "") {
switch ($row->COL_QSL_RCVD_VIA) {
case "B":
echo " (" . lang('general_word_qslcard_bureau') . ")";
break;
case "D":
echo " (" . lang('general_word_qslcard_direct') . ")";
break;
case "M":
echo " (Manager)";
break;
case "E":
echo " (" . lang('general_word_qslcard_electronic') . ")";
break;
}
}
echo '">&#9660;</span>';
?>
<?php if ($this->session->userdata('user_eqsl_name') != "") {
echo '<td style=\'text-align: center\' class="eqsl">';
echo '<span ';
if ($row->COL_EQSL_QSL_SENT == "Y") {
echo "title=\"" . lang('eqsl_short') . " " . lang('general_word_sent');
if ($row->COL_EQSL_QSLSDATE != null) {
$timestamp = strtotime($row->COL_EQSL_QSLSDATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="eqsl-';
echo ($row->COL_EQSL_QSL_SENT == 'Y') ? 'green' : 'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_EQSL_QSL_RCVD == "Y") {
echo "title=\"" . lang('eqsl_short') . " " . lang('general_word_received');
if ($row->COL_EQSL_QSLRDATE != null) {
$timestamp = strtotime($row->COL_EQSL_QSLRDATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="eqsl-';
echo ($row->COL_EQSL_QSL_RCVD == 'Y') ? 'green' : 'red';
echo '">';
if ($row->COL_EQSL_QSL_RCVD == 'Y') {
echo '<a style="color: green" href="';
echo site_url("eqsl/image/" . $row->COL_PRIMARY_KEY);
echo '" data-fancybox="images" data-width="528" data-height="336">&#9660;</a>';
} else {
echo '&#9660;';
}
echo '</span>';
echo '</td>';
} ?>
<?php if ($this->session->userdata('user_lotw_name') != "") {
echo '<td style=\'text-align: center\' class="lotw">';
echo '<span ';
if ($row->COL_LOTW_QSL_SENT == "Y") {
echo "title=\"" . lang('lotw_short') . " " . lang('general_word_sent');
if ($row->COL_LOTW_QSLSDATE != null) {
$timestamp = strtotime($row->COL_LOTW_QSLSDATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="lotw-';
echo ($row->COL_LOTW_QSL_SENT == 'Y') ? 'green' : 'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_LOTW_QSL_RCVD == "Y") {
echo "title=\"" . lang('lotw_short') . " " . lang('general_word_received');
if ($row->COL_LOTW_QSLRDATE != null) {
$timestamp = strtotime($row->COL_LOTW_QSLRDATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="lotw-';
echo ($row->COL_LOTW_QSL_RCVD == 'Y') ? 'green' : 'red';
echo '">&#9660;</span>';
echo '</td>';
} ?>
<?php if ($this->session->userdata('hasQrzKey') != "") {
echo '<td style=\'text-align: center\' class="qrz">';
echo '<span ';
if ($row->COL_QRZCOM_QSO_UPLOAD_STATUS == "Y") {
echo "title=\"QRZ " . lang('general_word_sent');
if ($row->COL_QRZCOM_QSO_UPLOAD_DATE != null) {
$timestamp = strtotime($row->COL_QRZCOM_QSO_UPLOAD_DATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="qrz-';
echo ($row->COL_QRZCOM_QSO_UPLOAD_STATUS == 'Y') ? 'green' : 'red';
echo '">&#9650;</span>';
echo '<span ';
if ($row->COL_QRZCOM_QSO_DOWNLOAD_STATUS == "Y") {
echo "title=\"QRZ " . lang('general_word_received');
if ($row->COL_QRZCOM_QSO_DOWNLOAD_DATE != null) {
$timestamp = strtotime($row->COL_QRZCOM_QSO_DOWNLOAD_DATE);
echo " " . ($timestamp != '' ? date($custom_date_format, $timestamp) : '');
}
echo "\" data-bs-toggle=\"tooltip\"";
}
echo ' class="qrz-';
echo ($row->COL_QRZCOM_QSO_DOWNLOAD_STATUS == 'Y') ? 'green' : 'red';
echo '">&#9660;</span>';
echo '</td>';
} ?>
<?php } ?>
<?php if (isset($row->station_callsign)) { ?>
<td>
<span class="badge text-bg-light"><?php echo $row->station_callsign; ?></span>
</td>
<?php } ?>
<?php if (($this->config->item('use_auth')) && ($this->session->userdata('user_type') >= 2)) { ?>
<td>
<div class="dropdown">
<a class="btn btn-sm btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-cog"></i>
</a>
<div class="dropdown-menu menuOnResultTab" aria-labelledby="dropdownMenuLink" data-qsoid="qso_<?php echo $row->COL_PRIMARY_KEY; ?>">
<a class="dropdown-item" id="edit_qso" href="javascript:qso_edit(<?php echo $row->COL_PRIMARY_KEY; ?>)"><i class="fas fa-edit"></i> <?php echo lang('general_edit_qso'); ?></a>
<?php if ($row->COL_QSL_SENT != 'Y') { ?>
<div class="qsl_sent_<?php echo $row->COL_PRIMARY_KEY; ?>">
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qsl_sent(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B')"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_tx_bureau'); ?></a>
<a class="dropdown-item" href="javascript:qsl_sent(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_tx_direct'); ?></a>
</div>
<?php } ?>
<?php if ($row->COL_QSL_RCVD != 'Y') { ?>
<div class="qsl_rcvd_<?php echo $row->COL_PRIMARY_KEY; ?>">
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'B')"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_bureau'); ?></a>
<a class="dropdown-item" href="javascript:qsl_rcvd(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')"><i class="fas fa-envelope"></i> <?php echo lang('general_mark_qsl_rx_direct'); ?></a>
<a class="dropdown-item" href="javascript:qsl_requested(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')"><i class="fas fa-envelope"></i><?php echo lang('general_mark_qsl_requested'); ?></a>
<a class="dropdown-item" href="javascript:qsl_ignore(<?php echo $row->COL_PRIMARY_KEY; ?>, 'D')"><i class="fas fa-envelope"></i><?php echo lang('general_mark_qsl_not_required'); ?></a>
</div>
<?php } ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://www.qrz.com/db/<?php echo $row->COL_CALL; ?>" target="_blank"><i class="fas fa-question"></i><?php echo lang('general_lookup_qrz'); ?></a>
<a class="dropdown-item" href="https://www.hamqth.com/<?php echo $row->COL_CALL; ?>" target="_blank"><i class="fas fa-question"></i><?php echo lang('general_lookup_hamqth'); ?></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="javascript:qso_delete(<?php echo $row->COL_PRIMARY_KEY; ?>, '<?php echo $row->COL_CALL; ?>')"><i class="fas fa-trash-alt"></i> <?php echo lang('general_delete_qso'); ?></a>
</div>
</div>
</td>
<?php } ?>
</tr>
<?php $i++;
} ?>
</tbody>
</table>
</div>
</div>

Wyświetl plik

@ -36,8 +36,22 @@
<div class="mb-3">
<label for="stationCallsignInput"><?php echo lang("station_location_callsign"); ?></label>
<input type="text" class="form-control" name="station_callsign" id="stationCallsignInput" aria-describedby="stationCallsignInputHelp" placeholder="2M0SQL" required>
<small id="stationCallsignInputHelp" class="form-text text-muted"><?php echo lang("station_location_callsign_hint"); ?></small>
<input type="text" class="form-control" name="station_callsign" id="stationCallsignInput" aria-describedby="stationCallsignInputHelp" placeholder="2M0SQL" pattern="[a-zA-Z0-9\/]*" required oninput="validateInput(this);">
<div id="stationCallsignInputError" style="display: none; color: red;">Only letters, numbers, and forward slashes are allowed.</div>
<script>
function validateInput(input) {
var errorDiv = document.getElementById('stationCallsignInputError');
if (input.checkValidity()) {
input.classList.remove('error-red-border');
errorDiv.style.display = 'none';
} else {
input.classList.add('error-red-border');
errorDiv.style.display = 'block';
}
}
</script>
<small id="stationCallsignInputHelp" class="form-text text-muted"><?php echo lang("station_location_callsign_hint"); ?></small>
</div>
<div class="mb-3">

Wyświetl plik

@ -53,7 +53,7 @@
<th style="text-align: center; vertical-align: middle;" scope="col"><?php echo lang('admin_delete'); ?></th>
</tr>
</thead>
<tbody>
<tbody hx-confirm="Are you sure you want to delete the user?" hx-target="closest tr" hx-swap="outerHTML swap:1s">
<?php
@ -80,11 +80,10 @@
}
?></td>
<td style="text-align: center; vertical-align: middle;">
<?php
if ($_SESSION['user_id'] != $row->user_id) {
echo "<a href=" . site_url('user/delete') . "/" . $row->user_id . " class=\"btn btn-danger btn-sm\"><i class=\"fas fa-user-minus\"></i></a>";
}
?></td>
<?php if ($_SESSION['user_id'] != $row->user_id) { ?>
<button class="btn btn-danger btn-sm" hx-delete="<?php echo site_url('user/delete_new/'.$row->user_id);?>"><i class="fas fa-user-minus"></i></button>
<?php } ?>
</td>
</td>
</tr>
<?php $i++;

Wyświetl plik

@ -796,4 +796,13 @@ label {
}
.table-responsive>table .dropdown{position:static;}
.table-responsive>table .dropdown>.dropdown-menu{left:auto !important;top:auto !important;}
.table-responsive>table .dropdown>.dropdown-menu{left:auto !important;top:auto !important;}
tr.htmx-swapping td {
opacity: 0;
transition: opacity 1s ease-out;
}
.error-red-border {
border-color: red;
}

1
assets/js/htmx.min.js vendored 100644

File diff suppressed because one or more lines are too long

Plik diff jest za duży Load Diff

Wyświetl plik

@ -0,0 +1,8 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

22
docker-compose.yml 100644
Wyświetl plik

@ -0,0 +1,22 @@
version: "3.8"
services:
web:
build: .
env_file:
- .env
ports:
- "80:80"
volumes:
- ./:/var/www/html:rw
depends_on:
- db
db:
image: mariadb:latest
env_file:
- .env
volumes:
- db_data:/var/lib/mysql
volumes:
db_data: {}

Wyświetl plik

@ -148,10 +148,10 @@ if($_POST) {
<fieldset>
<legend>Database settings</legend>
<label for="hostname">Hostname</label><input type="text" id="hostname" value="localhost" class="input_text" name="hostname" />
<label for="username">Username</label><input type="text" id="username" class="input_text" name="username" />
<label for="password">Password</label><input type="password" id="password" class="input_text" name="password" />
<label for="database">Database Name</label><input type="text" id="database" class="input_text" name="database" />
<label for="hostname">Hostname</label><input type="text" id="hostname" value="<?php echo getenv('MYSQL_HOST') ?: 'localhost'; ?>" class="input_text" name="hostname" />
<label for="username">Username</label><input type="text" id="username" value="<?php echo getenv('MYSQL_USER'); ?>" class="input_text" name="username" />
<label for="password">Password</label><input type="password" id="password" value="<?php echo getenv('MYSQL_PASSWORD'); ?>" class="input_text" name="password" />
<label for="database">Database Name</label><input type="text" id="database" value="<?php echo getenv('MYSQL_DATABASE'); ?>" class="input_text" name="database" />
<input type="submit" value="Install" id="submit" />
</fieldset>
</form>