Merge pull request #289 from wavelog/dev

Hotfix Release 1.5.2
This commit is contained in:
Florian (DF2ET)
2024-04-16 13:24:47 +02:00
committed by GitHub
16 changed files with 395 additions and 153 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
Dockerfile
.git
.github

View File

@@ -1,26 +0,0 @@
name: Accessibility-alt-text-bot
on:
issues:
types: [opened, edited]
pull_request:
types: [opened, edited]
issue_comment:
types: [created, edited]
discussion:
types: [created, edited]
discussion_comment:
types: [created, edited]
permissions:
issues: write
pull-requests: write
discussions: write
jobs:
accessibility_alt_text_bot:
name: Check alt text is set on issue or pull requests
runs-on: ubuntu-latest
if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }}
steps:
- name: Get action 'github/accessibility-alt-text-bot'
uses: github/accessibility-alt-text-bot@v1.2.0 # Set to latest

37
.github/workflows/docker-image.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Wavelog create Dockerimage and publish it
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ghcr.io/wavelog/wavelog:${{ github.ref_name == 'master' && 'latest' || github.ref_name }}

53
Dockerfile Normal file
View File

@@ -0,0 +1,53 @@
FROM php:8.3-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 = 256M" >> /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 = 600" >> /usr/local/etc/php/conf.d/uploads.ini
RUN apt-get update \
&& apt-get install -y curl libxml2-dev libonig-dev libzip-dev cron \
&& docker-php-ext-install mysqli mbstring xml zip
RUN a2enmod rewrite
ENV CI_ENV=docker
COPY ./ /var/www/html/
WORKDIR /var/www/html
RUN chown -R www-data:www-data /var/www/html
RUN mkdir ./userdata
RUN mkdir ./application/config/docker
RUN mv ./.htaccess.sample ./.htaccess
RUN echo "Setting www-data as owner of the html folder" \
&& chown -R www-data:www-data /var/www/html
RUN echo "Setting permissions to the install folder" \
&& cd /var/www/html \
&& 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 ./userdata/ \
&& chmod -R g+rw ./images/eqsl_card_images/ \
&& chmod -R g+rw ./assets/ \
&& chmod -R g+rw ./application/config/docker/ \
&& chmod -R 777 /var/www/html/install
RUN echo "Installing cronjobs" \
RUN touch /etc/crontab && \
echo "0 */12 * * * curl --silent http://localhost/clublog/upload &>/dev/null" >> /etc/crontab && \
echo "10 */12 * * * curl --silent http://localhost/eqsl/sync &>/dev/null" >> /etc/crontab && \
echo "20 */12 * * * curl --silent http://localhost/qrz/upload &>/dev/null" >> /etc/crontab && \
echo "30 */12 * * * curl --silent http://localhost/qrz/download &>/dev/null" >> /etc/crontab && \
echo "40 */12 * * * curl --silent http://localhost/hrdlog/upload &>/dev/null" >> /etc/crontab && \
echo "0 1 * * * curl --silent http://localhost/lotw/lotw_upload &>/dev/null" >> /etc/crontab && \
echo "10 1 * * * curl --silent http://localhost/update/lotw_users &>/dev/null" >> /etc/crontab && \
echo "20 1 * * 1 curl --silent http://localhost/update/update_clublog_scp &>/dev/null" >> /etc/crontab && \
echo "0 2 1 */1 * curl --silent http://localhost/update/update_sota &>/dev/null" >> /etc/crontab && \
echo "10 2 1 */1 * curl --silent http://localhost/update/update_wwff &>/dev/null" >> /etc/crontab && \
echo "20 2 1 */1 * curl --silent http://localhost/update/update_pota &>/dev/null" >> /etc/crontab && \
echo "0 3 1 */1 * curl --silent http://localhost/update/update_dok &>/dev/null" >> /etc/crontab
RUN chmod 0644 /etc/crontab
RUN crontab </etc/crontab
RUN mkdir -p /var/log/cron
RUN sed -i 's/^exec /service cron start\n\nexec /' /usr/local/bin/apache2-foreground

View File

@@ -22,11 +22,15 @@ https://demo.wavelog.org
## Requirements
### Recommended: Classic-LAMP-Stack:
* Linux based Operating System (Windows stack may also work)
* Apache (Nginx should work)
* PHP Version 7.4 up to PHP 8.2 (PHP 8.3. in friendly Usertest)
* MySQL or MariaDB (MySQL 5.7 or higher // MariaDB 10.1 or higher)
### Experimental:
* [Docker Support](https://github.com/wavelog/wavelog/wiki/Installation-via-Docker)
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.

View File

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

View File

@@ -364,6 +364,13 @@ class API extends CI_Controller {
$band = null;
}
// If $obj['cnfm'] exists
if(isset($obj['cnfm'])) {
$cnfm = $obj['cnfm'];
} else {
$cnfm = null;
}
$this->load->model('logbooks_model');
if($this->logbooks_model->public_slug_exists($logbook_slug)) {
@@ -388,15 +395,24 @@ class API extends CI_Controller {
// Search Logbook for callsign
$this->load->model('logbook_model');
$result = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band);
$query = $this->logbook_model->check_if_grid_worked_in_logbook($grid, $logbooks_locations_array, $band, $cnfm);
http_response_code(201);
if($result > 0)
{
if ($query->num_rows() == 0) {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']);
} else if ($cnfm == null) {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Found']);
} else {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Not Found']);
$arr = [];
foreach($query->result() as $line) {
$arr[] = $line->gridorcnfm;
}
if (in_array('Y', $arr)) {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Confirmed']);
} else {
echo json_encode(['gridsquare' => strtoupper($grid), 'result' => 'Worked']);
}
}
} else {
// Logbook not found
http_response_code(404);

View File

@@ -84,11 +84,10 @@ class Logbook extends CI_Controller {
echo json_encode($return, JSON_PRETTY_PRINT);
}
function json($tempcallsign, $temptype, $tempband, $tempmode, $tempstation_id = null) {
function json($tempcallsign, $tempband, $tempmode, $tempstation_id = null) {
session_write_close();
// Cleaning for security purposes
$callsign = $this->security->xss_clean($tempcallsign);
$type = $this->security->xss_clean($temptype);
$band = $this->security->xss_clean($tempband);
$mode = $this->security->xss_clean($tempmode);
$station_id = $this->security->xss_clean($tempstation_id);
@@ -134,7 +133,7 @@ class Logbook extends CI_Controller {
$lookupcall=$this->get_plaincall($callsign);
$return['partial'] = $this->partial($lookupcall);
$return['partial'] = $this->partial($lookupcall, $band);
$callbook = $this->logbook_model->loadCallBook($callsign, $this->config->item('use_fullname'));
@@ -152,8 +151,8 @@ class Logbook extends CI_Controller {
$return['qsl_manager'] = $this->nval($callbook['qslmgr'] ?? '', $this->logbook_model->call_qslvia($callsign));
$return['callsign_state'] = $this->nval($callbook['state'] ?? '', $this->logbook_model->call_state($callsign));
$return['callsign_us_county'] = $this->nval($callbook['us_county'] ?? '', $this->logbook_model->call_us_county($callsign));
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $type, $band, $mode);
$return['confirmed'] = $this->confirmed_grid_before($return['callsign_qra'], $type, $band, $mode);
$return['workedBefore'] = $this->worked_grid_before($return['callsign_qra'], $band, $mode);
$return['confirmed'] = $this->confirmed_grid_before($return['callsign_qra'], $band, $mode);
$return['timesWorked'] = $this->logbook_model->times_worked($lookupcall);
if ($this->session->userdata('user_show_profile_image')) {
@@ -201,7 +200,7 @@ class Logbook extends CI_Controller {
return (($val2 ?? "") === "" ? ($val1 ?? "") : ($val2 ?? ""));
}
function confirmed_grid_before($gridsquare, $type, $band, $mode) {
function confirmed_grid_before($gridsquare, $band, $mode) {
if (strlen($gridsquare) < 4)
return false;
@@ -235,7 +234,7 @@ class Logbook extends CI_Controller {
}
if($type == "SAT") {
if($band == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT');
if ($extrawhere != '') {
$this->db->where('('.$extrawhere.')');
@@ -270,7 +269,7 @@ class Logbook extends CI_Controller {
return false;
}
function worked_grid_before($gridsquare, $type, $band, $mode)
function worked_grid_before($gridsquare, $band, $mode)
{
if (strlen($gridsquare) < 4)
return false;
@@ -279,7 +278,7 @@ class Logbook extends CI_Controller {
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if(!empty($logbooks_locations_array)) {
if($type == "SAT") {
if($band == "SAT") {
$this->db->where('COL_PROP_MODE', 'SAT');
} else {
$this->db->where('COL_MODE', $this->logbook_model->get_main_mode_from_mode($mode));
@@ -625,7 +624,7 @@ class Logbook extends CI_Controller {
$this->load->view('interface_assets/footer');
}
function partial($id) {
function partial($id, $band = null) {
$this->load->model('user_model');
if(!$this->user_model->authorize($this->config->item('auth_mode'))) { return; }
@@ -855,7 +854,7 @@ class Logbook extends CI_Controller {
}
if (isset($data['callsign']['gridsquare'])) {
$this->load->model('logbook_model');
$callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
$callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'))->num_rows();
}
if (isset($callsign['callsign']['dxcc'])) {
$this->load->model('logbook_model');
@@ -879,7 +878,7 @@ class Logbook extends CI_Controller {
if (isset($callsign['callsign']['gridsquare'])) {
$this->load->model('logbook_model');
$callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($callsign['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
$callsign['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($callsign['callsign']['gridsquare'],0,4)), 0, $band)->num_rows();
}
if (isset($callsign['callsign']['error'])) {
$callsign['error'] = $callsign['callsign']['error'];
@@ -935,7 +934,7 @@ class Logbook extends CI_Controller {
$data['callsign'] = $this->qrz->search($id, $this->session->userdata('qrz_session_key'), $this->config->item('use_fullname'));
if (isset($data['callsign']['gridsquare'])) {
$data['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
$data['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'))->num_rows();
}
if (isset($data['callsign']['dxcc'])) {
$entity = $this->logbook_model->get_entity($data['callsign']['dxcc']);
@@ -962,7 +961,7 @@ class Logbook extends CI_Controller {
$data['callsign'] = $this->hamqth->search($id, $this->session->userdata('hamqth_session_key'));
}
if (isset($data['callsign']['gridsquare'])) {
$data['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'));
$data['grid_worked'] = $this->logbook_model->check_if_grid_worked_in_logbook(strtoupper(substr($data['callsign']['gridsquare'],0,4)), 0, $this->session->userdata('user_default_band'))->num_rows();
}
if (isset($data['callsign']['dxcc'])) {
$entity = $this->logbook_model->get_entity($data['callsign']['dxcc']);

View File

@@ -0,0 +1,36 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
Tag Wavelog as Version 1.5.2
*/
class Migration_tag_1_5_2 extends CI_Migration {
public function up()
{
// Tag Wavelog New Version
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '1.5.2'));
// Trigger Version Info Dialog
$this->db->where('option_type', 'version_dialog');
$this->db->where('option_name', 'confirmed');
$this->db->update('user_options', array('option_value' => 'false'));
// Also set Version Dialog to "both" if only custom text is applied
$this->db->where('option_name', 'version_dialog');
$this->db->where('option_value', 'custom_text');
$this->db->update('options', array('option_value' => 'both'));
}
public function down()
{
$this->db->where('option_name', 'version');
$this->db->update('options', array('option_value' => '1.5.1'));
}
}

View File

@@ -88,7 +88,7 @@ class DXCC extends CI_Model {
if ($postdata['confirmed'] != NULL) {
$confirmedDXCC = $this->getDxccBandConfirmed($location_list, $band, $postdata);
foreach ($confirmedDXCC as $cdxcc) {
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","' . $postdata['mode'] . '","DXCC","'.$qsl.'")\'>C</a></div>';
$dxccMatrix[$cdxcc->dxcc][$band] = '<div class="bg-success awardsBgSuccess"><a href=\'javascript:displayContacts("'.str_replace("&", "%26", $cdxcc->name).'","'. $band . '","'. $postdata['sat'] . '","'. $postdata['orbit'] . '","' . $postdata['mode'] . '","DXCC","'.$qsl.'")\'>C</a></div>';
}
}
}
@@ -402,7 +402,7 @@ class DXCC extends CI_Model {
if ($band == 'SAT') {
$sql .= " and thcv.col_prop_mode ='" . $band . "'";
if ($band != 'All') {
if ($band != 'All' && $postdata['sat'] != 'All') {
$sql .= " and col_sat_name ='" . $postdata['sat'] . "'";
}
} else if ($band == 'All') {

View File

@@ -2136,7 +2136,7 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
}
function check_if_grid_worked_in_logbook($grid, $StationLocationsArray = null, $band = null) {
function check_if_grid_worked_in_logbook($grid, $StationLocationsArray = null, $band = null, $cnfm = null) {
if($StationLocationsArray == null) {
$this->load->model('logbooks_model');
@@ -2145,7 +2145,25 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
$logbooks_locations_array = $StationLocationsArray;
}
$this->db->select('COL_GRIDSQUARE');
switch($cnfm) {
case 'qsl':
$this->db->select('COL_QSL_RCVD as gridorcnfm');
$this->db->group_by('COL_QSL_RCVD');
break;
case 'lotw':
$this->db->select('COL_LOTW_QSL_RCVD as gridorcnfm');
$this->db->group_by('COL_LOTW_QSL_RCVD');
break;
case 'eqsl':
$this->db->select('COL_EQSL_QSL_RCVD as gridorcnfm');
$this->db->group_by('COL_EQSL_QSL_RCVD');
break;
default:
$this->db->select('SUBSTR(COL_GRIDSQUARE,1 ,4) as gridorcnfm');
$this->db->group_by('gridorcnfm');
break;
}
$this->db->order_by('gridorcnfm');
$this->db->where_in('station_id', $logbooks_locations_array);
$this->db->group_start();
$this->db->like('COL_GRIDSQUARE', $grid);
@@ -2158,11 +2176,10 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray =
// Where col_sat_name is not empty
$this->db->where('COL_SAT_NAME !=', '');
}
$this->db->limit('2');
$query = $this->db->get($this->config->item('table_name'));
return $query->num_rows();
return $query;
}

View File

@@ -99,7 +99,6 @@ class Satellite_model extends CI_Model {
$this->db->select('satellite.name AS satellite, satellitemode.name AS satmode, satellitemode.uplink_mode AS Uplink_Mode, satellitemode.uplink_freq AS Uplink_Freq, satellitemode.downlink_mode AS Downlink_Mode, satellitemode.downlink_freq AS Downlink_Freq');
$this->db->join('satellitemode', 'satellite.id = satellitemode.satelliteid', 'LEFT OUTER');
$query = $this->db->get('satellite');
log_message('debug', 'SQL: '.$this->db->last_query());
return $query->result();
}

View File

@@ -107,7 +107,7 @@
// Load the logbook model and call check_if_grid_worked_in_logbook
foreach ($rove['grids'] as $grid) {
$worked = $CI->logbook_model->check_if_grid_worked_in_logbook($grid, null, "SAT");
if ($worked != 0) {
if ($worked->num_rows() != 0) {
echo " <span data-bs-toggle=\"tooltip\" title=\"Worked\" class=\"badge bg-success\">" . $grid . "</span>";
} else {
echo " <span data-bs-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge bg-danger\">" . $grid . "</span>";

View File

@@ -39,6 +39,10 @@
<td>Migration</td>
<td><?php echo (isset($migration_version) ? $migration_version : "<span class='badge text-bg-danger'>There is something wrong with your Migration in Database!</span>"); ?></td>
</tr>
<tr>
<td>Environment</td>
<td><?php echo ENVIRONMENT; ?></td>
</tr>
</table>
</div>
@@ -62,16 +66,8 @@
<td>MySQL Version</td>
<td><?php echo $this->db->version(); ?></td>
</tr>
</table>
</div>
</div>
<div class="card">
<div class="card-header">Codeigniter</div>
<div class="card-body">
<table width="100%">
<tr>
<td>Version</td>
<td>Codeigniter Version</td>
<td><?php echo CI_VERSION; ?></td>
</tr>
</table>
@@ -131,6 +127,47 @@
</table>
</div>
</div>
<div class="card">
<div class="card-header">
Config Maintenance
</div>
<div class="card-body">
<?php if ($this->config->item('auth_mode') != '3') { ?>
<div class="alert alert-primary">
<div class="alert alert-danger" role="alert">
<span class="badge rounded-pill text-bg-warning">Warning</span> Your authentication mode is outdated and possibly unsafe
</div>
<p>Please edit your ./application/config/config.php File:</br>
Go to your application/config Folder and compare config.sample.php with your config.php</br></br>
Change <span class="badge rounded-pill text-bg-secondary">$config['auth_mode']</span> to the value <span class="badge rounded-pill text-bg-secondary">3</span> (Strongly recommended)
</p>
</div>
<?php
} else { ?>
<div class="mb-2">
<span class="badge rounded-pill text-bg-success">Ok</span> Authentication Mode is set correctly
</div>
<?php } ?>
<?php if (!$this->config->item('cl_multilanguage')) { ?>
<div class="alert alert-primary">
<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;">
<span class="badge rounded-pill text-bg-warning">Warning</span> You didn't enabled Multilanguage support in your config.php
</div>
<p>Please edit your ./application/config/config.php File and add some rows to it:</br></br>
Go to your application/config Folder and compare config.sample.php with your config.php</br>
You'll probably find a block with language-settings. Please include this block into your current config.php
</p>
</div>
<?php
} else { ?>
<div class="mb-2">
<span class="badge rounded-pill text-bg-success">Ok</span> Multiuser-Language Support is enabled
</div>
<?php } ?>
</div>
</div>
<?php if (isset($userdata_enabled)) { ?>
<div class="card">
<div class="card-header">Migrate Userdata</div>
@@ -144,71 +181,164 @@
<div class="col">
<div class="card">
<div class="card-header">PHP Modules</div>
<div class="card-header">PHP</div>
<div class="card-body">
<table width="100%">
<tr>
<td>curl</td>
<td>
<?php if (in_array('curl', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<div class="row">
<div class="col border-end">
<p><u>Modules</u></p>
<table width="100%">
<tr>
<td>php-curl</td>
<td>
<?php if (in_array('curl', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>MySQL</td>
<td>
<?php if (in_array('mysqli', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>php-mysql</td>
<td>
<?php if (in_array('mysqli', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>mbstring</td>
<td>
<?php if (in_array('mbstring', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>php-mbstring</td>
<td>
<?php if (in_array('mbstring', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>xml</td>
<td>
<?php if (in_array('xml', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>php-xml</td>
<td>
<?php if (in_array('xml', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
<tr>
<td>zip</td>
<td>
<?php if (in_array('zip', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
</table>
<tr>
<td>php-zip</td>
<td>
<?php if (in_array('zip', get_loaded_extensions())) { ?>
<span class="badge text-bg-success">Installed</span>
<?php } else { ?>
<span class="badge text-bg-danger">Not Installed</span>
<?php } ?>
</td>
</tr>
</table>
</div>
<div class="col">
<p><u>Settings</u></p>
<?php
$max_execution_time = 600; // Seconds
$max_upload_file_size = 8; // Megabyte
$post_max_size = 8; // Megabyte
$memory_limit = 256; // Megabyte
$req_allow_url_fopen = '1'; // 1 = on
?>
<table width="100%">
<tr>
<td>max_execution_time</td>
<td><?php echo '> ' . $max_execution_time . ' s'; ?></td>
<td>
<?php
$maxExecutionTime = ini_get('max_execution_time');
if ($maxExecutionTime >= $max_execution_time) { ?>
<span class="badge text-bg-success"><?php echo $maxExecutionTime . ' s'; ?></span>
<?php } else { ?>
<span class="badge text-bg-warning"><?php echo $maxExecutionTime; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td>max_upload_file_size</td>
<td><?php echo '> ' . $max_upload_file_size . 'M'; ?></td>
<td>
<?php
$maxUploadFileSize = ini_get('upload_max_filesize');
$maxUploadFileSizeBytes = (int)($maxUploadFileSize) * (1024 * 1024); // convert to bytes
if ($maxUploadFileSizeBytes >= ($max_upload_file_size * 1024 * 1024)) { // compare with given value in bytes
?>
<span class="badge text-bg-success"><?php echo $maxUploadFileSize; ?></span>
<?php } else { ?>
<span class="badge text-bg-warning"><?php echo $maxUploadFileSize; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td>post_max_size</td>
<td><?php echo '> ' . $post_max_size . 'M'; ?></td>
<td>
<?php
$postMaxSize = ini_get('post_max_size');
$postMaxSizeBytes = (int)($postMaxSize) * (1024 * 1024); // convert to bytes
if ($postMaxSizeBytes >= ($post_max_size * 1024 * 1024)) { // compare with given value in bytes
?>
<span class="badge text-bg-success"><?php echo $postMaxSize; ?></span>
<?php } else { ?>
<span class="badge text-bg-warning"><?php echo $postMaxSize; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td>memory_limit</td>
<td><?php echo '> ' . $memory_limit . 'M'; ?></td>
<td>
<?php
$memoryLimit = ini_get('memory_limit');
$memoryLimitBytes = (int)($memoryLimit) * (1024 * 1024); // convert to bytes
if ($memoryLimitBytes >= ($memory_limit * 1024 * 1024)) { // compare with given value in bytes
?>
<span class="badge text-bg-success"><?php echo $memoryLimit; ?></span>
<?php } else { ?>
<span class="badge text-bg-warning"><?php echo $memoryLimit; ?></span>
<?php } ?>
</td>
</tr>
<tr>
<td>allow_url_fopen</td>
<td>On</td>
<td>
<?php
$get_allow_url_fopen = ini_get('allow_url_fopen');
if ($get_allow_url_fopen == $req_allow_url_fopen) {
?>
<span class="badge text-bg-success">On</span>
<?php } else { ?>
<span class="badge text-bg-danger">Off</span>
<?php } ?>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<?php if (file_exists(realpath(APPPATH . '../') . '/.git')) { ?>
<?php
//Below is a failsafe where git commands fail
try {
$commitHash = trim(exec('git log --pretty="%H" -n1 HEAD')); // Get last LOCAL commit of HEAD
$commitHash = trim(exec('git log --pretty="%H" -n1 HEAD')); // Get last LOCAL commit of HEAD
$branch = '';
$remote = '';
$owner = '';
@@ -226,7 +356,7 @@
}
if (isset($pieces[1])) {
$remote = substr($pieces[1], 0, strpos($pieces[1], '/'));
$branch = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on
$branch = trim(exec('git rev-parse --abbrev-ref HEAD')); // Get ONLY Name of the Branch we're on
$url = trim(exec('git remote get-url ' . $remote));
if (strpos($url, 'https://github.com') !== false) {
$owner = preg_replace('/https:\/\/github\.com\/(\w+)\/[w|W]avelog\.git/', '$1', $url);
@@ -295,10 +425,10 @@
<small id="last_version_check"></small>
</div>
<div class="row">
<div class="col">
<button class="btn btn-primary me-3 ld-ext-right" onClick="update_version_check('<?php echo $branch; ?>');" id="version_check_button">Check for new version<div class="ld ld-ring ld-spin"></div></button>
<a class="btn btn-primary" style="display: none;" id="version_update_button" href="debug/selfupdate" onClick='this.classList.add("disabled");'>Update now</a>
</div>
<div class="col">
<button class="btn btn-primary me-3 ld-ext-right" onClick="update_version_check('<?php echo $branch; ?>');" id="version_check_button">Check for new version<div class="ld ld-ring ld-spin"></div></button>
<a class="btn btn-primary" style="display: none;" id="version_update_button" href="debug/selfupdate" onClick='this.classList.add("disabled");'>Update now</a>
</div>
</div>
</div>
</div>
@@ -439,29 +569,6 @@
</div>
<?php } ?>
</div>
<div class="card">
<div class="card-header">
Settings Maintenance
</div>
<?php if (!$this->config->item('cl_multilanguage')) { ?>
<div class="alert alert-danger" role="alert" style="margin-bottom: 0px !important;">
<span class="badge rounded-pill text-bg-warning">Warning</span> You didn't enabled Multilanguage support in your config.php
</div>
<div class="card-body">
<p class="card-text">Please edit your ./application/config/config.php File and add some rows to it:</br></br>
Go to your application/config Folder and compare config.sample.php with your config.php</br>
You'll probably find a block with language-settings. Please include this block into your current config.php
</p>
</div>
<?php
} else { ?>
<div class="alert alert-secondary" role="alert" style="margin-bottom: 0px !important;">
<span class="badge rounded-pill text-bg-success">Everything ok</span> You have enabled Multuser-Language support
</div>
<?php } ?>
</div>
</div>
</div>
@@ -473,4 +580,4 @@
<?php } else { ?>
var local_branch = 'n/a';
<?php } ?>
</script>
</script>

View File

@@ -300,7 +300,7 @@ $("#callsign").keyup(async function (e) {
async function getCallbook() {
var call = $("#callsign").val();
if (call.length >= 3) {
$.getJSON(base_url + 'index.php/logbook/json/' + call + '/0/'+$("#band").val()+'/'+$("#band").val() + '/' + current_active_location, function(result) {
$.getJSON(base_url + 'index.php/logbook/json/' + call + '/'+$("#band").val()+'/'+$("#band").val() + '/' + current_active_location, function(result) {
try {
$('#bearing_info').html(result.bearing);
} catch {}

View File

@@ -752,14 +752,11 @@ $( document ).ready(function() {
$('.callsign-suggest').hide();
if($("#sat_name").val() != ""){
var sat_type = "SAT";
var json_band = "0";
var json_mode = "0";
var json_band = "SAT";
} else {
var sat_type = "0";
var json_band = $("#band").val();
var json_mode = $("#mode").val();
}
var json_mode = $("#mode").val();
var find_callsign = $(this).val().toUpperCase();
var callsign = find_callsign;
@@ -768,7 +765,7 @@ $( document ).ready(function() {
find_callsign=find_callsign.replace('Ø', '0');
// Replace / in a callsign with - to stop urls breaking
$.getJSON(base_url + 'index.php/logbook/json/' + find_callsign + '/' + sat_type + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), async function(result)
$.getJSON(base_url + 'index.php/logbook/json/' + find_callsign + '/' + json_band + '/' + json_mode + '/' + $('#stationProfile').val(), async function(result)
{
// Make sure the typed callsign and json result match