Added Settings for spot-age and de-continent

pull/2317/head
int2001 2023-07-21 11:46:16 +00:00
rodzic 1dc278847c
commit 6c07da28ee
4 zmienionych plików z 44 dodań i 2 usunięć

Wyświetl plik

@ -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'));

Wyświetl plik

@ -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';

Wyświetl plik

@ -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';

Wyświetl plik

@ -40,7 +40,29 @@
<input type="text" name="dxcache_url" class="form-control" id="dxcache_url" aria-describedby="dxcache_urlHelp" value="<?php echo $this->optionslib->get_option('dxcache_url'); ?>">
<small id="dxcache_urlHelp" class="form-text text-muted"><?php echo lang('options_dxcluster_hint'); ?></small>
</div>
<div class="form-group">
<label for="maxAgeSelect"><?php echo lang('options_dxcluster_maxage'); ?></label>
<select class="custom-select" id="maxAgeSelect" name="dxcluster_maxage" aria-describedby="dxcluster_maxageHelp" required>
<option value="120"<?php if ($this->optionslib->get_option('dxcluster_maxage') == '120') { echo " selected"; } ?>>2 Hours</option>
<option value="60"<?php if ($this->optionslib->get_option('dxcluster_maxage') == '60') { echo " selected"; } ?>>60 Minutes</option>
<option value="30"<?php if ($this->optionslib->get_option('dxcluster_maxage') == '30') { echo " selected"; } ?>>30 Minutes</option>
</select>
<small id="dxcluster_maxageHelp" class="form-text text-muted"><?php echo lang('options_dxcluster_maxage_hint'); ?></small>
</div>
<div class="form-group">
<label for="decontSelect"><?php echo lang('options_dxcluster_decont'); ?></label>
<select class="custom-select" id="decontSelect" name="dxcluster_decont" aria-describedby="dxcluster_decontHelp" required>
<option value="AF"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AF') { echo " selected"; } ?>>Africa</option>
<option value="AN"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AN') { echo " selected"; } ?>>Antarctica</option>
<option value="AS"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'AS') { echo " selected"; } ?>>Asia</option>
<option value="EU"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'EU') { echo " selected"; } ?>>Europe</option>
<option value="NA"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'NA') { echo " selected"; } ?>>North America</option>
<option value="OC"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'OC') { echo " selected"; } ?>>Oceania</option>
<option value="SA"<?php if ($this->optionslib->get_option('dxcluster_decont') == 'SA') { echo " selected"; } ?>>South America</option>
</select>
<small id="dxcluster_decontHelp" class="form-text text-muted"><?php echo lang('options_dxcluster_decont_hint'); ?></small>
</div>
<!-- Save the Form -->
<input class="btn btn-primary" type="submit" value="<?php echo lang('options_save'); ?>" />
</form>