mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Dev (#3)
* Added Windows, MariaDB and PHP-Versions * Release 1.0 * Re-added forum link * add stations_id to eqsl functions * remove 'v' in Version Dialog * Update README.md added Link to demo instance * Update index.php * We should be MIT Conform * [Debug] Added information about when files were last updated, and links to update * Added custom data format * Remove leftover-index * Migration * Check if index is there * [LBA] Can disable maidenhead overlay * [eQSL] only locations with a eQSL nickname should be displayed (#74) * only locations with a eQSL nickname should be displayed in the dropdown under eQSL Import * add proper error message * improve usability --------- Co-authored-by: Christoph Kottke <dg0tm@darc.de> * html fixes * show flashdata if no station has eqsl nick * removed openssl check, not required * accumulate stats language * multilanguage support * prettier * Prevent leaking data out of other station_location * moved qrg to first tab * Fix a PHP 8.1 deprecated bug. * [Contesting] Fix for table qso count * Fixed error when data was empty. Also clear table before inserting again. * Refactor to get the table to load * Need to clear datatable when session is deleted * Prevent Racecondition * Fixed a few null-checks which will fail on fresh accounts * Allow for longer gridsquare in station profile * Show IOTA/SOTA ref on station location tab * [LBA] Fixed mapping of selected QSOs --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: Andreas <6977712+AndreasK79@users.noreply.github.com> Co-authored-by: Christoph Kottke <dg0tm@darc.de> Co-authored-by: Florian (DF2ET) <github@florian-wolters.de> Co-authored-by: dg0tm <schieberjunge@gmx.net>
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Accumulated extends CI_Controller {
|
||||
class Accumulated 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'); }
|
||||
if (!$this->user_model->authorize(2)) {
|
||||
$this->session->set_flashdata('notice', 'You\'re not allowed to do that!');
|
||||
redirect('dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Render Page
|
||||
$data['page_title'] = "Accumulated Statistics";
|
||||
$data['page_title'] = $this->lang->line('menu_accumulated_statistics');
|
||||
|
||||
$this->load->model('bands');
|
||||
|
||||
@@ -32,7 +36,8 @@ class Accumulated extends CI_Controller {
|
||||
/*
|
||||
* Used for ajax-call in javascript to fetch the data and insert into table and chart
|
||||
*/
|
||||
public function get_accumulated_data(){
|
||||
public function get_accumulated_data()
|
||||
{
|
||||
//load model
|
||||
$this->load->model('accumulate_model');
|
||||
$band = $this->input->post('Band');
|
||||
@@ -45,5 +50,4 @@ class Accumulated extends CI_Controller {
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,7 @@ class eqsl extends CI_Controller {
|
||||
$this->load->model('eqslmethods_model');
|
||||
$eqsl_locations = $this->eqslmethods_model->all_of_user_with_eqsl_nick_defined();
|
||||
if($eqsl_locations->num_rows() == 0) {
|
||||
show_error("eQSL Nicknames in Station Profiles aren't defined");
|
||||
exit;
|
||||
$this->session->set_flashdata('error', 'eQSL Nicknames in Station Profiles aren\'t defined!');
|
||||
}
|
||||
|
||||
ini_set('memory_limit', '-1');
|
||||
@@ -131,8 +130,7 @@ class eqsl extends CI_Controller {
|
||||
// Check if eQSL Nicknames have been defined
|
||||
$this->load->model('stations');
|
||||
if($this->stations->are_eqsl_nicks_defined() == 0) {
|
||||
show_error('eQSL Nicknames in Station Profiles arent defined');
|
||||
exit;
|
||||
$this->session->set_flashdata('error', 'eQSL Nicknames in Station Profiles aren\'t defined!');
|
||||
}
|
||||
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
@@ -165,10 +165,12 @@ class Hrdlog extends CI_Controller {
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
if (isset($data['qsos'])) {
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
$this->logbook_model->mark_hrdlog_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('hrdlog/mark_hrdlog', $data);
|
||||
|
||||
@@ -256,7 +256,7 @@ class Logbookadvanced extends CI_Controller {
|
||||
'user_id' => (int)$this->session->userdata('user_id'),
|
||||
'dateFrom' => '',
|
||||
'dateTo' => '',
|
||||
'de' => '',
|
||||
'de' => (int)$this->input->post('de'),
|
||||
'dx' => '',
|
||||
'mode' => '',
|
||||
'band' => '',
|
||||
|
||||
@@ -717,9 +717,9 @@ class Lotw extends CI_Controller {
|
||||
|
||||
// Get credentials for LoTW
|
||||
$query = $this->user_model->get_by_id($this->session->userdata('user_id'));
|
||||
$q = $query->row();
|
||||
$data['user_lotw_name'] = urlencode($q->user_lotw_name);
|
||||
$data['user_lotw_password'] = urlencode($q->user_lotw_password);
|
||||
$q = $query->row();
|
||||
$data['user_lotw_name'] = urlencode($q->user_lotw_name ?? '');
|
||||
$data['user_lotw_password'] = urlencode($q->user_lotw_password ?? '');
|
||||
|
||||
// Get URL for downloading LoTW
|
||||
$query = $query = $this->db->query('SELECT lotw_download_url FROM config');
|
||||
@@ -733,15 +733,15 @@ class Lotw extends CI_Controller {
|
||||
$this->session->set_flashdata('warning', 'You have not defined your ARRL LoTW credentials!'); redirect('lotw/import');
|
||||
}
|
||||
|
||||
$customDate = $this->input->post('from');
|
||||
$customDate = $this->input->post('from');
|
||||
|
||||
if ($customDate != NULL) {
|
||||
$lotw_last_qsl_date = date($customDate);
|
||||
}
|
||||
else {
|
||||
// Query the logbook to determine when the last LoTW confirmation was
|
||||
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date($this->session->userdata['user_id'])));
|
||||
}
|
||||
$lotw_last_qsl_date = date($customDate);
|
||||
}
|
||||
else {
|
||||
// Query the logbook to determine when the last LoTW confirmation was
|
||||
$lotw_last_qsl_date = date('Y-m-d', strtotime($this->logbook_model->lotw_last_qsl_date($this->session->userdata['user_id'])));
|
||||
}
|
||||
|
||||
// Build URL for LoTW report file
|
||||
$lotw_url .= "?";
|
||||
|
||||
@@ -170,9 +170,10 @@ class Qrz extends CI_Controller {
|
||||
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
foreach ($data['qsos']->result() as $qso)
|
||||
{
|
||||
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
if (isset($data['qsos'])) {
|
||||
foreach ($data['qsos']->result() as $qso) {
|
||||
$this->logbook_model->mark_qrz_qsos_sent($qso->COL_PRIMARY_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Година';
|
||||
$lang['general_word_month'] = 'Месец';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = '后一项';
|
||||
$lang['general_word_previous'] = '前一项';
|
||||
$lang['general_word_cancel'] = "取消";
|
||||
$lang['general_word_ok'] = "确认";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "注意";
|
||||
$lang['general_word_enabled'] = "已启用";
|
||||
$lang['general_word_disabled'] = "已禁用";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = '年';
|
||||
$lang['general_word_month'] = '月';
|
||||
$lang['general_word_day'] = "日";
|
||||
$lang['general_word_days'] = "天";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "颜色";
|
||||
$lang['general_word_light'] = "浅色/高光";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "当前连续天数";
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "如果你今天进行了QSO,那么就能延长你的连续天数,否则将会被打破清零";
|
||||
$lang['statistics_dwq_no_current_streak'] = "没有找到连续的天数";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Rok';
|
||||
$lang['general_word_month'] = 'Měsíc';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Jaar';
|
||||
$lang['general_word_month'] = 'Maand';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Year';
|
||||
$lang['general_word_month'] = 'Month';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Vuosi';
|
||||
$lang['general_word_month'] = 'Kuukausi';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = "Suivant";
|
||||
$lang['general_word_previous'] = "Précédent";
|
||||
$lang['general_word_cancel'] = "Annuler";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Activé";
|
||||
$lang['general_word_disabled'] = "Désactivé";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = "Année";
|
||||
$lang['general_word_month'] = "Mois";
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Couleurs";
|
||||
$lang['general_word_light'] = "Lumière/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Weiter';
|
||||
$lang['general_word_previous'] = 'Zurück';
|
||||
$lang['general_word_cancel'] = "Abbrechen";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Anzeigen";
|
||||
$lang['general_word_attention'] = "Achtung";
|
||||
$lang['general_word_enabled'] = "Eingeschaltet";
|
||||
$lang['general_word_disabled'] = "Ausgeschaltet";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Jahr';
|
||||
$lang['general_word_month'] = 'Monat';
|
||||
$lang['general_word_day'] = "Tag";
|
||||
$lang['general_word_days'] = "Tage";
|
||||
$lang['general_word_period'] = "Zeitraum";
|
||||
$lang['general_word_yearly'] = "jährlich";
|
||||
$lang['general_word_monthly'] = "monatlich";
|
||||
|
||||
$lang['general_word_colors'] = "Farben";
|
||||
$lang['general_word_light'] = "Licht/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Aktuelle Serie (fortla
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "Wenn Sie heute ein QSO machen, können Sie Ihre Serie verlängern... Andernfalls wird Ihre aktuelle Serie unterbrochen!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "Keine aktuelle Serie gefunden!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Kumulierte Statistik gearbeiteter DXCC";
|
||||
$lang['statistics_accumulated_worked_states'] = "Kumulierte Statistik gearbeiteter US Staaten";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Kumulierte Statistik gearbeiteter IOTA";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Kumulierte Statistik gearbeiteter CQ Zonen";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Ετος';
|
||||
$lang['general_word_month'] = 'Μήνας';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Anno';
|
||||
$lang['general_word_month'] = 'Mese';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Rok';
|
||||
$lang['general_word_month'] = 'Miesiąc';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'След.';
|
||||
$lang['general_word_previous'] = 'Пред.';
|
||||
$lang['general_word_cancel'] = "Отмена";
|
||||
$lang['general_word_ok'] = "ОК";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Внимание";
|
||||
$lang['general_word_enabled'] = "Включено";
|
||||
$lang['general_word_disabled'] = "Выключено";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Год';
|
||||
$lang['general_word_month'] = 'Месяц';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Цвета";
|
||||
$lang['general_word_light'] = "Свет/лазер";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Siguiente';
|
||||
$lang['general_word_previous'] = 'Anterior';
|
||||
$lang['general_word_cancel'] = "Cancelar";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
|
||||
$lang['general_word_attention'] = "Atención";
|
||||
$lang['general_word_enabled'] = "Activado";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_total'] = 'Total';
|
||||
$lang['general_word_year'] = 'Año';
|
||||
$lang['general_word_month'] = 'Mes';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
$lang['general_word_days'] = "Days";
|
||||
|
||||
$lang['general_word_colors'] = "Colores";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_choose_file'] = 'Välj fil';
|
||||
$lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_not_display'] = "Not display";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_icon'] = "Icon";
|
||||
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_city'] = 'City';
|
||||
$lang['general_word_total'] = 'Totalt';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
$lang['general_word_year'] = 'I år';
|
||||
$lang['general_word_month'] = 'Denna månad';
|
||||
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang['general_word_next'] = 'Next';
|
||||
$lang['general_word_previous'] = 'Previous';
|
||||
$lang['general_word_cancel'] = "Cancel";
|
||||
$lang['general_word_ok'] = "OK";
|
||||
$lang['general_word_show'] = "Show";
|
||||
$lang['general_word_attention'] = "Attention";
|
||||
$lang['general_word_enabled'] = "Enabled";
|
||||
$lang['general_word_disabled'] = "Disabled";
|
||||
@@ -51,6 +52,9 @@ $lang['general_word_year'] = 'Yıl';
|
||||
$lang['general_word_month'] = 'Ay';
|
||||
$lang['general_word_day'] = "Day";
|
||||
$lang['general_word_days'] = "Days";
|
||||
$lang['general_word_period'] = "Period";
|
||||
$lang['general_word_yearly'] = "Yearly";
|
||||
$lang['general_word_monthly'] = "Monthly";
|
||||
|
||||
$lang['general_word_colors'] = "Colors";
|
||||
$lang['general_word_light'] = "Light/Laser";
|
||||
|
||||
@@ -58,3 +58,15 @@ $lang['statistics_dwq_current_streak_continuous_days'] = "Current streak (contin
|
||||
$lang['statistics_dwq_make_qso_to_extend_streak'] = "If you make a QSO today, you can continue to extend your streak... or else your current streak will be broken!";
|
||||
$lang['statistics_dwq_no_current_streak'] = "No current streak found!";
|
||||
|
||||
/*
|
||||
*
|
||||
* Accumulated Stats
|
||||
*
|
||||
*/
|
||||
|
||||
$lang['statistics_accumulated_worked_dxcc'] = "Accumulated Number of DXCCs worked";
|
||||
$lang['statistics_accumulated_worked_states'] = "Accumulated Number of States worked";
|
||||
$lang['statistics_accumulated_worked_iota'] = "Accumulated Number of IOTAs worked";
|
||||
$lang['statistics_accumulated_worked_cqzone'] = "Accumulated Number of CQ Zones worked";
|
||||
|
||||
|
||||
|
||||
@@ -3,33 +3,41 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class Accumulate_model extends CI_Model
|
||||
{
|
||||
function get_accumulated_data($band, $award, $mode, $period) {
|
||||
$CI =& get_instance();
|
||||
$CI->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
function get_accumulated_data($band, $award, $mode, $period)
|
||||
{
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$location_list = "'".implode("','",$logbooks_locations_array)."'";
|
||||
$location_list = "'" . implode("','", $logbooks_locations_array) . "'";
|
||||
|
||||
switch ($award) {
|
||||
case 'dxcc': $result = $this->get_accumulated_dxcc($band, $mode, $period, $location_list); break;
|
||||
case 'was': $result = $this->get_accumulated_was($band, $mode, $period, $location_list); break;
|
||||
case 'iota': $result = $this->get_accumulated_iota($band, $mode, $period, $location_list); break;
|
||||
case 'waz': $result = $this->get_accumulated_waz($band, $mode, $period, $location_list); break;
|
||||
case 'dxcc':
|
||||
$result = $this->get_accumulated_dxcc($band, $mode, $period, $location_list);
|
||||
break;
|
||||
case 'was':
|
||||
$result = $this->get_accumulated_was($band, $mode, $period, $location_list);
|
||||
break;
|
||||
case 'iota':
|
||||
$result = $this->get_accumulated_iota($band, $mode, $period, $location_list);
|
||||
break;
|
||||
case 'waz':
|
||||
$result = $this->get_accumulated_waz($band, $mode, $period, $location_list);
|
||||
break;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function get_accumulated_dxcc($band, $mode, $period, $location_list) {
|
||||
function get_accumulated_dxcc($band, $mode, $period, $location_list)
|
||||
{
|
||||
if ($period == "year") {
|
||||
$sql = "select year(thcv.col_time_on) year";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y%m') year";
|
||||
} else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y-%m') year";
|
||||
}
|
||||
|
||||
$sql .= ", coalesce(y.tot, 0) tot
|
||||
@@ -40,14 +48,13 @@ class Accumulate_model extends CI_Model
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= "year(col_time_on)";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$sql .= " year, col_dxcc
|
||||
from " . $this->config->item('table_name') .
|
||||
" where col_dxcc > 0 and station_id in (". $location_list . ")";
|
||||
from " . $this->config->item('table_name') .
|
||||
" where col_dxcc > 0 and station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -58,47 +65,45 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y%m') < year";;
|
||||
}
|
||||
|
||||
$sql .= " and col_dxcc = x.col_dxcc";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and station_id in (". $location_list . "))
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
} else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y-%m') < year";;
|
||||
}
|
||||
|
||||
$sql .= " and col_dxcc = x.col_dxcc";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and station_id in (" . $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y-%m') = y.year";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y%m') = y.year";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " where thcv.col_dxcc > 0";
|
||||
|
||||
if ($band != 'All') {
|
||||
@@ -111,19 +116,17 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and station_id in (". $location_list . ")";
|
||||
|
||||
$sql .= " and station_id in (" . $location_list . ")";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " group by year(thcv.col_time_on), y.tot
|
||||
order by year(thcv.col_time_on)";
|
||||
}
|
||||
|
||||
else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y-%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@@ -131,7 +134,8 @@ class Accumulate_model extends CI_Model
|
||||
return $this->count_and_add_accumulated_total($query->result());
|
||||
}
|
||||
|
||||
function count_and_add_accumulated_total($array) {
|
||||
function count_and_add_accumulated_total($array)
|
||||
{
|
||||
$counter = 0;
|
||||
for ($i = 0; $i < count($array); $i++) {
|
||||
$array[$i]->total = $array[$i]->tot + $counter;
|
||||
@@ -140,12 +144,12 @@ class Accumulate_model extends CI_Model
|
||||
return $array;
|
||||
}
|
||||
|
||||
function get_accumulated_was($band, $mode, $period, $location_list) {
|
||||
function get_accumulated_was($band, $mode, $period, $location_list)
|
||||
{
|
||||
if ($period == "year") {
|
||||
$sql = "select year(thcv.col_time_on) year";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y%m') year";
|
||||
} else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y-%m') year";
|
||||
}
|
||||
|
||||
$sql .= ", coalesce(y.tot, 0) tot
|
||||
@@ -156,14 +160,13 @@ class Accumulate_model extends CI_Model
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= "year(col_time_on)";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$sql .= " year, col_state
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (". $location_list . ")";
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -174,35 +177,6 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and COL_DXCC in ('291', '6', '110')";
|
||||
$sql .= " and COL_STATE in ('AK','AL','AR','AZ','CA','CO','CT','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY')";
|
||||
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y%m') < year";;
|
||||
}
|
||||
|
||||
$sql .= " and col_state = x.col_state";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
@@ -210,18 +184,17 @@ class Accumulate_model extends CI_Model
|
||||
$sql .= " and COL_DXCC in ('291', '6', '110')";
|
||||
$sql .= " and COL_STATE in ('AK','AL','AR','AZ','CA','CO','CT','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY')";
|
||||
|
||||
$sql .= " and station_id in (". $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
} else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y-%m') < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (". $location_list . ")";
|
||||
|
||||
$sql .= " and col_state = x.col_state";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -233,17 +206,43 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " and COL_DXCC in ('291', '6', '110')";
|
||||
$sql .= " and COL_STATE in ('AK','AL','AR','AZ','CA','CO','CT','DE','FL','GA','HI','IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MI','MN','MO','MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VA','VT','WA','WI','WV','WY')";
|
||||
|
||||
$sql .= " and station_id in (" . $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y-%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " group by year(thcv.col_time_on), y.tot
|
||||
order by year(thcv.col_time_on)";
|
||||
}
|
||||
|
||||
else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y-%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@@ -251,12 +250,12 @@ class Accumulate_model extends CI_Model
|
||||
return $this->count_and_add_accumulated_total($query->result());
|
||||
}
|
||||
|
||||
function get_accumulated_iota($band, $mode, $period, $location_list) {
|
||||
function get_accumulated_iota($band, $mode, $period, $location_list)
|
||||
{
|
||||
if ($period == "year") {
|
||||
$sql = "select year(thcv.col_time_on) year";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y%m') year";
|
||||
} else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y-%m') year";
|
||||
}
|
||||
|
||||
$sql .= ", coalesce(y.tot, 0) tot
|
||||
@@ -267,14 +266,13 @@ class Accumulate_model extends CI_Model
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= "year(col_time_on)";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$sql .= " year, col_iota
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (". $location_list . ")";
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -285,48 +283,21 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y%m') < year";;
|
||||
}
|
||||
|
||||
$sql .= " and col_iota = x.col_iota";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and station_id in (". $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
} else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y-%m') < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (". $location_list . ")";
|
||||
|
||||
$sql .= " and col_iota = x.col_iota";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -338,17 +309,40 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " and station_id in (" . $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y-%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " group by year(thcv.col_time_on), y.tot
|
||||
order by year(thcv.col_time_on)";
|
||||
}
|
||||
|
||||
else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y-%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
@@ -356,12 +350,12 @@ class Accumulate_model extends CI_Model
|
||||
return $this->count_and_add_accumulated_total($query->result());
|
||||
}
|
||||
|
||||
function get_accumulated_waz($band, $mode, $period, $location_list) {
|
||||
function get_accumulated_waz($band, $mode, $period, $location_list)
|
||||
{
|
||||
if ($period == "year") {
|
||||
$sql = "select year(thcv.col_time_on) year";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y%m') year";
|
||||
} else if ($period == "month") {
|
||||
$sql = "select date_format(col_time_on, '%Y-%m') year";
|
||||
}
|
||||
|
||||
$sql .= ", coalesce(y.tot, 0) tot
|
||||
@@ -372,14 +366,13 @@ class Accumulate_model extends CI_Model
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= "year(col_time_on)";
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= "date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$sql .= " year, col_cqz
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (". $location_list . ")";
|
||||
from " . $this->config->item('table_name') .
|
||||
" where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -390,48 +383,21 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y%m') < year";;
|
||||
}
|
||||
|
||||
$sql .= " and col_cqz = x.col_cqz";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
$sql .= " and station_id in (". $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
$sql .= " order by year
|
||||
) x
|
||||
where not exists (select 1 from " . $this->config->item('table_name') . " where";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
$sql .= " year(col_time_on) < year";;
|
||||
} else if ($period == "month") {
|
||||
$sql .= " date_format(col_time_on, '%Y-%m') < year";;
|
||||
}
|
||||
else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (". $location_list . ")";
|
||||
|
||||
$sql .= " and col_cqz = x.col_cqz";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
@@ -443,21 +409,44 @@ class Accumulate_model extends CI_Model
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
|
||||
$sql .= " and station_id in (" . $location_list . "))
|
||||
group by year
|
||||
order by year";
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " ) y on year(thcv.col_time_on) = y.year";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " ) y on date_format(col_time_on, '%Y-%m') = y.year";
|
||||
}
|
||||
|
||||
$sql .= " where station_id in (" . $location_list . ")";
|
||||
|
||||
if ($band != 'All') {
|
||||
if ($band == 'SAT') {
|
||||
$sql .= " and col_prop_mode ='" . $band . "'";
|
||||
} else {
|
||||
$sql .= " and col_prop_mode !='SAT'";
|
||||
$sql .= " and col_band ='" . $band . "'";
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode ='" . $mode . "' or col_submode ='" . $mode . "')";
|
||||
}
|
||||
|
||||
if ($period == "year") {
|
||||
$sql .= " group by year(thcv.col_time_on), y.tot
|
||||
order by year(thcv.col_time_on)";
|
||||
}
|
||||
|
||||
else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y%m')";
|
||||
} else if ($period == "month") {
|
||||
$sql .= " group by date_format(col_time_on, '%Y-%m'), y.tot
|
||||
order by date_format(col_time_on, '%Y-%m')";
|
||||
}
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
return $this->count_and_add_accumulated_total($query->result());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ class Distances_model extends CI_Model
|
||||
'Callsign' => '',
|
||||
'Grid' => '',
|
||||
'Distance' => '',
|
||||
'Qsos' => '',
|
||||
'Qsos' => 0,
|
||||
'Grids' => ''
|
||||
);
|
||||
|
||||
@@ -171,8 +171,8 @@ class Distances_model extends CI_Model
|
||||
$bearingdistance = $this->qra->distance($stationgrid, $qso['grid'], $measurement_base);
|
||||
if ($bearingdistance != $qso['COL_DISTANCE']) {
|
||||
$data = array('COL_DISTANCE' => $bearingdistance);
|
||||
$this->db->where('COL_PRIMARY_KEY', $qso['COL_PRIMARY_KEY']);
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
$this->db->where('COL_PRIMARY_KEY', $qso['COL_PRIMARY_KEY']);
|
||||
$this->db->update($this->config->item('table_name'), $data);
|
||||
}
|
||||
$arrayplacement = (int)($bearingdistance / 50); // Resolution is 50, calculates where to put result in array
|
||||
if ($bearingdistance > $qrb['Distance']) { // Saves the longest QSO
|
||||
@@ -205,8 +205,11 @@ class Distances_model extends CI_Model
|
||||
* Returns: bool
|
||||
*/
|
||||
function valid_locator ($loc) {
|
||||
$regex = '^[A-R]{2}[0-9]{2}[A-X]{2}$';
|
||||
if (preg_match("%{$regex}%i", $loc)) {
|
||||
$loc = strtoupper($loc);
|
||||
if (strlen($loc) == 4) $loc .= "LL"; // Only 4 Chars? Fill with center "LL" as only A-R allowed
|
||||
if (strlen($loc) == 6) $loc .= "55"; // Only 6 Chars? Fill with center "55"
|
||||
if (strlen($loc) == 8) $loc .= "LL"; // Only 8 Chars? Fill with center "LL" as only A-R allowed
|
||||
if (preg_match('/^[A-R]{2}[0-9]{2}[A-X]{2}[0-9]{2}[A-X]{2}$/', $loc)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@@ -214,7 +217,7 @@ class Distances_model extends CI_Model
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Used to fetch QSOs from the logbook in the awards
|
||||
*/
|
||||
public function qso_details($distance, $band, $sat){
|
||||
|
||||
@@ -292,7 +292,7 @@ class Logbook_model extends CI_Model {
|
||||
|
||||
$data['COL_STATION_CALLSIGN'] = strtoupper(trim($station['station_callsign']));
|
||||
$data['COL_MY_DXCC'] = strtoupper(trim($station['station_dxcc']));
|
||||
$data['COL_MY_COUNTRY'] = strtoupper(trim($station['station_country']));
|
||||
$data['COL_MY_COUNTRY'] = strtoupper(trim($station['station_country'] ?? ''));
|
||||
$data['COL_MY_CNTY'] = strtoupper(trim($station['station_cnty']));
|
||||
$data['COL_MY_CQ_ZONE'] = strtoupper(trim($station['station_cq']));
|
||||
$data['COL_MY_ITU_ZONE'] = strtoupper(trim($station['station_itu']));
|
||||
@@ -547,24 +547,30 @@ class Logbook_model extends CI_Model {
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
public function get_callsigns($callsign){
|
||||
$this->db->select('COL_CALL');
|
||||
$this->db->distinct();
|
||||
$this->db->like('COL_CALL', $callsign);
|
||||
public function get_callsigns($callsign){
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->db->select('COL_CALL');
|
||||
$this->db->distinct();
|
||||
$this->db->like('COL_CALL', $callsign);
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function get_dok($callsign){
|
||||
$this->db->select('COL_DARC_DOK');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit(1);
|
||||
public function get_dok($callsign){
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->db->select('COL_DARC_DOK');
|
||||
$this->db->where('COL_CALL', $callsign);
|
||||
$this->db->where_in('station_id', $logbooks_locations_array);
|
||||
$this->db->order_by("COL_TIME_ON", "desc");
|
||||
$this->db->limit(1);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function add_qso($data, $skipexport = false, $batchmode = false) {
|
||||
|
||||
@@ -4268,7 +4274,7 @@ function lotw_last_qsl_date($user_id) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function check_missing_dxcc_id($all){
|
||||
// get all records with no COL_DXCC
|
||||
$this->db->select("COL_PRIMARY_KEY, COL_CALL, COL_TIME_ON, COL_TIME_OFF");
|
||||
|
||||
@@ -1,99 +1,108 @@
|
||||
<script>
|
||||
var lang_statistics_accumulated_worked_dxcc = '<?php echo lang('statistics_accumulated_worked_dxcc'); ?>';
|
||||
var lang_statistics_accumulated_worked_states = '<?php echo lang('statistics_accumulated_worked_states'); ?>';
|
||||
var lang_statistics_accumulated_worked_iota = '<?php echo lang('statistics_accumulated_worked_iota'); ?>';
|
||||
var lang_statistics_accumulated_worked_cqzone = '<?php echo lang('statistics_accumulated_worked_cqzone'); ?>';
|
||||
var lang_general_word_year = '<?php echo lang('general_word_year'); ?>';
|
||||
var lang_general_word_yearly = '<?php echo lang('general_word_yearly'); ?>';
|
||||
var lang_general_word_month = '<?php echo lang('general_word_month'); ?>';
|
||||
var lang_general_word_monthly = '<?php echo lang('general_word_monthly'); ?>';
|
||||
</script>
|
||||
<div class="container">
|
||||
<h2><?php echo $page_title; ?></h1>
|
||||
|
||||
<form class="form">
|
||||
|
||||
<!-- Select Basic -->
|
||||
<div class="mb-3 row">
|
||||
<label class="col-md-1 control-label" for="band">Band</label>
|
||||
<div class="col-md-3">
|
||||
<select id="band" name="band" class="form-select">
|
||||
<option value="All">All</option>
|
||||
<?php foreach($worked_bands as $band) {
|
||||
echo '<option value="' . $band . '">' . $band . '</option>'."\n";
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Select Basic -->
|
||||
<div class="mb-3 row">
|
||||
<label class="col-md-1 control-label" for="band"><?php echo lang('gen_hamradio_band'); ?></label>
|
||||
<div class="col-md-3">
|
||||
<select id="band" name="band" class="form-select">
|
||||
<option value="All"><?php echo lang('general_word_all'); ?></option>
|
||||
<?php foreach ($worked_bands as $band) {
|
||||
echo '<option value="' . $band . '">' . $band . '</option>' . "\n";
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 control-label" for="mode">Mode</label>
|
||||
<div class="col-md-3">
|
||||
<select id="mode" name="mode" class="form-select">
|
||||
<option value="All">All</option>
|
||||
<?php
|
||||
foreach($modes->result() as $mode){
|
||||
if ($mode->submode == null) {
|
||||
printf("<option value=\"%s\">%s</option>", $mode->mode, $mode->mode);
|
||||
} else {
|
||||
printf("<option value=\"%s\">⇒ %s</option>", $mode->submode, $mode->submode);
|
||||
}
|
||||
<label class="col-md-1 control-label" for="mode"><?php echo lang('gen_hamradio_mode'); ?></label>
|
||||
<div class="col-md-3">
|
||||
<select id="mode" name="mode" class="form-select">
|
||||
<option value="All"><?php echo lang('general_word_all'); ?></option>
|
||||
<?php
|
||||
foreach ($modes->result() as $mode) {
|
||||
if ($mode->submode == null) {
|
||||
printf("<option value=\"%s\">%s</option>", $mode->mode, $mode->mode);
|
||||
} else {
|
||||
printf("<option value=\"%s\">⇒ %s</option>", $mode->submode, $mode->submode);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
|
||||
<label class="col-md-1 control-label" for="radio"><?php echo lang('gen_hamradio_award'); ?></label>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="dxcc" value="dxcc" checked>
|
||||
<label class="form-check-label" for="dxcc">
|
||||
DX Century Club (DXCC)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="was" value="was">
|
||||
<label class="form-check-label" for="was">
|
||||
Worked All States (WAS)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="iota" value="iota">
|
||||
<label class="form-check-label" for="iota">
|
||||
Islands On The Air (IOTA)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="waz" value="waz">
|
||||
<label class="form-check-label" for="waz">
|
||||
Worked All Zones (WAZ)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 row">
|
||||
|
||||
<label class="col-md-1 control-label" for="radio">Award</label>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="dxcc" value="dxcc" checked>
|
||||
<label class="form-check-label" for="dxcc">
|
||||
DX Century Club (DXCC)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="was" value="was">
|
||||
<label class="form-check-label" for="was">
|
||||
Worked All States (WAS)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="iota" value="iota">
|
||||
<label class="form-check-label" for="iota">
|
||||
Islands On The Air (IOTA)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="awardradio" id="waz" value="waz">
|
||||
<label class="form-check-label" for="waz">
|
||||
Worked All Zones (WAZ)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 control-label" for="radio">Period</label>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="periodradio" id="yearly" value="year" checked>
|
||||
<label class="form-check-label" for="yearly">
|
||||
Yearly
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="periodradio" id="monthly" value="month">
|
||||
<label class="form-check-label" for="monthly">
|
||||
Monthly
|
||||
</label>
|
||||
</div>
|
||||
<label class="col-md-1 control-label" for="radio"><?php echo lang('general_word_period'); ?></label>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="periodradio" id="yearly" value="year" checked>
|
||||
<label class="form-check-label" for="yearly">
|
||||
<?php echo lang('general_word_yearly'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="periodradio" id="monthly" value="month">
|
||||
<label class="form-check-label" for="monthly">
|
||||
<?php echo lang('general_word_monthly'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Button (Double) -->
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-10">
|
||||
<button id="button1id" type="button" name="button1id" class="btn btn-primary ld-ext-right" onclick="accumulatePlot(this.form)">Show<div class="ld ld-ring ld-spin"></div></button>
|
||||
</div>
|
||||
<!-- Button (Double) -->
|
||||
<div class="mb-3 row">
|
||||
<div class="col-md-10">
|
||||
<button id="button1id" type="button" name="button1id" class="btn btn-primary ld-ext-right" onclick="accumulatePlot(this.form)"><?php echo lang('general_word_show'); ?><div class="ld ld-ring ld-spin"></div></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div id="accumulateContainer">
|
||||
<canvas id="myChartAccumulate" width="400" height="150"></canvas>
|
||||
<div id="accumulateTable"></div>
|
||||
<canvas id="myChartAccumulate" width="400" height="150"></canvas>
|
||||
<div id="accumulateTable" class="mt-2"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -165,17 +165,6 @@
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>openssl</td>
|
||||
<td>
|
||||
<?php if(in_array ('openssl', get_loaded_extensions())) { ?>
|
||||
<span class="badge text-bg-success">Installed</span>
|
||||
<?php } else { ?>
|
||||
<span class="badge text-bg-danger">Not Installed</span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,20 +31,18 @@
|
||||
</label>
|
||||
<br>
|
||||
<p>Upload the Exported ADIF file from eQSL from the <a href="https://eqsl.cc/qslcard/DownloadInBox.cfm" target="_blank">Download Inbox</a> page, to mark QSOs as confirmed on eQSL.</p>
|
||||
<p><span class="label important">Important</span> Log files must have the file type .adi</p>
|
||||
<input type="file" name="userfile" size="20" />
|
||||
<br/><br/>
|
||||
<p>Choose Station(location) eQSL File belongs to:</p>
|
||||
<select name="station_profile" class="form-select mb-2 me-sm-2" style="width: 20%;">
|
||||
<option value="0">Select Station Location</option>
|
||||
<?php foreach ($station_profile->result() as $station) { ?>
|
||||
<?php foreach ($station_profile->result() as $station) {
|
||||
if($station->eqslqthnickname) { ?>
|
||||
<option value="<?php echo $station->station_id; ?>" <?php if ($station->station_id == $this->stations->find_active()) { echo " selected =\"selected\""; } ?>>Callsign: <?php echo $station->station_callsign; ?> (<?php echo $station->station_profile_name.") eQSL: ".$station->eqslqthnickname; ?></option>
|
||||
<?php } ?>
|
||||
<?php } } ?>
|
||||
</select>
|
||||
<p><span class="badge bg-info me-1">Important</span>Log files must have the file type .adi</p>
|
||||
<input class="form-control w-auto" type="file" name="userfile" size="20" />
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<hr class="divider">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="eqslimport" id="fetch" value="fetch" checked="checked"/>
|
||||
<label class="form-check-label" for="exampleRadios1">Import directly from eQSL</label>
|
||||
@@ -58,8 +56,7 @@
|
||||
<div class="mb-3 col-sm-5" style="vertical-align:middle;"><label class="form-label"><?php echo "(Select a date, only if you want to force an import with an older date)"; //$this->lang->line(''); ?></label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<hr class="divider">
|
||||
<div class="mb-3"><input class="btn btn-primary" type="submit" value="Import eQSL QSO Matches" /></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-6">
|
||||
<div class="mb-3 col">
|
||||
<label for="mode"><?php echo lang('gen_hamradio_mode'); ?></label>
|
||||
<select id="mode" class="form-select mode form-select-sm" name="mode">
|
||||
<?php
|
||||
@@ -146,7 +146,7 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 col-md-6">
|
||||
<div class="mb-3 col">
|
||||
<label for="band"><?php echo lang('gen_hamradio_band'); ?></label>
|
||||
|
||||
<select id="band" class="form-select form-select-sm" name="band">
|
||||
@@ -164,6 +164,10 @@
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3 col">
|
||||
<label for="frequency"><?php echo lang('gen_hamradio_frequency'); ?></label>
|
||||
<input type="text" class="form-control form-control-sm" id="frequency" name="freq_display" value="<?php echo $this->session->userdata('freq'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Signal Report Information -->
|
||||
@@ -236,11 +240,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="frequency"><?php echo lang('gen_hamradio_frequency'); ?></label>
|
||||
<input type="text" class="form-control" id="frequency" name="freq_display" value="<?php echo $this->session->userdata('freq'); ?>" />
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="frequency_rx"><?php echo lang('gen_hamradio_frequency_rx'); ?></label>
|
||||
<input type="text" class="form-control" id="frequency_rx" name="freq_display_rx" value="<?php echo $this->session->userdata('freq_rx'); ?>" />
|
||||
|
||||
@@ -192,7 +192,7 @@ $ci =& get_instance();
|
||||
case 'SOTA': echo '<td>' . ($row->COL_SOTA_REF); break;
|
||||
case 'WWFF': echo '<td>' . ($row->COL_WWFF_REF); break;
|
||||
case 'POTA': echo '<td>' . ($row->COL_POTA_REF); break;
|
||||
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE)==0?$row->COL_VUCC_GRIDS:$row->COL_GRIDSQUARE; break;
|
||||
case 'Grid': echo '<td>'; echo strlen($row->COL_GRIDSQUARE ?? '')==0?$row->COL_VUCC_GRIDS ?? '':$row->COL_GRIDSQUARE; break;
|
||||
case 'Distance':echo '<td>' . ($row->COL_DISTANCE ? $row->COL_DISTANCE . ' km' : ''); break;
|
||||
case 'Band': echo '<td>'; if($row->COL_SAT_NAME != null) { echo $row->COL_SAT_NAME; } else { echo strtolower($row->COL_BAND); }; break;
|
||||
case 'State': echo '<td>' . ($row->COL_STATE); break;
|
||||
|
||||
@@ -504,6 +504,20 @@
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_MY_IOTA) { ?>
|
||||
<tr>
|
||||
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_iota_reference'); ?></td>
|
||||
<td><?php echo $row->COL_MY_IOTA; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_MY_SOTA_REF) { ?>
|
||||
<tr>
|
||||
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_sota_reference'); ?></td>
|
||||
<td><?php echo $row->COL_MY_SOTA_REF; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($row->COL_MY_WWFF_REF) { ?>
|
||||
<tr>
|
||||
<td><?php echo lang('gen_hamradio_station') . ' ' . lang('gen_hamradio_wwff_reference'); ?></td>
|
||||
|
||||
@@ -1,64 +1,90 @@
|
||||
function accumulatePlot(form) {
|
||||
$(".ld-ext-right").addClass('running');
|
||||
$(".ld-ext-right").prop('disabled', true);
|
||||
$(".ld-ext-right").addClass("running");
|
||||
$(".ld-ext-right").prop("disabled", true);
|
||||
|
||||
// using this to change color of legend and label according to background color
|
||||
var color = ifDarkModeThemeReturn('white', 'grey');
|
||||
var color = ifDarkModeThemeReturn("white", "grey");
|
||||
|
||||
var award = form.awardradio.value;
|
||||
var mode = form.mode.value;
|
||||
var period = form.periodradio.value;
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/accumulated/get_accumulated_data',
|
||||
type: 'post',
|
||||
data: { 'Band': form.band.value, 'Award': award, 'Mode': mode, 'Period': period },
|
||||
url: base_url + "index.php/accumulated/get_accumulated_data",
|
||||
type: "post",
|
||||
data: {
|
||||
Band: form.band.value,
|
||||
Award: award,
|
||||
Mode: mode,
|
||||
Period: period,
|
||||
},
|
||||
success: function (data) {
|
||||
if (!$.trim(data)) {
|
||||
$("#accumulateContainer").empty();
|
||||
$("#accumulateContainer").append('<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Nothing found!</div>');
|
||||
$(".ld-ext-right").removeClass('running');
|
||||
$(".ld-ext-right").prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
$("#accumulateContainer").append(
|
||||
'<div class="alert alert-danger" role="alert"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>Nothing found!</div>'
|
||||
);
|
||||
$(".ld-ext-right").removeClass("running");
|
||||
$(".ld-ext-right").prop("disabled", false);
|
||||
} else {
|
||||
// used for switching award text in the table and the chart
|
||||
switch (award) {
|
||||
case 'dxcc': var awardtext = "DXCC\'s"; break;
|
||||
case 'was': var awardtext = "states"; break;
|
||||
case 'iota': var awardtext = "IOTA\'s"; break;
|
||||
case 'waz': var awardtext = "CQ zones"; break;
|
||||
case "dxcc":
|
||||
var awardtext = lang_statistics_accumulated_worked_dxcc;
|
||||
break;
|
||||
case "was":
|
||||
var awardtext =
|
||||
lang_statistics_accumulated_worked_states;
|
||||
break;
|
||||
case "iota":
|
||||
var awardtext = lang_statistics_accumulated_worked_iota;
|
||||
break;
|
||||
case "waz":
|
||||
var awardtext =
|
||||
lang_statistics_accumulated_worked_cqzone;
|
||||
break;
|
||||
}
|
||||
|
||||
var periodtext = 'Year';
|
||||
if (period == 'month') {
|
||||
periodtext += ' + month';
|
||||
var periodtext = lang_general_word_year;
|
||||
if (period == "month") {
|
||||
periodtext =
|
||||
lang_general_word_year +
|
||||
" + " +
|
||||
lang_general_word_month;
|
||||
}
|
||||
// removing the old chart so that it will not interfere when loading chart again
|
||||
$("#accumulateContainer").empty();
|
||||
$("#accumulateContainer").append("<canvas id=\"myChartAccumulate\" width=\"400\" height=\"150\"></canvas><div id=\"accumulateTable\"></div>");
|
||||
$("#accumulateContainer").append(
|
||||
'<canvas id="myChartAccumulate" width="400" height="150"></canvas><div id="accumulateTable"></div>'
|
||||
);
|
||||
|
||||
// appending table to hold the data
|
||||
$("#accumulateTable").append('<table style="width:100%" class="accutable table table-sm table-bordered table-hover table-striped table-condensed text-center"><thead>' +
|
||||
'<tr>' +
|
||||
'<td>#</td>' +
|
||||
'<td>' + periodtext + '</td>' +
|
||||
'<td>Accumulated # of ' + awardtext + ' worked </td>' +
|
||||
'</tr>' +
|
||||
'</thead>' +
|
||||
'<tbody></tbody></table>');
|
||||
$("#accumulateTable").append(
|
||||
'<table style="width:100%" class="accutable table table-sm table-bordered table-hover table-striped table-condensed text-center"><thead>' +
|
||||
"<tr>" +
|
||||
"<td>#</td>" +
|
||||
"<td>" +
|
||||
periodtext +
|
||||
"</td>" +
|
||||
"<td>" +
|
||||
awardtext +
|
||||
"</td>" +
|
||||
"</tr>" +
|
||||
"</thead>" +
|
||||
"<tbody></tbody></table>"
|
||||
);
|
||||
var labels = [];
|
||||
var dataDxcc = [];
|
||||
|
||||
var $myTable = $('.accutable');
|
||||
var $myTable = $(".accutable");
|
||||
var i = 1;
|
||||
|
||||
// building the rows in the table
|
||||
var rowElements = data.map(function (row) {
|
||||
var $row = $("<tr></tr>");
|
||||
|
||||
var $row = $('<tr></tr>');
|
||||
|
||||
var $iterator = $('<td></td>').html(i++);
|
||||
var $type = $('<td></td>').html(row.year);
|
||||
var $content = $('<td></td>').html(row.total);
|
||||
var $iterator = $("<td></td>").html(i++);
|
||||
var $type = $("<td></td>").html(row.year);
|
||||
var $content = $("<td></td>").html(row.total);
|
||||
|
||||
$row.append($iterator, $type, $content);
|
||||
|
||||
@@ -73,68 +99,78 @@ function accumulatePlot(form) {
|
||||
dataDxcc.push(this.total);
|
||||
});
|
||||
|
||||
var ctx = document.getElementById("myChartAccumulate").getContext('2d');
|
||||
var ctx = document
|
||||
.getElementById("myChartAccumulate")
|
||||
.getContext("2d");
|
||||
var headerperiod;
|
||||
if (period == "year") {
|
||||
headerperiod = lang_general_word_yearly;
|
||||
} else if (period == "month") {
|
||||
headerperiod = lang_general_word_monthly;
|
||||
} else {
|
||||
headerperiod = "n/a";
|
||||
}
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
type: "bar",
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: 'Accumulated number of ' + awardtext + ' worked each ' + period,
|
||||
data: dataDxcc,
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 2,
|
||||
color: color
|
||||
}]
|
||||
datasets: [
|
||||
{
|
||||
label: awardtext + " (" + headerperiod + ")",
|
||||
data: dataDxcc,
|
||||
backgroundColor: "rgba(54, 162, 235, 0.2)",
|
||||
borderColor: "rgba(54, 162, 235, 1)",
|
||||
borderWidth: 2,
|
||||
color: color,
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
color: color
|
||||
}
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
x: {
|
||||
ticks: {
|
||||
color: color
|
||||
}
|
||||
}
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
legend: {
|
||||
labels: {
|
||||
color: color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
$(".ld-ext-right").removeClass('running');
|
||||
$(".ld-ext-right").prop('disabled', false);
|
||||
$('.accutable').DataTable({
|
||||
$(".ld-ext-right").removeClass("running");
|
||||
$(".ld-ext-right").prop("disabled", false);
|
||||
$(".accutable").DataTable({
|
||||
responsive: false,
|
||||
ordering: false,
|
||||
"scrollY": "400px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
"language": {
|
||||
scrollY: "400px",
|
||||
scrollCollapse: true,
|
||||
paging: false,
|
||||
scrollX: true,
|
||||
language: {
|
||||
url: getDataTablesLanguageUrl(),
|
||||
},
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'csv'
|
||||
]
|
||||
dom: "Bfrtip",
|
||||
buttons: ["csv"],
|
||||
});
|
||||
|
||||
// using this to change color of csv-button if dark mode is chosen
|
||||
var background = $('body').css("background-color");
|
||||
var background = $("body").css("background-color");
|
||||
|
||||
if (background != ('rgb(255, 255, 255)')) {
|
||||
if (background != "rgb(255, 255, 255)") {
|
||||
$(".buttons-csv").css("color", "white");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -36,6 +36,39 @@ async function reset_contest_session() {
|
||||
$(".contest_qso_table_contents").empty();
|
||||
$('#copyexchangetodok').prop('checked', false);
|
||||
|
||||
if (!$.fn.DataTable.isDataTable('.qsotable')) {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm:ss');
|
||||
$('.qsotable').DataTable({
|
||||
"stateSave": true,
|
||||
"pageLength": 25,
|
||||
responsive: false,
|
||||
"scrollY": "400px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"scrollX": true,
|
||||
"language": {
|
||||
url: getDataTablesLanguageUrl(),
|
||||
},
|
||||
order: [0, 'desc'],
|
||||
"columnDefs": [
|
||||
{
|
||||
"render": function ( data, type, row ) {
|
||||
return pad(row[8],3);
|
||||
},
|
||||
"targets" : 8
|
||||
},
|
||||
{
|
||||
"render": function ( data, type, row ) {
|
||||
return pad(row[9],3);
|
||||
},
|
||||
"targets" : 9
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
var table = $('.qsotable').DataTable();
|
||||
table.clear();
|
||||
|
||||
}
|
||||
|
||||
// Storing the contestid in contest session
|
||||
@@ -111,6 +144,7 @@ document.onkeyup = function (e) {
|
||||
reset_log_fields();
|
||||
// CTRL-Enter logs QSO
|
||||
} else if ((e.keyCode == 10 || e.keyCode == 13) && (e.ctrlKey || e.metaKey)) {
|
||||
$("#callsign").blur();
|
||||
logQso();
|
||||
// Enter in received exchange logs QSO
|
||||
} else if ((e.which == 13) && (
|
||||
@@ -203,9 +237,9 @@ $('#start_date').change(function() {
|
||||
});
|
||||
|
||||
// On Key up check and suggest callsigns
|
||||
$("#callsign").keyup(function () {
|
||||
$("#callsign").keyup(async function (e) {
|
||||
var call = $(this).val();
|
||||
if (call.length >= 3) {
|
||||
if ((!((e.keyCode == 10 || e.keyCode == 13) && (e.ctrlKey || e.metaKey))) && (call.length >= 3)) { // prevent checking again when pressing CTRL-Enter
|
||||
|
||||
$.ajax({
|
||||
url: 'lookup/scp',
|
||||
@@ -219,7 +253,7 @@ $("#callsign").keyup(function () {
|
||||
}
|
||||
});
|
||||
|
||||
checkIfWorkedBefore();
|
||||
await checkIfWorkedBefore();
|
||||
var qTable = $('.qsotable').DataTable();
|
||||
qTable.search(call).draw();
|
||||
}
|
||||
@@ -228,7 +262,7 @@ $("#callsign").keyup(function () {
|
||||
}
|
||||
});
|
||||
|
||||
function checkIfWorkedBefore() {
|
||||
async function checkIfWorkedBefore() {
|
||||
var call = $("#callsign").val();
|
||||
if (call.length >= 3) {
|
||||
$('#callsign_info').text("");
|
||||
@@ -400,14 +434,14 @@ function logQso() {
|
||||
serials = $("#exch_serial_s").val();
|
||||
serialr = $("#exch_serial_r").val();
|
||||
break;
|
||||
|
||||
|
||||
case 'Serialexchange':
|
||||
exchsent = $("#exch_sent").val();
|
||||
exchrcvd = $("#exch_rcvd").val();
|
||||
serials = $("#exch_serial_s").val();
|
||||
serialr = $("#exch_serial_r").val();
|
||||
break;
|
||||
|
||||
|
||||
case 'Serialgridsquare':
|
||||
gridr = gridsquare;
|
||||
vuccr = vucc;
|
||||
@@ -416,21 +450,6 @@ function logQso() {
|
||||
break;
|
||||
}
|
||||
|
||||
var data = [[
|
||||
$("#start_date").val() + ' ' + $("#start_time").val(),
|
||||
$("#callsign").val().toUpperCase(),
|
||||
$("#band").val(),
|
||||
$("#mode").val(),
|
||||
$("#rst_sent").val(),
|
||||
$("#rst_rcvd").val(),
|
||||
exchsent,
|
||||
exchrcvd,
|
||||
serials,
|
||||
serialr,
|
||||
gridr,
|
||||
vuccr,
|
||||
]];
|
||||
|
||||
var formdata = new FormData(document.getElementById("qso_input"));
|
||||
$.ajax({
|
||||
url: base_url + 'index.php/qso/saveqso',
|
||||
@@ -447,7 +466,7 @@ function logQso() {
|
||||
}
|
||||
|
||||
$('#name').val("");
|
||||
|
||||
|
||||
$('#callsign').val("");
|
||||
$('#comment').val("");
|
||||
$('#exch_rcvd').val("");
|
||||
@@ -455,7 +474,7 @@ function logQso() {
|
||||
$('#exch_serial_r').val("");
|
||||
$("#callsign").focus();
|
||||
await setSession(formdata);
|
||||
|
||||
|
||||
await refresh_qso_table(sessiondata);
|
||||
var qTable = $('.qsotable').DataTable();
|
||||
qTable.search('').order([0, 'desc']).draw();
|
||||
@@ -471,23 +490,23 @@ async function getSession() {
|
||||
type: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function restoreContestSession(data) {
|
||||
if (data) {
|
||||
if (data.copytodok == "1") {
|
||||
$('#copyexchangetodok').prop('checked', true);
|
||||
}
|
||||
|
||||
|
||||
if (data.contestid != "") {
|
||||
$("#contestname").val(data.contestid);
|
||||
}
|
||||
|
||||
|
||||
if (data.exchangetype != "") {
|
||||
$("#exchangetype").val(data.exchangetype);
|
||||
setExchangetype(data.exchangetype);
|
||||
setSerial(data);
|
||||
}
|
||||
|
||||
|
||||
if (data.exchangesent != "") {
|
||||
$("#exch_sent").val(data.exchangesent);
|
||||
}
|
||||
@@ -507,30 +526,6 @@ async function refresh_qso_table(data) {
|
||||
type: 'post',
|
||||
data: { 'qso': data.qso, },
|
||||
success: function (html) {
|
||||
var mode = '';
|
||||
$(".contest_qso_table_contents").empty();
|
||||
$.each(html, function () {
|
||||
if (this.col_submode == null || this.col_submode == '') {
|
||||
mode = this.col_mode;
|
||||
} else {
|
||||
mode = this.col_submode;
|
||||
}
|
||||
|
||||
$(".qsotable tbody").prepend('<tr>' +
|
||||
'<td>' + this.col_time_on + '</td>' +
|
||||
'<td>' + this.col_call + '</td>' +
|
||||
'<td>' + this.col_band + '</td>' +
|
||||
'<td>' + mode + '</td>' +
|
||||
'<td>' + this.col_rst_sent + '</td>' +
|
||||
'<td>' + this.col_rst_rcvd + '</td>' +
|
||||
'<td>' + this.col_stx_string + '</td>' +
|
||||
'<td>' + this.col_srx_string + '</td>' +
|
||||
'<td>' + this.col_stx + '</td>' +
|
||||
'<td>' + this.col_srx + '</td>' +
|
||||
'<td>' + this.col_gridsquare + '</td>' +
|
||||
'<td>' + this.col_vucc_grids + '</td>' +
|
||||
'</tr>');
|
||||
});
|
||||
if (!$.fn.DataTable.isDataTable('.qsotable')) {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm:ss');
|
||||
$('.qsotable').DataTable({
|
||||
@@ -561,6 +556,39 @@ async function refresh_qso_table(data) {
|
||||
]
|
||||
});
|
||||
}
|
||||
var table = $('.qsotable').DataTable();
|
||||
table.clear();
|
||||
|
||||
var mode = '';
|
||||
var data;
|
||||
$.each(html, function () {
|
||||
if (this.col_submode == null || this.col_submode == '') {
|
||||
mode = this.col_mode;
|
||||
} else {
|
||||
mode = this.col_submode;
|
||||
}
|
||||
|
||||
data = [[
|
||||
this.col_time_on,
|
||||
this.col_call,
|
||||
this.col_band,
|
||||
mode,
|
||||
this.col_rst_sent,
|
||||
this.col_rst_rcvd,
|
||||
this.col_stx_string,
|
||||
this.col_srx_string,
|
||||
this.col_stx,
|
||||
this.col_srx,
|
||||
this.col_gridsquare,
|
||||
this.col_vucc_grids
|
||||
]];
|
||||
|
||||
if (data.length > 0) {
|
||||
table.rows.add(data).draw();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -854,7 +854,8 @@ function mapQsos(form) {
|
||||
url: base_url + 'index.php/logbookadvanced/mapSelectedQsos',
|
||||
type: 'post',
|
||||
data: {
|
||||
ids: id_list
|
||||
ids: id_list,
|
||||
de: form.de.value
|
||||
},
|
||||
success: function(data) {
|
||||
loadMap(data);
|
||||
|
||||
Reference in New Issue
Block a user