kopia lustrzana https://github.com/magicbug/Cloudlog
Porównaj commity
21 Commity
2248dbc511
...
95db6af753
Autor | SHA1 | Data |
---|---|---|
DJ3CE | 95db6af753 | |
Peter Goodhall | 583c2ad191 | |
Peter Goodhall | c1c39c9021 | |
Peter Goodhall | a09f1f13e2 | |
phl0 | 02aa35f06d | |
Peter Goodhall | bb64d68be1 | |
Peter Goodhall | 80276a071c | |
phl0 | aff522334a | |
DJ3CE | f03ad1d0b0 | |
Peter Goodhall | 36f05bdef3 | |
Patrick Burns | 83ad320e02 | |
Patrick Burns | b0a7eef25e | |
Peter Goodhall | c3a2046d9f | |
Peter Goodhall | 121911c306 | |
Patrick Burns | b5a7bc2847 | |
Patrick Burns | 9b6127c9ab | |
Patrick Burns | e345364bfa | |
Patrick Burns | eab8af8068 | |
Patrick Burns | c2c2b0f395 | |
Patrick Burns | 6330d5df77 | |
DJ3CE | 07ba06d104 |
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"cSpell.words": [
|
||||
"callsign",
|
||||
"cloudlog",
|
||||
"hamradio",
|
||||
"qslcard",
|
||||
"sstv",
|
||||
"sstvimages",
|
||||
"sstvtable",
|
||||
"SUBMODE",
|
||||
"userdata"
|
||||
]
|
||||
}
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 175;
|
||||
$config['migration_version'] = 176;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -12,8 +12,9 @@ class eqsl extends CI_Controller {
|
|||
public function index() {
|
||||
|
||||
$this->lang->load('qslcard');
|
||||
$this->load->helper('storage');
|
||||
$folder_name = "images/eqsl_card_images";
|
||||
$data['storage_used'] = $this->sizeFormat($this->folderSize($folder_name));
|
||||
$data['storage_used'] = sizeFormat(folderSize($folder_name));
|
||||
|
||||
|
||||
// Render Page
|
||||
|
@ -749,49 +750,4 @@ class eqsl extends CI_Controller {
|
|||
$status = $this->uploadQso($adif, $qsl);
|
||||
}
|
||||
}
|
||||
|
||||
// Functions for storage, these need shifted to a libary to use across Cloudlog
|
||||
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 = $this->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;
|
||||
}
|
||||
|
||||
function sizeFormat($bytes){
|
||||
$kb = 1024;
|
||||
$mb = $kb * 1024;
|
||||
$gb = $mb * 1024;
|
||||
$tb = $gb * 1024;
|
||||
|
||||
if (($bytes >= 0) && ($bytes < $kb)) {
|
||||
return $bytes . ' B';
|
||||
|
||||
} elseif (($bytes >= $kb) && ($bytes < $mb)) {
|
||||
return ceil($bytes / $kb) . ' KB';
|
||||
|
||||
} elseif (($bytes >= $mb) && ($bytes < $gb)) {
|
||||
return ceil($bytes / $mb) . ' MB';
|
||||
|
||||
} elseif (($bytes >= $gb) && ($bytes < $tb)) {
|
||||
return ceil($bytes / $gb) . ' GB';
|
||||
|
||||
} elseif ($bytes >= $tb) {
|
||||
return ceil($bytes / $tb) . ' TB';
|
||||
} else {
|
||||
return $bytes . ' B';
|
||||
}
|
||||
}
|
||||
|
||||
} // end class
|
||||
|
|
|
@ -15,7 +15,7 @@ class Qsl extends CI_Controller {
|
|||
|
||||
// Default view when loading controller.
|
||||
public function index() {
|
||||
|
||||
$this->load->helper('storage'); // Load the storage helper
|
||||
$folder_name = "assets/qslcard";
|
||||
$data['storage_used'] = sizeFormat(folderSize($folder_name));
|
||||
|
||||
|
@ -181,48 +181,4 @@ class Qsl extends CI_Controller {
|
|||
$this->load->view('qslcard/qslcarousel', $data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Functions for storage, these need shifted to a libary to use across Cloudlog
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $count_size;
|
||||
}
|
||||
|
||||
function sizeFormat($bytes){
|
||||
$kb = 1024;
|
||||
$mb = $kb * 1024;
|
||||
$gb = $mb * 1024;
|
||||
$tb = $gb * 1024;
|
||||
|
||||
if (($bytes >= 0) && ($bytes < $kb)) {
|
||||
return $bytes . ' B';
|
||||
|
||||
} elseif (($bytes >= $kb) && ($bytes < $mb)) {
|
||||
return ceil($bytes / $kb) . ' KB';
|
||||
|
||||
} elseif (($bytes >= $mb) && ($bytes < $gb)) {
|
||||
return ceil($bytes / $mb) . ' MB';
|
||||
|
||||
} elseif (($bytes >= $gb) && ($bytes < $tb)) {
|
||||
return ceil($bytes / $gb) . ' GB';
|
||||
|
||||
} elseif ($bytes >= $tb) {
|
||||
return ceil($bytes / $tb) . ' TB';
|
||||
} else {
|
||||
return $bytes . ' B';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,11 +8,27 @@ class Sstv extends CI_Controller {
|
|||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->lang->load('qslcard');
|
||||
$this->lang->load('sstv');
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$this->load->helper('storage');
|
||||
$folder_name = "assets/sstvimages";
|
||||
$data['storage_used'] = sizeFormat(folderSize($folder_name));
|
||||
|
||||
// Render Page
|
||||
$data['page_title'] = "SSTV Images";
|
||||
|
||||
$this->load->model('sstv_model');
|
||||
$data['sstvArray'] = $this->sstv_model->getQsoWithSstvImageList();
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('sstv/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function uploadSSTV() {
|
||||
$this->load->model('user_model');
|
||||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); }
|
||||
|
|
|
@ -75,6 +75,37 @@ class Visitor extends CI_Controller {
|
|||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
// load config and init pagination
|
||||
$this->load->library('pagination');
|
||||
|
||||
//Pagination config
|
||||
$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['full_tag_open'] = '<ul class="pagination">';
|
||||
$config['full_tag_close'] = '</ul>';
|
||||
$config['attributes'] = ['class' => 'page-link'];
|
||||
$config['first_link'] = false;
|
||||
$config['last_link'] = false;
|
||||
$config['first_tag_open'] = '<li class="page-item">';
|
||||
$config['first_tag_close'] = '</li>';
|
||||
$config['prev_link'] = '«';
|
||||
$config['prev_tag_open'] = '<li class="page-item">';
|
||||
$config['prev_tag_close'] = '</li>';
|
||||
$config['next_link'] = '»';
|
||||
$config['next_tag_open'] = '<li class="page-item">';
|
||||
$config['next_tag_close'] = '</li>';
|
||||
$config['last_tag_open'] = '<li class="page-item">';
|
||||
$config['last_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = '<li class="page-item active"><a href="#" class="page-link">';
|
||||
$config['cur_tag_close'] = '<span class="visually-hidden">(current)</span></a></li>';
|
||||
$config['num_tag_open'] = '<li class="page-item">';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
|
||||
// Public visitor so no QRA to setup
|
||||
$data['qra'] = "none";
|
||||
|
||||
|
@ -107,8 +138,9 @@ class Visitor extends CI_Controller {
|
|||
|
||||
$data['total_lotw_sent'] = $QSLStatsBreakdownArray['LoTW_Sent'];
|
||||
$data['total_lotw_rcvd'] = $QSLStatsBreakdownArray['LoTW_Received'];
|
||||
|
||||
$data['last_five_qsos'] = $this->logbook_model->get_last_qsos('18', $logbooks_locations_array);
|
||||
|
||||
// Show paginated results
|
||||
$data['results'] = $this->logbook_model->get_qsos($config['per_page'], $this->uri->segment(4), $logbooks_locations_array);
|
||||
|
||||
$data['page_title'] = "Dashboard";
|
||||
$data['slug'] = $public_slug;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $count_size;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('sizeFormat')) {
|
||||
function sizeFormat($bytes){
|
||||
$kb = 1024;
|
||||
$mb = $kb * 1024;
|
||||
$gb = $mb * 1024;
|
||||
$tb = $gb * 1024;
|
||||
|
||||
if (($bytes >= 0) && ($bytes < $kb)) {
|
||||
return $bytes . ' B';
|
||||
} elseif (($bytes >= $kb) && ($bytes < $mb)) {
|
||||
return ceil($bytes / $kb) . ' KB';
|
||||
} elseif (($bytes >= $mb) && ($bytes < $gb)) {
|
||||
return ceil($bytes / $mb) . ' MB';
|
||||
} elseif (($bytes >= $gb) && ($bytes < $tb)) {
|
||||
return ceil($bytes / $gb) . ' GB';
|
||||
} elseif ($bytes >= $tb) {
|
||||
return ceil($bytes / $tb) . ' TB';
|
||||
} else {
|
||||
return $bytes . ' B';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -74,6 +74,10 @@ $lang['general_word_invalid_ignore'] = 'Ungültig (Ignorieren)';
|
|||
$lang['general_word_qslcard'] = 'QSL Karte';
|
||||
$lang['general_word_qslcard_management'] = 'QSL Verwaltung';
|
||||
$lang['general_word_qslcards'] = 'QSL Karten';
|
||||
$lang['general_word_sstv_management'] = 'SSTV Management';
|
||||
$lang['general_word_sstvimages'] = 'SSTV Bilder';
|
||||
$lang['general_sstv_upload'] = 'Hochgeladene SSTV Bilder';
|
||||
$lang['general_sstv_upload_button'] = 'Lade SSTV Bild(er) hoch';
|
||||
$lang['general_word_qslcard_direct'] = 'Direkt';
|
||||
$lang['general_word_qslcard_bureau'] = 'Büro';
|
||||
$lang['general_word_qslcard_electronic'] = 'Elektronisch';
|
||||
|
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Zeitversetztes Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'QSL Ansicht';
|
||||
$lang['menu_view_eqsl'] = 'eQSL Ansicht';
|
||||
$lang['menu_view_sstv'] = 'SSTV Bilder';
|
||||
|
||||
$lang['menu_notes'] = 'Notizen';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'an Speicherplatz, um SSTV-Bilder zu speichern';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -17,6 +17,7 @@ $lang['menu_post_contest_logging'] = 'Post Contest Logging';
|
|||
$lang['menu_bandmap'] = 'Bandmap';
|
||||
$lang['menu_view_qsl'] = 'View QSL Cards';
|
||||
$lang['menu_view_eqsl'] = 'View eQSL Cards';
|
||||
$lang['menu_view_sstv'] = 'View SSTV Images';
|
||||
|
||||
$lang['menu_notes'] = 'Notes';
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
$lang['sstv_string_disk_space'] = 'of disk space to store SSTV image assets';
|
|
@ -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_to_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
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Tag Cloudlog as 2.6.8
|
||||
*/
|
||||
|
||||
class Migration_tag_2_6_8 extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
|
||||
// Tag Cloudlog 2.6.3
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '2.6.8'));
|
||||
|
||||
// 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'));
|
||||
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->db->where('option_name', 'version');
|
||||
$this->db->update('options', array('option_value' => '2.6.7'));
|
||||
}
|
||||
}
|
|
@ -88,4 +88,23 @@ class Sstv_model extends CI_Model
|
|||
return $this->db->get()->result();
|
||||
}
|
||||
|
||||
function getQsoWithSstvImageList()
|
||||
{
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (is_array($logbooks_locations_array) && !empty($logbooks_locations_array)) {
|
||||
$this->db->select('*');
|
||||
$this->db->from($this->config->item('table_name'));
|
||||
$this->db->join('sstv_images', 'sstv_images.qsoid = ' . $this->config->item('table_name') . '.col_primary_key');
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->order_by("id", "desc");
|
||||
|
||||
return $this->db->get();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<div id="awardInfoButton">
|
||||
<script>
|
||||
var lang_awards_info_button = "<?php echo lang('awards_info_button'); ?>";
|
||||
var lang_award_info_ln1 = "<?php echo lang('awards_dok_description_ln1'); ?>";
|
||||
var lang_award_info_ln2 = "<?php echo lang('awards_dok_description_ln2'); ?>";
|
||||
var lang_award_info_ln3 = "<?php echo lang('awards_dok_description_ln3'); ?>";
|
||||
var lang_award_info_ln4 = "<?php echo lang('awards_dok_description_ln4'); ?>";
|
||||
var lang_award_info_ln1 = "<?php echo lang('awards_wwff_description_ln1'); ?>";
|
||||
var lang_award_info_ln2 = "<?php echo lang('awards_wwff_description_ln2'); ?>";
|
||||
var lang_award_info_ln3 = "<?php echo lang('awards_wwff_description_ln3'); ?>";
|
||||
var lang_award_info_ln4 = "<?php echo lang('awards_wwff_description_ln4'); ?>";
|
||||
</script>
|
||||
<h2><?php echo $page_title; ?></h2>
|
||||
<button type="button" class="btn btn-sm btn-primary me-1" id="displayAwardInfo"><?php echo lang('awards_info_button'); ?></button>
|
||||
|
|
|
@ -2474,10 +2474,10 @@ if ($this->session->userdata('user_id') != null) {
|
|||
|
||||
<script>
|
||||
function viewQsl(picture, callsign) {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
var $textAndPic = $('<div></div>');
|
||||
$textAndPic.append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="' + baseURL + '/assets/qslcard/' + picture + '" /><center>');
|
||||
var title = '';
|
||||
let title = '';
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const textAndPic = $('<div></div>').append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="' + baseURL + '/assets/qslcard/' + picture + '" /><center>');
|
||||
|
||||
if (callsign == null) {
|
||||
title = 'QSL Card';
|
||||
} else {
|
||||
|
@ -2487,7 +2487,7 @@ if ($this->session->userdata('user_id') != null) {
|
|||
BootstrapDialog.show({
|
||||
title: title,
|
||||
size: BootstrapDialog.SIZE_WIDE,
|
||||
message: $textAndPic,
|
||||
message: textAndPic,
|
||||
buttons: [{
|
||||
label: lang_admin_close,
|
||||
action: function(dialogRef) {
|
||||
|
@ -2499,6 +2499,7 @@ if ($this->session->userdata('user_id') != null) {
|
|||
</script>
|
||||
<script>
|
||||
function deleteQsl(id) {
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
BootstrapDialog.confirm({
|
||||
title: 'DANGER',
|
||||
message: 'Warning! Are you sure you want to delete this QSL card?',
|
||||
|
@ -2508,7 +2509,6 @@ if ($this->session->userdata('user_id') != null) {
|
|||
btnOKClass: 'btn-danger',
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
$.ajax({
|
||||
url: baseURL + 'index.php/qsl/delete',
|
||||
type: 'post',
|
||||
|
@ -2535,18 +2535,16 @@ if ($this->session->userdata('user_id') != null) {
|
|||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function viewSstv(picture) {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
var $textAndPic = $('<div></div>');
|
||||
$textAndPic.append('<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="' + baseURL + '/assets/sstvimages/' + picture + '" /><center>');
|
||||
title = 'SSTV Image';
|
||||
const title = 'SSTV Image';
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const textAndPic = $('<div></div>').append(`<center><img class="img-fluid w-qsl" style="height:auto;width:auto;"src="${baseURL}/assets/sstvimages/${picture}" /><center>`);
|
||||
|
||||
BootstrapDialog.show({
|
||||
title: title,
|
||||
size: BootstrapDialog.SIZE_WIDE,
|
||||
message: $textAndPic,
|
||||
message: textAndPic,
|
||||
buttons: [{
|
||||
label: lang_admin_close,
|
||||
action: function(dialogRef) {
|
||||
|
@ -2555,9 +2553,9 @@ if ($this->session->userdata('user_id') != null) {
|
|||
}]
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
function deleteSstv(id) {
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
BootstrapDialog.confirm({
|
||||
title: 'DANGER',
|
||||
message: 'Warning! Are you sure you want to delete this SSTV Image?',
|
||||
|
@ -2567,7 +2565,6 @@ if ($this->session->userdata('user_id') != null) {
|
|||
btnOKClass: 'btn-danger',
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
$.ajax({
|
||||
url: baseURL + 'index.php/sstv/delete',
|
||||
type: 'post',
|
||||
|
@ -2747,9 +2744,53 @@ if ($this->session->userdata('user_id') != null) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTable(title, type) {
|
||||
const tableClass = type === 'sstv' ? 'sstvtable' : 'qsltable';
|
||||
return `<table style="width:100%" class="${tableClass} table table-sm table-bordered table-hover table-striped table-condensed">` +
|
||||
'<thead>' +
|
||||
'<tr>' +
|
||||
'<th style="text-align: center">' + title + '</th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'</tr>' +
|
||||
'</thead>' +
|
||||
'<tbody></tbody>' +
|
||||
'</table>'
|
||||
}
|
||||
|
||||
function createTableRow(image, type){
|
||||
const viewFunction = type === 'sstv' ? 'viewSstv' : 'viewQsl';
|
||||
const deleteFunction = type === 'sstv' ? 'deleteSstv' : 'deleteQsl';
|
||||
return '<tr><td style="text-align: center">' + image.filename + '</td>' +
|
||||
`<td id="${image.insertid}" style="text-align: center"><button onclick="${deleteFunction}(${image.insertid});" class="btn btn-sm btn-danger">Delete</button></td>` +
|
||||
`<td style="text-align: center"><button onclick="${viewFunction}('${image.filename}')" class="btn btn-sm btn-success">View</button></td>` +
|
||||
'</tr>'
|
||||
}
|
||||
|
||||
function handleSSTVImageUpload(sstvImage){
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const numCarouselItems = $('#sstv-carousel-indicators li').length;
|
||||
|
||||
// Next, append card to the table
|
||||
$('.sstvtable').length === 0 ? $("#sstvupload").prepend(createTable("SSTV image file", "sstv")) : null;
|
||||
$('.sstvtable tbody:last').append(createTableRow(sstvImage, "sstv"));
|
||||
|
||||
// Append card to the carousel
|
||||
const newCarouselItem = '<div class="' + (numCarouselItems === 0 ? 'active ' : '') + 'carousel-item carouselimageid_' + sstvImage.insertid +'"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/sstvimages/' + sstvImage.filename + '" alt="QSL picture"></div>';
|
||||
$("#sstv-carousel-inner").append(newCarouselItem);
|
||||
|
||||
// Append new carousel indicator
|
||||
const newCarouselIndicator = '<li class="' + (numCarouselItems === 0 ? 'active ' : '') + '" data-bs-target="#sstvCarouselIndicators" data-bs-slide-to="' + numCarouselItems + '"></li>';
|
||||
$("#sstv-carousel-indicators").append(newCarouselIndicator);
|
||||
|
||||
// Initialize the bootstrap carousel
|
||||
$("#sstvCarouselIndicators").carousel();
|
||||
}
|
||||
|
||||
function uploadSSTV() {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
var formdata = new FormData(document.getElementById("sstvinfo"));
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const formdata = new FormData(document.getElementById("sstvinfo"));
|
||||
|
||||
$.ajax({
|
||||
url: baseURL + 'index.php/sstv/uploadsstv',
|
||||
|
@ -2759,67 +2800,49 @@ if ($this->session->userdata('user_id') != null) {
|
|||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
// Iterate over each SSTV image and handle it
|
||||
data.forEach((sstvImage) => {
|
||||
if (sstvImage.status == 'Success') {
|
||||
// Check if the table exists, if it does we'll update it, if not, we'll create it
|
||||
if ($('.sstvtable').length > 0) {
|
||||
// Update table on Manage SSTV Image tab
|
||||
$('.sstvtable tr:last').after('<tr><td style="text-align: center">' + sstvImage.filename + '</td>' +
|
||||
'<td id="' + sstvImage.insertid + '"style="text-align: center"><button onclick="deleteSstv(' + sstvImage.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewSstv(\'' + sstvImage.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>');
|
||||
|
||||
// Update SSTV Image carousel
|
||||
var quantity = $("#sstv-carousel-indicators").length;
|
||||
$("#sstvCarouselIndicators .sstv-carousel-indicators").append('<li data-bs-target="#sstvCarouselIndicators" data-bs-slide-to="' + quantity + '"></li>');
|
||||
$("#sstvCarouselIndicators .carousel-inner").append('<center><div class="carousel-item carouselimageid_' + sstvImage.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/sstvimages/' + sstvImage.filename + '" alt="SSTV picture #' + (quantity + 1) + '"></div></center>');
|
||||
|
||||
// Initialize the bootstrap image carousel
|
||||
$("#sstvCarouselIndicators").carousel();
|
||||
|
||||
// Reset the image input
|
||||
$("#sstvimages").val(null);
|
||||
} else {
|
||||
// Create table on Manage SSTV Image tab
|
||||
$("#sstvupload").prepend('<table style="width:100%" class="sstvtable table table-sm table-bordered table-hover table-striped table-condensed">' +
|
||||
'<thead>' +
|
||||
'<tr>' +
|
||||
'<th style="text-align: center">SSTV image file</th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'</tr>' +
|
||||
'</thead><tbody>' +
|
||||
'<tr><td style="text-align: center">' + sstvImage.filename + '</td>' +
|
||||
'<td id="' + sstvImage.insertid + '"style="text-align: center"><button onclick="deleteSstv(' + sstvImage.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewSstv(\'' + sstvImage.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>' +
|
||||
'</tbody></table>');
|
||||
|
||||
// Make the SSTV image tab visible by remvoving the hidden attribute
|
||||
if (sstvImage.status == 'Success') {
|
||||
// Show the SSTV image tab
|
||||
$('.sstvimagetab').removeAttr('hidden');
|
||||
|
||||
// Create SSTV Image carousel
|
||||
var quantity = $("#sstv-carousel-indicators").length;
|
||||
$("#sstv-carousel-indicators").append('<li class="active" data-bs-target="#sstvCarouselIndicators" data-bs-slide-to="' + quantity + '" />');
|
||||
$("#sstv-carousel-inner").append('<center><div class="active carousel-item carouselimageid_' + sstvImage.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/sstvimages/' + sstvImage.filename + '" alt="SSTV picture #' + (quantity + 1) + '"></div></center>');
|
||||
|
||||
// Initialize the bootstrap carousel
|
||||
$("#sstvCarouselIndicators").carousel();
|
||||
|
||||
// Handle the SSTV image upload
|
||||
handleSSTVImageUpload(sstvImage);
|
||||
} else if (sstvImage.status != '') {
|
||||
$("#sstvupload").append('<div class="alert alert-danger">SSTV image:' +
|
||||
sstvImage.error +
|
||||
'</div>');
|
||||
}
|
||||
|
||||
} else if (sstvImage.status != '') {
|
||||
$("#sstvupload").append('<div class="alert alert-danger">SSTV Image:' +
|
||||
sstvImage.error +
|
||||
'</div>');
|
||||
}
|
||||
// Reset the image inputs
|
||||
$("#sstvimages").val(null);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleQslCardUpload(qslCard) {
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const numCarouselItems = $('#qsl-carousel-indicators li').length;
|
||||
|
||||
// append card to the qsl management table
|
||||
$('.qsltable').length === 0 ? $("#qslupload").prepend(createTable("QSL image file", "qsl")) : null;
|
||||
$('.qsltable tbody:last').append(createTableRow(qslCard, "qsl"));
|
||||
|
||||
// Append card image to the carousel
|
||||
const newCarouselItem = '<div class="' + (numCarouselItems === 0 ? 'active ' : '') + 'carousel-item carouselimageid_' + qslCard.insertid +'"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + qslCard.filename + '" alt="QSL picture"></div>';
|
||||
$("#qsl-carousel-inner").append(newCarouselItem);
|
||||
|
||||
// Append carousel indicator for the new card
|
||||
const newCarouselIndicator = '<li class="' + (numCarouselItems === 0 ? 'active ' : '') + '" data-bs-target="#qslCarouselIndicators" data-bs-slide-to="' + numCarouselItems + '"></li>';
|
||||
$("#qsl-carousel-indicators").append(newCarouselIndicator);
|
||||
|
||||
// Initialize the bootstrap carousel
|
||||
$("#qslCarouselIndicators").carousel();
|
||||
}
|
||||
|
||||
function uploadQsl() {
|
||||
var baseURL = "<?php echo base_url(); ?>";
|
||||
var formdata = new FormData(document.getElementById("fileinfo"));
|
||||
const baseURL = "<?php echo base_url(); ?>";
|
||||
const formdata = new FormData(document.getElementById("fileinfo"));
|
||||
|
||||
$.ajax({
|
||||
url: baseURL + 'index.php/qsl/uploadqsl',
|
||||
|
@ -2829,80 +2852,29 @@ if ($this->session->userdata('user_id') != null) {
|
|||
processData: false,
|
||||
contentType: false,
|
||||
success: function(data) {
|
||||
const qslCard = data.status || {}
|
||||
if (data.status.front.status == 'Success') {
|
||||
if ($('.qsltable').length > 0) {
|
||||
$('.qsltable tr:last').after('<tr><td style="text-align: center">' + data.status.front.filename + '</td>' +
|
||||
'<td id="' + data.status.front.insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data.status.front.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' + quantity + '"></li>');
|
||||
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_' + data.status.front.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + data.status.front.filename + '" alt="QSL picture #' + (quantity + 1) + '"></div></center>');
|
||||
$("#qslcardfront").val(null);
|
||||
} else {
|
||||
$("#qslupload").prepend('<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">' +
|
||||
'<thead>' +
|
||||
'<tr>' +
|
||||
'<th style="text-align: center">QSL image file</th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'</tr>' +
|
||||
'</thead><tbody>' +
|
||||
'<tr><td style="text-align: center">' + data.status.front.filename + '</td>' +
|
||||
'<td id="' + data.status.front.insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data.status.front.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.front.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>' +
|
||||
'</tbody></table>');
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' + quantity + '"></li>');
|
||||
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_' + data.status.front.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + data.status.front.filename + '" alt="QSL picture #' + (quantity + 1) + '"></div></center>');
|
||||
$(".carouselExampleIndicators").carousel();
|
||||
$("#qslcardfront").val(null);
|
||||
}
|
||||
|
||||
} else if (data.status.front.status != '') {
|
||||
handleQslCardUpload(qslCard.front);
|
||||
} else if (qslCard.front.status != '') {
|
||||
$("#qslupload").append('<div class="alert alert-danger">Front QSL Card:' +
|
||||
data.status.front.error +
|
||||
qslCard.front.error +
|
||||
'</div>');
|
||||
}
|
||||
if (data.status.back.status == 'Success') {
|
||||
var qsoid = $("#qsoid").text();
|
||||
if ($('.qsltable').length > 0) {
|
||||
$('.qsltable tr:last').after('<tr><td style="text-align: center">' + data.status.back.filename + '</td>' +
|
||||
'<td id="' + data.status.back.insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data.status.back.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td style="text-align: center"><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' + quantity + '"></li>');
|
||||
$(".carousel-inner").append('<center><div class="carousel-item carouselimageid_' + data.status.back.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + data.status.back.filename + '" alt="QSL picture #' + (quantity + 1) + '"></div></center>');
|
||||
$("#qslcardback").val(null);
|
||||
} else {
|
||||
$("#qslupload").prepend('<table style="width:100%" class="qsltable table table-sm table-bordered table-hover table-striped table-condensed">' +
|
||||
'<thead>' +
|
||||
'<tr>' +
|
||||
'<th style="text-align: center">QSL image file</th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'<th style="text-align: center"></th>' +
|
||||
'</tr>' +
|
||||
'</thead><tbody>' +
|
||||
'<tr><td style="text-align: center">' + data.status.back.filename + '</td>' +
|
||||
'<td id="' + data.status.back.insertid + '"style="text-align: center"><button onclick="deleteQsl(' + data.status.back.insertid + ');" class="btn btn-sm btn-danger">Delete</button></td>' +
|
||||
'<td><button onclick="viewQsl(\'' + data.status.back.filename + '\')" class="btn btn-sm btn-success">View</button></td>' +
|
||||
'</tr>' +
|
||||
'</tbody></table>');
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
var quantity = $(".carousel-indicators li").length;
|
||||
$(".carousel-indicators").append('<li class="active" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' + quantity + '"></li>');
|
||||
$(".carousel-inner").append('<center><div class="active carousel-item carouselimageid_' + data.status.back.insertid + '"><img class="img-fluid w-qsl" src="' + baseURL + '/assets/qslcard/' + data.status.back.filename + '" alt="QSL picture #' + (quantity + 1) + '"></div></center>');
|
||||
$(".carouselExampleIndicators").carousel();
|
||||
$("#qslcardback").val(null);
|
||||
}
|
||||
} else if (data.status.back.status != '') {
|
||||
|
||||
if (qslCard.back.status == 'Success') {
|
||||
handleQslCardUpload(qslCard.back);
|
||||
} else if (qslCard.back.status != '') {
|
||||
$("#qslupload").append('<div class="alert alert-danger">\nBack QSL Card: ' +
|
||||
data.status.back.error +
|
||||
qslCard.back.error +
|
||||
'</div>');
|
||||
}
|
||||
|
||||
// Show the QSL card tab
|
||||
$('.qslcardtab').removeAttr('hidden');
|
||||
|
||||
// Reset the image inputs
|
||||
$("#qslcardfront").val(null);
|
||||
$("#qslcardback").val(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
<a class="dropdown-item" href="<?php echo site_url('qsl'); ?>" title="QSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_qsl'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('eqsl'); ?>" title="eQSL"><i class="fa fa-id-card"></i> <?php echo lang('menu_view_eqsl'); ?></a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('sstv'); ?>" title="SSTV"><i class="fa fa-image"></i> <?php echo lang('menu_view_sstv'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
|
|
@ -94,6 +94,6 @@
|
|||
</div>
|
||||
|
||||
<!-- Map -->
|
||||
<div id="custommap" class="map-leaflet mt-2" style="width: 100%; height: calc(100vh - 390px); max-height: 900px;"></div>
|
||||
<div id="custommap" class="map-leaflet mt-2" style="width: 100%; height: 1000px;"></div>
|
||||
|
||||
<div class="alert alert-success" role="alert">Showing QSOs for Custom Date for Active Logbook <?php echo $logbook_name ?></div>
|
|
@ -1,42 +1,37 @@
|
|||
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
|
||||
<?php if (count($qslimages) > 1) { ?>
|
||||
<ol class="carousel-indicators">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' . $i . '"';
|
||||
if ($i == 0) {
|
||||
echo 'class="active"';
|
||||
<div id="qslCarouselIndicators" class="carousel slide" data-bs-ride="carousel">
|
||||
<ol class="carousel-indicators" id="qsl-carousel-indicators">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<li data-bs-target="#qslCarouselIndicators" data-bs-slide-to="' . $i . '"';
|
||||
if ($i == 0) {
|
||||
echo 'class="active"';
|
||||
}
|
||||
$i++;
|
||||
echo '></li>';
|
||||
}
|
||||
$i++;
|
||||
echo '></li>';
|
||||
}
|
||||
?>
|
||||
</ol>
|
||||
<?php } ?>
|
||||
<div class="carousel-inner">
|
||||
|
||||
<?php
|
||||
$i = 1;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
if ($i == 1) {
|
||||
echo ' active';
|
||||
}
|
||||
echo '">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/qslcard/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if (count($qslimages) > 1) { ?>
|
||||
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
?>
|
||||
</ol>
|
||||
<div id="qsl-carousel-inner" class="carousel-inner">
|
||||
<?php
|
||||
$i = 1;
|
||||
foreach ($qslimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
if ($i == 1) {
|
||||
echo ' active';
|
||||
}
|
||||
echo '">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/qslcard/' . $image->filename .'" alt="QSL picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#qslCarouselIndicators" role="button" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#qslCarouselIndicators" role="button" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<div class="container">
|
||||
<br>
|
||||
<h2>
|
||||
<?php echo lang('general_word_sstvimages'); ?>
|
||||
</h2>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<?php echo lang('qslcard_string_your_are_using'); ?>
|
||||
<?php echo $storage_used; ?>
|
||||
<?php echo lang('sstv_string_disk_space'); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
if ($sstvArray !== FALSE && is_array($sstvArray->result())) {
|
||||
echo '<table style="width:100%" class="sstvtable table table-sm table-bordered table-hover table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_callsign') . '</th>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_mode') . '</th>
|
||||
<th style=\'text-align: center\'>' . lang('general_word_date') . '</th>
|
||||
<th style=\'text-align: center\'>' . lang('general_word_time') . '</th>
|
||||
<th style=\'text-align: center\'>' . lang('gen_hamradio_band') . '</th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
<th style=\'text-align: center\'></th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
|
||||
foreach ($sstvArray->result() as $sstvImage) {
|
||||
echo '<tr>';
|
||||
echo '<td style=\'text-align: center\'>' . str_replace("0", "Ø", $sstvImage->COL_CALL) . '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
echo $sstvImage->COL_SUBMODE == null ? $sstvImage->COL_MODE : $sstvImage->COL_SUBMODE;
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
$timestamp = strtotime($sstvImage->COL_TIME_ON);
|
||||
echo date($custom_date_format, $timestamp);
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
$timestamp = strtotime($sstvImage->COL_TIME_ON);
|
||||
echo date('H:i', $timestamp);
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>';
|
||||
if ($sstvImage->COL_SAT_NAME != null) {
|
||||
echo $sstvImage->COL_SAT_NAME;
|
||||
} else {
|
||||
echo strtolower($sstvImage->COL_BAND);
|
||||
}
|
||||
;
|
||||
echo '</td>';
|
||||
echo '<td style=\'text-align: center\'>' . $sstvImage->filename . '</td>';
|
||||
echo '<td id="' . $sstvImage->id . '" style=\'text-align: center\'><button onclick="deleteSstv(\'' . $sstvImage->id . '\')" class="btn btn-sm btn-danger">Delete</button></td>';
|
||||
echo '<td style=\'text-align: center\'><button onclick="viewSstv(\'' . $sstvImage->filename . '\', \'' . $sstvImage->COL_CALL . '\')" class="btn btn-sm btn-success">View</button></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
} else {
|
||||
echo '<div class="alert alert-warning" role="alert">No SSTV images Found.</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
|
@ -13,26 +13,25 @@
|
|||
?>
|
||||
</ol>
|
||||
<div id="sstv-carousel-inner" class="carousel-inner">
|
||||
|
||||
<?php
|
||||
$i = 1;
|
||||
foreach ($sstvimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
if ($i == 1) {
|
||||
echo ' active';
|
||||
$i = 1;
|
||||
foreach ($sstvimages as $image) {
|
||||
echo '<div class="text-center carousel-item carouselimageid_' . $image->id;
|
||||
if ($i == 1) {
|
||||
echo ' active';
|
||||
}
|
||||
echo '">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/sstvimages/' . $image->filename .'" alt="SSTV picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '">';
|
||||
echo '<img class="img-fluid w-qsl" src="' . base_url() . '/assets/sstvimages/' . $image->filename .'" alt="SSTV picture #'. $i++.'">';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#sstvCarouselIndicators" role="button" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#sstvCarouselIndicators" role="button" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</a>
|
||||
<a class="carousel-control-prev" href="#sstvCarouselIndicators" role="button" data-bs-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#sstvCarouselIndicators" role="button" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -80,12 +80,11 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
|
||||
<?php
|
||||
$i = 0;
|
||||
if(!empty($last_five_qsos) > 0) {
|
||||
foreach ($last_five_qsos->result() as $row) { ?>
|
||||
if(!empty($results)) {
|
||||
foreach ($results->result() as $row) { ?>
|
||||
<?php echo '<tr class="tr'.($i & 1).'">'; ?>
|
||||
|
||||
<?php
|
||||
|
||||
// Get Date format
|
||||
if($this->session->userdata('user_date_format')) {
|
||||
// If Logged in and session exists
|
||||
|
@ -114,6 +113,9 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
</tr>
|
||||
<?php $i++; } } ?>
|
||||
</table>
|
||||
<div class="pagination-links">
|
||||
<?php echo $this->pagination->create_links(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue