isLogin()){ header('Location: ' . BASEDIR . 'login'); } $automations = []; $automationsData = AutomationManager::getAll(); foreach ($automationsData as $automationKey => $automationData) { $automations[$automationData['automation_id']] = [ 'name' => '', 'onDays' => $automationData['on_days'], 'ifSomething' => $automationData['if_something'], 'doSomething' => $automationData['do_something'], ]; } $template = new Template('setting'); $template->prepare('title', 'Automation'); $template->prepare('langMng', $langMng); $template->prepare('automations', $automations); $template->render(); } }