name = pathinfo($filepath, PATHINFO_FILENAME); /** * Session */ $disableRedirect = array( 'login', 'register', 'install' ); if (!isset($_SESSION['user']) && isset($_GET['page']) && !in_array($_GET['page'], $disableRedirect)) { header('Location: /?page=login'); die(); } } public function header(): void { ?>
'; /** Default */ $stylesheetDefault = 'includes/assets/css/default.css'; $stylesheetDefaultModified = filemtime($stylesheetDefault); echo ''; /** Page */ $stylesheetPage = 'includes/assets/css/' . $this->name . '.css'; if (file_exists($stylesheetPage)) { $stylesheetPageModified = filemtime($stylesheetPage); echo ''; } /** * Scripts */ /** jQuery */ $scriptjQuery = 'node_modules/jquery/dist/jquery.min.js'; $scriptjQueryModified = filemtime($scriptjQuery); echo ''; /** Fomantic */ $scriptFomantic = 'semantic/dist/semantic.min.js'; $scriptFomanticModified = filemtime($scriptFomantic); echo ''; /** Default */ $scriptDefault = 'includes/assets/js/default.js'; $scriptDefaultModified = filemtime($scriptDefault); echo ''; ?>