name = pathinfo($filepath, PATHINFO_FILENAME); /** * Session */ if (!isset($_SESSION['user']) && isset($_GET['page']) && 'login' !== $_GET['page']) { 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 ''; ?>