From d4988910138fb056bd303e10813fc30007e24e06 Mon Sep 17 00:00:00 2001 From: phl0 Date: Tue, 19 Sep 2023 13:59:19 +0200 Subject: [PATCH] Add frontend for SAT timers API --- application/controllers/Sattimers.php | 26 +++++++++++ application/views/interface_assets/header.php | 8 +++- application/views/sattimers/index.php | 45 +++++++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 application/controllers/Sattimers.php create mode 100644 application/views/sattimers/index.php diff --git a/application/controllers/Sattimers.php b/application/controllers/Sattimers.php new file mode 100644 index 00000000..fa78876b --- /dev/null +++ b/application/controllers/Sattimers.php @@ -0,0 +1,26 @@ +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() { + $footerData = []; + $footerData['scripts'] = [ + 'assets/js/sections/sattimers.js?' + ]; + $url = 'https://www.df2et.de/tevel/api.php'; + $json = file_get_contents($url); + $data['activations'] = json_decode($json, true); + + $data['page_title'] = "Satellite Timers"; + $this->load->view('interface_assets/header', $data); + $this->load->view('/sattimers/index', $data); + $this->load->view('interface_assets/footer', $footerData); + } +} diff --git a/application/views/interface_assets/header.php b/application/views/interface_assets/header.php index f4c3e046..8a02d16d 100644 --- a/application/views/interface_assets/header.php +++ b/application/views/interface_assets/header.php @@ -42,6 +42,10 @@ + uri->segment(1) == "sattimers") { ?> + + + '; } ?> @@ -101,6 +105,8 @@ + + SAT Timers @@ -348,4 +354,4 @@ - \ No newline at end of file + diff --git a/application/views/sattimers/index.php b/application/views/sattimers/index.php new file mode 100644 index 00000000..ea0827bc --- /dev/null +++ b/application/views/sattimers/index.php @@ -0,0 +1,45 @@ +
+
+ +

Satellite Timers

+

This data is from https://www.df2et.de/tevel/

+ + + + + + + + + + + + + + + + + + + + + +
SatelliteStatusTime-Out
n/a...
+
+