Porównaj commity

...

34 Commity

Autor SHA1 Wiadomość Data
Patrick Burns f476715723
Merge 253da3797c into fd3ba41d26 2024-04-12 17:26:16 +02: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 253da3797c pause for the night on passing tests 2024-04-07 21:31:41 -05:00
Patrick Burns f619a6b702 add a step to check that the link station button works 2024-04-07 20:53:47 -05:00
Patrick Burns 6c06956e9a add station logbook create tests 2024-04-07 20:29:50 -05:00
Patrick Burns ec8f4b4e5d 3 second delay was too fast 2024-04-07 20:18:29 -05:00
Patrick Burns 485c21a1eb attempting to add some caching and speed up the delay 2024-04-07 20:16:12 -05:00
Patrick Burns 08c5e4420f testing if i need both dxcc calls 2024-04-07 20:08:43 -05:00
Patrick Burns ede0b201a5 attempt to add the permissions stuff to the script.sh before adding it to github actions 2024-04-07 20:04:08 -05:00
Patrick Burns e0af386cc5 add another request for dxcc 2024-04-07 19:58:37 -05:00
Patrick Burns 08d2ffaa3b add a short delay to let web connect to db 2024-04-07 19:49:57 -05:00
Patrick Burns a361d593e5 move it to github actions run step 2024-04-07 19:46:21 -05:00
Patrick Burns f65a8c1e12 still trying to populate dxcc_entities for the station creation tests 2024-04-07 19:39:19 -05:00
Patrick Burns 3d5169bbdd move request to the before on the station tests 2024-04-07 19:25:23 -05:00
Patrick Burns 155537e99c add request to populate dxcc_entities 2024-04-07 19:18:48 -05: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
DJ3CE 07ba06d104 Make dxped-url configurable 2024-03-27 11:33:16 +01:00
19 zmienionych plików z 55520 dodań i 39730 usunięć

Wyświetl plik

@ -7,14 +7,39 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .env
run: cp .env.sample .env
- name: Build Docker services
run: docker-compose up -d
- name: Cache Cypress
uses: actions/cache@v2
with:
path: ~/.cache/Cypress
key: cypress-${{ hashFiles('package-lock.json') }}
restore-keys: |
cypress-
- name: Install Cypress
run: npm install cypress
- name: Cache .env
uses: actions/cache@v2
with:
path: .env
key: .env-${{ hashFiles('.env.sample') }}
restore-keys: |
.env-
- name: Setup .env
run: |
if [ ! -f .env ]; then
cp .env.sample .env
fi
- name: Build Docker services
run: docker-compose up -d
- name: Wait for services to start
run: sleep 5
- name: Populate dxcc_entities table
run: curl "http://localhost/index.php/update/dxcc"
- name: Run Cypress tests
run: npx cypress run

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>

Wyświetl plik

@ -0,0 +1,83 @@
describe("Create station logbook", () => {
beforeEach(() => {
cy.login();
});
it("should load an empty list of station locations", () => {
// Navigate to the logbooks page
cy.visit("/index.php/logbooks");
// Check that the table is not present
cy.get("#station_logbooks_table").should("not.exist");
});
it("should have a button to create a new station location", () => {
// Navigate to the logbooks page
cy.visit("/index.php/logbooks");
// Check that the button is present
cy.get("a").contains("Create Station Logbook").should("exist").click();
cy.url().should("include", "/logbooks/create");
});
it("should create a new station location", () => {
// Navigate to the create logbook page
cy.visit("/index.php/logbooks/create");
// Define the station location name
const stationLogbookName = "Home QTH";
// Type the station location name into the input field
cy.get('input[name="stationLogbook_Name"]').type(stationLogbookName);
// Click the save button
cy.get('button[type="submit"]')
.contains("Create Station Logbook")
.click();
// Check if the station location was created successfully
cy.url().should("include", "/logbooks");
// // Check if the station location is present in the table
cy.get("#station_logbooks_table")
.contains(stationLogbookName)
.should("exist");
});
// it("should set as active station logbook when button clicked", () => {
// // Navigate to the logbooks page
// cy.visit("/index.php/logbooks");
// // Check that the button is present
// cy.get("a").contains("Set as Active Logbook").should("exist").click();
// // Check if the station was set to active
// cy.get("body")
// .contains("Active Logbook")
// .should("be.visible")
// .and("have.class", "badge text-bg-success");
// });
// it("should link to a station location from the edit logbook page", () => {
// // Navigate to the logbooks page
// cy.visit("/index.php/logbooks");
// // Click the edit button
// cy.get("i.fas.fa-edit").should("exist").click();
// // Ensure that the edit link navigates to the correct page
// cy.url().should("include", "/logbooks/edit");
// // Scroll to the bottom of the page
// cy.scrollTo("bottom");
// // Click the link location button
// cy.get("button").contains("Link Location").should("exist").click();
// // Make sure that our table now shows the linked station location
// cy.get("#station_logbooks_linked_table")
// .contains("Test Station Location")
// .should("exist");
// });
});

Wyświetl plik

@ -79,5 +79,24 @@ rm -rf /install
echo "Replacement complete."
# Set Permissions
chown -R root:www-data /var/www/html/application/config/
chown -R root:www-data /var/www/html/application/logs/
chown -R root:www-data /var/www/html/assets/qslcard/
chown -R root:www-data /var/www/html/backup/
chown -R root:www-data /var/www/html/updates/
chown -R root:www-data /var/www/html/uploads/
chown -R root:www-data /var/www/html/images/eqsl_card_images/
chown -R root:www-data /var/www/html/assets/json
chmod -R g+rw /var/www/html/application/config/
chmod -R g+rw /var/www/html/application/logs/
chmod -R g+rw /var/www/html/assets/qslcard/
chmod -R g+rw /var/www/html/backup/
chmod -R g+rw /var/www/html/updates/
chmod -R g+rw /var/www/html/uploads/
chmod -R g+rw /var/www/html/images/eqsl_card_images/
chmod -R g+rw /var/www/html/assets/json
# Start Apache in the foreground
exec apache2-foreground