From 3b23307652778e88490a36a0d83959d154a87f15 Mon Sep 17 00:00:00 2001 From: Florian Pesth Date: Fri, 22 Mar 2024 17:23:14 +0100 Subject: [PATCH] Add namespace to make php checker happy --- html/Admin.php | 3 + html/AdminAlleSchichten.php | 3 + html/AdminDienste.php | 3 + html/AdminHelferUebersicht.php | 3 + html/AdminMeineSchichten.php | 3 + html/AdminUserdaten.php | 3 + html/AlleSchichten.php | 3 + html/Ausdrucke-alles.php | 3 + html/Ausdrucke.php | 3 + html/CreateHelfer.php | 3 + html/DecodeToken.php | 3 + html/DetailsSchichten.php | 3 + html/EmailZuToken.php | 3 + html/Info.php | 3 + html/Kalender-all.php | 3 + html/Kalender.php | 4 +- html/MeineSchichten.php | 3 + html/ReadLog.php | 3 + html/SQL.php | 2 + html/SQL_old.php | 1 + html/Setup.php | 2 + html/TeilnehmerSchichtenAusdruck.php | 3 + html/TeilnehmerSchichtenAusdruck2.php | 3 + html/UrlLogin.php | 2 + html/Userdaten.php | 3 + html/Wizard.php | 96 +------------------------- html/WizardStep.php | 97 +++++++++++++++++++++++++++ html/_crypt.php | 2 + html/_login.php | 3 + html/_zeitbereich.php | 2 + html/index.php | 3 + html/konfiguration.php | 4 +- html/testPDO.php | 2 + 33 files changed, 185 insertions(+), 95 deletions(-) create mode 100644 html/WizardStep.php diff --git a/html/Admin.php b/html/Admin.php index 15e34dd..e3b95c3 100644 --- a/html/Admin.php +++ b/html/Admin.php @@ -1,4 +1,7 @@ diff --git a/html/MeineSchichten.php b/html/MeineSchichten.php index 146ba44..5184d16 100644 --- a/html/MeineSchichten.php +++ b/html/MeineSchichten.php @@ -1,4 +1,7 @@ page = $step['page']; - } - if (isset($step['redirects'])) { - $this->redirects = $step['redirects']; - } - } - public function setCurrentStep() - { - if (!empty($this->redirects)) { - foreach ($this->redirects as $redirect) { - if (isset($redirect['==']) && isset($redirect['id'])) { - foreach ($redirect['=='] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] == $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - if (isset($redirect['!=']) && isset($redirect['id'])) { - foreach ($redirect['!='] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] != $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - if (isset($redirect['>']) && isset($redirect['id'])) { - foreach ($redirect['>'] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] > $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - if (isset($redirect['<']) && isset($redirect['id'])) { - foreach ($redirect['<'] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] < $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - if (isset($redirect['>=']) && isset($redirect['id'])) { - foreach ($redirect['>='] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] >= $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - if (isset($redirect['<=']) && isset($redirect['id'])) { - foreach ($redirect['<='] as $key => $value) { - if (isset($_POST[$key]) && $_POST[$key] <= $value) { - $_POST['step'] = $redirect['id']; - if (isset($redirect['warning'])) { - $this->warning = $redirect['warning']; - } - return; - } - } - } - } - } - } - public function setCode(callable $function) - { - $this->code = $function; - } -} +namespace Bengelsytem; + +require_once 'WizardStep.php'; class Wizard { diff --git a/html/WizardStep.php b/html/WizardStep.php new file mode 100644 index 0000000..d8dd487 --- /dev/null +++ b/html/WizardStep.php @@ -0,0 +1,97 @@ +page = $step['page']; + } + if (isset($step['redirects'])) { + $this->redirects = $step['redirects']; + } + } + public function setCurrentStep() + { + if (!empty($this->redirects)) { + foreach ($this->redirects as $redirect) { + if (isset($redirect['==']) && isset($redirect['id'])) { + foreach ($redirect['=='] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] == $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + if (isset($redirect['!=']) && isset($redirect['id'])) { + foreach ($redirect['!='] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] != $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + if (isset($redirect['>']) && isset($redirect['id'])) { + foreach ($redirect['>'] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] > $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + if (isset($redirect['<']) && isset($redirect['id'])) { + foreach ($redirect['<'] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] < $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + if (isset($redirect['>=']) && isset($redirect['id'])) { + foreach ($redirect['>='] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] >= $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + if (isset($redirect['<=']) && isset($redirect['id'])) { + foreach ($redirect['<='] as $key => $value) { + if (isset($_POST[$key]) && $_POST[$key] <= $value) { + $_POST['step'] = $redirect['id']; + if (isset($redirect['warning'])) { + $this->warning = $redirect['warning']; + } + return; + } + } + } + } + } + } + public function setCode(callable $function) + { + $this->code = $function; + } +} diff --git a/html/_crypt.php b/html/_crypt.php index dcb2ef3..ef33313 100644 --- a/html/_crypt.php +++ b/html/_crypt.php @@ -1,5 +1,7 @@