diff --git a/application/config/migration.php b/application/config/migration.php index ad5f2d9e3..c52d5d72d 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 184; +$config['migration_version'] = 185; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Band.php b/application/controllers/Band.php index d56e7a05d..0bedbad6a 100644 --- a/application/controllers/Band.php +++ b/application/controllers/Band.php @@ -20,7 +20,7 @@ class Band extends CI_Controller { $this->load->model('bands'); $data['bands'] = $this->bands->get_all_bands_for_user(); - + // Render Page $data['page_title'] = "Bands"; $this->load->view('interface_assets/header', $data); @@ -28,7 +28,7 @@ class Band extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function create() + public function create() { $this->load->model('bands'); $this->load->library('form_validation'); @@ -41,7 +41,7 @@ class Band extends CI_Controller { $this->load->view('bands/create', $data); } else - { + { $this->bands->add(); } } @@ -55,7 +55,7 @@ class Band extends CI_Controller { $band_query = $this->bands->getband($item_id_clean); $data['my_band'] = $band_query->row(); - + $data['page_title'] = "Edit Band"; $this->load->view('bands/edit', $data); @@ -122,8 +122,11 @@ class Band extends CI_Controller { $band['cq'] = $this->security->xss_clean($this->input->post('cq')); $band['dok'] = $this->security->xss_clean($this->input->post('dok')); $band['dxcc'] = $this->security->xss_clean($this->input->post('dxcc')); - $band['helvetia'] = $this->security->xss_clean($this->input->post('helvetia')); + $band['helvetia'] = $this->security->xss_clean($this->input->post('helvetia')); $band['iota'] = $this->security->xss_clean($this->input->post('iota')); + $band['jcc'] = $this->security->xss_clean($this->input->post('jcc')); + $band['pota'] = $this->security->xss_clean($this->input->post('pota')); + $band['rac'] = $this->security->xss_clean($this->input->post('rac')); $band['sig'] = $this->security->xss_clean($this->input->post('sig')); $band['sota'] = $this->security->xss_clean($this->input->post('sota')); $band['uscounties'] = $this->security->xss_clean($this->input->post('uscounties')); @@ -131,11 +134,10 @@ class Band extends CI_Controller { $band['wwff'] = $this->security->xss_clean($this->input->post('wwff')); $band['vucc'] = $this->security->xss_clean($this->input->post('vucc')); $band['waja'] = $this->security->xss_clean($this->input->post('waja')); - $band['pota'] = $this->security->xss_clean($this->input->post('pota')); - + $this->load->model('bands'); $this->bands->saveBand($id, $band); - + header('Content-Type: application/json'); echo json_encode(array('message' => 'OK')); return; @@ -144,10 +146,10 @@ class Band extends CI_Controller { public function saveBandAward() { $award = $this->security->xss_clean($this->input->post('award')); $status = $this->security->xss_clean($this->input->post('status')); - + $this->load->model('bands'); $this->bands->saveBandAward($award, $status); - + header('Content-Type: application/json'); echo json_encode(array('message' => 'OK')); return; diff --git a/application/controllers/Clublog.php b/application/controllers/Clublog.php index b7bcf21fb..5aa2b630d 100644 --- a/application/controllers/Clublog.php +++ b/application/controllers/Clublog.php @@ -6,6 +6,16 @@ class Clublog extends CI_Controller { + function __construct() + { + parent::__construct(); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } + } + // Show frontend if there is one public function index() { $this->config->load('config'); diff --git a/application/controllers/Dxcluster.php b/application/controllers/Dxcluster.php index 0e399cbf7..3a642256c 100644 --- a/application/controllers/Dxcluster.php +++ b/application/controllers/Dxcluster.php @@ -13,10 +13,10 @@ class Dxcluster extends CI_Controller { function spots($band,$age = '', $de = '') { if ($age == '') { - $age = $this->optionslib->get_option('dxcluster_maxage'); + $age = $this->optionslib->get_option('dxcluster_maxage') ?? 60; } if ($de == '') { - $de = $this->optionslib->get_option('dxcluster_decont'); + $de = $this->optionslib->get_option('dxcluster_decont') ?? 'EU'; } $calls_found=$this->dxcluster_model->dxc_spotlist($band, $age, $de); header('Content-Type: application/json'); diff --git a/application/controllers/Eqsl.php b/application/controllers/Eqsl.php index 9f93cbb8a..f82a1d9c8 100644 --- a/application/controllers/Eqsl.php +++ b/application/controllers/Eqsl.php @@ -4,8 +4,15 @@ class eqsl extends CI_Controller { /* Controls who can access the controller and its functions */ function __construct() { + parent::__construct(); + $this->load->helper(array('form', 'url')); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } } // Default view when loading controller. diff --git a/application/controllers/Hrdlog.php b/application/controllers/Hrdlog.php index 934cd1b2e..2b3182b49 100644 --- a/application/controllers/Hrdlog.php +++ b/application/controllers/Hrdlog.php @@ -11,6 +11,17 @@ class Hrdlog extends CI_Controller { * When called from the url wavelog/hrdlog/upload, the function loops through all station_id's with a hrdlog code defined. * All QSOs not previously uploaded, will then be uploaded, one at a time */ + + function __construct() + { + parent::__construct(); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } + } + public function upload() { $this->setOptions(); @@ -34,7 +45,6 @@ class Hrdlog extends CI_Controller { echo "No station profiles with a hrdlog Code found."; log_message('error', "No station profiles with a hrdlog Code found."); } - } function setOptions() { diff --git a/application/controllers/Logbook.php b/application/controllers/Logbook.php index 7b82ca5fb..dd48d3c98 100644 --- a/application/controllers/Logbook.php +++ b/application/controllers/Logbook.php @@ -851,7 +851,7 @@ class Logbook extends CI_Controller { if($callsign['callsign']['error'] == "Session does not exist or expired") { $hamqth_session_key = $this->hamqth->session($this->config->item('hamqth_username'), $this->config->item('hamqth_password')); $this->session->set_userdata('hamqth_session_key', $hamqth_session_key); - $callsign['callsign'] = $this->hamqth->search($callsign, $this->session->userdata('hamqth_session_key')); + $callsign['callsign'] = $this->hamqth->search($id, $this->session->userdata('hamqth_session_key')); } if (isset($data['callsign']['gridsquare'])) { $this->load->model('logbook_model'); diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 1925f0ad5..615e0c061 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -414,14 +414,14 @@ class Logbookadvanced extends CI_Controller { $data['datetime'] = date($custom_date_format, strtotime($qso['COL_TIME_ON'])). date(' H:i',strtotime($qso['COL_TIME_ON'])); $data['satname'] = $qso['COL_SAT_NAME']; $data['confirmed'] = ($this->logbook_model->qso_is_confirmed($qso)==true) ? true : false; - + return $data; } public function calculateCoordinates($qso, $lat, $long, $mygrid, $measurement_base, $var_dist, $custom_date_format) { $this->load->library('Qra'); $this->load->model('logbook_model'); - + $latlng1 = $this->qra->qra2latlong($mygrid); $latlng2[0] = $lat; $latlng2[1] = $long; @@ -486,6 +486,7 @@ class Logbookadvanced extends CI_Controller { $json_string['iota']['show'] = $this->input->post('iota'); $json_string['pota']['show'] = $this->input->post('pota'); $json_string['operator']['show'] = $this->input->post('operator'); + $json_string['comment']['show'] = $this->input->post('comment'); $obj['column_settings']= json_encode($json_string); diff --git a/application/controllers/Logbooks.php b/application/controllers/Logbooks.php index 61938f5c5..0f8306b94 100644 --- a/application/controllers/Logbooks.php +++ b/application/controllers/Logbooks.php @@ -27,7 +27,7 @@ class Logbooks extends CI_Controller { $this->load->view('interface_assets/footer'); } - public function create() + public function create() { $this->load->library('form_validation'); @@ -41,11 +41,11 @@ class Logbooks extends CI_Controller { $this->load->view('interface_assets/footer'); } else - { + { $this->load->model('logbooks_model'); $this->logbooks_model->add(); - - redirect('logbooks'); + + redirect('stationsetup'); } } @@ -65,7 +65,7 @@ class Logbooks extends CI_Controller { $data['station_locations_list'] = $this->stations->all_of_user(); $data['station_locations_linked'] = $this->logbooks_model->list_logbooks_linked($station_logbook_id); - + $data['page_title'] = "Edit Station Logbook"; $this->form_validation->set_rules('station_logbook_id', 'Station Logbook Name', 'required'); @@ -99,27 +99,27 @@ class Logbooks extends CI_Controller { $this->logbooks_model->set_logbook_active($id); $this->user_model->update_session($this->session->userdata('user_id')); - redirect('logbooks'); + redirect('stationsetup'); } public function delete($id) { $this->load->model('logbooks_model'); $this->logbooks_model->delete($id); - - redirect('logbooks'); + + redirect('stationsetup'); } public function delete_relationship($logbook_id, $station_id) { $this->load->model('logbooks_model'); $this->logbooks_model->delete_relationship($logbook_id, $station_id); - + redirect('logbooks/edit/'.$logbook_id); } public function publicslug_validate() { $this->load->model('logbooks_model'); $result = $this->logbooks_model->is_public_slug_available($this->input->post('public_slug')); - + if($result == true) { $data['slugAvailable'] = true; } else { @@ -151,8 +151,8 @@ class Logbooks extends CI_Controller { { $this->load->model('logbooks_model'); $result = $this->logbooks_model->is_public_slug_available($this->input->post('public_slug')); - - + + if($result == true) { $returndata = $this->logbooks_model->save_public_slug($this->input->post('public_slug'), $this->input->post('logbook_id')); echo "
Public Slug Saved
"; diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 24a569dc4..ffdea9090 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -26,6 +26,11 @@ class Lotw extends CI_Controller { // Load language files $this->lang->load('lotw'); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } } /* @@ -352,7 +357,7 @@ class Lotw extends CI_Controller { /* | Download QSO Matches from LoTW - */ + */ if ($this->user_model->authorize(2)) { echo "

"; $sync_user_id=$this->session->userdata('user_id'); diff --git a/application/controllers/Qrz.php b/application/controllers/Qrz.php index 557a8a6b8..a4507bdd9 100644 --- a/application/controllers/Qrz.php +++ b/application/controllers/Qrz.php @@ -6,6 +6,16 @@ class Qrz extends CI_Controller { + function __construct() + { + parent::__construct(); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } + } + // Show frontend if there is one public function index() { $this->config->load('config'); @@ -38,7 +48,6 @@ class Qrz extends CI_Controller { echo "No station profiles with a QRZ API Key found."; log_message('error', "No station profiles with a QRZ API Key found."); } - } function setOptions() { @@ -247,7 +256,7 @@ class Qrz extends CI_Controller { } else { echo "Downloaded QRZ report contains no matches."; } - } + } } function mass_download_qsos($qrz_api_key = '', $lastqrz = '1900-01-01', $trusted = false) { diff --git a/application/controllers/Qso.php b/application/controllers/Qso.php index f04a8c29e..b197537bb 100755 --- a/application/controllers/Qso.php +++ b/application/controllers/Qso.php @@ -583,6 +583,17 @@ class QSO extends CI_Controller { $this->load->view('qso/components/previous_contacts', $data); } + public function get_eqsl_default_qslmsg() { // Get ONLY Default eQSL-Message with this function. This is ONLY for QSO relevant! + $return_json = array(); + $option_key = $this->input->post('option_key'); + if ($option_key > 0) { + $options_object = $this->user_options_model->get_options('eqsl_default_qslmsg', array('option_name' => 'key_station_id', 'option_key' => $option_key))->result(); + $return_json['eqsl_default_qslmsg'] = (isset($options_object[0]->option_value)) ? $options_object[0]->option_value : ''; + } + header('Content-Type: application/json'); + echo json_encode($return_json); + } + function check_locator($grid) { $grid = $this->input->post('locator'); // Allow empty locator diff --git a/application/controllers/Station.php b/application/controllers/Station.php index 5c8b5d6a8..fd82eb55a 100644 --- a/application/controllers/Station.php +++ b/application/controllers/Station.php @@ -57,15 +57,8 @@ class Station extends CI_Controller $this->load->view('station_profile/create'); $this->load->view('interface_assets/footer'); } else { - if (($station_id = $this->stations->add()) !== false) { - // [eQSL default msg] ADD to user options (option_type='eqsl_default_qslmsg'; option_name='key_station_id'; option_key=station_id; option_value=value) // - $eqsl_default_qslmsg = xss_clean($this->input->post('eqsl_default_qslmsg', true)); - if (!empty(trim($eqsl_default_qslmsg))) { - $this->load->model('user_options_model'); - $this->user_options_model->set_option('eqsl_default_qslmsg', 'key_station_id', array($station_id => $eqsl_default_qslmsg)); - } - } - redirect('station'); + $this->stations->add(); + redirect('stationsetup'); } } @@ -77,32 +70,17 @@ class Station extends CI_Controller $data['page_title'] = lang('station_location_edit') . $data['my_station_profile']->station_profile_name; if ($this->form_validation->run() == FALSE) { - // [eQSL default msg] GET from user options (option_type='eqsl_default_qslmsg'; option_name='key_station_id'; option_key=station_id) // - $this->load->model('user_options_model'); - $options_object = $this->user_options_model->get_options('eqsl_default_qslmsg', array('option_name' => 'key_station_id', 'option_key' => $id))->result(); - $data['eqsl_default_qslmsg'] = (isset($options_object[0]->option_value)) ? $options_object[0]->option_value : ''; - $this->load->view('interface_assets/header', $data); $this->load->view('station_profile/edit'); $this->load->view('interface_assets/footer'); } else { - if ($this->stations->edit() !== false) { - // [eQSL default msg] ADD to user options (option_type='eqsl_default_qslmsg'; option_name='key_station_id'; option_key=station_id; option_value=value) // - $eqsl_default_qslmsg = xss_clean($this->input->post('eqsl_default_qslmsg', true)); - $this->load->model('user_options_model'); - if (!empty(trim($eqsl_default_qslmsg))) { - $this->user_options_model->set_option('eqsl_default_qslmsg', 'key_station_id', array($id => $eqsl_default_qslmsg)); - } else { - $this->user_options_model->del_option('eqsl_default_qslmsg', 'key_station_id', array('option_key' => $id)); - } + if ($this->stations->edit()) { + $data['notice'] = lang('station_location') . $this->security->xss_clean($this->input->post('station_profile_name', true)) . " Updated"; } - - $data['notice'] = lang('station_location') . $this->security->xss_clean($this->input->post('station_profile_name', true)) . " Updated"; - - redirect('station'); + redirect('stationsetup'); } } else { - redirect('station'); + redirect('stationsetup'); } } @@ -125,22 +103,19 @@ class Station extends CI_Controller } else { $this->stations->add(); - redirect('station'); + redirect('stationsetup'); } } else { - redirect('station'); + redirect('stationsetup'); } } - public function edit_favorite($id) + public function edit_favourite($id) { - $is_favorite = $this->user_options_model->get_options('station_location', array('option_name'=>'is_favorite', 'option_key'=>$id))->row()->option_value ?? 'false'; - if ($is_favorite == 'true') { - $this->user_options_model->del_option('station_location', 'is_favorite', array('option_key'=>$id)); - } else if ($is_favorite == 'false') { - $this->user_options_model->set_option('station_location', 'is_favorite', array($id=>'true')); - } - redirect('station'); + $this->load->model('stations'); + $this->stations->edit_favourite($id); + + redirect('stationsetup'); } function load_station_for_editing($id): array @@ -155,9 +130,7 @@ class Station extends CI_Controller $item_id_clean = $this->security->xss_clean($id); - $station_profile_query = $this->stations->profile($item_id_clean); - - $data['my_station_profile'] = $station_profile_query->row(); + $data['my_station_profile'] = $this->stations->profile_full($item_id_clean); $data['dxcc_list'] = $this->dxcc->list(); @@ -176,19 +149,19 @@ class Station extends CI_Controller } //$this->stations->logbook_session_data(); - redirect('station'); + redirect('stationsetup'); } function set_active($current, $new, $is_ajax = null) { $this->load->model('stations'); $this->stations->set_active($current, $new); - + if ($is_ajax != null) { return; } - - redirect('station'); + + redirect('stationsetup'); } public function delete($id) @@ -196,11 +169,8 @@ class Station extends CI_Controller $this->load->model('stations'); if ($this->stations->check_station_is_accessible($id)) { $this->stations->delete($id); - // [eQSL default msg] DELETE user options // - $this->load->model('user_options_model'); - $this->user_options_model->del_option('eqsl_default_qslmsg', 'key_station_id', array('option_key' => $id)); } - redirect('station'); + redirect('stationsetup'); } public function deletelog($id) @@ -209,7 +179,7 @@ class Station extends CI_Controller if ($this->stations->check_station_is_accessible($id)) { $this->stations->deletelog($id); } - redirect('station'); + redirect('stationsetup'); } /* @@ -246,19 +216,4 @@ class Station extends CI_Controller echo json_encode($json); } - // [eQSL default msg] Function return options from this station (but can be general use) // - public function get_options() - { - $return_json = array(); - $option_type = $this->input->post('option_type'); - $option_name = $this->input->post('option_name'); - $option_key = $this->input->post('option_key'); - if (!empty($option_type) && !empty($option_name) && ($option_key > 0)) { - $this->load->model('user_options_model'); - $options_object = $this->user_options_model->get_options($option_type, array('option_name' => $option_name, 'option_key' => $option_key))->result(); - $return_json[$option_type] = (isset($options_object[0]->option_value)) ? $options_object[0]->option_value : ''; - } - header('Content-Type: application/json'); - echo json_encode($return_json); - } } diff --git a/application/controllers/Stationsetup.php b/application/controllers/Stationsetup.php new file mode 100644 index 000000000..0d0fca6c7 --- /dev/null +++ b/application/controllers/Stationsetup.php @@ -0,0 +1,321 @@ +load->helper(array('form', 'url')); + + $this->load->model('user_model'); + if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } + } + + public function index() { + $this->load->model('stations'); + $this->load->model('Logbook_model'); + $this->load->model('logbooks_model'); + + $data['my_logbooks'] = $this->logbooks_model->show_all(); + + $data['stations'] = $this->stations->all_with_count(); + $data['current_active'] = $this->stations->find_active(); + $data['is_there_qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); + + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/stationsetup.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/stationsetup.js")), + ]; + + // Render Page + $data['page_title'] = "Station Setup"; + $this->load->view('interface_assets/header', $data); + $this->load->view('stationsetup/stationsetup'); + $this->load->view('interface_assets/footer', $footerData); + } + + public function DeleteStation_json() { + $id2del=xss_clean($this->input->post('id2del',true)); + if ($id2del ?? '' != '') { + $this->load->model('stations'); + if ($this->stations->check_station_is_accessible($id2del)) { + $this->stations->delete($id2del); + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Not allowed'; + } + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + + public function EmptyStation_json() { + $id2empty=xss_clean($this->input->post('id2Empty',true)); + if ($id2empty ?? '' != '') { + $this->load->model('stations'); + if ($this->stations->check_station_is_accessible($id2empty)) { + $this->stations->deletelog($id2empty); + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Not allowed'; + } + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + + public function setActiveStation_json() { + $id2act=xss_clean($this->input->post('id2setActive',true)); + if ($id2act ?? '' != '') { + $this->load->model('stations'); + $current=$this->stations->find_active(); + $this->stations->set_active($current, $id2act); + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + + // get active station for quickswitcher + public function getActiveStation() { + $active_loc = $this->stations->find_active(); + echo json_encode($active_loc); + } + + public function setFavorite_json() { + $id2fav = xss_clean($this->input->post('id2Favorite', true)); + if ($id2fav ?? '' != '') { + $this->load->model('stations'); + $this->stations->edit_favourite($id2fav); + $data['success'] = 1; + } else { + $data['success'] = 0; + $data['flashdata'] ='Error'; + } + echo json_encode($data); + } + + public function setActiveLogbook_json() { + $id2act=xss_clean($this->input->post('id2setActive',true)); + if ($id2act ?? '' != '') { + $this->load->model('logbooks_model'); + $this->logbooks_model->set_logbook_active($id2act); + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + + public function deleteLogbook_json() { + $id2del=xss_clean($this->input->post('id2delete',true)); + if ($id2del ?? '' != '') { + $this->load->model('logbooks_model'); + $this->logbooks_model->delete($id2del); + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + + public function newLogbook_json() { + $this->load->library('form_validation'); + + $this->form_validation->set_rules('stationLogbook_Name', 'Station Logbook Name', 'required'); + + if ($this->form_validation->run() == FALSE) { + $data['flashdata']=validation_errors(); + $data['success']=0; + echo json_encode($data); + } else { + $this->load->model('logbooks_model'); + $newId=$this->logbooks_model->add(xss_clean($this->input->post('stationLogbook_Name', true))); + if ($newId > 0) { + $data['success']=1; + } else { + $data['success']=0; + $data['flashdata']='Error'; + } + echo json_encode($data); + } + } + + public function newLogbook() { + $data['page_title'] = "Create Station Logbook"; + $this->load->view('stationsetup/create', $data); + } + + public function newLocation() { + $this->load->model('stations'); + $this->load->model('dxcc'); + $data['dxcc_list'] = $this->dxcc->list(); + + $this->load->model('logbook_model'); + $data['iota_list'] = $this->logbook_model->fetchIota(); + + $data['page_title'] = lang('station_location_create_header'); + $this->load->view('station_profile/create', $data); + } + + public function fetchLogbooks() { + $this->load->model('logbooks_model'); + $hres=[]; + $result = $this->logbooks_model->show_all()->result(); + foreach ($result as $entry) { + $single=(Object)[]; + $single->logbook_id=$entry->logbook_id; + $single->logbook_name=$entry->logbook_name; + $single->logbook_state=$this->lbstate2html($entry->logbook_id); + $single->logbook_edit=$this->lbedit2html($entry->logbook_id,$entry->logbook_name); + $single->logbook_delete=$this->lbdel2html($entry->logbook_id,$entry->logbook_name); + $single->logbook_link=$this->lblnk2html($entry->public_slug,$entry->logbook_name); + $single->logbook_publicsearch = $this->lbpublicsearch2html($entry->public_search); + array_push($hres,$single); + } + echo json_encode($hres); + } + + private function lbpublicsearch2html($publicsearch) { + return ($publicsearch=='1' ? 'Enabled' : 'Disabled'); + + } + + private function lbstate2html($id) { + if($this->session->userdata('active_station_logbook') != $id) { + $htmret=''; + } else { + $htmret="" . lang('station_logbooks_active_logbook') . ""; + } + return $htmret; + } + + private function lbdel2html($id, $logbook_name) { + if($this->session->userdata('active_station_logbook') != $id) { + $htmret=''; + } else { + $htmret=''; + } + return $htmret; + } + + private function lblnk2html($public_slug, $logbook_name) { + if($public_slug != '') { + $htmret=''; + } else { + $htmret=''; + } + return $htmret; + } + + private function lbps2html($id, $logbook_name) { + return ''; + } + + private function lbedit2html($id, $logbook_name) { + return ''; + } + + public function fetchLocations() { + $this->load->model('stations'); + $this->load->model('Logbook_model'); + + $result = $this->stations->all_with_count()->result(); + $current_active = $this->stations->find_active(); + $data['is_there_qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); + + $quickswitch_enabled = ($this->user_options_model->get_options('header_menu', array('option_name'=>'locations_quickswitch'))->row()->option_value ?? 'false'); + + $hres=[]; + foreach ($result as $entry) { + $single=(Object)[]; + $single->station_id = $this->stationid2html($entry->station_id); + $single->station_name = $entry->station_profile_name; + $single->station_callsign = $entry->station_callsign; + $single->station_country = $this->stationcountry2html($entry->station_country, $entry->dxcc_end); + $single->station_gridsquare = $entry->station_gridsquare; + $single->station_badge = $this->stationbadge2html($entry->station_active, $entry->qso_total, $current_active, $entry->station_profile_name,$entry->station_id); + $single->station_edit = $this->stationedit2html($entry->station_id); + $single->station_emptylog = $this->stationemptylog2html($entry->station_id); + $single->station_copylog = $this->stationcopy2html($entry->station_id); + $single->station_delete = $this->stationdelete2html($entry->station_id, $entry->station_profile_name, $entry->station_active); + $single->station_favorite = $this->stationfavorite2html($entry->station_id, $quickswitch_enabled); + array_push($hres,$single); + } + echo json_encode($hres); + } + + private function stationfavorite2html($id, $quickswitch_enabled) { + if ($quickswitch_enabled == 'false') { + return ''; + } + + $locationFavorite = ($this->user_options_model->get_options('station_location', array('option_name'=>'is_favorite', 'option_key'=>$id))->row()->option_value ?? 'false'); + if ($locationFavorite == 'true') { + $favStarClasses = 'class="setFavorite fas fa-star btn btn-sm" style="color: #ffc82b;"'; + } else { + $favStarClasses = 'class="setFavorite far fa-star btn btn-sm" style="color: #a58118;"'; + } + return '
'; + } else { + $returntext .= '' . lang('station_location_active') . '
'; + } + + $returntext .='' . $qso_total .' '. lang('gen_hamradio_qso') . ''; + return $returntext; + } + + private function stationedit2html($id) { + return ''; + } + + private function stationemptylog2html($id) { + return ''; + } + + private function stationcopy2html($id) { + return ''; + } + + private function stationdelete2html($id, $station_profile_name, $station_active) { + if($station_active != 1) { + return ''; + } + + return ''; + } + + private function stationcountry2html($station_country, $dxcc_end) { + $returntext = $station_country == '' ? '- NONE -' : $station_country; + if ($dxcc_end != NULL) { + $returntext .= ' '.lang('gen_hamradio_deleted_dxcc').''; + } + + return $returntext; + } + +} diff --git a/application/controllers/Update.php b/application/controllers/Update.php index 01ac1abc7..6ff666e4a 100644 --- a/application/controllers/Update.php +++ b/application/controllers/Update.php @@ -8,6 +8,16 @@ class Update extends CI_Controller { lotw_users - imports lotw users */ + function __construct() + { + parent::__construct(); + + if (ENVIRONMENT == 'maintenance' && $this->session->userdata('user_id') == '') { + echo "Maintenance Mode is active. Try again later.\n"; + redirect('user/login'); + } + } + public function index() { $data['page_title'] = "Updates"; @@ -290,9 +300,9 @@ class Update extends CI_Controller { if ($nCount > 0) { echo "DONE: " . number_format($nCount) . " callsigns loaded"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('scp_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('scp_update', $datetime , 'no'); } else { echo "FAILED: Empty file"; } @@ -360,9 +370,9 @@ class Update extends CI_Controller { $totaltime = ($endtime - $starttime); echo "This page was created in ".$totaltime." seconds
"; echo "Records inserted: " . $i . "
"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('lotw_users_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('lotw_users_update', $datetime , 'no'); } public function lotw_check() { @@ -394,9 +404,9 @@ class Update extends CI_Controller { if ($nCount > 0) { echo "DONE: " . number_format($nCount) . " DOKs and SDOKs saved"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('dok_file_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('dok_file_update', $datetime , 'no'); } else { echo"FAILED: Empty file"; } @@ -444,9 +454,9 @@ class Update extends CI_Controller { if ($nCount > 0) { echo "DONE: " . number_format($nCount) . " SOTA's saved"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('sota_file_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('sota_file_update', $datetime , 'no'); } else { echo"FAILED: Empty file"; } @@ -481,12 +491,12 @@ class Update extends CI_Controller { $data = str_getcsv($csv,"\n"); $nCount = 0; foreach ($data as $idx => $row) { - if ($idx == 0) continue; // Skip line we are not interested in - $row = str_getcsv($row, ','); - if ($row[0]) { - fwrite($wwfffilehandle, $row[0].PHP_EOL); - $nCount++; - } + if ($idx == 0) continue; // Skip line we are not interested in + $row = str_getcsv($row, ','); + if ($row[0]) { + fwrite($wwfffilehandle, $row[0].PHP_EOL); + $nCount++; + } } fclose($wwfffilehandle); @@ -494,9 +504,9 @@ class Update extends CI_Controller { if ($nCount > 0) { echo "DONE: " . number_format($nCount) . " WWFF's saved"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('wwff_file_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('wwff_file_update', $datetime , 'no'); } else { echo"FAILED: Empty file"; } @@ -527,12 +537,12 @@ class Update extends CI_Controller { $data = str_getcsv($csv,"\n"); $nCount = 0; foreach ($data as $idx => $row) { - if ($idx == 0) continue; // Skip line we are not interested in - $row = str_getcsv($row, ','); - if ($row[0]) { - fwrite($potafilehandle, $row[0].PHP_EOL); - $nCount++; - } + if ($idx == 0) continue; // Skip line we are not interested in + $row = str_getcsv($row, ','); + if ($row[0]) { + fwrite($potafilehandle, $row[0].PHP_EOL); + $nCount++; + } } fclose($potafilehandle); @@ -540,9 +550,9 @@ class Update extends CI_Controller { if ($nCount > 0) { echo "DONE: " . number_format($nCount) . " POTA's saved"; - $datetime = new DateTime("now", new DateTimeZone('UTC')); - $datetime = $datetime->format('Ymd h:i'); - $this->optionslib->update('pota_file_update', $datetime , 'no'); + $datetime = new DateTime("now", new DateTimeZone('UTC')); + $datetime = $datetime->format('Ymd h:i'); + $this->optionslib->update('pota_file_update', $datetime , 'no'); } else { echo"FAILED: Empty file"; } diff --git a/application/language/bulgarian/general_words_lang.php b/application/language/bulgarian/general_words_lang.php index 38125ca9b..181185010 100644 --- a/application/language/bulgarian/general_words_lang.php +++ b/application/language/bulgarian/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/bulgarian/menu_lang.php b/application/language/bulgarian/menu_lang.php index b60f4ad2d..6bf0458f2 100644 --- a/application/language/bulgarian/menu_lang.php +++ b/application/language/bulgarian/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/bulgarian/station_lang.php b/application/language/bulgarian/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/bulgarian/station_lang.php +++ b/application/language/bulgarian/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/chinese_simplified/general_words_lang.php b/application/language/chinese_simplified/general_words_lang.php index 149fddcf5..cba141d13 100644 --- a/application/language/chinese_simplified/general_words_lang.php +++ b/application/language/chinese_simplified/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = '今天'; $lang['dashboard_php_version_warning'] = '您需要升级您的 PHP 版本。 最低版本为 7.4。 你的版本是'; $lang['dashboard_country_files_warning'] = '您需要更新国家/地区文件! 请前往此处执行此操作!'; -$lang['dashboard_locations_warning'] = '您没有电台站位置。 前往此处创建它!'; -$lang['dashboard_logbooks_warning'] = '你没有电台日志。 请前往此处创建它!'; +$lang['dashboard_locations_warning'] = '您没有电台站位置。 前往此处创建它!'; +$lang['dashboard_logbooks_warning'] = '你没有电台日志。 请前往此处创建它!'; $lang['hams_at_no_activations_found'] = '未找到即将进行的激活。 请稍后再回来查看。'; diff --git a/application/language/chinese_simplified/menu_lang.php b/application/language/chinese_simplified/menu_lang.php index 08640518e..a312fe34b 100644 --- a/application/language/chinese_simplified/menu_lang.php +++ b/application/language/chinese_simplified/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = '账户'; $lang['menu_station_logbooks'] = '电台站日志簿'; $lang['menu_station_locations'] = '电台站位置'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = '波段'; $lang['menu_adif_import_export'] = 'ADIF 导入/导出'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/chinese_simplified/station_lang.php b/application/language/chinese_simplified/station_lang.php index 0ca448355..4632a8fec 100644 --- a/application/language/chinese_simplified/station_lang.php +++ b/application/language/chinese_simplified/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/czech/general_words_lang.php b/application/language/czech/general_words_lang.php index 1b0026ac7..32da5ee89 100644 --- a/application/language/czech/general_words_lang.php +++ b/application/language/czech/general_words_lang.php @@ -225,6 +225,11 @@ $lang['southamerica'] = 'Jižní Amerika'; $lang['gen_band_selection'] = 'Výběr pásma'; $lang['general_word_today'] = 'Dnes'; +$lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; +$lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; + $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; $lang['datatables_language'] = "en-GB"; diff --git a/application/language/czech/menu_lang.php b/application/language/czech/menu_lang.php index 2131110af..55aa82911 100644 --- a/application/language/czech/menu_lang.php +++ b/application/language/czech/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Účet'; $lang['menu_station_logbooks'] = 'Logy stanice'; $lang['menu_station_locations'] = 'Umístění stanice'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Pásmo'; $lang['menu_adif_import_export'] = 'ADIF import / export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/czech/station_lang.php b/application/language/czech/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/czech/station_lang.php +++ b/application/language/czech/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/dutch/general_words_lang.php b/application/language/dutch/general_words_lang.php index f715b1889..a3947639e 100644 --- a/application/language/dutch/general_words_lang.php +++ b/application/language/dutch/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/dutch/menu_lang.php b/application/language/dutch/menu_lang.php index cbfc52f66..13f4793ff 100644 --- a/application/language/dutch/menu_lang.php +++ b/application/language/dutch/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/dutch/station_lang.php b/application/language/dutch/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/dutch/station_lang.php +++ b/application/language/dutch/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/english/general_words_lang.php b/application/language/english/general_words_lang.php index 9d00c0efd..1d597a991 100644 --- a/application/language/english/general_words_lang.php +++ b/application/language/english/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/english/menu_lang.php b/application/language/english/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/english/menu_lang.php +++ b/application/language/english/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/english/station_lang.php b/application/language/english/station_lang.php index 342aab554..a3cd03af3 100644 --- a/application/language/english/station_lang.php +++ b/application/language/english/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/finnish/general_words_lang.php b/application/language/finnish/general_words_lang.php index ba9ccc774..9639b7c3d 100644 --- a/application/language/finnish/general_words_lang.php +++ b/application/language/finnish/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/finnish/menu_lang.php b/application/language/finnish/menu_lang.php index beace7606..5a9ea059f 100644 --- a/application/language/finnish/menu_lang.php +++ b/application/language/finnish/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Käyttäjätili'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bandit'; $lang['menu_adif_import_export'] = 'ADIF Tuonti / Vienti'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/finnish/station_lang.php b/application/language/finnish/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/finnish/station_lang.php +++ b/application/language/finnish/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/french/general_words_lang.php b/application/language/french/general_words_lang.php index 1c70a6d88..62ba10b78 100644 --- a/application/language/french/general_words_lang.php +++ b/application/language/french/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = "Aujourd'hui"; $lang['dashboard_php_version_warning'] = "Vous devez mettre à jour votre version PHP. La version minimale est 7.4. Votre version est"; $lang['dashboard_country_files_warning'] = "Vous devez mettre à jour les fichiers pays ! Cliquez ici pour le faire !"; -$lang['dashboard_locations_warning'] = "Vous n'avez pas de lieu de station. Cliquez ici pour en créer un !"; -$lang['dashboard_logbooks_warning'] = "Vous n'avez pas de journal de travail pour la station. Aller sur cette page pour en créer un !"; +$lang['dashboard_locations_warning'] = "Vous n'avez pas de lieu de station. Cliquez ici pour en créer un !"; +$lang['dashboard_logbooks_warning'] = "Vous n'avez pas de journal de travail pour la station. Aller sur cette page pour en créer un !"; $lang['hams_at_no_activations_found'] = "Aucune activation à venir trouvée. Veuillez revenir plus tard."; diff --git a/application/language/french/menu_lang.php b/application/language/french/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/french/menu_lang.php +++ b/application/language/french/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/french/station_lang.php b/application/language/french/station_lang.php index ee5145d5f..f5d943cfc 100644 --- a/application/language/french/station_lang.php +++ b/application/language/french/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = "mis à jour."; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/german/general_words_lang.php b/application/language/german/general_words_lang.php index d682131aa..8bd6ae8b1 100644 --- a/application/language/german/general_words_lang.php +++ b/application/language/german/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Heute'; $lang['dashboard_php_version_warning'] = 'Die PHP Version is zu alt. Benötigt wird mindestens die Version 7.4. Die installierte Version ist'; $lang['dashboard_country_files_warning'] = 'Die Länderlisten müssen aktualisiert werden! Klicke hier, um das zu tun!'; -$lang['dashboard_locations_warning'] = 'Es wurde kein Stationsstandort angelegt! Klicke hier, um das zu tun!'; -$lang['dashboard_logbooks_warning'] = 'Es wurde kein Stationslogbuch angelegt. Klicke hier, um das zu tun!'; +$lang['dashboard_locations_warning'] = 'Es wurde kein Stationsstandort angelegt! Klicke hier, um das zu tun!'; +$lang['dashboard_logbooks_warning'] = 'Es wurde kein Stationslogbuch angelegt. Klicke hier, um das zu tun!'; $lang['hams_at_no_activations_found'] = 'Keine bevorstehenden Aktivierungen gefunden. Bitte später noch einmal vorbeischauen.'; diff --git a/application/language/german/menu_lang.php b/application/language/german/menu_lang.php index e967676bd..c182d2c02 100644 --- a/application/language/german/menu_lang.php +++ b/application/language/german/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Konto'; $lang['menu_station_logbooks'] = 'Stationslogbücher'; $lang['menu_station_locations'] = 'Stationsstandorte'; $lang['menu_select_location'] = "Wähle einen Stationsstandort"; -$lang['menu_select_location_show_all'] = "Zeige alle"; -$lang['menu_choose_another_logbook'] = "Wähle ein anderes Logbuch"; +$lang['menu_station_setup'] = 'Stations Setup'; $lang['menu_bands'] = 'Bänder'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Andere Export Optionen"; diff --git a/application/language/german/station_lang.php b/application/language/german/station_lang.php index bd9f6bad7..313cab13f 100644 --- a/application/language/german/station_lang.php +++ b/application/language/german/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' aktualisiert.'; // nur letztes Wort i $lang['station_location_warning'] = 'Achtung: Du musst einen aktiven Stationsstandort auswählen. Gehe zu Rufzeichen -> Stationsstandorte um einen zu aktivieren.'; $lang['station_location_reassign_at'] = 'Bitte mache die Zuordnung in '; $lang['station_location_warning_reassign'] = 'Aufgrund von Änderungen in Wavelog musst du QSOs wieder einem Stationsstandort zuordnen.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Station Name'; $lang['station_location_name_hint'] = 'Kurzname für den Stationsstandort. Zum Beispiel: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Rufzeichen'; diff --git a/application/language/greek/general_words_lang.php b/application/language/greek/general_words_lang.php index 7f44734f9..7acdead80 100644 --- a/application/language/greek/general_words_lang.php +++ b/application/language/greek/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/greek/menu_lang.php b/application/language/greek/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/greek/menu_lang.php +++ b/application/language/greek/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/greek/station_lang.php b/application/language/greek/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/greek/station_lang.php +++ b/application/language/greek/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/italian/general_words_lang.php b/application/language/italian/general_words_lang.php index dfa0008bd..e965009ad 100644 --- a/application/language/italian/general_words_lang.php +++ b/application/language/italian/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/italian/menu_lang.php b/application/language/italian/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/italian/menu_lang.php +++ b/application/language/italian/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/italian/station_lang.php b/application/language/italian/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/italian/station_lang.php +++ b/application/language/italian/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/polish/general_words_lang.php b/application/language/polish/general_words_lang.php index 45c4817d6..68a39738f 100644 --- a/application/language/polish/general_words_lang.php +++ b/application/language/polish/general_words_lang.php @@ -225,6 +225,11 @@ $lang['southamerica'] = 'South America'; $lang['gen_band_selection'] = 'Band selection'; $lang['general_word_today'] = 'Today'; +$lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; +$lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; + $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; $lang['datatables_language'] = "en-GB"; diff --git a/application/language/polish/menu_lang.php b/application/language/polish/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/polish/menu_lang.php +++ b/application/language/polish/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/polish/station_lang.php b/application/language/polish/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/polish/station_lang.php +++ b/application/language/polish/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/russian/general_words_lang.php b/application/language/russian/general_words_lang.php index 6027c0530..504ec4a79 100644 --- a/application/language/russian/general_words_lang.php +++ b/application/language/russian/general_words_lang.php @@ -228,8 +228,8 @@ $lang['general_word_today'] = 'Сегодня'; $lang['dashboard_php_version_warning'] = 'Вам нужнго обновить версию PHP. Минимальная версия 7.4. Ваша версия'; $lang['dashboard_country_files_warning'] = 'Вам нужно обновить файлы стран! Пеерйдите сюда, чтобы сделать это!'; -$lang['dashboard_locations_warning'] = 'У вас нет расположений станций! Перейдите сюда, чтобы создать!'; -$lang['dashboard_logbooks_warning'] = 'У вас нет аппаратного журнала! Перейдите сюда, чтобы создать его!'; +$lang['dashboard_locations_warning'] = 'У вас нет расположений станций! Перейдите сюда, чтобы создать!'; +$lang['dashboard_logbooks_warning'] = 'У вас нет аппаратного журнала! Перейдите сюда, чтобы создать его!'; $lang['hams_at_no_activations_found'] = 'не найдены предстоящие активации. Проверьте позже.'; diff --git a/application/language/russian/menu_lang.php b/application/language/russian/menu_lang.php index bce605cea..998a0525c 100644 --- a/application/language/russian/menu_lang.php +++ b/application/language/russian/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Аккаунт'; $lang['menu_station_logbooks'] = 'Аппаратные журналы'; $lang['menu_station_locations'] = 'Расположения станции'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Диапазоны'; $lang['menu_adif_import_export'] = 'Импорт / экспорт ADIF'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/russian/station_lang.php b/application/language/russian/station_lang.php index 92f88007d..bd9dea300 100644 --- a/application/language/russian/station_lang.php +++ b/application/language/russian/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Обновлено.'; $lang['station_location_warning'] = 'Внимание. Вам нужно установить активное расположение станции. Перейдите в меню Позывной->Расположение станции, чтобы выбрать.'; $lang['station_location_reassign_at'] = 'Пожалуйста, переназначьте их в '; $lang['station_location_warning_reassign'] = 'Из-за недавних изменений в Wavelog вам нужно переназначить QSO вашим профилям станции.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Название профиля'; $lang['station_location_name_hint'] = 'Короткое название профиля расположения станции, к примеру: Home (HM54ip)'; $lang['station_location_callsign'] = 'Позывной станции'; diff --git a/application/language/spanish/general_words_lang.php b/application/language/spanish/general_words_lang.php index 1e6d60821..01cdace95 100644 --- a/application/language/spanish/general_words_lang.php +++ b/application/language/spanish/general_words_lang.php @@ -228,8 +228,8 @@ $lang['general_word_today'] = 'Hoy'; $lang['dashboard_php_version_warning'] = 'Necesita actualizar su versión de PHP. La versión mínima es 7.4. Su versión es '; $lang['dashboard_country_files_warning'] = 'Necesita actualizar su archivo de países. ¡Haga clic aquí para hacerlo!'; -$lang['dashboard_locations_warning'] = 'No tiene localizaciones de estaciones. ¡Haga clic aquí para crear una!'; -$lang['dashboard_logbooks_warning'] = 'No tiene libro de guardias. ¡Haga clic aquí para crear uno!'; +$lang['dashboard_locations_warning'] = 'No tiene localizaciones de estaciones. ¡Haga clic aquí para crear una!'; +$lang['dashboard_logbooks_warning'] = 'No tiene libro de guardias. ¡Haga clic aquí para crear uno!'; $lang['hams_at_no_activations_found'] = 'No hay activaciones próximas. Por favor vuelve a revisar más tarde.'; diff --git a/application/language/spanish/menu_lang.php b/application/language/spanish/menu_lang.php index c2838d597..3aba2800b 100644 --- a/application/language/spanish/menu_lang.php +++ b/application/language/spanish/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/spanish/station_lang.php b/application/language/spanish/station_lang.php index 67730d57a..5e43d5913 100644 --- a/application/language/spanish/station_lang.php +++ b/application/language/spanish/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Actualizada.'; $lang['station_location_warning'] = 'Atención: Debe configurar una Localización de Estación como activa. vaya a Indicativo->Localización de Estación para seleccionar una.'; $lang['station_location_reassign_at'] = 'Por favor, reasignelas en '; $lang['station_location_warning_reassign'] = 'Debido a cambios recientes en Wavelog, debe reasignar sus QSO a sus perfiles de estación.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Nombre de Perfil'; $lang['station_location_name_hint'] = 'Nombre corto para la Localización de Estación. Ejemplo: Casa (HM54ip)'; $lang['station_location_callsign'] = 'Indicativo de la Estación'; diff --git a/application/language/swedish/general_words_lang.php b/application/language/swedish/general_words_lang.php index ad15f28b5..77366f6a2 100644 --- a/application/language/swedish/general_words_lang.php +++ b/application/language/swedish/general_words_lang.php @@ -1,236 +1,237 @@ -<<<<<<< HEAD -here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; - -$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; - -$lang['datatables_language'] = "en-GB"; +$lang['gen_hamradio_logbook'] = 'Loggbok'; +$lang['gen_hamradio_active_logbook'] = 'Active Logbook'; + +$lang['gen_hamradio_zones'] = 'Zones'; +$lang['gen_hamradio_cq_zone'] = 'CQ Zone'; +$lang['gen_hamradio_itu_zone'] = 'ITU Zone'; +$lang['gen_hamradio_dxcc'] = 'DXCC'; +$lang['gen_hamradio_deleted_dxcc'] = 'Struket DXCC'; +$lang['gen_hamradio_continent'] = 'Kontinent'; +$lang['gen_hamradio_usa_state'] = 'USA State'; +$lang['gen_hamradio_county_reference'] = 'USA County'; +$lang['gen_hamradio_iota_reference'] = 'IOTA Reference'; +$lang['gen_hamradio_sota_reference'] = 'SOTA Reference'; +$lang['gen_hamradio_wwff_reference'] = 'WWFF Reference'; +$lang['gen_hamradio_pota_reference'] = 'POTA Reference'; +$lang['gen_hamradio_dok'] = 'DOK'; +$lang['gen_hamradio_state'] = 'State'; +$lang['gen_hamradio_iota'] = 'IOTA'; +$lang['gen_hamradio_sota'] = 'SOTA'; +$lang['gen_hamradio_wwff'] = 'WWFF'; +$lang['gen_hamradio_pota'] = 'POTA'; +$lang['gen_hamradio_gridsquare'] = 'Lokator/Gridsquare'; +$lang['gen_hamradio_latitude'] = "Latitude"; +$lang['gen_hamradio_longitude'] = "Longitude"; +$lang['gen_hamradio_bearing'] = "Bearing"; +$lang['gen_hamradio_get_gridsquare'] = 'Get Gridsquare'; +$lang['gen_hamradio_gridsquare_show'] = "Show Locator"; +$lang['gen_hamradio_distance'] = 'Distance'; +$lang['gen_hamradio_operator'] = 'Operatör'; + +$lang['gen_hamradio_sig'] = 'Sig'; +$lang['gen_hamradio_sig_info'] = 'Sig Info'; + +// Find your CQ/ITU Zone +$lang['gen_find_zone_cq_part1'] = "If you don't know your CQ Zone then"; +$lang['gen_find_zone_itu_part1'] = "If you don't know your ITU Zone then"; +$lang['gen_find_zone_part2'] = "click here"; +$lang['gen_find_zone_part3'] = "to find it!"; + +// Dashboard Words +$lang['dashboard_you_have_had'] = 'Du har kört'; +$lang['dashboard_qsos_today'] = 'QSOs idag!'; +$lang['dashboard_qso_breakdown'] = 'QSOs Breakdown'; +$lang['dashboard_countries_breakdown'] = 'Länder Breakdown'; +$lang['gen_to_date'] = 'To date'; + +$lang['gen_from_date'] = 'Från datum'; + +$lang['gen_this_qso_was_confirmed_on'] = 'Detta QSO blev konfirmerat'; + +$lang['error_no_logbook_found'] = 'Ingen loggbok hittades. Du måste konfigurera en loggbok under Station Logbooks. Gör det här:'; + +$lang['copy_to_clipboard'] = 'Kopiera till clipboard'; + +$lang['africa'] = 'Afrika'; +$lang['antarctica'] = 'Antarktis'; +$lang['asia'] = 'Asien'; +$lang['europe'] = 'Europa'; +$lang['northamerica'] = 'Nordamerika'; +$lang['oceania'] = 'Oceanien'; +$lang['southamerica'] = 'Sydamerika'; + +$lang['gen_band_selection'] = 'Band val'; +$lang['general_word_today'] = 'Today'; + +$lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; +$lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; + +$lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; + +$lang['datatables_language'] = "en-GB"; diff --git a/application/language/swedish/menu_lang.php b/application/language/swedish/menu_lang.php index 7e21a4c06..cc47624bc 100644 --- a/application/language/swedish/menu_lang.php +++ b/application/language/swedish/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Konto'; $lang['menu_station_logbooks'] = 'Stationsloggböcker'; $lang['menu_station_locations'] = 'Stationsplatser'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/swedish/station_lang.php b/application/language/swedish/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/swedish/station_lang.php +++ b/application/language/swedish/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/language/turkish/general_words_lang.php b/application/language/turkish/general_words_lang.php index 9ab0d69bd..2e1314b92 100644 --- a/application/language/turkish/general_words_lang.php +++ b/application/language/turkish/general_words_lang.php @@ -227,8 +227,8 @@ $lang['general_word_today'] = 'Today'; $lang['dashboard_php_version_warning'] = 'You need to upgrade your PHP version. Minimum version is 7.4. Your version is'; $lang['dashboard_country_files_warning'] = 'You need to update country files! Go here to do it!'; -$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; -$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; +$lang['dashboard_locations_warning'] = 'You have no station locations. Go here to create it!'; +$lang['dashboard_logbooks_warning'] = 'You have no station logbook. Go here to create it!'; $lang['hams_at_no_activations_found'] = 'No upcoming activations found. Please check back later.'; diff --git a/application/language/turkish/menu_lang.php b/application/language/turkish/menu_lang.php index ee57473ba..008e4b59e 100644 --- a/application/language/turkish/menu_lang.php +++ b/application/language/turkish/menu_lang.php @@ -80,8 +80,7 @@ $lang['menu_account'] = 'Account'; $lang['menu_station_logbooks'] = 'Station Logbooks'; $lang['menu_station_locations'] = 'Station Locations'; $lang['menu_select_location'] = "Select a Location"; -$lang['menu_select_location_show_all'] = "Show all"; -$lang['menu_choose_another_logbook'] = "Choose another Logbook"; +$lang['menu_station_setup'] = 'Station Setup'; $lang['menu_bands'] = 'Bands'; $lang['menu_adif_import_export'] = 'ADIF Import / Export'; $lang['menu_other_export'] = "Other Export Options"; diff --git a/application/language/turkish/station_lang.php b/application/language/turkish/station_lang.php index 1d80fedb1..1942ff543 100644 --- a/application/language/turkish/station_lang.php +++ b/application/language/turkish/station_lang.php @@ -58,6 +58,7 @@ $lang['station_location_updated_suff'] = ' Updated.'; $lang['station_location_warning'] = 'Attention: You need to set an active station location. Go to Callsign->Station Location to select one.'; $lang['station_location_reassign_at'] = 'Please reassign them at '; $lang['station_location_warning_reassign'] = 'Due to recent changes within Wavelog you need to reassign QSOs to your station profiles.'; +$lang['station_location_id'] = 'ID'; $lang['station_location_name'] = 'Profile Name'; $lang['station_location_name_hint'] = 'Shortname for the station location. For example: Home (HM54ip)'; $lang['station_location_callsign'] = 'Station Callsign'; diff --git a/application/migrations/139_modify_eQSL_url.php b/application/migrations/139_modify_eQSL_url.php deleted file mode 100644 index ab8cbba46..000000000 --- a/application/migrations/139_modify_eQSL_url.php +++ /dev/null @@ -1,16 +0,0 @@ -db->query($sql); - } - - public function down() - { - // Will not go back to insecure connections - } -} -?> diff --git a/application/migrations/139_modify_eqsl.php b/application/migrations/139_modify_eqsl.php new file mode 100644 index 000000000..8050bdb58 --- /dev/null +++ b/application/migrations/139_modify_eqsl.php @@ -0,0 +1,17 @@ +db->where('id', '1'); + $this->db->update('config', array('eqsl_download_url' => 'https://www.eqsl.cc/qslcard/DownloadInBox.cfm')); + } + + public function down() + { + // Will not go back to insecure connections + } +} diff --git a/application/migrations/185_harmonize_keys.php b/application/migrations/185_harmonize_keys.php new file mode 100644 index 000000000..2dbe7841a --- /dev/null +++ b/application/migrations/185_harmonize_keys.php @@ -0,0 +1,67 @@ +db->query("update ".$this->config->item('table_name')." set station_id=0 where station_id is null;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." ENGINE=InnoDB;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `station_id` `station_id` INT(10) UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `COL_PRIMARY_KEY` `COL_PRIMARY_KEY` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." AUTO_INCREMENT=".$this->get_max_from_tbl($this->config->item('table_name'),"`COL_PRIMARY_KEY`").";"); + $this->db->query("ALTER TABLE `station_profile` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `users` CHANGE COLUMN `user_id` `user_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT;"); + $this->db->query("ALTER TABLE `users` AUTO_INCREMENT=".$this->get_max_from_tbl("`users`","user_id").";"); + $this->db->query("ALTER TABLE `station_logbooks_relationship` CHANGE COLUMN `logbook_relation_id` `logbook_relation_id` INT UNSIGNED NOT NULL AUTO_INCREMENT, CHANGE COLUMN `station_logbook_id` `station_logbook_id` INT UNSIGNED NOT NULL, CHANGE COLUMN `station_location_id` `station_location_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `station_logbooks_relationship` AUTO_INCREMENT=".$this->get_max_from_tbl("`station_logbooks_relationship`","logbook_relation_id").";"); + $this->db->query("ALTER TABLE `station_logbooks` CHANGE COLUMN `logbook_id` `logbook_id` INT UNSIGNED NOT NULL AUTO_INCREMENT, CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `station_logbooks` AUTO_INCREMENT=".$this->get_max_from_tbl("`station_logbooks`","logbook_id").";"); + $this->db->query("ALTER TABLE `user_options` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `oqrs` CHANGE COLUMN `station_id` `station_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `notes` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `lotw_certs` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `label_types` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("update `paper_types` set user_id=0 where user_id=-1;"); // Make user_id 0 as template for papers + $this->db->query("ALTER TABLE `paper_types` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `eQSL_images` CHANGE COLUMN `qso_id` `qso_id` BIGINT(20) UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `contest_session` CHANGE COLUMN `station_id` `station_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `qsl_images` CHANGE COLUMN `qsoid` `qsoid` BIGINT(20) UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `contest_session` CHANGE COLUMN `station_id` `station_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `cat` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `api` CHANGE COLUMN `user_id` `user_id` INT UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `bandxuser` CHANGE COLUMN `active` `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `cq` `cq` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `dok` `dok` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `dxcc` `dxcc` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `iota` `iota` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `sig` `sig` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `sota` `sota` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `uscounties` `uscounties` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `was` `was` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `vucc` `vucc` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `wwff` `wwff` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `pota` `pota` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `waja` `waja` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `rac` `rac` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `helvetia` `helvetia` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `jcc` `jcc` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1;"); + } + + public function down(){ + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." ENGINE=MyISAM;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `station_id` `station_id` INT(11) NOT NULL;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." CHANGE COLUMN `COL_PRIMARY_KEY` `COL_PRIMARY_KEY` INT UNSIGNED NOT NULL AUTO_INCREMENT;"); + $this->db->query("ALTER TABLE ".$this->config->item('table_name')." AUTO_INCREMENT=".$this->get_max_from_tbl($this->config->item('table_name'),"`COL_PRIMARY_KEY`").";"); + $this->db->query("ALTER TABLE `station_profile` CHANGE COLUMN `user_id` `user_id` BIGINT(20) DEFAULT NULL;"); + $this->db->query("ALTER TABLE `station_logbooks_relationship` CHANGE COLUMN `logbook_relation_id` `logbook_relation_id` BIGINT(20) NOT NULL AUTO_INCREMENT, CHANGE COLUMN `station_logbook_id` `station_logbook_id` BIGINT(20) NOT NULL, CHANGE COLUMN `station_location_id` `station_location_id` BIGINT(20) NOT NULL;"); + $this->db->query("ALTER TABLE `station_logbooks_relationship` AUTO_INCREMENT=".$this->get_max_from_tbl("`station_logbooks_relationship`","logbook_relation_id").";"); + $this->db->query("ALTER TABLE `station_logbooks` CHANGE COLUMN `logbook_id` `logbook_id` BIGINT(20) NOT NULL AUTO_INCREMENT, CHANGE COLUMN `user_id` `user_id` BIGINT(20) NOT NULL;"); + $this->db->query("ALTER TABLE `station_logbooks` AUTO_INCREMENT=".$this->get_max_from_tbl("`station_logbooks`","logbook_id").";"); + $this->db->query("ALTER TABLE `user_options` CHANGE COLUMN `user_id` `user_id` INT NOT NULL;"); + $this->db->query("ALTER TABLE `oqrs` CHANGE COLUMN `station_id` `station_id` INT NOT NULL;"); + $this->db->query("ALTER TABLE `notes` CHANGE COLUMN `user_id` `user_id` BIGINT(20) NULL DEFAULT NULL;"); + $this->db->query("ALTER TABLE `lotw_certs` CHANGE COLUMN `user_id` `user_id` INT NULL DEFAULT NULL;"); + $this->db->query("ALTER TABLE `label_types` CHANGE COLUMN `user_id` `user_id` INT(5) NULL DEFAULT NULL;"); + $this->db->query("ALTER TABLE `paper_types` CHANGE COLUMN `user_id` `user_id` INT(5) NULL DEFAULT NULL;"); + $this->db->query("update `paper_types` set user_id=-1 where user_id=0;"); + $this->db->query("ALTER TABLE `eQSL_images` CHANGE COLUMN `qso_id` `qso_id` VARCHAR(250) NOT NULL;"); + $this->db->query("ALTER TABLE `contest_session` CHANGE COLUMN `station_id` `station_id` BIGINT(20) UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `qsl_images` CHANGE COLUMN `qsoid` `qsoid` INT NULL;"); + $this->db->query("ALTER TABLE `contest_session` CHANGE COLUMN `station_id` `station_id` BIGINT(20) UNSIGNED NOT NULL;"); + $this->db->query("ALTER TABLE `cat` CHANGE COLUMN `user_id` `user_id` BIGINT(20) NULL;"); + $this->db->query("ALTER TABLE `api` CHANGE COLUMN `user_id` `user_id` BIGINT(20) NULL;"); + $this->db->query("ALTER TABLE `users` CHANGE COLUMN `user_id` `user_id` INT(11) NOT NULL AUTO_INCREMENT;"); + } + + function get_max_from_tbl($tbl,$col) { + $query = $this->db->query("select max(".$col.") as MAXI from ".$tbl.";"); + $row = $query->row(); + return $row->MAXI ?? 0; + } +} diff --git a/application/models/Bands.php b/application/models/Bands.php index 2a8df6cc5..3b932e756 100644 --- a/application/models/Bands.php +++ b/application/models/Bands.php @@ -260,9 +260,11 @@ class Bands extends CI_Model { 'cq' => $band['cq'] == "true" ? '1' : '0', 'dok' => $band['dok'] == "true" ? '1' : '0', 'dxcc' => $band['dxcc'] == "true" ? '1' : '0', - 'helvetia' => $band['helvetia'] == "true" ? '1' : '0', + 'helvetia' => $band['helvetia'] == "true" ? '1' : '0', 'iota' => $band['iota'] == "true" ? '1' : '0', + 'jcc' => $band['jcc'] == "true" ? '1' : '0', 'pota' => $band['pota'] == "true" ? '1' : '0', + 'rac' => $band['rac'] == "true" ? '1' : '0', 'sig' => $band['sig'] == "true" ? '1' : '0', 'sota' => $band['sota'] == "true" ? '1' : '0', 'uscounties' => $band['uscounties'] == "true" ? '1' : '0', @@ -308,8 +310,8 @@ class Bands extends CI_Model { $this->db->insert('bands', $data); } - $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, helvetia, iota, pota, sig, sota, uscounties, was, wwff, vucc, waja) - select bands.id, " . $this->session->userdata('user_id') . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);"); + $this->db->query("insert into bandxuser (bandid, userid) + select bands.id, " . $this->session->userdata('user_id') . " from bands where band ='".$data['band']."' and not exists (select 1 from bandxuser where userid = " . $this->session->userdata('user_id') . " and bandid = bands.id);"); } function getband($id) { diff --git a/application/models/Dxcluster_model.php b/application/models/Dxcluster_model.php index 45070489c..5c61708b8 100644 --- a/application/models/Dxcluster_model.php +++ b/application/models/Dxcluster_model.php @@ -5,101 +5,103 @@ use Wavelog\Dxcc\Dxcc; class Dxcluster_model extends CI_Model { public function dxc_spotlist($band = '20m', $maxage = 60, $de = '') { $this->load->helper(array('psr4_autoloader')); - $CI =& get_instance(); - if ( ($this->optionslib->get_option('dxcache_url') != '') ) { - if($CI->session->userdata('user_date_format')) { - $custom_date_format = $CI->session->userdata('user_date_format'); - } else { - $custom_date_format = $CI->config->item('qso_date_format'); - } - if ($band == "All") { - $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/'; - } else { - $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spots/'.$band; - } - $CI->load->model('logbooks_model'); - $CI->load->model('logbook_model'); - $logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + if($this->session->userdata('user_date_format')) { + $custom_date_format = $this->session->userdata('user_date_format'); + } else { + $custom_date_format = $this->config->item('qso_date_format'); + } - $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); - if (!$jsonraw = $this->cache->get('dxcache'.$band)) { - // CURL Functions - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $dxcache_url); - curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog '.$this->optionslib->get_option('version').' DXLookup'); - curl_setopt($ch, CURLOPT_HEADER, false); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $jsonraw = curl_exec($ch); - curl_close($ch); - $this->cache->save('dxcache'.$band, $jsonraw, 59); // Cache DXClusterCache Instancewide for 59seconds - } - $json = json_decode($jsonraw); - $date = date('Ymd', time()); + $dxcache_url = ($this->optionslib->get_option('dxcache_url') == '' ? 'https://dxc.jo30.de/dxcache' : $this->optionslib->get_option('dxcache_url')); - $dxccObj = new DXCC($date); + if ($band == "All") { + $dxcache_url = $dxcache_url . '/spots/'; + } else { + $dxcache_url = $dxcache_url . '/spots/'.$band; + } + // $this->load->model('logbooks_model'); lives in the autoloader + $this->load->model('logbook_model'); + $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); - // Create JSON object - if (strlen($jsonraw)>20) { - $spotsout=[]; - foreach($json as $singlespot){ - $spotband = $CI->frequency->GetBand($singlespot->frequency*1000); - $singlespot->band=$spotband; - if (($band != 'All') && ($band != $spotband)) { continue; } - $datetimecurrent = new DateTime("now", new DateTimeZone('UTC')); // Today's Date/Time - $datetimespot = new DateTime($singlespot->when, new DateTimeZone('UTC')); - $spotage = $datetimecurrent->diff($datetimespot); - $minutes = $spotage->days * 24 * 60; - $minutes += $spotage->h * 60; - $minutes += $spotage->i; - $singlespot->age=$minutes; - $singlespot->when_pretty=date($custom_date_format . " H:i", strtotime($singlespot->when)); + $this->load->driver('cache', array('adapter' => 'file', 'backup' => 'file')); + if (!$jsonraw = $this->cache->get('dxcache'.$band)) { + // CURL Functions + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $dxcache_url); + curl_setopt($ch, CURLOPT_USERAGENT, 'Wavelog '.$this->optionslib->get_option('version').' DXLookup'); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $jsonraw = curl_exec($ch); + curl_close($ch); + $this->cache->save('dxcache'.$band, $jsonraw, 59); // Cache DXClusterCache Instancewide for 59seconds + } + $json = json_decode($jsonraw); + $date = date('Ymd', time()); - if ($minutes<=$maxage) { - if (!(property_exists($singlespot,'dxcc_spotted'))) { // Check if we already have dxcc of spotted - $dxcc=$dxccObj->dxcc_lookup($singlespot->spotted,date('Ymd', time())); - $singlespot->dxcc_spotted->dxcc_id=$dxcc['adif']; - $singlespot->dxcc_spotted->cont=$dxcc['cont']; - $singlespot->dxcc_spotted->flag=''; - $singlespot->dxcc_spotted->entity=$dxcc['entity']; - } - if (!(property_exists($singlespot,'dxcc_spotter'))) { // Check if we already have dxcc of spotter - $dxcc=$dxccObj->dxcc_lookup($singlespot->spotter,date('Ymd', time())); - $singlespot->dxcc_spotter->dxcc_id=$dxcc['adif']; - $singlespot->dxcc_spotter->cont=$dxcc['cont']; - $singlespot->dxcc_spotter->flag=''; - $singlespot->dxcc_spotter->entity=$dxcc['entity']; - } - if ( ($de != '') && ($de != 'Any') && (property_exists($singlespot->dxcc_spotter,'cont')) ){ // If we have a "de continent" and a filter-wish filter on that - if (strtolower($de) == strtolower($singlespot->dxcc_spotter->cont ?? '')) { - $singlespot->worked_dxcc = ($this->logbook_model->check_if_dxcc_worked_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); - $singlespot->cnfmd_dxcc = ($this->logbook_model->check_if_dxcc_cnfmd_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); - $singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); - $singlespot->cnfmd_call = ($this->logbook_model->check_if_callsign_cnfmd_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); - array_push($spotsout,$singlespot); - } - } else { // No de continent? No Filter --> Just push + $dxccObj = new DXCC($date); + + // Create JSON object + if (strlen($jsonraw)>20) { + $spotsout=[]; + foreach($json as $singlespot){ + $spotband = $this->frequency->GetBand($singlespot->frequency*1000); + $singlespot->band=$spotband; + if (($band != 'All') && ($band != $spotband)) { continue; } + $datetimecurrent = new DateTime("now", new DateTimeZone('UTC')); // Today's Date/Time + $datetimespot = new DateTime($singlespot->when, new DateTimeZone('UTC')); + $spotage = $datetimecurrent->diff($datetimespot); + $minutes = $spotage->days * 24 * 60; + $minutes += $spotage->h * 60; + $minutes += $spotage->i; + $singlespot->age=$minutes; + $singlespot->when_pretty=date($custom_date_format . " H:i", strtotime($singlespot->when)); + + if ($minutes<=$maxage) { + if (!(property_exists($singlespot,'dxcc_spotted'))) { // Check if we already have dxcc of spotted + $dxcc=$dxccObj->dxcc_lookup($singlespot->spotted,date('Ymd', time())); + $singlespot->dxcc_spotted->dxcc_id=$dxcc['adif']; + $singlespot->dxcc_spotted->cont=$dxcc['cont']; + $singlespot->dxcc_spotted->flag=''; + $singlespot->dxcc_spotted->entity=$dxcc['entity']; + } + if (!(property_exists($singlespot,'dxcc_spotter'))) { // Check if we already have dxcc of spotter + $dxcc=$dxccObj->dxcc_lookup($singlespot->spotter,date('Ymd', time())); + $singlespot->dxcc_spotter->dxcc_id=$dxcc['adif']; + $singlespot->dxcc_spotter->cont=$dxcc['cont']; + $singlespot->dxcc_spotter->flag=''; + $singlespot->dxcc_spotter->entity=$dxcc['entity']; + } + if ( ($de != '') && ($de != 'Any') && (property_exists($singlespot->dxcc_spotter,'cont')) ){ // If we have a "de continent" and a filter-wish filter on that + if (strtolower($de) == strtolower($singlespot->dxcc_spotter->cont ?? '')) { $singlespot->worked_dxcc = ($this->logbook_model->check_if_dxcc_worked_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); - $singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); $singlespot->cnfmd_dxcc = ($this->logbook_model->check_if_dxcc_cnfmd_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); + $singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); $singlespot->cnfmd_call = ($this->logbook_model->check_if_callsign_cnfmd_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); array_push($spotsout,$singlespot); } + } else { // No de continent? No Filter --> Just push + $singlespot->worked_dxcc = ($this->logbook_model->check_if_dxcc_worked_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); + $singlespot->worked_call = ($this->logbook_model->check_if_callsign_worked_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); + $singlespot->cnfmd_dxcc = ($this->logbook_model->check_if_dxcc_cnfmd_in_logbook($singlespot->dxcc_spotted->dxcc_id, $logbooks_locations_array, $singlespot->band) >= 1); + $singlespot->cnfmd_call = ($this->logbook_model->check_if_callsign_cnfmd_in_logbook($singlespot->spotted, $logbooks_locations_array, $singlespot->band) >= 1); + array_push($spotsout,$singlespot); } } - return ($spotsout); - } else { - return ''; } + return ($spotsout); } else { return ''; } + } public function dxc_qrg_lookup($qrg, $maxage = 120) { $this->load->helper(array('psr4_autoloader')); - if ( ($this->optionslib->get_option('dxcache_url') != '') && (is_numeric($qrg)) ) { - $dxcache_url = $this->optionslib->get_option('dxcache_url').'/spot/'.$qrg; + if (is_numeric($qrg)) { + + $dxcache_url = ($this->optionslib->get_option('dxcache_url') == '' ? 'https://dxc.jo30.de/dxcache' : $this->optionslib->get_option('dxcache_url')); + + $dxcache_url = $dxcache_url .'/spot/'.$qrg; // CURL Functions $ch = curl_init(); diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 1a297c3bf..503995155 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1038,7 +1038,7 @@ class Logbook_model extends CI_Model { $entity = $this->get_entity($this->input->post('dxcc_id')); $stationId = $this->input->post('station_profile'); - $country = ucwords(strtolower($entity['name']), "- (/"); + $country = ucwords(strtolower($entity['name'] ?? ''), "- (/"); // Prevent Errors, if JS-Fence doesn't help // be sure that station belongs to user $this->load->model('stations'); @@ -4513,6 +4513,7 @@ function lotw_last_qsl_date($user_id) { public function check_for_station_id() { $this->db->select('COL_PRIMARY_KEY, COL_TIME_ON, COL_CALL, COL_MODE, COL_BAND, COL_STATION_CALLSIGN'); $this->db->where('station_id =', NULL); + $this->db->or_where("station_id",0); $query = $this->db->get($this->config->item('table_name')); if($query->num_rows() >= 1) { return $query->result(); @@ -4571,26 +4572,29 @@ function lotw_last_qsl_date($user_id) { public function update_station_ids($station_id,$station_callsign,$qsoids) { if (! empty($qsoids)) { - $data = array( - 'station_id' => $station_id, - ); + $data = array( + 'station_id' => $station_id, + ); - $this->db->where_in('COL_PRIMARY_KEY', $qsoids); - $this->db->where(array('station_id' => NULL)); - if ($station_callsign == '') { - $this->db->where(array('col_station_callsign' => NULL)); - } else { - $this->db->where('col_station_callsign', $station_callsign); - } - $this->db->update($this->config->item('table_name'), $data); - if ($this->db->affected_rows() > 0) { - return TRUE; - } else { - return FALSE; - } - } else { - return FALSE; - } + $this->db->where_in('COL_PRIMARY_KEY', $qsoids); + $this->db->group_start(); + $this->db->where(array('station_id' => NULL)); + $this->db->or_where(array('station_id' => 0)); // 0 is also unassigned, compare mig_185 + $this->db->group_end(); + if ($station_callsign == '') { + $this->db->where(array('col_station_callsign' => NULL)); + } else { + $this->db->where('col_station_callsign', $station_callsign); + } + $this->db->update($this->config->item('table_name'), $data); + if ($this->db->affected_rows() > 0) { + return TRUE; + } else { + return FALSE; + } + } else { + return FALSE; + } } public function parse_frequency($frequency) diff --git a/application/models/Logbooks_model.php b/application/models/Logbooks_model.php index e03011384..f9fc7d794 100644 --- a/application/models/Logbooks_model.php +++ b/application/models/Logbooks_model.php @@ -14,25 +14,30 @@ class Logbooks_model extends CI_Model { return $query->num_rows(); } - function add() { + function add($logbook_name = '') { // Create data array with field values - $data = array( - 'user_id' => $this->session->userdata('user_id'), - 'logbook_name' => xss_clean($this->input->post('stationLogbook_Name', true)), - ); + if ($logbook_name ?? '' != '') { + $data = array( + 'user_id' => $this->session->userdata('user_id'), + 'logbook_name' => $logbook_name, + ); - // Insert Records - $this->db->insert('station_logbooks', $data); - $logbook_id = $this->db->insert_id(); + // Insert Records + $this->db->insert('station_logbooks', $data); + $logbook_id = $this->db->insert_id(); - // check if user has no active logbook yet - if ($this->session->userdata('active_station_logbook') === null) { - // set logbook active - $this->set_logbook_active($logbook_id); + // check if user has no active logbook yet + if ($this->session->userdata('active_station_logbook') === null) { + // set logbook active + $this->set_logbook_active($logbook_id); - // update user session data - $this->load->model('user_model'); - $this->user_model->update_session($this->session->userdata('user_id')); + // update user session data + $this->load->model('user_model'); + $this->user_model->update_session($this->session->userdata('user_id')); + } + return $logbook_id; + } else { + return -1; } } @@ -51,9 +56,8 @@ class Logbooks_model extends CI_Model { $this->set_logbook_active($logbook_id, $id); } - function delete($id) { + function delete($clean_id) { // Clean ID - $clean_id = $this->security->xss_clean($id); // do not delete active logbook if ($this->session->userdata('active_station_logbook') === $clean_id) { @@ -62,7 +66,7 @@ class Logbooks_model extends CI_Model { // Delete logbook $this->db->where('user_id', $this->session->userdata('user_id')); - $this->db->where('logbook_id', $id); + $this->db->where('logbook_id', $clean_id); $this->db->delete('station_logbooks'); } diff --git a/application/models/Stations.php b/application/models/Stations.php index b1c788ef0..66165d953 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -49,6 +49,17 @@ class Stations extends CI_Model { return $this->db->get('station_profile'); } + function profile_full($id) { + // Should refactor all calls for profile to profile_full, since it contains also those eqsl-default-msg + $clean_id = $this->security->xss_clean($id); + $this->db->where('station_id', $clean_id); + $row=$this->db->get('station_profile')->row(); + + $options_object = $this->user_options_model->get_options('eqsl_default_qslmsg', array('option_name' => 'key_station_id', 'option_key' => $id))->result(); + $row->eqsl_default_qslmsg = $options_object[0]->option_value ?? ''; + return $row; + } + function profile_clean($id) { // Clean ID $clean_id = $this->security->xss_clean($id); @@ -123,11 +134,15 @@ class Stations extends CI_Model { ); // Insert Records & return insert id // - if ($this->db->insert('station_profile', $data)===true) { - $station_user_list = $this->all_of_user()->result(); - if ((count($station_user_list)>0) && (isset($station_user_list[intval(count($station_user_list)-1)]->station_id))) { - return $station_user_list[intval(count($station_user_list)-1)]->station_id; + if ($this->db->insert('station_profile', $data)) { + $new_station_id = $this->db->insert_id(); + $eqsl_default_qslmsg = xss_clean($this->input->post('eqsl_default_qslmsg', true)); + if (!empty(trim($eqsl_default_qslmsg))) { + $this->user_options_model->set_option('eqsl_default_qslmsg', 'key_station_id', array($new_station_id => $eqsl_default_qslmsg)); } + return $new_station_id; + } else { + return 0; } } @@ -182,6 +197,9 @@ class Stations extends CI_Model { $this->db->where('user_id', $this->session->userdata('user_id')); $this->db->where('station_id', xss_clean($this->input->post('station_id', true))); $this->db->update('station_profile', $data); + + $eqsl_default_qslmsg = xss_clean($this->input->post('eqsl_default_qslmsg', true) ?? ''); + $this->user_options_model->set_option('eqsl_default_qslmsg', 'key_station_id', array(xss_clean($this->input->post('station_id', true)) => $eqsl_default_qslmsg)); } function delete($id) { @@ -192,6 +210,7 @@ class Stations extends CI_Model { if ($clean_id === $this->find_active()) { return; } + $this->user_options_model->del_option('eqsl_default_qslmsg', 'key_station_id', array('option_key' => $id)); // Delete QSOs $this->db->where('station_id', $id); @@ -238,6 +257,17 @@ class Stations extends CI_Model { $this->db->update('station_profile', $newdefault); } + function edit_favourite($id) { + $cleanid = $this->security->xss_clean($id); + + $is_favorite = $this->user_options_model->get_options('station_location', array('option_name'=>'is_favorite', 'option_key'=>$cleanid))->row()->option_value ?? 'false'; + if ($is_favorite == 'true') { + $this->user_options_model->del_option('station_location', 'is_favorite', array('option_key'=>$cleanid)); + } else if ($is_favorite == 'false') { + $this->user_options_model->set_option('station_location', 'is_favorite', array($cleanid=>'true')); + } + } + public function find_active() { $this->db->where('user_id', $this->session->userdata('user_id')); $this->db->where('station_active', 1); diff --git a/application/models/User_model.php b/application/models/User_model.php index 3783f84a3..5936dee7c 100644 --- a/application/models/User_model.php +++ b/application/models/User_model.php @@ -200,8 +200,10 @@ class User_Model extends CI_Model { // Add user and insert bandsettings for user $this->db->insert($this->config->item('auth_table'), $data); $insert_id = $this->db->insert_id(); - $this->db->query("insert into bandxuser (bandid, userid, active, cq, dok, dxcc, helvetia, iota, pota, sig, sota, uscounties, was, wwff, vucc, waja, rac) select bands.id, " . $insert_id . ", 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 from bands;"); - $this->db->query("insert into paper_types (user_id,paper_name,metric,width,orientation,height) SELECT ".$insert_id.", paper_name, metric, width, orientation,height FROM paper_types where user_id = -1;"); + + $this->db->query("insert into bandxuser (bandid, userid) select bands.id, " . $insert_id . " from bands;"); + $this->db->query("insert into paper_types (user_id,paper_name,metric,width,orientation,height) SELECT ".$insert_id.", paper_name, metric, width, orientation,height FROM paper_types where user_id = 0;"); + return OK; } else { return EUSERNAMEEXISTS; diff --git a/application/views/bandmap/index.php b/application/views/bandmap/index.php index 52e07442f..2c14b09d7 100644 --- a/application/views/bandmap/index.php +++ b/application/views/bandmap/index.php @@ -1,6 +1,6 @@ diff --git a/application/views/bandmap/list.php b/application/views/bandmap/list.php index 9ae7c0e09..9aa51c18f 100644 --- a/application/views/bandmap/list.php +++ b/application/views/bandmap/list.php @@ -1,7 +1,7 @@ diff --git a/application/views/bands/index.php b/application/views/bands/index.php index a0c4f04ef..85bf0e3d8 100644 --- a/application/views/bands/index.php +++ b/application/views/bands/index.php @@ -4,7 +4,9 @@ $dok = 0; $dxcc = 0; $helvetia = 0; $iota = 0; +$jcc = 0; $pota = 0; +$rac = 0; $sig = 0; $sota = 0; $uscounties = 0; @@ -48,7 +50,9 @@ $wwff = 0; + + @@ -76,7 +80,9 @@ $wwff = 0; dxcc == 1) {echo 'checked'; $dxcc++;}?>> helvetia == 1) {echo 'checked'; $helvetia++;}?>> iota == 1) {echo 'checked'; $iota++;}?>> + jcc == 1) {echo 'checked'; $jcc++;}?>> pota == 1) {echo 'checked'; $pota++;}?>> + rac == 1) {echo 'checked'; $rac++;}?>> sig == 1) {echo 'checked'; $sig++;}?>> sota == 1) {echo 'checked'; $sota++;}?>> uscounties == 1) {echo 'checked'; $uscounties++;}?>> @@ -108,7 +114,9 @@ $wwff = 0; 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> + 0) echo 'checked';?>> 0) echo 'checked';?>> + 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> 0) echo 'checked';?>> diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 716bf459a..d23fee3fb 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -1,21 +1,24 @@ - - + @@ -91,17 +96,9 @@ if($this->session->userdata('user_id') != null) { ?> - uri->segment(1) == "oqrs") { ?> @@ -965,15 +962,12 @@ $($('#callsign')).on('keypress',function(e) { session->userdata('isWinkeyEnabled')) { ?> -optionslib->get_option('dxcache_url') != ''){ ?> + stations->find_active(); $station_profile = $this->stations->profile($active_station_id); $active_station_info = $station_profile->row(); @@ -1672,58 +1666,6 @@ $(document).ready(function(){ - - - uri->segment(2) == "dxcc") { ?> + + uri->segment(1) == "timeline") { ?> + diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index 88ed12120..eda022e9d 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -78,7 +78,7 @@