Add CSRF token validation and include tokens in authentication, website manager, and GrapesJS forms and requests. Harden login with password hash verification and session ID regeneration, validate database identifiers and charset, and secure upload MIME detection and filename generation. Update nullable type declarations and PHP syntax across core contracts and modules, switch the Docker image to PHP 8.4, and move the theme script asset to the end of the page. Refresh the PageBuilderBody distribution assets.
158 lines
5.9 KiB
PHP
158 lines
5.9 KiB
PHP
<?php
|
|
|
|
use Plugi\Extensions;
|
|
use Plugi\Repositories\MenuRepository;
|
|
?>
|
|
<!doctype html>
|
|
<html lang="<?= phpb_current_language() ?>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<title><?= phpb_e($page->getTranslation("meta_title")) ?></title>
|
|
<meta name="description" content="<?= phpb_e(
|
|
$page->getTranslation("meta_description"),
|
|
) ?>">
|
|
|
|
|
|
<link href="<?= phpb_asset("icons/duotone/style.css") ?>" rel="stylesheet">
|
|
<link href="<?= phpb_asset("icons/regular/style.css") ?>" rel="stylesheet">
|
|
<link href="<?= phpb_asset("icons/bold/style.css") ?>" rel="stylesheet">
|
|
|
|
<link href="<?= phpb_theme_asset("dist/style.css") ?>" rel="stylesheet">
|
|
<?= Extensions::getHtmlBlocks() ?>
|
|
<?= Extensions::getHeaderAssets() ?>
|
|
<?php phpb_registered_assets('header'); ?>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<?= Extensions::getHtmlBlocks("body-start") ?>
|
|
|
|
<div class="navbar bg-base-100">
|
|
<div class="navbar-start">
|
|
<div class="dropdown">
|
|
<label tabindex="0" class="btn btn-ghost lg:hidden">
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h8m-8 6h16" /></svg>
|
|
</label>
|
|
<ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
|
|
<?php
|
|
$menuRepo = new MenuRepository();
|
|
$mainMenu = $menuRepo->getHydratedMenu("Main");
|
|
?>
|
|
<?php if ($mainMenu): ?>
|
|
<?php foreach ($mainMenu["pages"] as $menuPage): ?>
|
|
<li>
|
|
<a href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e(
|
|
$menuPage["title"],
|
|
) ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<!-- <li>-->
|
|
<!-- <a>Parent</a>-->
|
|
<!-- <ul class="p-2">-->
|
|
<!-- <li><a>Submenu 1</a></li>-->
|
|
<!-- <li><a>Submenu 2</a></li>-->
|
|
<!-- </ul>-->
|
|
<!-- </li>-->
|
|
</ul>
|
|
</div>
|
|
<a class="btn btn-ghost normal-case text-xl">daisyUI</a>
|
|
</div>
|
|
<div class="navbar-center hidden lg:flex">
|
|
<ul class="menu menu-horizontal px-1">
|
|
<?php
|
|
$menuRepo = new MenuRepository();
|
|
$mainMenu = $menuRepo->getHydratedMenu("Main");
|
|
?>
|
|
<?php if ($mainMenu): ?>
|
|
<?php foreach ($mainMenu["pages"] as $menuPage): ?>
|
|
<li>
|
|
<a href="<?= phpb_e($menuPage["route"]) ?>"><?= phpb_e(
|
|
$menuPage["title"],
|
|
) ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<!-- <li tabindex="0">-->
|
|
<!-- <details>-->
|
|
<!-- <summary>Parent</summary>-->
|
|
<!-- <ul class="p-2">-->
|
|
<!-- <li><a>Submenu 1</a></li>-->
|
|
<!-- <li><a>Submenu 2</a></li>-->
|
|
<!-- </ul>-->
|
|
<!-- </details>-->
|
|
<!-- </li>-->
|
|
</ul>
|
|
</div>
|
|
<div class="navbar-end">
|
|
<a class="btn">Button</a>
|
|
</div>
|
|
</div>
|
|
|
|
<main class="#main-content">
|
|
<?= $body ?>
|
|
</main>
|
|
|
|
<footer class="footer footer-center p-4 bg-base-300 text-base-content">
|
|
<div>
|
|
<ul class="flex flex-wrap justify-center items-center mb-6 text-gray-900 dark:text-white">
|
|
<?php
|
|
$menuRepo = new MenuRepository();
|
|
$footerMenu = $menuRepo->getHydratedMenu("Footer");
|
|
?>
|
|
<?php if ($footerMenu): ?>
|
|
<?php foreach ($footerMenu["pages"] as $menuPage): ?>
|
|
<li>
|
|
<a href="<?= phpb_e(
|
|
$menuPage["route"],
|
|
) ?>" class="mr-4 hover:underline md:mr-6 "><?= phpb_e(
|
|
$menuPage["title"],
|
|
) ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<li>
|
|
<div class="dropdown dropdown-hover dropdown-top">
|
|
<label tabindex="0" class="btn m-1 btn-xs"><i class="ph ph-translate"></i></label>
|
|
<ul tabindex="0" class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52">
|
|
<?php
|
|
$menuRepo = new MenuRepository();
|
|
$languageMenu = $menuRepo->getLanguageMenu(
|
|
$page->getTranslation("page_id"),
|
|
);
|
|
?>
|
|
<?php if ($languageMenu): ?>
|
|
<?php foreach ($languageMenu as $lang): ?>
|
|
<li x-data="{emoji: ''}" x-init="emoji = plugi.getFlagEmoji('<?= phpb_e(
|
|
$lang["locale"],
|
|
) ?>')">
|
|
<a href="<?= phpb_e($lang["route"]) ?>">
|
|
<span x-text="emoji"></span>
|
|
<?= phpb_e($lang["title"]) ?>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<p>Copyright © <?= phpb_e(date("Y")) ?></p>
|
|
</div>
|
|
</footer>
|
|
|
|
<script src="<?= phpb_theme_asset("dist/script.js") ?>"></script>
|
|
<!-- Run Plugi script.js files -->
|
|
<script type="text/javascript">
|
|
document.querySelectorAll("script").forEach(function(scriptTag) {
|
|
scriptTag.dispatchEvent(new Event('run-script'));
|
|
});
|
|
</script>
|
|
<?= Extensions::getHtmlBlocks("body-end") ?>
|
|
<?php phpb_registered_assets('footer'); ?>
|
|
|
|
</body>
|
|
</html>
|