- Added network-view.js for visualizing network topology with devices and connections. - Introduced svg-editor.js for managing ports on device types with drag-and-drop functionality. - Created bootstrap.php for application initialization, including configuration and database connection. - Established config.php for centralized configuration settings. - Developed index.php as the main entry point with module-based routing. - Integrated _sql.php for database abstraction. - Added auth.php for single-user authentication handling. - Included helpers.php for utility functions. - Created modules for managing connections, device types, devices, and floors. - Implemented database schema in init.sql for locations, buildings, floors, rooms, network outlets, devices, and connections. - Added Docker support with docker-compose.yml for web and database services. - Documented database structure and UI/UX concepts in respective markdown files.
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* bootstrap.php
|
|
*
|
|
* Initialisierung der Anwendung
|
|
* - Config laden
|
|
* - Session starten
|
|
* - DB-Verbindung über _sql.php
|
|
* - Helper einbinden
|
|
*/
|
|
|
|
/* =========================
|
|
* Config laden
|
|
* ========================= */
|
|
require_once __DIR__ . '/config.php';
|
|
// TODO: Config-Datei mit DB-Zugang, Pfaden, globalen Settings füllen
|
|
|
|
/* =========================
|
|
* Session starten
|
|
* ========================= */
|
|
session_start();
|
|
// TODO: Single-User Auth prüfen
|
|
// z.B. $_SESSION['user'] setzen oder Login erzwingen
|
|
|
|
/* =========================
|
|
* DB-Verbindung initialisieren
|
|
* ========================= */
|
|
require_once __DIR__ . '/lib/_sql.php';
|
|
|
|
// TODO: Host, User, Passwort, DB aus config.php nutzen
|
|
$sql = new SQL(
|
|
DB_HOST, // z.B. localhost
|
|
DB_USER, // z.B. netdoc
|
|
DB_PASSWORD, // z.B. netdoc
|
|
DB_NAME // z.B. netdoc
|
|
);
|
|
|
|
/* =========================
|
|
* Helper laden
|
|
* ========================= */
|
|
require_once __DIR__ . '/lib/helpers.php';
|
|
// TODO: Globale Funktionen: escape, redirect, flash messages, etc.
|
|
|
|
/* =========================
|
|
* Optional: Fehlerbehandlung
|
|
* ========================= */
|
|
// error_reporting(E_ALL);
|
|
// ini_set('display_errors', 1);
|