'2.6.5
这个提交包含在:
当前提交
a7c4750a82
共有 18 个文件被更改,包括 1013 次插入 和 392 次删除
|
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 171;
|
||||
$config['migration_version'] = 172;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Dashboard extends CI_Controller {
|
||||
class Dashboard extends CI_Controller
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
// If environment is set to development then show the debug toolbar
|
||||
if(ENVIRONMENT == 'development') {
|
||||
$this->output->enable_profiler(TRUE);
|
||||
}
|
||||
if (ENVIRONMENT == 'development') {
|
||||
$this->output->enable_profiler(TRUE);
|
||||
}
|
||||
|
||||
// Load language files
|
||||
$this->lang->load('lotw');
|
||||
|
|
@ -19,13 +20,13 @@ class Dashboard extends CI_Controller {
|
|||
// LoTW infos
|
||||
$this->load->model('LotwCert');
|
||||
|
||||
if($this->optionslib->get_option('version2_trigger') == "false") {
|
||||
if ($this->optionslib->get_option('version2_trigger') == "false") {
|
||||
redirect('welcome');
|
||||
}
|
||||
|
||||
// Check if users logged in
|
||||
|
||||
if($this->user_model->validate_session() == 0) {
|
||||
if ($this->user_model->validate_session() == 0) {
|
||||
// user is not logged in
|
||||
redirect('user/login');
|
||||
}
|
||||
|
|
@ -34,19 +35,19 @@ class Dashboard extends CI_Controller {
|
|||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
// Calculate Lat/Lng from Locator to use on Maps
|
||||
if($this->session->userdata('user_locator')) {
|
||||
$this->load->library('qra');
|
||||
if ($this->session->userdata('user_locator')) {
|
||||
$this->load->library('qra');
|
||||
|
||||
$qra_position = $this->qra->qra2latlong($this->session->userdata('user_locator'));
|
||||
if ($qra_position) {
|
||||
$data['qra'] = "set";
|
||||
$data['qra_lat'] = $qra_position[0];
|
||||
$data['qra_lng'] = $qra_position[1];
|
||||
} else {
|
||||
$data['qra'] = "none";
|
||||
}
|
||||
} else {
|
||||
$qra_position = $this->qra->qra2latlong($this->session->userdata('user_locator'));
|
||||
if ($qra_position) {
|
||||
$data['qra'] = "set";
|
||||
$data['qra_lat'] = $qra_position[0];
|
||||
$data['qra_lng'] = $qra_position[1];
|
||||
} else {
|
||||
$data['qra'] = "none";
|
||||
}
|
||||
} else {
|
||||
$data['qra'] = "none";
|
||||
}
|
||||
|
||||
$this->load->model('stations');
|
||||
|
|
@ -60,7 +61,7 @@ class Dashboard extends CI_Controller {
|
|||
|
||||
$setup_required = false;
|
||||
|
||||
if($setup_required) {
|
||||
if ($setup_required) {
|
||||
$data['page_title'] = "Cloudlog Setup Checklist";
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
|
@ -88,7 +89,7 @@ class Dashboard extends CI_Controller {
|
|||
$data['total_countries_confirmed_eqsl'] = $CountriesBreakdown['Countries_Worked_EQSL'];
|
||||
$data['total_countries_confirmed_lotw'] = $CountriesBreakdown['Countries_Worked_LOTW'];
|
||||
|
||||
$QSLStatsBreakdownArray =$this->logbook_model->get_QSLStats($logbooks_locations_array);
|
||||
$QSLStatsBreakdownArray = $this->logbook_model->get_QSLStats($logbooks_locations_array);
|
||||
|
||||
$data['total_qsl_sent'] = $QSLStatsBreakdownArray['QSL_Sent'];
|
||||
$data['total_qsl_rcvd'] = $QSLStatsBreakdownArray['QSL_Received'];
|
||||
|
|
@ -130,15 +131,38 @@ class Dashboard extends CI_Controller {
|
|||
$this->load->view('dashboard/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function radio_display_component() {
|
||||
function radio_display_component()
|
||||
{
|
||||
$this->load->model('cat');
|
||||
|
||||
$data['radio_status'] = $this->cat->recent_status();
|
||||
$this->load->view('components/radio_display_table', $data);
|
||||
}
|
||||
|
||||
function upcoming_dxcc_component()
|
||||
{
|
||||
|
||||
$this->load->model('Workabledxcc_model');
|
||||
|
||||
$this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file'));
|
||||
|
||||
// Get the user ID from the session data
|
||||
$userID = $this->session->userdata('user_id');
|
||||
|
||||
|
||||
$thisWeekRecords = $this->Workabledxcc_model->GetThisWeek();
|
||||
|
||||
|
||||
$data['thisWeekRecords'] = $thisWeekRecords;
|
||||
|
||||
usort($data['thisWeekRecords'], function ($a, $b) {
|
||||
$dateA = new DateTime($a['1']);
|
||||
$dateB = new DateTime($b['1']);
|
||||
return $dateA <=> $dateB;
|
||||
});
|
||||
|
||||
$this->load->view('components/upcoming_dxccs', $data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,170 @@
|
|||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
Controller to interact with the Cloudlog DXPed Aggregator
|
||||
*/
|
||||
|
||||
class Workabledxcc extends CI_Controller
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$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()
|
||||
{
|
||||
// Load public view
|
||||
$data['page_title'] = "Upcoming DXPeditions";
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('/workabledxcc/index');
|
||||
$this->load->view('interface_assets/footer');
|
||||
}
|
||||
|
||||
public function dxcclist()
|
||||
{
|
||||
|
||||
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
|
||||
|
||||
// Decode the JSON data into a PHP array
|
||||
$dataResult = json_decode($json, true);
|
||||
|
||||
// Initialize an empty array to store the required data
|
||||
$requiredData = array();
|
||||
|
||||
// Get 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');
|
||||
}
|
||||
|
||||
// Iterate through the decoded JSON data
|
||||
foreach ($dataResult as $item) {
|
||||
// Create a new array with the required fields and add it to the main array
|
||||
$oldStartDate = DateTime::createFromFormat('Y-m-d', $item['0']);
|
||||
|
||||
$StartDate = $oldStartDate->format($custom_date_format);
|
||||
|
||||
$oldEndDate = DateTime::createFromFormat('Y-m-d', $item['1']);
|
||||
|
||||
$EndDate = $oldEndDate->format($custom_date_format);
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
$dxccInfo = $this->logbook_model->dxcc_lookup($item['callsign'], $StartDate);
|
||||
|
||||
// Call DXCC Worked function to check if the DXCC has been worked before
|
||||
if (isset($dxccInfo['entity'])) {
|
||||
$dxccWorked = $this->dxccWorked($dxccInfo['entity']);
|
||||
} else {
|
||||
// Handle the case where 'entity' is not set in $dxccInfo
|
||||
$dxccWorked = array(
|
||||
'workedBefore' => false,
|
||||
'confirmed' => false,
|
||||
);
|
||||
}
|
||||
|
||||
$requiredData[] = array(
|
||||
'clean_date' => $item['0'],
|
||||
'start_date' => $StartDate,
|
||||
'end_date' => $EndDate,
|
||||
'country' => $item['2'],
|
||||
'notes' => $item['6'],
|
||||
'callsign' => $item['callsign'],
|
||||
'workedBefore' => $dxccWorked['workedBefore'],
|
||||
'confirmed' => $dxccWorked['confirmed'],
|
||||
);
|
||||
}
|
||||
|
||||
$data['dxcclist'] = $requiredData;
|
||||
|
||||
// Return the array with the required data
|
||||
|
||||
$this->load->view('/workabledxcc/components/dxcclist', $data);
|
||||
}
|
||||
|
||||
function dxccWorked($country)
|
||||
{
|
||||
|
||||
$return = [
|
||||
"workedBefore" => false,
|
||||
"confirmed" => false,
|
||||
];
|
||||
|
||||
$user_default_confirmation = $this->session->userdata('user_default_confirmation');
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
if (!empty($logbooks_locations_array)) {
|
||||
$this->db->where('COL_PROP_MODE !=', 'SAT');
|
||||
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_COUNTRY', urldecode($country));
|
||||
|
||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||
foreach ($query->result() as $workedBeforeRow) {
|
||||
$return['workedBefore'] = true;
|
||||
}
|
||||
|
||||
$extrawhere = '';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Q') !== false) {
|
||||
$extrawhere = "COL_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'L') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_LOTW_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'E') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_EQSL_QSL_RCVD='Y'";
|
||||
}
|
||||
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Z') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_QRZCOM_QSO_DOWNLOAD_STATUS='Y'";
|
||||
}
|
||||
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
$this->db->where('COL_PROP_MODE !=', 'SAT');
|
||||
if ($extrawhere != '') {
|
||||
$this->db->where('(' . $extrawhere . ')');
|
||||
} else {
|
||||
$this->db->where("1=0");
|
||||
}
|
||||
|
||||
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_COUNTRY', urldecode($country));
|
||||
|
||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||
foreach ($query->result() as $workedBeforeRow) {
|
||||
$return['confirmed'] = true;
|
||||
}
|
||||
|
||||
return $return;
|
||||
} else {
|
||||
$return['workedBefore'] = false;
|
||||
$return['confirmed'] = false;
|
||||
|
||||
|
||||
return $return;;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -411,6 +411,10 @@ class DxccFlag
|
|||
|
||||
public function get($dxcc)
|
||||
{
|
||||
return $this->dxccFlags[$dxcc];
|
||||
if (!isset($this->dxccFlags[$dxcc])) {
|
||||
return null;
|
||||
} else {
|
||||
return $this->dxccFlags[$dxcc];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* Tag Cloudlog as 2.6.5
|
||||
*/
|
||||
|
||||
class Migration_tag_2_6_5 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.5'));
|
||||
|
||||
// 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.4'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
<?php
|
||||
|
||||
class Workabledxcc_model extends CI_Model
|
||||
{
|
||||
|
||||
public function GetThisWeek()
|
||||
{
|
||||
$json = file_get_contents('https://cdn.cloudlog.org/read_ng3k_dxped_list.php');
|
||||
|
||||
// Step 2: Convert the JSON data to an array.
|
||||
$data = json_decode($json, true);
|
||||
|
||||
// Step 3: Create a new array to hold the records for this week.
|
||||
$thisWeekRecords = [];
|
||||
|
||||
// Get the start and end of this week.
|
||||
$startOfWeek = (new DateTime())->setISODate((new DateTime())->format('o'), (new DateTime())->format('W'), 1);
|
||||
$endOfWeek = (clone $startOfWeek)->modify('+6 days');
|
||||
|
||||
// Step 4: Iterate over the array.
|
||||
foreach ($data as $record) {
|
||||
|
||||
// Convert "0" and "1" to DateTime objects.
|
||||
$startDate = new DateTime($record['0']);
|
||||
$endDate = new DateTime($record['1']);
|
||||
|
||||
// Step 5: Check if the start date or end date is within this week.
|
||||
if (($startDate >= $startOfWeek && $startDate <= $endOfWeek) || ($endDate >= $startOfWeek && $endDate <= $endOfWeek)) {
|
||||
$endDate = new DateTime($record['1']);
|
||||
$now = new DateTime();
|
||||
$interval = $now->diff($endDate);
|
||||
$daysLeft = $interval->days;
|
||||
|
||||
// If daysLeft is 0, set it to "Last day"
|
||||
if ($daysLeft == 0) {
|
||||
$daysLeft = "Last day";
|
||||
} else {
|
||||
$daysLeft = $daysLeft . " days left";
|
||||
}
|
||||
|
||||
// Add daysLeft to record
|
||||
$record['daysLeft'] = $daysLeft;
|
||||
// Get 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');
|
||||
}
|
||||
|
||||
// Create a new array with the required fields and add it to the main array
|
||||
$oldStartDate = DateTime::createFromFormat('Y-m-d', $record['0']);
|
||||
|
||||
$StartDate = $oldStartDate->format($custom_date_format);
|
||||
$record['startDate'] = $StartDate;
|
||||
|
||||
$oldEndDate = DateTime::createFromFormat('Y-m-d', $record['1']);
|
||||
$EndDate = $oldEndDate->format($custom_date_format);
|
||||
$record['endDate'] = $EndDate;
|
||||
|
||||
$record['confirmed'] = true; // or false, depending on your logic
|
||||
|
||||
$CI = &get_instance();
|
||||
$CI->load->model('logbook_model');
|
||||
$dxccInfo = $CI->logbook_model->dxcc_lookup($record['callsign'], $startDate->format('Y-m-d'));
|
||||
|
||||
// Call DXCC Worked function to check if the DXCC has been worked before
|
||||
if (isset($dxccInfo['entity'])) {
|
||||
$dxccWorkedData = $this->dxccWorked($dxccInfo['entity']);
|
||||
$record = array_merge($record, $dxccWorkedData);
|
||||
} else {
|
||||
// Handle the case where 'entity' is not set in $dxccInfo
|
||||
$itemsToAdd = array(
|
||||
'workedBefore' => false,
|
||||
'confirmed' => false,
|
||||
);
|
||||
$record = array_merge($record, $itemsToAdd);
|
||||
}
|
||||
|
||||
$thisWeekRecords[] = $record;
|
||||
}
|
||||
}
|
||||
return $thisWeekRecords;
|
||||
|
||||
}
|
||||
|
||||
function dxccWorked($country)
|
||||
{
|
||||
|
||||
$return = [
|
||||
"workedBefore" => false,
|
||||
"confirmed" => false,
|
||||
];
|
||||
|
||||
$user_default_confirmation = $this->session->userdata('user_default_confirmation');
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
if (!empty($logbooks_locations_array)) {
|
||||
$this->db->where('COL_PROP_MODE !=', 'SAT');
|
||||
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_COUNTRY', urldecode($country));
|
||||
|
||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||
foreach ($query->result() as $workedBeforeRow) {
|
||||
$return['workedBefore'] = true;
|
||||
}
|
||||
|
||||
$extrawhere = '';
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Q') !== false) {
|
||||
$extrawhere = "COL_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'L') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_LOTW_QSL_RCVD='Y'";
|
||||
}
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'E') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_EQSL_QSL_RCVD='Y'";
|
||||
}
|
||||
|
||||
if (isset($user_default_confirmation) && strpos($user_default_confirmation, 'Z') !== false) {
|
||||
if ($extrawhere != '') {
|
||||
$extrawhere .= " OR";
|
||||
}
|
||||
$extrawhere .= " COL_QRZCOM_QSO_DOWNLOAD_STATUS='Y'";
|
||||
}
|
||||
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
$this->db->where('COL_PROP_MODE !=', 'SAT');
|
||||
if ($extrawhere != '') {
|
||||
$this->db->where('(' . $extrawhere . ')');
|
||||
} else {
|
||||
$this->db->where("1=0");
|
||||
}
|
||||
|
||||
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->where('COL_COUNTRY', urldecode($country));
|
||||
|
||||
$query = $this->db->get($this->config->item('table_name'), 1, 0);
|
||||
foreach ($query->result() as $workedBeforeRow) {
|
||||
$return['confirmed'] = true;
|
||||
}
|
||||
|
||||
return $return;
|
||||
} else {
|
||||
$return['workedBefore'] = false;
|
||||
$return['confirmed'] = false;
|
||||
|
||||
|
||||
return $return;;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<br>
|
||||
<h2>Hamsat - Satellite Rovers</h2>
|
||||
<p>This data is from <a target="_blank" href="https://hams.at/">https://hams.at/</a></p>
|
||||
<?php if ($rovedata == []) { ?>
|
||||
<?php if ($rovedata['data'] == []) { ?>
|
||||
<div class="alert alert-warning" role="warning">
|
||||
<?php echo lang('hams_at_no_activations_found');?>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="3"><i class="fas fa-chart-bar"></i> DXPeditions (This Week)</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
foreach ($thisWeekRecords as $record) {
|
||||
$color = $record['workedBefore'] == 1 ? '#ddffdd' : '#ffdddd';
|
||||
echo '<tr>';
|
||||
echo '<td style="background-color: ' . $color . ';" width="33%">' . $record['daysLeft'] . '</td>'; // Date
|
||||
echo '<td style="background-color: ' . $color . ';" width="33%">' . '<a href="#" data-bs-toggle="tooltip" data-bs-title="'.$record['6'].'">'.$record['callsign'] . '</a>'. '</td>'; // Callsign
|
||||
echo '<td style="background-color: ' . $color . ';" width="33%">' . $record['2'] . '</td>'; // Country
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
|
@ -1,356 +1,464 @@
|
|||
<?php
|
||||
function echo_table_header_col($ctx, $name) {
|
||||
switch($name) {
|
||||
case 'Mode': echo '<th>'.$ctx->lang->line('gen_hamradio_mode').'</th>'; break;
|
||||
case 'RSTS': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rsts').'</th>'; break;
|
||||
case 'RSTR': echo '<th class="d-none d-sm-table-cell">'.$ctx->lang->line('gen_hamradio_rstr').'</th>'; break;
|
||||
case 'Country': echo '<th>'.$ctx->lang->line('general_word_country').'</th>'; break;
|
||||
case 'IOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_iota').'</th>'; break;
|
||||
case 'SOTA': echo '<th>'.$ctx->lang->line('gen_hamradio_sota').'</th>'; break;
|
||||
case 'WWFF': echo '<th>'.$ctx->lang->line('gen_hamradio_wwff').'</th>'; break;
|
||||
case 'POTA': echo '<th>'.$ctx->lang->line('gen_hamradio_pota').'</th>'; break;
|
||||
case 'State': echo '<th>'.$ctx->lang->line('gen_hamradio_state').'</th>'; break;
|
||||
case 'Grid': echo '<th>'.$ctx->lang->line('gen_hamradio_gridsquare').'</th>'; break;
|
||||
case 'Distance': echo '<th>'.$ctx->lang->line('gen_hamradio_distance').'</th>'; break;
|
||||
case 'Band': echo '<th>'.$ctx->lang->line('gen_hamradio_band').'</th>'; break;
|
||||
case 'Frequency': echo '<th>'.$ctx->lang->line('gen_hamradio_frequency').'</th>'; break;
|
||||
case 'Operator': echo '<th>'.$ctx->lang->line('gen_hamradio_operator').'</th>'; break;
|
||||
case 'Name': echo '<th>'.$ctx->lang->line('general_word_name').'</th>'; break;
|
||||
function echo_table_header_col($ctx, $name)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'Mode':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_mode') . '</th>';
|
||||
break;
|
||||
case 'RSTS':
|
||||
echo '<th class="d-none d-sm-table-cell">' . $ctx->lang->line('gen_hamradio_rsts') . '</th>';
|
||||
break;
|
||||
case 'RSTR':
|
||||
echo '<th class="d-none d-sm-table-cell">' . $ctx->lang->line('gen_hamradio_rstr') . '</th>';
|
||||
break;
|
||||
case 'Country':
|
||||
echo '<th>' . $ctx->lang->line('general_word_country') . '</th>';
|
||||
break;
|
||||
case 'IOTA':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_iota') . '</th>';
|
||||
break;
|
||||
case 'SOTA':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_sota') . '</th>';
|
||||
break;
|
||||
case 'WWFF':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_wwff') . '</th>';
|
||||
break;
|
||||
case 'POTA':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_pota') . '</th>';
|
||||
break;
|
||||
case 'State':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_state') . '</th>';
|
||||
break;
|
||||
case 'Grid':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_gridsquare') . '</th>';
|
||||
break;
|
||||
case 'Distance':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_distance') . '</th>';
|
||||
break;
|
||||
case 'Band':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_band') . '</th>';
|
||||
break;
|
||||
case 'Frequency':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_frequency') . '</th>';
|
||||
break;
|
||||
case 'Operator':
|
||||
echo '<th>' . $ctx->lang->line('gen_hamradio_operator') . '</th>';
|
||||
break;
|
||||
case 'Name':
|
||||
echo '<th>' . $ctx->lang->line('general_word_name') . '</th>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function echo_table_col($row, $name) {
|
||||
$ci =& get_instance();
|
||||
switch($name) {
|
||||
case 'Mode': echo '<td>'; echo $row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE . '</td>'; break;
|
||||
case 'RSTS': echo '<td class="d-none d-sm-table-cell">' . $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 '</td>'; break;
|
||||
case 'RSTR': echo '<td class="d-none d-sm-table-cell">' . $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 '</td>'; break;
|
||||
case 'Country': echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY))); if ($row->end != NULL) echo ' <span class="badge text-bg-danger">'.$ci->lang->line('gen_hamradio_deleted_dxcc').'</span>' . '</td>'; break;
|
||||
case 'IOTA': echo '<td>' . ($row->COL_IOTA) . '</td>'; break;
|
||||
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF) . '</td>'; break;
|
||||
case 'WWFF': echo '<td>' . ($row->COL_WWFF_REF) . '</td>'; break;
|
||||
case 'POTA': echo '<td>' . ($row->COL_POTA_REF) . '</td>'; break;
|
||||
case 'Grid': echo '<td>'; echoQrbCalcLink($row->station_gridsquare, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE); echo '</td>'; break;
|
||||
case 'Distance': echo '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : '') . '</td>'; break;
|
||||
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { echo strtolower($row->COL_BAND); } echo '</td>'; break;
|
||||
case 'Frequency': echo '<td>'; if($row->COL_SAT_NAME != null) { echo '<a href="https://db.satnogs.org/search/?q='.$row->COL_SAT_NAME.'" target="_blank">'.$row->COL_SAT_NAME.'</a></td>'; } else { if($row->COL_FREQ != null) { echo $ci->frequency->hz_to_mhz($row->COL_FREQ); } else { echo strtolower($row->COL_BAND); } } echo '</td>'; break;
|
||||
case 'State': echo '<td>' . ($row->COL_STATE) . '</td>'; break;
|
||||
case 'Operator': echo '<td>' . ($row->COL_OPERATOR) . '</td>'; break;
|
||||
case 'Name': echo '<td>' . ($row->COL_NAME) . '</td>'; break;
|
||||
function echo_table_col($row, $name)
|
||||
{
|
||||
$ci = &get_instance();
|
||||
switch ($name) {
|
||||
case 'Mode':
|
||||
echo '<td>';
|
||||
echo $row->COL_SUBMODE == null ? $row->COL_MODE : $row->COL_SUBMODE . '</td>';
|
||||
break;
|
||||
case 'RSTS':
|
||||
echo '<td class="d-none d-sm-table-cell">' . $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 '</td>';
|
||||
break;
|
||||
case 'RSTR':
|
||||
echo '<td class="d-none d-sm-table-cell">' . $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 '</td>';
|
||||
break;
|
||||
case 'Country':
|
||||
echo '<td>' . ucwords(strtolower(($row->COL_COUNTRY)));
|
||||
if ($row->end != NULL) echo ' <span class="badge text-bg-danger">' . $ci->lang->line('gen_hamradio_deleted_dxcc') . '</span>' . '</td>';
|
||||
break;
|
||||
case 'IOTA':
|
||||
echo '<td>' . ($row->COL_IOTA) . '</td>';
|
||||
break;
|
||||
case 'SOTA':
|
||||
echo '<td>' . ($row->COL_SOTA_REF) . '</td>';
|
||||
break;
|
||||
case 'WWFF':
|
||||
echo '<td>' . ($row->COL_WWFF_REF) . '</td>';
|
||||
break;
|
||||
case 'POTA':
|
||||
echo '<td>' . ($row->COL_POTA_REF) . '</td>';
|
||||
break;
|
||||
case 'Grid':
|
||||
echo '<td>';
|
||||
echoQrbCalcLink($row->station_gridsquare, $row->COL_VUCC_GRIDS, $row->COL_GRIDSQUARE);
|
||||
echo '</td>';
|
||||
break;
|
||||
case 'Distance':
|
||||
echo '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : '') . '</td>';
|
||||
break;
|
||||
case 'Band':
|
||||
echo '<td>';
|
||||
if ($row->COL_SAT_NAME != null) {
|
||||
echo '<a href="https://db.satnogs.org/search/?q=' . $row->COL_SAT_NAME . '" target="_blank">' . $row->COL_SAT_NAME . '</a></td>';
|
||||
} else {
|
||||
echo strtolower($row->COL_BAND);
|
||||
}
|
||||
echo '</td>';
|
||||
break;
|
||||
case 'Frequency':
|
||||
echo '<td>';
|
||||
if ($row->COL_SAT_NAME != null) {
|
||||
echo '<a href="https://db.satnogs.org/search/?q=' . $row->COL_SAT_NAME . '" target="_blank">' . $row->COL_SAT_NAME . '</a></td>';
|
||||
} else {
|
||||
if ($row->COL_FREQ != null) {
|
||||
echo $ci->frequency->hz_to_mhz($row->COL_FREQ);
|
||||
} else {
|
||||
echo strtolower($row->COL_BAND);
|
||||
}
|
||||
}
|
||||
echo '</td>';
|
||||
break;
|
||||
case 'State':
|
||||
echo '<td>' . ($row->COL_STATE) . '</td>';
|
||||
break;
|
||||
case 'Operator':
|
||||
echo '<td>' . ($row->COL_OPERATOR) . '</td>';
|
||||
break;
|
||||
case 'Name':
|
||||
echo '<td>' . ($row->COL_NAME) . '</td>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
||||
function echoQrbCalcLink($mygrid, $grid, $vucc)
|
||||
{
|
||||
if (!empty($grid)) {
|
||||
echo $grid . ' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $grid . '\')"><i class="fas fa-globe"></i></a>';
|
||||
} else if (!empty($vucc)) {
|
||||
echo $vucc .' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
echo $vucc . ' <a href="javascript:spawnQrbCalculator(\'' . $mygrid . '\',\'' . $vucc . '\')"><i class="fas fa-globe"></i></a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="container dashboard">
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
|
||||
<?php if (($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) { ?>
|
||||
|
||||
<?php if (version_compare(PHP_VERSION, '7.4.0') <= 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_php_version_warning') . ' ' . PHP_VERSION . '.';?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($countryCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_country_files_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($locationCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_locations_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($logbookCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_logbooks_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->optionslib->get_option('dashboard_banner') != "false") { ?>
|
||||
<?php if($todays_qsos >= 1) { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
<?php echo lang('dashboard_you_have_had'); ?> <strong><?php echo $todays_qsos; ?></strong> <?php echo $todays_qsos != 1 ? lang('dashboard_qsos_today') : str_replace('QSOs', 'QSO', lang('dashboard_qsos_today')); ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-broadcast-tower"></i> <?php echo lang('notice_turn_the_radio_on'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($current_active == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('error_no_active_station_profile'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->userdata('user_id')) { ?>
|
||||
<?php
|
||||
$current_date = date('Y-m-d H:i:s');
|
||||
if($this->LotwCert->lotw_cert_expired($this->session->userdata('user_id'), $current_date) == true) { ?>
|
||||
<?php if (version_compare(PHP_VERSION, '7.4.0') <= 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-hourglass-end"></i> <?php echo lang('lotw_cert_expired'); ?>
|
||||
<?php echo lang('dashboard_php_version_warning') . ' ' . PHP_VERSION . '.'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($this->LotwCert->lotw_cert_expiring($this->session->userdata('user_id'), $current_date) == true) { ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-hourglass-half"></i> <?php echo lang('lotw_cert_expiring'); ?>
|
||||
<?php if ($countryCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_country_files_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($locationCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_locations_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($logbookCount == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('dashboard_logbooks_warning'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->optionslib->get_option('dashboard_banner') != "false") { ?>
|
||||
<?php if ($todays_qsos >= 1) { ?>
|
||||
<div class="alert alert-success" role="alert">
|
||||
<?php echo lang('dashboard_you_have_had'); ?> <strong><?php echo $todays_qsos; ?></strong> <?php echo $todays_qsos != 1 ? lang('dashboard_qsos_today') : str_replace('QSOs', 'QSO', lang('dashboard_qsos_today')); ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-broadcast-tower"></i> <?php echo lang('notice_turn_the_radio_on'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($current_active == 0) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo lang('error_no_active_station_profile'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->session->userdata('user_id')) { ?>
|
||||
<?php
|
||||
$current_date = date('Y-m-d H:i:s');
|
||||
if ($this->LotwCert->lotw_cert_expired($this->session->userdata('user_id'), $current_date) == true) { ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-hourglass-end"></i> <?php echo lang('lotw_cert_expired'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($this->LotwCert->lotw_cert_expiring($this->session->userdata('user_id'), $current_date) == true) { ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<span class="badge text-bg-info"><?php echo lang('general_word_important'); ?></span> <i class="fas fa-hourglass-half"></i> <?php echo lang('lotw_cert_expiring'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if($this->optionslib->get_option('dashboard_map') != "false" && $this->optionslib->get_option('dashboard_map') != "map_at_right") { ?>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map-leaflet" style="width: 100%; height: 350px"></div>
|
||||
<?php if ($this->config->item('option_dashboard_map ') != "false" && $this->config->item('option_dashboard_map ') != "map_at_right") { ?>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map-leaflet" style="width: 100%; height: 350px"></div>
|
||||
<?php } ?>
|
||||
<div style="padding-top: 0px; margin-top: 5px;" class="container dashboard">
|
||||
|
||||
<!-- Log Data -->
|
||||
<div class="row logdata">
|
||||
<div class="col-sm-8">
|
||||
<!-- Log Data -->
|
||||
<div class="row logdata">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover border-top">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover border-top">
|
||||
|
||||
<thead>
|
||||
<tr class="titles">
|
||||
<th><?php echo lang('general_word_date'); ?></th>
|
||||
<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
|
||||
echo_table_header_col($this, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php
|
||||
$i = 0;
|
||||
if(!empty($last_five_qsos) > 0) {
|
||||
foreach ($last_five_qsos->result() as $row) { ?>
|
||||
<?php echo '<tr id="qso_'.$row->COL_PRIMARY_KEY.'" class="tr'.($i & 1).'">'; ?>
|
||||
<?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
|
||||
echo_table_header_col($this, $this->session->userdata('user_column1') == "" ? 'Mode' : $this->session->userdata('user_column1'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column2') == "" ? 'RSTS' : $this->session->userdata('user_column2'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column3') == "" ? 'RSTR' : $this->session->userdata('user_column3'));
|
||||
echo_table_header_col($this, $this->session->userdata('user_column4') == "" ? 'Band' : $this->session->userdata('user_column4'));
|
||||
?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php
|
||||
$i = 0;
|
||||
if (!empty($last_five_qsos) > 0) {
|
||||
foreach ($last_five_qsos->result() as $row) { ?>
|
||||
<?php echo '<tr id="qso_' . $row->COL_PRIMARY_KEY . '" class="tr' . ($i & 1) . '">'; ?>
|
||||
|
||||
// Get 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
|
||||
|
||||
?>
|
||||
// Get 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');
|
||||
}
|
||||
|
||||
<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","Ø",strtoupper($row->COL_CALL)); ?></a>
|
||||
</td>
|
||||
<?php
|
||||
echo_table_col($row, $this->session->userdata('user_column1')==""?'Mode':$this->session->userdata('user_column1'));
|
||||
echo_table_col($row, $this->session->userdata('user_column2')==""?'RSTS':$this->session->userdata('user_column2'));
|
||||
echo_table_col($row, $this->session->userdata('user_column3')==""?'RSTR':$this->session->userdata('user_column3'));
|
||||
echo_table_col($row, $this->session->userdata('user_column4')==""?'Band':$this->session->userdata('user_column4'));
|
||||
?>
|
||||
</tr>
|
||||
<?php $i++; } } ?>
|
||||
</table>
|
||||
<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", "Ø", strtoupper($row->COL_CALL)); ?></a>
|
||||
</td>
|
||||
<?php
|
||||
echo_table_col($row, $this->session->userdata('user_column1') == "" ? 'Mode' : $this->session->userdata('user_column1'));
|
||||
echo_table_col($row, $this->session->userdata('user_column2') == "" ? 'RSTS' : $this->session->userdata('user_column2'));
|
||||
echo_table_col($row, $this->session->userdata('user_column3') == "" ? 'RSTR' : $this->session->userdata('user_column3'));
|
||||
echo_table_col($row, $this->session->userdata('user_column4') == "" ? 'Band' : $this->session->userdata('user_column4'));
|
||||
?>
|
||||
</tr>
|
||||
<?php $i++;
|
||||
}
|
||||
} ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<?php if ($this->config->item('dashboard_map') == "map_at_right") { ?>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map-leaflet" style="width: 100%; height: 350px; margin-bottom: 15px;"></div>
|
||||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<div id="radio_display" hx-get="<?php echo site_url('visitor/radio_display_component'); ?>" hx-trigger="load, every 5s"></div>
|
||||
<div>
|
||||
<div id="upcoming_dxccs_component" hx-get="<?php echo site_url('dashboard/upcoming_dxcc_component'); ?>" hx-trigger="load" hx-indicator="#loading_upcoming_dxcc"></div>
|
||||
<div id="loading_upcoming_dxcc" style="display: none;">Loading Upcoming DXPeditions.</div>
|
||||
</div>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-chart-bar"></i> <?php echo lang('dashboard_qso_breakdown'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_total'); ?></td>
|
||||
<td width="50%"><?php echo $total_qsos; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_year'); ?></td>
|
||||
<td width="50%"><?php echo $year_qsos; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_month'); ?></td>
|
||||
<td width="50%"><?php echo $month_qsos; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-globe-europe"></i> <?php echo lang('dashboard_countries_breakdown'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_worked'); ?></td>
|
||||
<td width="50%"><?php echo $total_countries; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><a href="#" onclick="return false" title="QSL Cards / eQSL / LoTW" data-bs-toggle="tooltip"><?php echo lang('general_word_confirmed'); ?></a></td>
|
||||
<td width="50%">
|
||||
<?php echo $total_countries_confirmed_paper; ?> /
|
||||
<?php echo $total_countries_confirmed_eqsl; ?> /
|
||||
<?php echo $total_countries_confirmed_lotw; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_needed'); ?></td>
|
||||
<td width="50%"><?php echo $total_countries_needed; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_qsl_sent != 0 || $total_qsl_rcvd != 0 || $total_qsl_requested != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-envelope"></i> <?php echo lang('general_word_qslcards'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','QSLSDATE','');"><?php echo $qsl_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','QSLRDATE','');"><?php echo $qsl_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_requested'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_requested; ?></td>
|
||||
<td width="25%"><?php echo $qsl_requested_today; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_eqsl_sent != 0 || $total_eqsl_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-address-card"></i> <?php echo lang('general_word_eqslcards'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_eqsl_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','EQSLSDATE','');"><?php echo $eqsl_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_eqsl_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','EQSLRDATE','');"><?php echo $eqsl_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_lotw_sent != 0 || $total_lotw_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-list"></i> <?php echo lang('general_word_lotw'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_lotw_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','LOTWSDATE','');"><?php echo $lotw_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_lotw_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','LOTWRDATE','');"><?php echo $lotw_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_qrz_sent != 0 || $total_qrz_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-list"></i> QRZ.com</td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_qrz_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','QRZSDATE','');"><?php echo $qrz_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_qrz_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','QRZRDATE','');"><?php echo $qrz_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-globe-europe"></i> VUCC-Grids</td>
|
||||
<td colspan="1">SAT</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_worked'); ?></td>
|
||||
<td width="25%"><?php echo $vucc['All']['worked']; ?></td>
|
||||
<td width="25%"><?php echo $vuccSAT['SAT']['worked'] ?? '0'; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_confirmed'); ?></td>
|
||||
<td width="25%"><?php echo $vucc['All']['confirmed']; ?></td>
|
||||
<td width="25%"><?php echo $vuccSAT['SAT']['confirmed'] ?? '0'; ?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<?php if($this->optionslib->get_option('dashboard_map') == "map_at_right") { ?>
|
||||
<!-- Map -->
|
||||
<div id="map" class="map-leaflet" style="width: 100%; height: 350px; margin-bottom: 15px;"></div>
|
||||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<div id="radio_display" hx-get="<?php echo site_url('visitor/radio_display_component'); ?>" hx-trigger="load, every 5s"></div>
|
||||
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-chart-bar"></i> <?php echo lang('dashboard_qso_breakdown'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_total'); ?></td>
|
||||
<td width="50%"><?php echo $total_qsos; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_year'); ?></td>
|
||||
<td width="50%"><?php echo $year_qsos; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_month'); ?></td>
|
||||
<td width="50%"><?php echo $month_qsos; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-globe-europe"></i> <?php echo lang('dashboard_countries_breakdown'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_worked'); ?></td>
|
||||
<td width="50%"><?php echo $total_countries; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><a href="#" onclick="return false" title="QSL Cards / eQSL / LoTW" data-bs-toggle="tooltip"><?php echo lang('general_word_confirmed'); ?></a></td>
|
||||
<td width="50%">
|
||||
<?php echo $total_countries_confirmed_paper; ?> /
|
||||
<?php echo $total_countries_confirmed_eqsl; ?> /
|
||||
<?php echo $total_countries_confirmed_lotw; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_needed'); ?></td>
|
||||
<td width="50%"><?php echo $total_countries_needed; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_qsl_sent != 0 || $total_qsl_rcvd != 0 || $total_qsl_requested != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-envelope"></i> <?php echo lang('general_word_qslcards'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','QSLSDATE','');"><?php echo $qsl_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','QSLRDATE','');"><?php echo $qsl_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_requested'); ?></td>
|
||||
<td width="25%"><?php echo $total_qsl_requested; ?></td>
|
||||
<td width="25%"><?php echo $qsl_requested_today; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE) && ($total_eqsl_sent != 0 || $total_eqsl_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-address-card"></i> <?php echo lang('general_word_eqslcards'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_eqsl_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','EQSLSDATE','');"><?php echo $eqsl_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_eqsl_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','All','All','EQSLRDATE','');"><?php echo $eqsl_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_lotw_sent != 0 || $total_lotw_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-list"></i> <?php echo lang('general_word_lotw'); ?></td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_lotw_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','LOTWSDATE','');"><?php echo $lotw_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_lotw_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','LOTWRDATE','');"><?php echo $lotw_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === false) && ($total_qrz_sent != 0 || $total_qrz_rcvd != 0)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-list"></i> QRZ.com</td>
|
||||
<td colspan="1"><?php echo lang('general_word_today'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_sent'); ?></td>
|
||||
<td width="25%"><?php echo $total_qrz_sent; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','QRZSDATE','');"><?php echo $qrz_sent_today; ?></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_received'); ?></td>
|
||||
<td width="25%"><?php echo $total_qrz_rcvd; ?></td>
|
||||
<td width="25%"><a href="javascript:displayContacts('','all','all','QRZRDATE','');"><?php echo $qrz_rcvd_today; ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<?php if((($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE)) { ?>
|
||||
<table class="table table-striped border-top">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-globe-europe"></i> VUCC-Grids</td>
|
||||
<td colspan="1">SAT</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_worked'); ?></td>
|
||||
<td width="25%"><?php echo $vucc['All']['worked']; ?></td>
|
||||
<td width="25%"><?php echo $vuccSAT['SAT']['worked'] ?? '0'; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="50%"><?php echo lang('general_word_confirmed'); ?></td>
|
||||
<td width="25%"><?php echo $vucc['All']['confirmed']; ?></td>
|
||||
<td width="25%"><?php echo $vuccSAT['SAT']['confirmed'] ?? '0'; ?></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -182,6 +182,8 @@
|
|||
<div class="d-inline d-lg-none" style="padding-left: 10px">Tools</div>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="<?php echo site_url('workabledxcc'); ?>" title="Upcoming DXPeditions"><i class="fas fa-globe"></i> Upcoming DXPeditions</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="<?php echo site_url('hamsat'); ?>" title="Hams.at"><i class="fas fa-list"></i> Hams.at</a>
|
||||
<?php if ($this->optionslib->get_option('dxcache_url') != '') { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,29 @@
|
|||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<script src="<?php echo base_url('assets/js/showdown.min.js'); ?>"></script>
|
||||
|
||||
<script>
|
||||
function convertMarkdownToHTML() {
|
||||
// Get the Markdown content from the div
|
||||
var markdownContent = document.getElementById('markdownDiv').innerText;
|
||||
|
||||
// Create a new Showdown Converter with simplifiedAutoLink option enabled
|
||||
var converter = new showdown.Converter({
|
||||
simplifiedAutoLink: true
|
||||
});
|
||||
|
||||
// Convert Markdown to HTML
|
||||
var html = converter.makeHtml(markdownContent);
|
||||
|
||||
// Set the HTML content of the div
|
||||
document.getElementById('formattedHTMLDiv').innerHTML = html;
|
||||
}
|
||||
|
||||
convertMarkdownToHTML();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$versionDialogMode = isset($this->optionslib) ? $this->optionslib->get_option('version_dialog') : 'release_notes';
|
||||
if ($versionDialogMode == 'custom_text' || $versionDialogMode == 'both') {
|
||||
|
|
@ -25,44 +48,45 @@
|
|||
}
|
||||
if ($versionDialogMode == 'release_notes' || $versionDialogMode == 'both' || $versionDialogMode == 'disabled') {
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
$url = 'https://api.github.com/repos/magicbug/Cloudlog/releases';
|
||||
$options = [
|
||||
'http' => [
|
||||
'header' => 'User-Agent: Cloudlog - Amateur Radio Logbook'
|
||||
]
|
||||
];
|
||||
$context = stream_context_create($options);
|
||||
$response = file_get_contents($url, false, $context);
|
||||
<div>
|
||||
<?php
|
||||
$url = 'https://api.github.com/repos/magicbug/Cloudlog/releases';
|
||||
$options = [
|
||||
'http' => [
|
||||
'header' => 'User-Agent: Cloudlog - Amateur Radio Logbook'
|
||||
]
|
||||
];
|
||||
$context = stream_context_create($options);
|
||||
$response = file_get_contents($url, false, $context);
|
||||
|
||||
if ($response !== false) {
|
||||
$data = json_decode($response, true);
|
||||
if ($response !== false) {
|
||||
$data = json_decode($response, true);
|
||||
|
||||
$current_version=$this->optionslib->get_option('version');
|
||||
if ($data !== null && !empty($data)) {
|
||||
foreach ($data as $singledata) {
|
||||
if ($singledata['tag_name']==$current_version) {
|
||||
$firstRelease = $singledata;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$current_version = $this->optionslib->get_option('version');
|
||||
if ($data !== null && !empty($data)) {
|
||||
foreach ($data as $singledata) {
|
||||
if ($singledata['tag_name'] == $current_version) {
|
||||
$firstRelease = $singledata;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$releaseBody = isset($firstRelease['body']) ? $firstRelease['body'] : 'No release information available';
|
||||
$htmlReleaseBody = htmlspecialchars($releaseBody);
|
||||
$htmlReleaseBodyWithLinks = preg_replace('/(https?:\/\/[^\s<]+)/', '<a href="$1" target="_blank">$1</a>', $htmlReleaseBody);
|
||||
$releaseBody = isset($firstRelease['body']) ? $firstRelease['body'] : 'No release information available';
|
||||
$htmlReleaseBody = htmlspecialchars($releaseBody);
|
||||
$htmlReleaseBodyWithLinks = preg_replace('/(https?:\/\/[^\s<]+)/', '<a href="$1" target="_blank">$1</a>', $htmlReleaseBody);
|
||||
|
||||
$releaseName = isset($firstRelease['name']) ? $firstRelease['name'] : 'No version name information available';
|
||||
echo "<h4>v".$releaseName."</h4>";
|
||||
echo nl2br($htmlReleaseBodyWithLinks);
|
||||
$releaseName = isset($firstRelease['name']) ? $firstRelease['name'] : 'No version name information available';
|
||||
echo "<h4>v" . $releaseName . "</h4>";
|
||||
echo "<div id='markdownDiv' style='display: none;'>" . $releaseBody . "</div>";
|
||||
echo "<div id='formattedHTMLDiv'></div>";
|
||||
} else {
|
||||
echo 'Error decoding JSON data or received empty response.';
|
||||
}
|
||||
} else {
|
||||
echo 'Fehler beim Decodieren der JSON-Daten oder leere Antwort erhalten.';
|
||||
echo 'Error retrieving data from the GitHub API.';
|
||||
}
|
||||
} else {
|
||||
echo 'Fehler beim Abrufen der Daten von der GitHub API.';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
@ -71,7 +95,7 @@
|
|||
<?php
|
||||
if ($versionDialogMode !== 'disabled') {
|
||||
?>
|
||||
<button class="btn btn-secondary" onclick="dismissVersionDialog()" data-bs-dismiss="modal"><?php echo lang('options_version_dialog_dismiss'); ?></button>
|
||||
<button class="btn btn-secondary" onclick="dismissVersionDialog()" data-bs-dismiss="modal"><?php echo lang('options_version_dialog_dismiss'); ?></button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
@ -79,4 +103,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
<?php if($row->name != null) { ?>
|
||||
<tr>
|
||||
<td><?php echo lang('general_word_country'); ?></td>
|
||||
<td><?php echo ucwords(strtolower(($row->name)), "- (/"); if ($dxccFlag != null) { echo " ".$dxccFlag; } if ($row->end != null) { echo ' <span class="badge text-bg-danger">'.lang('gen_hamradio_deleted_dxcc').'</span>'; } ?></td>
|
||||
<td><?php echo ucwords(strtolower(($row->name)), "- (/"); if (isset($dxccFlag)) { echo " ".$dxccFlag; } if ($row->end != null) { echo ' <span class="badge text-bg-danger">'.lang('gen_hamradio_deleted_dxcc').'</span>'; } ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -427,7 +427,7 @@
|
|||
$twitter_string = urlencode("Just worked ".$row->COL_CALL." ");
|
||||
if ($row->COL_DXCC != 0) {
|
||||
$twitter_string .= urlencode("in ".ucwords(strtolower(($row->COL_COUNTRY)))." ");
|
||||
if ($dxccFlag != null) {
|
||||
if (isset($dxccFlag)) {
|
||||
$twitter_string .= $dxccFlag." ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
<p>Data is collected by Cloudlog from multiple sources.</p>
|
||||
|
||||
<?php
|
||||
$grouped = [];
|
||||
|
||||
// Step 2: Iterate over $dxcclist.
|
||||
foreach ($dxcclist as $dxcc) {
|
||||
// Get the month from the start date.
|
||||
$month = date('F Y', strtotime($dxcc['clean_date']));
|
||||
|
||||
// Check if this month already exists in $grouped.
|
||||
if (!isset($grouped[$month])) {
|
||||
// If it doesn't, create a new array for it.
|
||||
$grouped[$month] = [];
|
||||
}
|
||||
|
||||
// Add the current item to the array for its month.
|
||||
$grouped[$month][] = $dxcc;
|
||||
}
|
||||
|
||||
// Step 5: Iterate over $grouped to create a table for each month.
|
||||
foreach ($grouped as $month => $dxccs) {
|
||||
echo "<h3>$month</h3>";
|
||||
echo '<table class="table table-striped table-hover">';
|
||||
echo '<tr>
|
||||
<td>Start Date</td>
|
||||
<td>End Date</td>
|
||||
<td>Country</td>
|
||||
<td>Callsign</td>
|
||||
<td></td>
|
||||
<td>Notes</td>
|
||||
</tr>';
|
||||
|
||||
foreach ($dxccs as $dxcc) {
|
||||
echo '<tr>
|
||||
<td>' . $dxcc['start_date'] . '</td>
|
||||
<td>' . $dxcc['end_date'] . '</td>
|
||||
<td>' . $dxcc['country'] . '</td>
|
||||
<td>' . $dxcc['callsign'] . '</td>
|
||||
<td>';
|
||||
|
||||
if (!$dxcc['workedBefore']) {
|
||||
echo '<span class="badge bg-danger">Not Worked Before</span>';
|
||||
} else {
|
||||
echo '<span class="badge bg-success">Worked Before</span>';
|
||||
}
|
||||
|
||||
if ($dxcc['confirmed']) {
|
||||
echo '<span class="badge bg-primary">Confirmed</span>';
|
||||
}
|
||||
|
||||
echo '</td>
|
||||
<td>' . $dxcc['notes'] . '</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
echo '</table>';
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<div class="container">
|
||||
|
||||
<h2><?php echo $page_title; ?></h2>
|
||||
<div id="dxcclist_display" hx-get="<?php echo site_url('workabledxcc/dxcclist'); ?>" hx-trigger="load"></div>
|
||||
</div>
|
||||
|
|
@ -2,39 +2,40 @@
|
|||
// Admin Menu - Version Dialog Settings
|
||||
|
||||
function showCustomTextarea() {
|
||||
var selectedOptionValue = $("#version_dialog_mode option:selected").val();
|
||||
var selectedOptionValue = $("#version_dialog_mode option:selected").val();
|
||||
|
||||
if (selectedOptionValue === "custom_text" || selectedOptionValue === "both") {
|
||||
$('#version_dialog_custom_textarea').show();
|
||||
} else {
|
||||
$('#version_dialog_custom_textarea').hide();
|
||||
}
|
||||
if (selectedOptionValue === "custom_text" || selectedOptionValue === "both") {
|
||||
$('#version_dialog_custom_textarea').show();
|
||||
} else {
|
||||
$('#version_dialog_custom_textarea').hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
showCustomTextarea();
|
||||
showCustomTextarea();
|
||||
});
|
||||
|
||||
$('#version_dialog_mode').on('change', function () {
|
||||
showCustomTextarea();
|
||||
showCustomTextarea();
|
||||
});
|
||||
|
||||
// JavaScript-Funktion displayVersionDialog für Bootstrap 5
|
||||
|
||||
// JavaScript function displayVersionDialog for Bootstrap 5
|
||||
function displayVersionDialog() {
|
||||
|
||||
$.ajax({
|
||||
url: base_url + "index.php/Version_Dialog/displayVersionDialog",
|
||||
type: 'GET',
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
$('body').append(data);
|
||||
|
||||
// Aktiviere das Bootstrap-Modal
|
||||
// Activate the Bootstrap Modal
|
||||
var versionDialogModal = new bootstrap.Modal(document.getElementById('versionDialogModal'));
|
||||
versionDialogModal.show();
|
||||
},
|
||||
error: function() {
|
||||
// Behandlung von Fehlern
|
||||
error: function () {
|
||||
// Handling of errors
|
||||
console.log('Fehler beim Laden der PHP-Datei.');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
3
assets/js/showdown.min.js
vendored
普通文件
3
assets/js/showdown.min.js
vendored
普通文件
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
|
|
@ -339,6 +339,18 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"NO-44":{
|
||||
"Modes":{
|
||||
"V":[
|
||||
{
|
||||
"Uplink_Mode":"PKT",
|
||||
"Uplink_Freq":"145825000",
|
||||
"Downlink_Mode":"PKT",
|
||||
"Downlink_Freq":"145825000"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"NO-84":{
|
||||
"Modes":{
|
||||
"A/U":[
|
||||
|
|
|
|||
正在加载…
在新工单中引用