Clean URLs and security improvements
- Add .htaccess rewrite rules for clean URLs (/nl/page, /admin/route) - Add PHP dev server router with clean URL support - Update admin template asset paths to absolute for clean URL compat - All pentest fixes verified: CSRF on login, directory listing disabled, secure cookies, backup/sourcemap files removed, version disclosure off
This commit is contained in:
+24
-24
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CodePress Admin</title>
|
||||
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="assets/css/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="/assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/assets/css/bootstrap-icons.css">
|
||||
<style>
|
||||
body { background-color: #f5f6fa; min-height: 100vh; }
|
||||
.admin-sidebar { background-color: #0a369d; min-height: 100vh; width: 240px; position: fixed; top: 0; left: 0; z-index: 100; }
|
||||
@@ -25,8 +25,8 @@
|
||||
}
|
||||
</style>
|
||||
<?php if (in_array($route ?? '', ['content-edit', 'content-new', 'plugins-edit'])): ?>
|
||||
<link rel="stylesheet" href="assets/codemirror/codemirror.min.css">
|
||||
<link rel="stylesheet" href="assets/css/editor.css">
|
||||
<link rel="stylesheet" href="/assets/codemirror/codemirror.min.css">
|
||||
<link rel="stylesheet" href="/assets/css/editor.css">
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body>
|
||||
@@ -37,43 +37,43 @@
|
||||
</div>
|
||||
<ul class="nav flex-column mt-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'dashboard' || ($route ?? '') === '' ? 'active' : '' ?>" href="admin.php?route=dashboard">
|
||||
<a class="nav-link <?= ($route ?? '') === 'dashboard' || ($route ?? '') === '' ? 'active' : '' ?>" href="/admin/dashboard">
|
||||
<i class="bi bi-speedometer2"></i> Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'content' || str_starts_with($route ?? '', 'content') ? 'active' : '' ?>" href="admin.php?route=content">
|
||||
<a class="nav-link <?= ($route ?? '') === 'content' || str_starts_with($route ?? '', 'content') ? 'active' : '' ?>" href="/admin/content">
|
||||
<i class="bi bi-file-earmark-text"></i> Content
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'theme' ? 'active' : '' ?>" href="admin.php?route=theme">
|
||||
<a class="nav-link <?= ($route ?? '') === 'theme' ? 'active' : '' ?>" href="/admin/theme">
|
||||
<i class="bi bi-palette"></i> Thema
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'config' ? 'active' : '' ?>" href="admin.php?route=config">
|
||||
<a class="nav-link <?= ($route ?? '') === 'config' ? 'active' : '' ?>" href="/admin/config">
|
||||
<i class="bi bi-sliders"></i> Configuratie
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'plugins' ? 'active' : '' ?>" href="admin.php?route=plugins">
|
||||
<a class="nav-link <?= ($route ?? '') === 'plugins' ? 'active' : '' ?>" href="/admin/plugins">
|
||||
<i class="bi bi-plug"></i> Plugins
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link <?= ($route ?? '') === 'users' ? 'active' : '' ?>" href="admin.php?route=users">
|
||||
<a class="nav-link <?= ($route ?? '') === 'users' ? 'active' : '' ?>" href="/admin/users">
|
||||
<i class="bi bi-people"></i> Gebruikers
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item mt-3">
|
||||
<a class="nav-link" href="index.php" target="_blank">
|
||||
<a class="nav-link" href="/" target="_blank">
|
||||
<i class="bi bi-box-arrow-up-right"></i> Website bekijken
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-warning" href="admin.php?route=logout">
|
||||
<a class="nav-link text-warning" href="/admin/logout">
|
||||
<i class="bi bi-box-arrow-left"></i> Uitloggen
|
||||
</a>
|
||||
</li>
|
||||
@@ -147,19 +147,19 @@
|
||||
?>
|
||||
</main>
|
||||
|
||||
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/bootstrap.bundle.min.js"></script>
|
||||
<?php if (in_array($route ?? '', ['content-edit', 'content-new', 'plugins-edit'])): ?>
|
||||
<script src="assets/codemirror/codemirror.min.js"></script>
|
||||
<script src="assets/codemirror/mode/markdown.min.js"></script>
|
||||
<script src="assets/codemirror/mode/xml.min.js"></script>
|
||||
<script src="assets/codemirror/mode/htmlmixed.min.js"></script>
|
||||
<script src="assets/codemirror/mode/php.min.js"></script>
|
||||
<script src="assets/codemirror/mode/clike.min.js"></script>
|
||||
<script src="assets/codemirror/mode/css.min.js"></script>
|
||||
<script src="assets/codemirror/mode/javascript.min.js"></script>
|
||||
<script src="assets/codemirror/addon/edit/closebrackets.min.js"></script>
|
||||
<script src="assets/codemirror/addon/selection/active-line.min.js"></script>
|
||||
<script src="assets/js/editor-toolbar.js"></script>
|
||||
<script src="/assets/codemirror/codemirror.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/markdown.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/xml.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/htmlmixed.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/php.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/clike.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/css.min.js"></script>
|
||||
<script src="/assets/codemirror/mode/javascript.min.js"></script>
|
||||
<script src="/assets/codemirror/addon/edit/closebrackets.min.js"></script>
|
||||
<script src="/assets/codemirror/addon/selection/active-line.min.js"></script>
|
||||
<script src="/assets/js/editor-toolbar.js"></script>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CodePress Admin - Login</title>
|
||||
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="assets/css/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="/assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/assets/css/bootstrap-icons.css">
|
||||
<style>
|
||||
body { background-color: #f5f6fa; }
|
||||
.login-card { max-width: 400px; margin: 10vh auto; }
|
||||
@@ -26,7 +26,7 @@
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form method="POST" action="admin.php?route=login">
|
||||
<form method="POST" action="/admin/login">
|
||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrfToken) ?>">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Gebruikersnaam</label>
|
||||
@@ -51,10 +51,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-center text-muted mt-3 small">
|
||||
<a href="index.php" class="text-decoration-none"><i class="bi bi-arrow-left"></i> Terug naar website</a>
|
||||
<a href="/" class="text-decoration-none"><i class="bi bi-arrow-left"></i> Terug naar website</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<i class="bi bi-filetype-json"></i> config.json
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=config">
|
||||
<form method="POST" action="/admin/config">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="mb-3">
|
||||
<textarea name="config_content" class="form-control font-monospace" rows="25" style="font-size: 0.9rem; tab-size: 4;"><?= htmlspecialchars($siteConfig) ?></textarea>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<a href="admin.php?route=content&dir=<?= urlencode(dirname($dir) === '.' ? '' : dirname($dir)) ?>" class="btn btn-secondary">Annuleren</a>
|
||||
<a href="/admin/content&dir=<?= urlencode(dirname($dir) === '.' ? '' : dirname($dir)) ?>" class="btn btn-secondary">Annuleren</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Opslaan</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=content-edit&file=<?= urlencode($file) ?>" id="editor-form">
|
||||
<form method="POST" action="/admin/content-edit&file=<?= urlencode($file) ?>" id="editor-form">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-4">
|
||||
@@ -48,7 +48,7 @@
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-check-lg"></i> Opslaan
|
||||
</button>
|
||||
<a href="admin.php?route=content&dir=<?= urlencode(dirname($file)) ?>" class="btn btn-outline-secondary" id="back-btn">Terug</a>
|
||||
<a href="/admin/content&dir=<?= urlencode(dirname($file)) ?>" class="btn btn-outline-secondary" id="back-btn">Terug</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -172,7 +172,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('media-size-form').classList.add('d-none');
|
||||
document.getElementById('media-grid').classList.remove('d-none');
|
||||
pendingFile = null;
|
||||
fetch('admin.php?route=media-list')
|
||||
fetch('/admin/media-list')
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (files) {
|
||||
var grid = document.getElementById('media-grid');
|
||||
@@ -288,7 +288,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
var formData = new FormData(form);
|
||||
formData.append('csrf_token', '<?= $csrf ?>');
|
||||
|
||||
fetch('admin.php?route=media', { method: 'POST', body: formData })
|
||||
fetch('/admin/media', { method: 'POST', body: formData })
|
||||
.then(function () {
|
||||
form.reset();
|
||||
document.getElementById('media-upload-btn').disabled = true;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<a href="admin.php?route=content&dir=<?= urlencode(dirname($item) === '.' ? '' : dirname($item)) ?>" class="btn btn-secondary">Annuleren</a>
|
||||
<a href="/admin/content&dir=<?= urlencode(dirname($item) === '.' ? '' : dirname($item)) ?>" class="btn btn-secondary">Annuleren</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Verplaatsen</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=content-new&dir=<?= urlencode($dir ?? '') ?>" id="editor-form" data-new-page>
|
||||
<form method="POST" action="/admin/content-new&dir=<?= urlencode($dir ?? '') ?>" id="editor-form" data-new-page>
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8">
|
||||
@@ -55,7 +55,7 @@
|
||||
<button type="submit" class="btn btn-primary" id="content-create-btn" disabled>
|
||||
<i class="bi bi-check-lg"></i> Aanmaken
|
||||
</button>
|
||||
<a href="admin.php?route=content&dir=<?= urlencode($dir ?? '') ?>" class="btn btn-outline-secondary" id="back-btn">Terug</a>
|
||||
<a href="/admin/content&dir=<?= urlencode($dir ?? '') ?>" class="btn btn-outline-secondary" id="back-btn">Terug</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -174,7 +174,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
document.getElementById('media-size-form').classList.add('d-none');
|
||||
document.getElementById('media-grid').classList.remove('d-none');
|
||||
pendingFile = null;
|
||||
fetch('admin.php?route=media-list')
|
||||
fetch('/admin/media-list')
|
||||
.then(function (r) { return r.json(); })
|
||||
.then(function (files) {
|
||||
var grid = document.getElementById('media-grid');
|
||||
@@ -289,7 +289,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
var formData = new FormData(form);
|
||||
formData.append('csrf_token', '<?= $csrf ?>');
|
||||
|
||||
fetch('admin.php?route=media', { method: 'POST', body: formData })
|
||||
fetch('/admin/media', { method: 'POST', body: formData })
|
||||
.then(function () {
|
||||
form.reset();
|
||||
document.getElementById('media-upload-btn').disabled = true;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm me-1" data-bs-toggle="modal" data-bs-target="#createDirModal">
|
||||
<i class="bi bi-folder-plus"></i> Nieuwe map
|
||||
</button>
|
||||
<a href="admin.php?route=content-new&dir=<?= urlencode($subdir) ?>" class="btn btn-primary btn-sm">
|
||||
<a href="/admin/content-new&dir=<?= urlencode($subdir) ?>" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus-lg"></i> Nieuw bestand
|
||||
</a>
|
||||
</div>
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="collapse mb-4" id="uploadForm">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=content&dir=<?= urlencode($subdir) ?>" enctype="multipart/form-data">
|
||||
<form method="POST" action="/admin/content&dir=<?= urlencode($subdir) ?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="mb-3">
|
||||
<label for="file" class="form-label">Bestanden selecteren</label>
|
||||
@@ -38,7 +38,7 @@
|
||||
?>
|
||||
<nav aria-label="breadcrumb" class="mb-3">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="admin.php?route=content"><i class="bi bi-house"></i></a></li>
|
||||
<li class="breadcrumb-item"><a href="/admin/content"><i class="bi bi-house"></i></a></li>
|
||||
<?php
|
||||
$crumbPath = '';
|
||||
foreach (explode('/', $subdir) as $i => $crumb):
|
||||
@@ -48,7 +48,7 @@
|
||||
<?php if ($crumbPath === $subdir): ?>
|
||||
<?= htmlspecialchars($crumb) ?>
|
||||
<?php else: ?>
|
||||
<a href="admin.php?route=content&dir=<?= urlencode($crumbPath) ?>"><?= htmlspecialchars($crumb) ?></a>
|
||||
<a href="/admin/content&dir=<?= urlencode($crumbPath) ?>"><?= htmlspecialchars($crumb) ?></a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
@@ -76,11 +76,11 @@
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($item['is_dir']): ?>
|
||||
<a href="admin.php?route=content&dir=<?= urlencode($item['path']) ?>">
|
||||
<a href="/admin/content&dir=<?= urlencode($item['path']) ?>">
|
||||
<i class="bi bi-folder-fill text-warning"></i> <?= htmlspecialchars($item['name']) ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="admin.php?route=content-edit&file=<?= urlencode($item['path']) ?>">
|
||||
<a href="/admin/content-edit&file=<?= urlencode($item['path']) ?>">
|
||||
<?php
|
||||
$icon = match($item['extension']) {
|
||||
'md' => 'bi-file-text text-primary',
|
||||
@@ -104,26 +104,26 @@
|
||||
<td class="text-muted"><?= $item['modified'] ?></td>
|
||||
<td>
|
||||
<?php if ($item['is_dir']): ?>
|
||||
<a href="admin.php?route=content-dir-rename&dir=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-secondary" title="Hernoemen">
|
||||
<a href="/admin/content-dir-rename&dir=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-secondary" title="Hernoemen">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<a href="admin.php?route=content-move&item=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-info" title="Verplaatsen">
|
||||
<a href="/admin/content-move&item=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-info" title="Verplaatsen">
|
||||
<i class="bi bi-arrows-move"></i>
|
||||
</a>
|
||||
<form method="POST" action="admin.php?route=content-dir-delete&dir=<?= urlencode($item['path']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je deze map wilt verwijderen? De map moet leeg zijn.')">
|
||||
<form method="POST" action="/admin/content-dir-delete&dir=<?= urlencode($item['path']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je deze map wilt verwijderen? De map moet leeg zijn.')">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Verwijderen">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<a href="admin.php?route=content-edit&file=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-primary" title="Bewerken">
|
||||
<a href="/admin/content-edit&file=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-primary" title="Bewerken">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<a href="admin.php?route=content-move&item=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-info" title="Verplaatsen">
|
||||
<a href="/admin/content-move&item=<?= urlencode($item['path']) ?>" class="btn btn-sm btn-outline-info" title="Verplaatsen">
|
||||
<i class="bi bi-arrows-move"></i>
|
||||
</a>
|
||||
<form method="POST" action="admin.php?route=content-delete&file=<?= urlencode($item['path']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je dit bestand wilt verwijderen?')">
|
||||
<form method="POST" action="/admin/content-delete&file=<?= urlencode($item['path']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je dit bestand wilt verwijderen?')">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Verwijderen">
|
||||
<i class="bi bi-trash"></i>
|
||||
@@ -143,7 +143,7 @@
|
||||
<div class="modal fade" id="createDirModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="admin.php?route=content-dir-create&dir=<?= urlencode($subdir) ?>">
|
||||
<form method="POST" action="/admin/content-dir-create&dir=<?= urlencode($subdir) ?>">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><i class="bi bi-folder-plus"></i> Nieuwe map aanmaken</h5>
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
<div class="card-header"><i class="bi bi-lightning"></i> Snelle acties</div>
|
||||
<div class="card-body">
|
||||
<div class="d-grid gap-2">
|
||||
<a href="admin.php?route=content-new" class="btn btn-outline-primary"><i class="bi bi-plus-lg"></i> Nieuwe pagina</a>
|
||||
<a href="admin.php?route=config" class="btn btn-outline-secondary"><i class="bi bi-sliders"></i> Configuratie bewerken</a>
|
||||
<a href="admin.php?route=content" class="btn btn-outline-info"><i class="bi bi-folder2-open"></i> Content beheren</a>
|
||||
<a href="/admin/content-new" class="btn btn-outline-primary"><i class="bi bi-plus-lg"></i> Nieuwe pagina</a>
|
||||
<a href="/admin/config" class="btn btn-outline-secondary"><i class="bi bi-sliders"></i> Configuratie bewerken</a>
|
||||
<a href="/admin/content" class="btn btn-outline-info"><i class="bi bi-folder2-open"></i> Content beheren</a>
|
||||
<a href="index.php" target="_blank" class="btn btn-outline-success"><i class="bi bi-box-arrow-up-right"></i> Website bekijken</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="collapse mb-4" id="uploadForm">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=media" enctype="multipart/form-data">
|
||||
<form method="POST" action="/admin/media" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="mb-3">
|
||||
<label for="file" class="form-label">Bestanden selecteren</label>
|
||||
@@ -53,7 +53,7 @@
|
||||
<td class="text-muted small"><?= htmlspecialchars($file['modified']) ?></td>
|
||||
<td><code class="small"><?= htmlspecialchars($file['url']) ?></code></td>
|
||||
<td>
|
||||
<form method="POST" action="admin.php?route=media" class="d-inline" onsubmit="return confirm('Weet je zeker dat je '<?= htmlspecialchars($file['name']) ?>' wilt verwijderen?')">
|
||||
<form method="POST" action="/admin/media" class="d-inline" onsubmit="return confirm('Weet je zeker dat je '<?= htmlspecialchars($file['name']) ?>' wilt verwijderen?')">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="delete" value="<?= htmlspecialchars($file['name']) ?>">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Verwijderen">
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
<?php if (!empty($pluginConfig)): ?>
|
||||
<div class="card-footer text-end">
|
||||
<a href="admin.php?route=plugins" class="btn btn-secondary">Annuleren</a>
|
||||
<a href="/admin/plugins" class="btn btn-secondary">Annuleren</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Opslaan</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
<div class="mt-3">
|
||||
<a href="admin.php?route=plugins" class="btn btn-outline-secondary btn-sm">
|
||||
<a href="/admin/plugins" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-arrow-left"></i> Terug naar plugins
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2><i class="bi bi-pencil"></i> Plugin bewerken: <?= htmlspecialchars($pluginName) ?></h2>
|
||||
<a href="admin.php?route=plugins" class="btn btn-outline-secondary btn-sm">
|
||||
<a href="/admin/plugins" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-arrow-left"></i> Terug
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=plugins-edit&plugin=<?= urlencode($pluginName) ?>" id="editor-form">
|
||||
<form method="POST" action="/admin/plugins-edit&plugin=<?= urlencode($pluginName) ?>" id="editor-form">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="badge bg-secondary">PHP</span>
|
||||
@@ -21,7 +21,7 @@
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-check-lg"></i> Opslaan
|
||||
</button>
|
||||
<a href="admin.php?route=plugins" class="btn btn-outline-secondary">Annuleren</a>
|
||||
<a href="/admin/plugins" class="btn btn-outline-secondary">Annuleren</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-end">
|
||||
<a href="admin.php?route=plugins" class="btn btn-secondary">Annuleren</a>
|
||||
<a href="/admin/plugins" class="btn btn-secondary">Annuleren</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Aanmaken</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2><i class="bi bi-plug"></i> Plugins</h2>
|
||||
<a href="admin.php?route=plugins-new" class="btn btn-primary btn-sm">
|
||||
<a href="/admin/plugins-new" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-plus-lg"></i> Nieuwe plugin
|
||||
</a>
|
||||
</div>
|
||||
@@ -113,23 +113,23 @@
|
||||
<div class="mt-3 d-flex justify-content-between align-items-center">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<?php if ($plugin['has_main']): ?>
|
||||
<a href="admin.php?route=plugins-edit&plugin=<?= urlencode($plugin['name']) ?>" class="btn btn-outline-secondary" title="Bewerken">
|
||||
<a href="/admin/plugins-edit&plugin=<?= urlencode($plugin['name']) ?>" class="btn btn-outline-secondary" title="Bewerken">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<form method="POST" action="admin.php?route=plugins-toggle&plugin=<?= urlencode($plugin['name']) ?>" class="d-inline">
|
||||
<form method="POST" action="/admin/plugins-toggle&plugin=<?= urlencode($plugin['name']) ?>" class="d-inline">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<button type="submit" class="btn btn-sm <?= $plugin['viewable'] ? 'btn-outline-warning' : 'btn-outline-success' ?>" title="<?= $plugin['viewable'] ? 'Verbergen' : 'Tonen' ?>">
|
||||
<i class="bi <?= $plugin['viewable'] ? 'bi-eye-slash' : 'bi-eye' ?>"></i> <?= $plugin['viewable'] ? 'Verberg' : 'Toon' ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php if ($plugin['has_config']): ?>
|
||||
<a href="admin.php?route=plugins-config&plugin=<?= urlencode($plugin['name']) ?>" class="btn btn-outline-primary" title="Configureren">
|
||||
<a href="/admin/plugins-config&plugin=<?= urlencode($plugin['name']) ?>" class="btn btn-outline-primary" title="Configureren">
|
||||
<i class="bi bi-gear"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<form method="POST" action="admin.php?route=plugins-delete&plugin=<?= urlencode($plugin['name']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je de plugin '<?= htmlspecialchars($plugin['name']) ?>' wilt verwijderen? Alle bestanden worden permanent verwijderd.')">
|
||||
<form method="POST" action="/admin/plugins-delete&plugin=<?= urlencode($plugin['name']) ?>" class="d-inline" onsubmit="return confirm('Weet je zeker dat je de plugin '<?= htmlspecialchars($plugin['name']) ?>' wilt verwijderen? Alle bestanden worden permanent verwijderd.')">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger" title="Verwijderen">
|
||||
<i class="bi bi-trash"></i>
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<!-- Edit theme -->
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2><i class="bi bi-palette"></i> Bewerk thema: <?= htmlspecialchars($editTheme['name'] ?? $editThemeName) ?></h2>
|
||||
<a href="admin.php?route=theme" class="btn btn-outline-secondary btn-sm">
|
||||
<a href="/admin/theme" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-arrow-left"></i> Terug
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=theme" enctype="multipart/form-data">
|
||||
<form method="POST" action="/admin/theme" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="save">
|
||||
<input type="hidden" name="theme" value="<?= htmlspecialchars($editThemeName) ?>">
|
||||
@@ -150,7 +150,7 @@
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="bi bi-check-lg"></i> Opslaan
|
||||
</button>
|
||||
<a href="admin.php?route=theme" class="btn btn-outline-secondary">Annuleren</a>
|
||||
<a href="/admin/theme" class="btn btn-outline-secondary">Annuleren</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -169,7 +169,7 @@
|
||||
<div class="collapse mb-4" id="newThemeForm">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=theme" class="row g-3 align-items-end">
|
||||
<form method="POST" action="/admin/theme" class="row g-3 align-items-end">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="create">
|
||||
<div class="col-md-6">
|
||||
@@ -233,11 +233,11 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<a href="admin.php?route=theme&edit=<?= urlencode($themeName) ?>" class="btn btn-outline-primary btn-sm">
|
||||
<a href="/admin/theme&edit=<?= urlencode($themeName) ?>" class="btn btn-outline-primary btn-sm">
|
||||
<i class="bi bi-pencil"></i> Bewerken
|
||||
</a>
|
||||
<?php if ($themeName !== $activeTheme): ?>
|
||||
<form method="POST" action="admin.php?route=theme">
|
||||
<form method="POST" action="/admin/theme">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="activate">
|
||||
<input type="hidden" name="theme" value="<?= htmlspecialchars($themeName) ?>">
|
||||
@@ -247,7 +247,7 @@
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php if ($themeName !== 'default'): ?>
|
||||
<form method="POST" action="admin.php?route=theme">
|
||||
<form method="POST" action="/admin/theme">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="delete">
|
||||
<input type="hidden" name="theme" value="<?= htmlspecialchars($themeName) ?>">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<td class="text-muted"><?= htmlspecialchars($u['created']) ?></td>
|
||||
<td>
|
||||
<!-- Change password -->
|
||||
<form method="POST" action="admin.php?route=users" class="d-inline">
|
||||
<form method="POST" action="/admin/users" class="d-inline">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="change_password">
|
||||
<input type="hidden" name="pw_username" value="<?= htmlspecialchars($u['username']) ?>">
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<?php if ($u['username'] !== $user['username']): ?>
|
||||
<form method="POST" action="admin.php?route=users" class="d-inline ms-1" onsubmit="return confirm('Weet je zeker dat je deze gebruiker wilt verwijderen?')">
|
||||
<form method="POST" action="/admin/users" class="d-inline ms-1" onsubmit="return confirm('Weet je zeker dat je deze gebruiker wilt verwijderen?')">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="delete">
|
||||
<input type="hidden" name="delete_username" value="<?= htmlspecialchars($u['username']) ?>">
|
||||
@@ -64,7 +64,7 @@
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header"><i class="bi bi-person-plus"></i> Gebruiker toevoegen</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="admin.php?route=users">
|
||||
<form method="POST" action="/admin/users">
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
||||
<input type="hidden" name="action" value="add">
|
||||
<div class="mb-3">
|
||||
|
||||
Reference in New Issue
Block a user