From 6c07da28ee8a7323a949ecc5384737796717417e Mon Sep 17 00:00:00 2001 From: int2001 Date: Fri, 21 Jul 2023 11:46:16 +0000 Subject: [PATCH] Added Settings for spot-age and de-continent --- application/controllers/Options.php | 12 ++++++++++ application/language/english/options_lang.php | 5 ++++ application/language/german/options_lang.php | 5 +++- application/views/options/dxcluster.php | 24 ++++++++++++++++++- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/application/controllers/Options.php b/application/controllers/Options.php index c83bcf27..55e7551a 100644 --- a/application/controllers/Options.php +++ b/application/controllers/Options.php @@ -159,12 +159,24 @@ class Options extends CI_Controller { $this->load->library('form_validation'); $this->form_validation->set_rules('dxcache_url', 'URL of DXCache', 'valid_url'); + $this->form_validation->set_rules('dxcluster_maxage', 'Max Age of Spots', 'required'); + $this->form_validation->set_rules('dxcluster_decont', 'de continent', 'required'); if ($this->form_validation->run() == FALSE) { $this->load->view('interface_assets/header', $data); $this->load->view('options/dxcluster'); $this->load->view('interface_assets/footer'); } else { + $dxcluster_decont_update = $this->optionslib->update('dxcluster_decont', $this->input->post('dxcluster_decont'), 'yes'); + if($dxcluster_decont_update == TRUE) { + $this->session->set_flashdata('success', $this->lang->line('options_dxcluster_decont_changed_to').$this->input->post('dxcluster_decont')); + } + + $dxcluster_url_update = $this->optionslib->update('dxcluster_maxage', $this->input->post('dxcluster_maxage'), 'yes'); + if($dxcluster_maxage_update == TRUE) { + $this->session->set_flashdata('success', $this->lang->line('options_dxcluster_maxage_changed_to').$this->input->post('dxcluster_maxage')); + } + $dxcache_url_update = $this->optionslib->update('dxcache_url', $this->input->post('dxcache_url'), 'yes'); if($dxcache_url_update == TRUE) { $this->session->set_flashdata('success', $this->lang->line('options_dxcache_url_changed_to').$this->input->post('dxcache_url')); diff --git a/application/language/english/options_lang.php b/application/language/english/options_lang.php index 70814e49..da12f681 100644 --- a/application/language/english/options_lang.php +++ b/application/language/english/options_lang.php @@ -64,5 +64,10 @@ $lang['options_dxcluster_longtext'] = 'The Provider of the DXCluster-Cache. You $lang['options_dxcluster_hint'] = 'URL of the DXCluster-Cache. e.g. https://dxc.jo30.de/dxcache'; $lang['options_dxcluster_settings'] = 'DXCluster'; $lang['options_dxcache_url_changed_to'] = 'DXCluster Cache URL changed to '; +$lang['options_dxcluster_maxage'] = 'Maximum Age of spots taken care of'; +$lang['options_dxcluster_maxage_hint'] = 'The Age in Minutes of spots, that will be taken care at bandplan/lookup'; +$lang['options_dxcluster_decont'] = 'Show spots which are spotted from following continent'; +$lang['options_dxcluster_maxage_changed_to']='Maximum age of spots changed to '; +$lang['options_dxcluster_decont_changed_to']='de continent changed to '; $lang['options_save'] = 'Save'; diff --git a/application/language/german/options_lang.php b/application/language/german/options_lang.php index eee2cdfd..ec0886a1 100644 --- a/application/language/german/options_lang.php +++ b/application/language/german/options_lang.php @@ -64,6 +64,9 @@ $lang['options_dxcluster_longtext'] = 'Der Provider des DXCluster-Caches. Du kan $lang['options_dxcluster_hint'] = 'URL des DXCluster-Caches. z.B. https://dxc.jo30.de/dxcache'; $lang['options_dxcluster_settings'] = 'DXCluster'; $lang['options_dxcache_url_changed_to'] = 'DXCluster Cache URL geänder zu '; - +$lang['options_dxcluster_maxage'] = 'Maximales Alter bis zu dem Spots berücksichtigt werden'; +$lang['options_dxcluster_decont'] = 'Nur Spots berücksichtigen, die in folgendem Kontinent erfasst wurden'; +$lang['options_dxcluster_maxage_changed_to']='Maximal Spot-Alter geänder auf '; +$lang['options_dxcluster_decont_changed_to']='Spotterkontinent geändert auf '; $lang['options_save'] = 'Speichern'; diff --git a/application/views/options/dxcluster.php b/application/views/options/dxcluster.php index 645eb923..4d8d9a58 100644 --- a/application/views/options/dxcluster.php +++ b/application/views/options/dxcluster.php @@ -40,7 +40,29 @@ - +
+ + + +
+
+ + + +
+