mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
refactor: reorganize to standard PHP structure
- Moved /lib → /src (PHP source code)
- Moved /includes → /public/includes (main site templates)
- Admin section remains self-contained in /public/admin with its own /inc
- Updated all require/include paths across codebase
- Updated config/bootstrap.php, justfile, tests, docs
- All tests passing ✅
Structure now follows PHP best practices:
/config - Configuration files
/database - SQLite database + schema
/docs - Documentation (intact)
/nginx - Server config (intact)
/public - Web-accessible files (entry point)
/admin - Self-contained admin interface
/assets - CSS, fonts, icons
/includes - Main site templates (header/footer)
/scripts - Deployment scripts (intact)
/src - PHP source classes (Database, AdminAuth, RateLimit)
/tests - Test suites
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
require_once __DIR__ . '/../config/bootstrap.php';
|
||||
|
||||
// Load required libraries and classes
|
||||
require_once APP_ROOT . '/lib/Database.php';
|
||||
require_once APP_ROOT . '/src/Database.php';
|
||||
|
||||
// Check if an id parameter is provided in the URL
|
||||
if (isset($_GET['id'])) {
|
||||
@@ -29,7 +29,7 @@ if (isset($_GET['id'])) {
|
||||
}
|
||||
|
||||
// Include the header template
|
||||
include APP_ROOT . '/includes/header.php'; ?>
|
||||
include APP_ROOT . '/public/includes/header.php'; ?>
|
||||
<main>
|
||||
<div class="item">
|
||||
<div class="card-content">
|
||||
@@ -151,4 +151,4 @@ include APP_ROOT . '/includes/header.php'; ?>
|
||||
</main>
|
||||
|
||||
<!-- Include the footer template -->
|
||||
<?php include APP_ROOT . '/includes/footer.php'; ?>
|
||||
<?php include APP_ROOT . '/public/includes/footer.php'; ?>
|
||||
Reference in New Issue
Block a user