wavelog/application/controllers/Station.php

175 lines
5 KiB
PHP
Raw Normal View History

2024-02-09 11:05:28 +01:00
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
Handles Displaying of information for station tools.
*/
2024-02-09 11:05:28 +01:00
class Station extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->helper(array('form', 'url'));
$this->load->model('user_model');
2024-02-09 11:05:28 +01:00
if (!$this->user_model->authorize(2)) {
2024-08-16 10:08:44 +02:00
$this->session->set_flashdata('error', __("You're not allowed to do that!"));
2024-02-09 11:05:28 +01:00
redirect('dashboard');
}
}
2024-02-09 11:05:28 +01:00
public function create()
{
$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();
$this->load->library('form_validation');
$this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required');
2024-10-09 07:51:49 +00:00
$this->form_validation->set_rules('dxcc', 'DXCC', 'required');
2024-02-09 11:05:28 +01:00
if ($this->form_validation->run() == FALSE) {
2024-06-06 21:32:42 +02:00
$data['page_title'] = __("Create Station Location");
$this->load->view('interface_assets/header', $data);
$this->load->view('station_profile/create');
$this->load->view('interface_assets/footer');
2024-02-09 11:05:28 +01:00
} else {
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
$this->stations->add();
redirect('stationsetup');
}
}
public function edit($id) {
$id = $this->security->xss_clean($id);
$this->load->model('stations');
if ($this->stations->check_station_is_accessible($id)) {
$data = $this->load_station_for_editing($id);
2024-06-06 21:32:42 +02:00
$data['page_title'] = __("Edit Station Location: ") . $data['my_station_profile']->station_profile_name;
2024-10-09 07:51:49 +00:00
$this->form_validation->set_rules('dxcc', 'DXCC', 'required');
if ($this->form_validation->run() == FALSE) {
$this->load->view('interface_assets/header', $data);
$this->load->view('station_profile/edit');
$this->load->view('interface_assets/footer');
} else {
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
if ($this->stations->edit()) {
2024-06-06 21:32:42 +02:00
$data['notice'] = __("Station Location") . $this->security->xss_clean($this->input->post('station_profile_name', true)) . " Updated";
}
// Also clean up static map images
if (!$this->load->is_loaded('staticmap_model')) {
$this->load->model('staticmap_model');
}
$this->staticmap_model->remove_static_map_image($id);
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
} else {
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
}
public function copy($id) {
$id = $this->security->xss_clean($id);
$this->load->model('stations');
if ($this->stations->check_station_is_accessible($id)) {
$data = $this->load_station_for_editing($id);
2024-06-08 11:01:59 +02:00
$data['page_title'] = __("Duplicate Station Location:"). "{$data['my_station_profile']->station_profile_name}";
// we NULLify station_id and station_profile_name to make sure we are creating a new station
$data['copy_from'] = $data['my_station_profile']->station_id;
$data['my_station_profile']->station_id = NULL;
$data['my_station_profile']->station_profile_name = '';
2024-02-09 11:05:28 +01:00
if ($this->form_validation->run() == FALSE) {
$this->load->view('interface_assets/header', $data);
$this->load->view('station_profile/edit');
$this->load->view('interface_assets/footer');
2024-02-09 11:05:28 +01:00
} else {
$this->stations->add();
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
} else {
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
}
public function edit_favourite($id) {
$id = $this->security->xss_clean($id);
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
$this->load->model('stations');
$this->stations->edit_favourite($id);
redirect('stationsetup');
2024-02-09 11:05:28 +01:00
}
function load_station_for_editing($id): array {
$id = $this->security->xss_clean($id);
$this->load->library('form_validation');
$this->load->model('stations');
$this->load->model('dxcc');
$this->load->model('logbook_model');
$data['iota_list'] = $this->logbook_model->fetchIota();
$item_id_clean = $this->security->xss_clean($id);
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
$data['my_station_profile'] = $this->stations->profile_full($item_id_clean);
$data['dxcc_list'] = $this->dxcc->list();
$this->form_validation->set_rules('station_profile_name', 'Station Profile Name', 'required');
return $data;
}
function reassign_profile($id) {
$id = $this->security->xss_clean($id);
// $id is the profile that needs reassigned to QSOs // ONLY Admin can do that!
$this->load->model('stations');
if ($this->user_model->authorize(99)) {
$this->stations->reassign($id);
}
//$this->stations->logbook_session_data();
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
function set_active($current, $new, $is_ajax = null) {
$current = $this->security->xss_clean($current);
$new = $this->security->xss_clean($new);
$this->load->model('stations');
$this->stations->set_active($current, $new);
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
2024-02-09 11:05:28 +01:00
if ($is_ajax != null) {
return;
}
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
public function delete($id) {
$id = $this->security->xss_clean($id);
$this->load->model('stations');
if ($this->stations->check_station_is_accessible($id)) {
$this->stations->delete($id);
}
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
public function deletelog($id) {
$id = $this->security->xss_clean($id);
2024-02-09 11:05:28 +01:00
$this->load->model('stations');
if ($this->stations->check_station_is_accessible($id)) {
$this->stations->deletelog($id);
}
Station setup (#175) * The start of station setup * Added modals new logbook and new location * Added 1st JSON-Create Logbook (PHP) * Added 1st JSON-Create Logbook (JS) * Changed to small buttons * A bit more errorhandling (JS) * Moved collecting of params to controller and added errorhandling * Added Delete-Function (with confirmation) * Moved view to new folder and added delete Logbook * Added AJAX for setActive Book * Added AJAX for setActiveBook (JS) * Partially working reload logbook table * Dynamic loading of logbooks (PHP) * Dynamic loading of logbooks (JS) * Reload location table * Removed duplicate return statement * Fixed Zoo of params to JSON-Out * Fixed RenderBug (not yet finished) at JS * Fixed DT error * Fixed CSS * Changed setActiveStation from link to Ajax (PHP) * Changed setActiveStation from link to Ajax (JS) * Added confirmation to changeActiveStation * Changed EmptyStation to AJAX (PHP) * Changed EmptyStation to AJAX (JS) * Changed DeleteStation to AJAX (JS) * Changed DeleteStation to AJAX (PHP) * Tidy up code a little * Re-added favorites * Ajaxyfing favorite location * Fixed clicking on favorite * Fixed favorite star * Tweaked new logbook dialog * Fixed public search badge * Fix badges on first load * Reloads stations on load * Redirect to station setup * Re-added translation * Fixed more badges * Added menu item translation * Header with translated menu * Updated warning links on dashboard to go to station setup * Added missing lang lines for Polish and Czech * Changed links in Quickswitch to station setup * station setup in quickswitcher * Make station location ID a separate (and sortable) column * Added missing ID * Relocated eQSL-Thing to station_model to reduce redundancies * Removed Debug-Stuff * Moved get_options to get_default_eqsl_message within QSO-Controller * Moved generic get_options to more specific get_eqsl_default_message * Removed loading of options_model, since it is already loaded via "autload"... * dynamic quickswitcher * disabled button for active location * typo * removed empty unused function * comment * reload stationsetup list if we are on this page * don't grey out the locations * dynamic loading in both directions * rename function to make it more clear * readability --------- Co-authored-by: int2001 <joerg@dj7nt.de> Co-authored-by: Joerg (DJ7NT) <int2001@users.noreply.github.com> Co-authored-by: HB9HIL <fabian.berg@hb9hil.org> Co-authored-by: phl0 <github@florian-wolters.de>
2024-03-03 21:52:51 +01:00
redirect('stationsetup');
}
}