- 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
41 lines
2.2 KiB
PHP
41 lines
2.2 KiB
PHP
<h2 class="mb-4"><i class="bi bi-plug"></i> Nieuwe plugin aanmaken</h2>
|
|
|
|
<form method="post" class="card shadow-sm">
|
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrf) ?>">
|
|
|
|
<div class="card-body">
|
|
<?php if (!empty($message)): ?>
|
|
<div class="alert alert-<?= $messageType ?>"><?= htmlspecialchars($message) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="mb-3">
|
|
<label for="plugin_name" class="form-label">Plugin naam</label>
|
|
<input type="text" class="form-control font-monospace" id="plugin_name" name="plugin_name"
|
|
value="<?= htmlspecialchars($_POST['plugin_name'] ?? '') ?>" required
|
|
placeholder="bijv. MijnPlugin">
|
|
<div class="form-text">Alleen letters, cijfers en underscores. Begin met een hoofdletter. Wordt gebruikt als <strong>mapnaam</strong>, <strong>bestandsnaam</strong> en <strong>class naam</strong>.</div>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="plugin_desc" class="form-label">Omschrijving <small class="text-muted">(optioneel)</small></label>
|
|
<textarea class="form-control" id="plugin_desc" name="plugin_desc" rows="3"
|
|
placeholder="Korte omschrijving van wat de plugin doet..."><?= htmlspecialchars($_POST['plugin_desc'] ?? '') ?></textarea>
|
|
<div class="form-text">Wordt opgeslagen als README.md bij de plugin.</div>
|
|
</div>
|
|
|
|
<div class="alert alert-info mb-0">
|
|
<strong><i class="bi bi-lightbulb"></i> Wat wordt er aangemaakt?</strong>
|
|
<ul class="mb-0 mt-2">
|
|
<li><code>plugins/PluginNaam/PluginNaam.php</code> — Hoofdbestand met boilerplate</li>
|
|
<li><code>plugins/PluginNaam/config.json</code> — Configuratiebestand</li>
|
|
<li><code>plugins/PluginNaam/README.md</code> — Documentatie (alleen bij omschrijving)</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-footer text-end">
|
|
<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>
|