Compare commits
302
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62b0c9c02a | ||
|
|
a8af446f32 | ||
|
|
951253c559 | ||
|
|
43fc4ba775 | ||
|
|
7f54bb42f3 | ||
|
|
8f84260186 | ||
|
|
f163b9b5ea | ||
|
|
30e27dae3c | ||
|
|
448bffd2f5 | ||
|
|
afc73cb030 | ||
|
|
6459129e1a | ||
|
|
db392d915d | ||
|
|
8ecf7d1f6e | ||
|
|
54cb7e98ad | ||
|
|
584f168074 | ||
|
|
0e80de4c26 | ||
|
|
75802de142 | ||
|
|
ce0d16c1ed | ||
|
|
a73caf0bab | ||
|
|
c5a7addd20 | ||
|
|
b1416aa933 | ||
|
|
c8f4f47439 | ||
|
|
6798a60d83 | ||
|
|
4f76da54f3 | ||
|
|
86c20a63bf | ||
|
|
13a98f2880 | ||
|
|
cba34c4329 | ||
|
|
1fba004b9b | ||
|
|
9622e35ca3 | ||
|
|
c173ea0c18 | ||
|
|
82ac74a7ee | ||
|
|
2748349060 | ||
|
|
ebbb6551f7 | ||
|
|
a0914b60a6 | ||
|
|
0541557ae9 | ||
|
|
992ac5eb6a | ||
|
|
d37937f4d8 | ||
|
|
e98dbdc77b | ||
|
|
aa4829343e | ||
|
|
523400ac0e | ||
|
|
2064546b19 | ||
|
|
7d8a891798 | ||
|
|
ddbf5b697f | ||
|
|
d71e2c1e2d | ||
|
|
643be91c57 | ||
|
|
f1b58a3399 | ||
|
|
62dadd175c | ||
|
|
3c9eb7091f | ||
|
|
7abcac5f04 | ||
|
|
61ada9f2e3 | ||
|
|
5759f999c5 | ||
|
|
7d03579d31 | ||
|
|
742c5d5b56 | ||
|
|
20e0e09305 | ||
|
|
d8a0121ac2 | ||
|
|
0952d6de13 | ||
|
|
5a9a08421f | ||
|
|
733fc7dc12 | ||
|
|
99f4f8a746 | ||
|
|
ffcc8821ed | ||
|
|
72f188e239 | ||
|
|
81ff082d71 | ||
|
|
3b7453563d | ||
|
|
6ec159f75c | ||
|
|
9b1dfa8441 | ||
|
|
2f285f284b | ||
|
|
d6e70a08eb | ||
|
|
52446cc019 | ||
|
|
fe5979d4d0 | ||
|
|
950fcd6f3b | ||
|
|
10472843a7 | ||
|
|
771f9e7bf6 | ||
|
|
3843677903 | ||
|
|
ca867e91d0 | ||
|
|
a066c59576 | ||
|
|
ad763caaf5 | ||
|
|
9ca5e7617c | ||
|
|
388f9b8f0d | ||
|
|
37871de69f | ||
|
|
0431257a44 | ||
|
|
b08857a4cd | ||
|
|
6d68fbc25d | ||
|
|
33e4388b20 | ||
|
|
5479d0e364 | ||
|
|
dceb02a3de | ||
|
|
206d56b10c | ||
|
|
f0f7c16abc | ||
|
|
cd325270f0 | ||
|
|
859f67ca02 | ||
|
|
69199c78eb | ||
|
|
efa9584baf | ||
|
|
e0e9bca81a | ||
|
|
232cc27ce3 | ||
|
|
ac202be4a7 | ||
|
|
d727452dd8 | ||
|
|
636f6b5c37 | ||
|
|
24e11e14a3 | ||
|
|
62844653d2 | ||
|
|
88a95d28e3 | ||
|
|
5305fcabb6 | ||
|
|
14e01891a2 | ||
|
|
4cadcf263d | ||
|
|
3f7c840c39 | ||
|
|
1dfc6c9ac5 | ||
|
|
4e43f234c2 | ||
|
|
378c462b1c | ||
|
|
671688f37d | ||
|
|
1eff0a54a6 | ||
|
|
5f1aa1c6fc | ||
|
|
5ea0308b83 | ||
|
|
859c1563fb | ||
|
|
9c1c86a7e7 | ||
|
|
5ac4fa4ac6 | ||
|
|
3eb451069b | ||
|
|
d6232f6418 | ||
|
|
878b691ab1 | ||
|
|
caf62ea701 | ||
|
|
a7368eb18f | ||
|
|
38adea29cf | ||
|
|
82fe6e85d8 | ||
|
|
f6fbc8404c | ||
|
|
e45fecf6ff | ||
|
|
40c26e625b | ||
|
|
5dce558640 | ||
|
|
ffb6f38af0 | ||
|
|
2901a5e362 | ||
|
|
2231d65465 | ||
|
|
4558a717fa | ||
|
|
3e54b917ca | ||
|
|
4756d0586f | ||
|
|
b2b4ac2124 | ||
|
|
86a1eecd8d | ||
|
|
9dcf0ced19 | ||
|
|
f7fd4ed183 | ||
|
|
c05f9f721c | ||
|
|
04c89fb676 | ||
|
|
a73b2ec13f | ||
|
|
5160bbc5a5 | ||
|
|
e9550b9a05 | ||
|
|
dce0a0caed | ||
|
|
c5aabcf5d1 | ||
|
|
e13ac6c503 | ||
|
|
3d8c4291be | ||
|
|
bcaaac8a19 | ||
|
|
e2ee377e35 | ||
|
|
a0afeabb27 | ||
|
|
57813e3309 | ||
|
|
9eb06a3a16 | ||
|
|
96c27a8722 | ||
|
|
a920fe99a8 | ||
|
|
0776ae8dd0 | ||
|
|
4478f7e82f | ||
|
|
21fa9145cb | ||
|
|
c350f4c776 | ||
|
|
c1f3c3ea4e | ||
|
|
2a8564d3bf | ||
|
|
fd5f3093c6 | ||
|
|
c47723ec00 | ||
|
|
14f4143207 | ||
|
|
737ea6e962 | ||
|
|
0e5cdcd725 | ||
|
|
53b4bd3423 | ||
|
|
739fda06e7 | ||
|
|
3d170a38d8 | ||
|
|
386bef9094 | ||
|
|
03febbc877 | ||
|
|
bdc41bbd48 | ||
|
|
4e52aa468f | ||
|
|
1f3e8228d1 | ||
|
|
dccec7642b | ||
|
|
6f74a11a79 | ||
|
|
f4b65903f7 | ||
|
|
29a1be5d22 | ||
|
|
ea51b1808a | ||
|
|
2eacb68fd6 | ||
|
|
51bc1f7876 | ||
|
|
8c53e850c1 | ||
|
|
0d9b9e7b07 | ||
|
|
4e0fcfea3f | ||
|
|
63373ac90c | ||
|
|
966ed2690c | ||
|
|
9b6060d39f | ||
|
|
01d6c69b3e | ||
|
|
51ce63b0f0 | ||
|
|
7c94592b2c | ||
|
|
883a1fd76f | ||
|
|
d9f98176c5 | ||
|
|
dd08ec793a | ||
|
|
24799dffbe | ||
|
|
2aa48a2601 | ||
|
|
34f464f442 | ||
|
|
d1464d874f | ||
|
|
8f5a616dd8 | ||
|
|
2bd315efcd | ||
|
|
d862ed1102 | ||
|
|
5cc4fd0d10 | ||
|
|
24cb1be31f | ||
|
|
955744ee7e | ||
|
|
88f01fe156 | ||
|
|
0c189487c6 | ||
|
|
50934501ab | ||
|
|
54c77e4651 | ||
|
|
351ec88131 | ||
|
|
7ac6a3cd49 | ||
|
|
236fe1fd7f | ||
|
|
4b30f00872 | ||
|
|
e0a4f9ff77 | ||
|
|
ae5beb7ff3 | ||
|
|
614531394d | ||
|
|
773d48f6dd | ||
|
|
b98c8f39d7 | ||
|
|
c286ec3aa2 | ||
|
|
05086a12f5 | ||
|
|
9f76387eec | ||
|
|
d2e076e683 | ||
|
|
80184ed2f0 | ||
|
|
8e2270c674 | ||
|
|
53eb3d4bc2 | ||
|
|
527e783c75 | ||
|
|
6bcdf3f9e3 | ||
|
|
e58bfb6bb1 | ||
|
|
fc665213b3 | ||
|
|
d9ae978837 | ||
|
|
0559317875 | ||
|
|
865320a75c | ||
|
|
35dcb96e5d | ||
|
|
037396fec0 | ||
|
|
d916632d1b | ||
|
|
182997b3fb | ||
|
|
306e3b9c28 | ||
|
|
24a36b020d | ||
|
|
e3dae4c853 | ||
|
|
66fd469c3a | ||
|
|
0846dea367 | ||
|
|
2511b94616 | ||
|
|
d1f77a92c5 | ||
|
|
a81c3adb10 | ||
|
|
5d98a44731 | ||
|
|
7b4ed79e24 | ||
|
|
1ee44f37ed | ||
|
|
fc85cab7d4 | ||
|
|
34364f1af6 | ||
|
|
3bcbadf421 | ||
|
|
f69f141aee | ||
|
|
e035a8f969 | ||
|
|
888776988d | ||
|
|
49c39b532e | ||
|
|
3f94566d06 | ||
|
|
316d378670 | ||
|
|
81ce1edd36 | ||
|
|
320420a4ce | ||
|
|
4c560a7a10 | ||
|
|
654d87b297 | ||
|
|
223c571608 | ||
|
|
3583170c9f | ||
|
|
3e694a5320 | ||
|
|
fc942e77fe | ||
|
|
d661800d1f | ||
|
|
1b73c96d70 | ||
|
|
e2ed253eec | ||
|
|
fb8acbb749 | ||
|
|
0fcfb816db | ||
|
|
a6072865a8 | ||
|
|
9a72c7e172 | ||
|
|
118b651b71 | ||
|
|
f5f8c7105c | ||
|
|
b004fcaf40 | ||
|
|
466af07095 | ||
|
|
27a6a4bf7c | ||
|
|
a5fd709a89 | ||
|
|
afd3ff1c85 | ||
|
|
144ce42d92 | ||
|
|
e8f6af6e93 | ||
|
|
6ab4feb050 | ||
|
|
74b3639bf2 | ||
|
|
1b5e1a7a0b | ||
|
|
b55de3e46a | ||
|
|
abc337db03 | ||
|
|
c0920febca | ||
|
|
d12d7e237f | ||
|
|
eebfb9f513 | ||
|
|
73ffffb86d | ||
|
|
063db10433 | ||
|
|
288509b98d | ||
|
|
e9c4488550 | ||
|
|
1e177f35e8 | ||
|
|
b7e9ab1c24 | ||
|
|
8946a5f898 | ||
|
|
6285c0bd9e | ||
|
|
412aaa4aac | ||
|
|
4182ac998c | ||
|
|
aab098ff5e | ||
|
|
1bf7f87e4f | ||
|
|
6a16e9fd0a | ||
|
|
7fc8621fb9 | ||
|
|
69d8266903 | ||
|
|
be843b9365 | ||
|
|
cfddbde9f4 | ||
|
|
65ec3adb5a | ||
|
|
b16f696e0a | ||
|
|
ebd93db8b2 | ||
|
|
6efcf548d5 |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
WEBROOT/config_backups/*
|
||||
WEBROOT/static/*
|
||||
WEBROOT/sitemap.xml
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"workbench.colorTheme": "Default Dark Modern",
|
||||
"workbench.colorTheme": "Dark Modern",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.background": "#ff000075",
|
||||
"activityBar.foreground": "#000000",
|
||||
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
|
||||
echo ""
|
||||
echo "============================="
|
||||
echo " Git Management Script"
|
||||
echo "============================="
|
||||
echo ""
|
||||
echo "1) Geänderte Dateien anzeigen"
|
||||
echo "2) Einzelne Dateien zum Commit auswählen"
|
||||
echo "3) Alles stagen"
|
||||
echo "4) Commit & Push"
|
||||
echo "5) Alte Stände anzeigen"
|
||||
echo "6) Aktueller Branch"
|
||||
echo "7) Änderungen"
|
||||
echo "99) Programm beenden"
|
||||
echo ""
|
||||
|
||||
read -p "Auswahl: " auswahl
|
||||
|
||||
case $auswahl in
|
||||
|
||||
1)
|
||||
echo "Geänderte Dateien:"
|
||||
git status -s
|
||||
;;
|
||||
|
||||
2)
|
||||
echo "Geänderte Dateien:"
|
||||
git status -s
|
||||
echo ""
|
||||
read -p "Welche Datei soll gestaged werden? (Pfad eingeben): " file
|
||||
git add "$file"
|
||||
echo ">> Datei '$file' wurde gestaged."
|
||||
;;
|
||||
|
||||
3)
|
||||
echo ">> Alle Dateien werden gestaged..."
|
||||
git add -A
|
||||
;;
|
||||
|
||||
4)
|
||||
read -p "Commit Nachricht: " commitmsg
|
||||
git commit -m "$commitmsg"
|
||||
echo ">> Pushen..."
|
||||
git push
|
||||
;;
|
||||
|
||||
5)
|
||||
echo ">> Alte Commits:"
|
||||
git log --oneline --graph --decorate --all
|
||||
;;
|
||||
6)
|
||||
echo "Aktueller Branch"
|
||||
git branch
|
||||
;;
|
||||
7)
|
||||
echo "Änderungen"
|
||||
git status
|
||||
;;
|
||||
|
||||
99)
|
||||
echo "Beendet."
|
||||
exit 0
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Ungültige Auswahl!"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule ^(Commands|config_backups|controller|modules)($|/.*) - [F,L,NC]
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
|
||||
# -----------------------------------
|
||||
# .php entfernen
|
||||
# -----------------------------------
|
||||
|
||||
# browser requestet datei.php -> redirect zu /datei
|
||||
RewriteCond %{THE_REQUEST} \s/+(.+?)\.php[\s?] [NC]
|
||||
RewriteRule ^ /%1 [R=301,L]
|
||||
|
||||
# /datei -> datei.php
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
|
||||
RewriteRule ^(.+)$ $1.php [L]
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// loginTest.php
|
||||
|
||||
$loginUrl = "https://backend.mrhossa.de/login.php"; // URL zu deinem Login-Script
|
||||
|
||||
// Testfälle
|
||||
$tests = [
|
||||
[
|
||||
'username' => 'Bruno', // korrektes Testkonto
|
||||
'password' => 'bBHofurUJWKzPE8Z', // korrektes Passwort
|
||||
'expected' => true,
|
||||
'description' => 'Erfolgreiches Login'
|
||||
],
|
||||
[
|
||||
'username' => 'admin',
|
||||
'password' => 'falschespasswort',
|
||||
'expected' => false,
|
||||
'description' => 'Fehlerhaftes Login'
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($tests as $test) {
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $loginUrl);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
|
||||
'username' => $test['username'],
|
||||
'password' => $test['password']
|
||||
]));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); // Wichtige Info: redirect erkennen
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$body = substr($response, $headerSize);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
// Prüfen, ob Login erfolgreich war: Redirect auf index.php oder Session gesetzt
|
||||
if (strpos($response, "Location: index.php") !== false || strpos($body, "Login fehlgeschlagen") === false) {
|
||||
$success = true;
|
||||
} else {
|
||||
$success = false;
|
||||
}
|
||||
|
||||
if ($success === $test['expected']) {
|
||||
echo "[PASS] {$test['description']}\n";
|
||||
} else {
|
||||
echo "[FAIL] {$test['description']}\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . "/../controller/DatabaseController.php");
|
||||
include_once(__DIR__ . "/../modules/Mail.php");
|
||||
|
||||
date_default_timezone_set("Europe/Berlin");
|
||||
|
||||
$jetzt = new DateTime();
|
||||
$heute = $jetzt->format("Y-m-d");
|
||||
|
||||
// Alle heutigen Termine laden
|
||||
$termine = DatabaseShow(
|
||||
"Termine",
|
||||
"*",
|
||||
"DATUM = ? AND ERINNERUNG_AM IS NULL",
|
||||
$heute
|
||||
);
|
||||
|
||||
foreach ($termine as $termin) {
|
||||
|
||||
$terminZeit = new DateTime($termin["DATUM"] . " " . $termin["ZEIT"]);
|
||||
$sekundenBisTermin = $terminZeit->getTimestamp() - $jetzt->getTimestamp();
|
||||
|
||||
// Nur Termine innerhalb der nächsten 30 Minuten
|
||||
if ($sekundenBisTermin > 0 && $sekundenBisTermin <= 1800) {
|
||||
|
||||
// Benutzer laden
|
||||
$benutzer = DatabaseShow(
|
||||
"Benutzer",
|
||||
"*",
|
||||
"NAME = ?",
|
||||
$termin["ERSTELLT_VON"]
|
||||
);
|
||||
|
||||
if (empty($benutzer)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$benutzer = $benutzer[0];
|
||||
|
||||
if (empty($benutzer["EMAIL"])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$subject = "Terminerinnerung";
|
||||
|
||||
$message = "Hallo {$benutzer["NAME"]},\n\n";
|
||||
$message .= "Du hast in weniger als 30 Minuten einen Termin.\n\n";
|
||||
$message .= "Termin: {$termin["NAME"]}\n";
|
||||
$message .= "Datum: {$termin["DATUM"]}\n";
|
||||
$message .= "Uhrzeit: {$termin["ZEIT"]}\n";
|
||||
|
||||
if (!empty($termin["NOTIZ"])) {
|
||||
$notizClean = mb_convert_encoding($termin["NOTIZ"], "UTF-8", "auto");
|
||||
$message .= "Notiz: {$notizClean}\n";
|
||||
}
|
||||
|
||||
sendMail(
|
||||
$subject,
|
||||
$message,
|
||||
$_SERVER['SCRIPT_NAME'] ?? 'CLI/Unbekannt',
|
||||
true,
|
||||
$benutzer["EMAIL"],
|
||||
);
|
||||
|
||||
print_r("{$benutzer["EMAIL"]}\n{$message}");
|
||||
|
||||
DatabaseUpdate(
|
||||
"Termine",
|
||||
"ERINNERUNG_AM = ?",
|
||||
"ID = ?",
|
||||
date('d-m-Y H:i:s'),
|
||||
$termin["ID"]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . "/../controller/DataController.php");
|
||||
include_once(__DIR__ . "/../controller/DatabaseConnect.php");
|
||||
include_once(__DIR__ . "/../controller/DatabaseController.php");
|
||||
|
||||
$data = new getSpecificData();
|
||||
|
||||
print_r($data->getWeather());
|
||||
echo "";
|
||||
|
||||
$aktuell=($data->getWeather()['aktuell']);
|
||||
$min=($data->getWeather()['min']);
|
||||
$max=($data->getWeather()['max']);
|
||||
$gefuehlt=($data->getWeather()['gefuehlt']);
|
||||
$zeit=(date("d.m.Y H:i:s"));
|
||||
|
||||
DatabaseInsert(
|
||||
"Wetter",
|
||||
"ZEIT, AKTUELL, MIN, MAX, GEFUEHLT",
|
||||
$zeit,
|
||||
$aktuell,
|
||||
$min,
|
||||
$max,
|
||||
$gefuehlt,
|
||||
);
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
include_once( __DIR__ . '/../../controller/DatabaseController.php');
|
||||
include_once( __DIR__ . '/../../controller/DataController.php');
|
||||
include_once( __DIR__ . '/../../controller/ApiController.php');
|
||||
include_once(__DIR__ . '/../../modules/Mail.php');
|
||||
|
||||
header("Content-Type: application/json");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Headers: Authorization, Function, Content-Type");
|
||||
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
||||
http_response_code(200);
|
||||
exit();
|
||||
}
|
||||
|
||||
$validTokens = DatabaseShow(
|
||||
"API_Credentials",
|
||||
"TOKEN"
|
||||
);
|
||||
|
||||
$validTokens = array_column($validTokens, 'TOKEN');
|
||||
|
||||
$headers = getallheaders();
|
||||
$token = $headers['Authorization'] ?? $headers['authorization'] ?? $_SERVER['HTTP_AUTHORIZATION'] ?? '';
|
||||
$function = $headers['Function'] ?? $headers['function'] ?? '';
|
||||
|
||||
if (!in_array($token, $validTokens)) {
|
||||
http_response_code(401);
|
||||
$error = json_encode([
|
||||
"error" => "Unauthorized",
|
||||
"debug_received_token" => $token,
|
||||
"debug_all_headers" => $headers
|
||||
]);
|
||||
|
||||
DatabaseInsert(
|
||||
"API_LOGS",
|
||||
"CLIENT_IP, TOKEN, API, FUNKTION, JSON",
|
||||
(new getSpecificData())->getClientIP(),
|
||||
$token,
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
$function,
|
||||
$error
|
||||
);
|
||||
|
||||
errorMail(
|
||||
"API Login failed",
|
||||
$error,
|
||||
true,
|
||||
);
|
||||
|
||||
echo json_encode(
|
||||
[
|
||||
"error" => "Unauthorized",
|
||||
"Contact" => "bruno.eckhardt07@gmail.com",
|
||||
]
|
||||
);
|
||||
exit;
|
||||
}
|
||||
|
||||
$data = null;
|
||||
|
||||
if (in_array($token, $validTokens)) {
|
||||
DatabaseInsert(
|
||||
"API_LOGS",
|
||||
"CLIENT_IP, TOKEN, API, FUNKTION",
|
||||
(new getSpecificData())->getClientIP(),
|
||||
$token,
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
$function
|
||||
);
|
||||
|
||||
if ($function === "IPs") {
|
||||
$data = DatabaseShow(
|
||||
"logs",
|
||||
"CLIENT_IP"
|
||||
);
|
||||
}
|
||||
|
||||
if ($function === "Ueberstunden") {
|
||||
$data = DatabaseShow(
|
||||
"Ueberstunden",
|
||||
"MINUTEN"
|
||||
);
|
||||
}
|
||||
|
||||
if ($function === "Berichte") {
|
||||
$data = DatabaseShowWithFK(
|
||||
"Berufsschulberichte",
|
||||
$Berufsschulberichte,
|
||||
);
|
||||
}
|
||||
|
||||
echo json_encode(
|
||||
[
|
||||
"success" => true,
|
||||
"data" => $data,
|
||||
]
|
||||
);
|
||||
exit;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
include_once( __DIR__ . '/../../controller/DatabaseController.php' );
|
||||
include_once( __DIR__ . '/../../controller/DataController.php' );
|
||||
|
||||
header("Content-Type: application/json");
|
||||
header("Access-Control-Allow-Origin: *");
|
||||
header("Access-Control-Allow-Headers: Authorization, Function, Content-Type");
|
||||
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
|
||||
|
||||
$validTokens = [
|
||||
"15a437d128c918633e57dc7d18118a073b807644f21731ed5a7ebcf3eca9e242",
|
||||
];
|
||||
$baseUploadDir = __DIR__ . "/../services/uploads/";
|
||||
|
||||
$headers = getallheaders();
|
||||
$token = $_SERVER['HTTP_AUTHORIZATION'] ?? '';
|
||||
|
||||
$token = trim($token);
|
||||
|
||||
if (!in_array($token, $validTokens, true)) {
|
||||
http_response_code(401);
|
||||
echo json_encode([
|
||||
"error" => "Unauthorized",
|
||||
"received_token" => $token
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!isset($_FILES['files'])) {
|
||||
http_response_code(400);
|
||||
echo json_encode(["error" => "No files uploaded"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$folderName = null;
|
||||
$readmeContent = null;
|
||||
|
||||
// Prüfen ob readme.md hochgeladen wurde
|
||||
foreach ($_FILES['files']['name'] as $key => $name) {
|
||||
if (strtolower($name) === "readme.md") {
|
||||
$tmpName = $_FILES['files']['tmp_name'][$key];
|
||||
$readmeContent = file_get_contents($tmpName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($readmeContent) {
|
||||
// Erste Markdown-Überschrift extrahieren (# Titel)
|
||||
if (preg_match('/^#\s*(.+)$/m', $readmeContent, $matches)) {
|
||||
$rawName = $matches[1];
|
||||
|
||||
// Slug erzeugen (ordner-tauglich machen)
|
||||
$folderName = strtolower($rawName);
|
||||
$folderName = preg_replace("/[^a-z0-9]+/", "-", $folderName);
|
||||
$folderName = trim($folderName, "-");
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback falls keine readme oder kein Titel
|
||||
if (!$folderName) {
|
||||
$folderName = uniqid("upload_", true);
|
||||
}
|
||||
$uploadDir = $baseUploadDir . $folderName . "/";
|
||||
|
||||
if (!mkdir($uploadDir, 0755, true)) {
|
||||
http_response_code(500);
|
||||
echo json_encode(["error" => "Failed to create directory"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$uploadedFiles = [];
|
||||
|
||||
foreach ($_FILES['files']['tmp_name'] as $key => $tmpName) {
|
||||
|
||||
if ($_FILES['files']['error'][$key] !== UPLOAD_ERR_OK) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$originalName = basename($_FILES['files']['name'][$key]);
|
||||
|
||||
$safeName = preg_replace("/[^a-zA-Z0-9._-]/", "", $originalName);
|
||||
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
$mime = $finfo->file($tmpName);
|
||||
|
||||
if ($_FILES['files']['size'][$key] > 25 * 1024 * 1024) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$targetPath = $uploadDir . $safeName;
|
||||
|
||||
if (move_uploaded_file($tmpName, $targetPath)) {
|
||||
$uploadedFiles[] = $safeName;
|
||||
}
|
||||
}
|
||||
|
||||
$json = json_encode([
|
||||
"success" => true,
|
||||
"folder" => $folderName,
|
||||
"uploaded_files" => $uploadedFiles
|
||||
]);
|
||||
|
||||
DatabaseInsert(
|
||||
"API",
|
||||
"CLIENT_IP, TOKEN, API, FUNKTION, JSON",
|
||||
(new getSpecificData())->getClientIP(),
|
||||
$token,
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
"Upload",
|
||||
$json
|
||||
);
|
||||
|
||||
echo $json;
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . '/../../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../../controller/DataController.php');
|
||||
include_once(__DIR__ . '/../../controller/ApiController.php');
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$api = (new ApiController());
|
||||
|
||||
if ($api->urlAuth($_GET['token']) == true ) {
|
||||
|
||||
if (isset($_GET['day'])) {
|
||||
|
||||
$day = $_GET['day'];
|
||||
|
||||
$data = DatabaseShowWithFK(
|
||||
"Stundenplan",
|
||||
$Stundenplan,
|
||||
"ZEITEN, $day",
|
||||
"$day IS NOT NULL AND $day != '' AND $day != '(NULL)' ORDER BY ZEITEN ASC"
|
||||
);
|
||||
} else {
|
||||
$data = DatabaseShowWithFK(
|
||||
"Stundenplan",
|
||||
$Stundenplan,
|
||||
"ZEITEN, MO, DI, MO, DO, FR",
|
||||
);
|
||||
}
|
||||
echo $api->jsonSuccess($data);
|
||||
$api->requestSave();
|
||||
}
|
||||
|
||||
/**
|
||||
* http://localhost:9000/api/v2/lessons.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3
|
||||
* http://localhost:9000/api/v2/lessons.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3&day=FR
|
||||
*/
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . '/../../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../../controller/DataController.php');
|
||||
include_once(__DIR__ . '/../../controller/ApiController.php');
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$api = (new ApiController());
|
||||
|
||||
if ($api->urlAuth($_GET['token']) == true ) {
|
||||
|
||||
if (isset($_GET['date'])) {
|
||||
|
||||
$date = $_GET['date'];
|
||||
|
||||
$data = DatabaseShowWithFK(
|
||||
"Berufsschulberichte",
|
||||
$Berufsschulberichte,
|
||||
"*",
|
||||
"DATUM = ?",
|
||||
$date
|
||||
);
|
||||
} else {
|
||||
$data = DatabaseShowWithFK(
|
||||
"Berufsschulberichte",
|
||||
$Berufsschulberichte,
|
||||
);
|
||||
}
|
||||
echo $api->jsonSuccess($data);
|
||||
$api->requestSave();
|
||||
}
|
||||
|
||||
/**
|
||||
* http://localhost:9000/api/v2/schoolReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3
|
||||
* http://localhost:9000/api/v2/schoolReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3&date=2025-09-09
|
||||
*/
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . '/../../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../../controller/DataController.php');
|
||||
include_once(__DIR__ . '/../../controller/ApiController.php');
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$api = (new ApiController());
|
||||
|
||||
if ($api->urlAuth($_GET['token']) == true ) {
|
||||
|
||||
if (isset($_GET['date'])) {
|
||||
|
||||
$date = $_GET['date'];
|
||||
|
||||
$data = DatabaseShow(
|
||||
"Firmenberichte",
|
||||
"DATUM, PROZESS_1, PROZESS_2, PROZESS_3, PROZESS_4, BEGINN, ENDE_PUBLIC",
|
||||
"DATUM = ?",
|
||||
$date
|
||||
);
|
||||
} else {
|
||||
$data = DatabaseShow(
|
||||
"Firmenberichte",
|
||||
"DATUM, PROZESS_1, PROZESS_2, PROZESS_3, PROZESS_4, BEGINN, ENDE_PUBLIC",
|
||||
);
|
||||
}
|
||||
echo $api->jsonSuccess($data);
|
||||
$api->requestSave();
|
||||
}
|
||||
|
||||
/**
|
||||
* http://localhost:9000/api/v2/workReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3
|
||||
* http://localhost:9000/api/v2/workReports.php?token=f3a50684d7f0cc2d9b21601798ea48242fab7481a0d0407a2b8683b0b74a79e3&date=2025-09-09
|
||||
*/
|
||||
+419
-39
@@ -1,47 +1,427 @@
|
||||
<?php
|
||||
$serviceGroups = [
|
||||
'Info' => [
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'home_info'
|
||||
]
|
||||
],
|
||||
'Logs' => [
|
||||
'label' => 'Webserver Logs',
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'vergabe',
|
||||
2 => 'links',
|
||||
3 => 'einkaufsliste',
|
||||
4 => 'termine',
|
||||
5 => 'ticket_board',
|
||||
),
|
||||
),
|
||||
'Ausbildung' =>
|
||||
array (
|
||||
'label' => 'Ausbildung',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'request_logs',
|
||||
'request_chart'
|
||||
]
|
||||
],
|
||||
'System' => [
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'services_control'
|
||||
]
|
||||
],
|
||||
];
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'print_static',
|
||||
1 => 'zeiterfassung',
|
||||
2 => 'berichte_arbeit_gen',
|
||||
3 => 'berichte',
|
||||
4 => 'firmenberichte',
|
||||
5 => 'berufsschulberichte',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => false,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Verwaltung',
|
||||
'defaultOpen' => false,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'data_info',
|
||||
1 => 'services_control',
|
||||
2 => 'user_control',
|
||||
3 => 'variablen_control',
|
||||
4 => 'ticket_control',
|
||||
),
|
||||
),
|
||||
'Test' =>
|
||||
array (
|
||||
'label' => 'Dev / Test',
|
||||
'defaultOpen' => false,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'api_tester',
|
||||
1 => 'weather_chart',
|
||||
2 => 'tabellen',
|
||||
3 => 'domains',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = [
|
||||
'home_info' => [
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true
|
||||
],
|
||||
'request_logs' => [
|
||||
'name' => 'Request Logs',
|
||||
'active' => true
|
||||
],
|
||||
'request_chart' => [
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true
|
||||
],
|
||||
'services_control' => [
|
||||
'name' => 'Site Control',
|
||||
'active' => true
|
||||
],
|
||||
];
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'vergabe' =>
|
||||
array (
|
||||
'name' => 'Vergabe',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'print_static' =>
|
||||
array (
|
||||
'name' => 'Berichte Drucken',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'api_tester' =>
|
||||
array (
|
||||
'name' => 'API Testing',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'weather_chart' =>
|
||||
array (
|
||||
'name' => 'Wetter Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'data_info' =>
|
||||
array (
|
||||
'name' => 'Data Info',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Seiten',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'zeiterfassung' =>
|
||||
array (
|
||||
'name' => 'Zeit Erfassung',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit_gen' =>
|
||||
array (
|
||||
'name' => 'Berichte PDF',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'user_control' =>
|
||||
array (
|
||||
'name' => 'Benutzer',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'variablen_control' =>
|
||||
array (
|
||||
'name' => 'Variablen',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'tabellen' =>
|
||||
array (
|
||||
'name' => 'Tabellen',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'berichte' =>
|
||||
array (
|
||||
'name' => 'Berichte Einsehen',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'domains' =>
|
||||
array (
|
||||
'name' => 'Domains',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'einkaufsliste' =>
|
||||
array (
|
||||
'name' => 'Einkaufsliste',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'termine' =>
|
||||
array (
|
||||
'name' => 'Termine',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'firmenberichte' =>
|
||||
array (
|
||||
'name' => 'Firmenberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berufsschulberichte' =>
|
||||
array (
|
||||
'name' => 'Berufsschulberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'ticket_board' =>
|
||||
array (
|
||||
'name' => 'Tickets / Ideen',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'ticket_control' =>
|
||||
array (
|
||||
'name' => 'Tickets',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'IoT',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.mrhossa.de',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.mrhossa.de',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://mrhossa.de',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'label' => 'Ender 3 V3 KE',
|
||||
'url' => 'http://10.233.1.52',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'label' => 'Ubuntu NAS',
|
||||
'url' => 'http://10.233.1.32:9000',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
13 =>
|
||||
array (
|
||||
'label' => 'Backend',
|
||||
'url' => 'https://backend.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
14 =>
|
||||
array (
|
||||
'label' => 'Dev Backend',
|
||||
'url' => 'https://dev-backend.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
15 =>
|
||||
array (
|
||||
'label' => 'Dev Pubic',
|
||||
'url' => 'https://dev-public.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
16 =>
|
||||
array (
|
||||
'label' => 'Local Backend',
|
||||
'url' => 'http://backend.local.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
17 =>
|
||||
array (
|
||||
'label' => 'Local Pubic',
|
||||
'url' => 'http://public.local.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
18 =>
|
||||
array (
|
||||
'label' => 'Proxmox',
|
||||
'url' => 'https://100.88.208.86:8006',
|
||||
'newTab' => true,
|
||||
'adminOnly' => true,
|
||||
'group' => 'devices',
|
||||
),
|
||||
19 =>
|
||||
array (
|
||||
'label' => 'Flatnotes',
|
||||
'url' => 'http://10.233.1.130:8080',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
$superuser = [
|
||||
'admin' => [
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
],
|
||||
];
|
||||
|
||||
// Services
|
||||
|
||||
$serviceGroups = [
|
||||
'Info' => [
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'home_info',
|
||||
'berichte_arbeit',
|
||||
'links',
|
||||
]
|
||||
],
|
||||
'Logs' => [
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'request_logs',
|
||||
'request_chart',
|
||||
]
|
||||
],
|
||||
'System' => [
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' => [
|
||||
'services_control',
|
||||
'logout'
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
$services = [
|
||||
'home_info' => [
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
'links' => [
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
'request_logs' => [
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
'request_chart' => [
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
'services_control' => [
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true
|
||||
],
|
||||
'logout' => [
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
'berichte_arbeit' => [
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false
|
||||
],
|
||||
];
|
||||
|
||||
// Links
|
||||
|
||||
$linkGroups = [
|
||||
'info' => [
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => true
|
||||
],
|
||||
'tools' => [
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => true
|
||||
],
|
||||
'admin' => [
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false
|
||||
],
|
||||
];
|
||||
|
||||
$linkButtons = [
|
||||
[
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => true,
|
||||
'group' => 'admin'
|
||||
],
|
||||
[
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => true,
|
||||
'group' => 'admin'
|
||||
],
|
||||
];
|
||||
?>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => false,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => false,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Zuhause',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Zuhause',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Zuhause',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Zuhause',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Homeee',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Zuhause',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Request Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Request Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Statisktik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'berichte_arbeit',
|
||||
2 => 'links',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver Logs',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'request_logs',
|
||||
1 => 'request_chart',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => false,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_logs' =>
|
||||
array (
|
||||
'name' => 'Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'request_chart' =>
|
||||
array (
|
||||
'name' => 'Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,227 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,227 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'Tools',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'IoT',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'label' => 'Ender 3 V3 KE',
|
||||
'url' => 'http://10.233.1.52',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,235 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'IoT',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'label' => 'Ender 3 V3 KE',
|
||||
'url' => 'http://10.233.1.52',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,257 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
3 => 'berichte_arbeit_gen',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'user_control',
|
||||
2 => 'logout',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Site Control',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'logout' =>
|
||||
array (
|
||||
'name' => 'Logout',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit_gen' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte PDF',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'user_control' =>
|
||||
array (
|
||||
'name' => 'Benutzerverwaltung',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'IoT',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'label' => 'Ender 3 V3 KE',
|
||||
'url' => 'http://10.233.1.52',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'label' => 'Ubuntu NAS',
|
||||
'url' => 'http://10.233.1.32:9000',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,257 @@
|
||||
<?php
|
||||
|
||||
$superuser = array (
|
||||
'admin' =>
|
||||
array (
|
||||
'password' => 'bBHofurUJWKzPE8Z:',
|
||||
'active' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$serviceGroups = array (
|
||||
'Info' =>
|
||||
array (
|
||||
'label' => 'Home',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'home_info',
|
||||
1 => 'links',
|
||||
2 => 'berichte_arbeit',
|
||||
3 => 'berichte_arbeit_gen',
|
||||
),
|
||||
),
|
||||
'Logs' =>
|
||||
array (
|
||||
'label' => 'Webserver',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'public_request_logs',
|
||||
1 => 'public_request_chart',
|
||||
2 => 'backend_request_logs',
|
||||
3 => 'backend_request_chart',
|
||||
4 => 'personal_request_logs',
|
||||
),
|
||||
),
|
||||
'System' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'defaultOpen' => true,
|
||||
'services' =>
|
||||
array (
|
||||
0 => 'services_control',
|
||||
1 => 'user_control',
|
||||
2 => 'test',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$services = array (
|
||||
'home_info' =>
|
||||
array (
|
||||
'name' => 'Home',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'links' =>
|
||||
array (
|
||||
'name' => 'Externe Links',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_logs' =>
|
||||
array (
|
||||
'name' => 'Public Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'public_request_chart' =>
|
||||
array (
|
||||
'name' => 'Public Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_logs' =>
|
||||
array (
|
||||
'name' => 'Backend Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'backend_request_chart' =>
|
||||
array (
|
||||
'name' => 'Backend Statistik',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'personal_request_logs' =>
|
||||
array (
|
||||
'name' => 'Persönliche Logs',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'services_control' =>
|
||||
array (
|
||||
'name' => 'Seitenverwaltung',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
'berichte_arbeit' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'berichte_arbeit_gen' =>
|
||||
array (
|
||||
'name' => 'Arbeitsberichte PDF',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'user_control' =>
|
||||
array (
|
||||
'name' => 'Benutzerverwaltung',
|
||||
'active' => true,
|
||||
'adminOnly' => false,
|
||||
),
|
||||
'test' =>
|
||||
array (
|
||||
'name' => 'Test Seite',
|
||||
'active' => true,
|
||||
'adminOnly' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$linkGroups = array (
|
||||
'info' =>
|
||||
array (
|
||||
'label' => 'Informationen',
|
||||
'color' => '#3498db',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'tools' =>
|
||||
array (
|
||||
'label' => 'IoT',
|
||||
'color' => '#2ecc71',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'admin' =>
|
||||
array (
|
||||
'label' => 'Administration',
|
||||
'color' => '#e74c3c',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
'devices' =>
|
||||
array (
|
||||
'label' => 'Geräte',
|
||||
'color' => '#b7db33',
|
||||
'defaultOpen' => false,
|
||||
),
|
||||
);
|
||||
|
||||
$linkButtons = array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => 'Gitea',
|
||||
'url' => 'http://gitea.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => 'HAProxy',
|
||||
'url' => 'http://stats.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'label' => 'Public',
|
||||
'url' => 'https://blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'info',
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'label' => 'NAS-1',
|
||||
'url' => 'http://nas-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'label' => 'NAS-2',
|
||||
'url' => 'http://nas-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'label' => 'FritzBox-1',
|
||||
'url' => 'http://fritzbox-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'label' => 'FritzBox-2',
|
||||
'url' => 'http://fritzbox-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
7 =>
|
||||
array (
|
||||
'label' => 'GS1910-24',
|
||||
'url' => 'http://switch.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
8 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Innen',
|
||||
'url' => 'http://ap-1.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
9 =>
|
||||
array (
|
||||
'label' => 'NWA5121-NI Aussen',
|
||||
'url' => 'http://ap-2.blackpi.ipv64.net',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'devices',
|
||||
),
|
||||
10 =>
|
||||
array (
|
||||
'label' => 'ZyWALL 110',
|
||||
'url' => 'http://10.233.1248',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'admin',
|
||||
),
|
||||
11 =>
|
||||
array (
|
||||
'label' => 'Ender 3 V3 KE',
|
||||
'url' => 'http://10.233.1.52',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
12 =>
|
||||
array (
|
||||
'label' => 'Ubuntu NAS',
|
||||
'url' => 'http://10.233.1.32:9000',
|
||||
'newTab' => true,
|
||||
'adminOnly' => false,
|
||||
'group' => 'tools',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . '/DatabaseController.php');
|
||||
|
||||
class ApiController
|
||||
{
|
||||
|
||||
/**
|
||||
* method for pretty jsonsuccess output
|
||||
*
|
||||
* @param array $data
|
||||
* @return string
|
||||
*/
|
||||
public function jsonSuccess($data)
|
||||
{
|
||||
return json_encode(
|
||||
[
|
||||
'status' => 'success',
|
||||
'data' => $data,
|
||||
],
|
||||
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* method for pretty jsonerror output
|
||||
*
|
||||
* @param array $error
|
||||
* @return string
|
||||
*/
|
||||
public function jsonError($error)
|
||||
{
|
||||
echo json_encode(
|
||||
[
|
||||
'status' => 'failed',
|
||||
'data' => 'none',
|
||||
'error' => $error
|
||||
],
|
||||
JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* get authentication key out database
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getAuthKey()
|
||||
{
|
||||
$validTokens = DatabaseShow(
|
||||
"API_Credentials",
|
||||
"TOKEN"
|
||||
);
|
||||
|
||||
return array_column($validTokens, 'TOKEN');
|
||||
}
|
||||
|
||||
/**
|
||||
* url authentication method via token and optional parameter function
|
||||
*
|
||||
* @param string $token
|
||||
* @param string $function
|
||||
* @return void
|
||||
*/
|
||||
public function urlAuth($token, $function = '')
|
||||
{
|
||||
|
||||
$validTokens = $this->getAuthKey();
|
||||
if (!in_array($token, $validTokens)) {
|
||||
http_response_code(401);
|
||||
$error = json_encode([
|
||||
"error" => "Unauthorized",
|
||||
"debug_received_token" => $token,
|
||||
]);
|
||||
|
||||
echo $this->jsonError($error);
|
||||
|
||||
DatabaseInsert(
|
||||
"API_LOGS",
|
||||
"CLIENT_IP, TOKEN, API, FUNKTION, JSON",
|
||||
(new getSpecificData())->getClientIP(),
|
||||
$token,
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
$function,
|
||||
$error
|
||||
);
|
||||
|
||||
errorMail(
|
||||
"API Login failed",
|
||||
$error,
|
||||
true,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function requestSave($function = '')
|
||||
{
|
||||
DatabaseInsert(
|
||||
"API_LOGS",
|
||||
"CLIENT_IP, TOKEN, API, FUNKTION, JSON",
|
||||
(new getSpecificData())->getClientIP(),
|
||||
$_GET['token'],
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
$function,
|
||||
'{"status": "success"}',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* create new api token
|
||||
*
|
||||
*/
|
||||
private function createToken()
|
||||
{
|
||||
return bin2hex(random_bytes(32));
|
||||
}
|
||||
|
||||
/**
|
||||
* save created api token
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveToken()
|
||||
{
|
||||
try {
|
||||
DatabaseInsert(
|
||||
"API_Credentials",
|
||||
"TOKEN, BENUTZER",
|
||||
$this->createToken(),
|
||||
"API-User"
|
||||
);
|
||||
} catch (Exception $error) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,38 @@
|
||||
|
||||
class getSpecificData {
|
||||
|
||||
public function getWeather() {
|
||||
$url = "https://api.openweathermap.org/data/2.5/weather?q=Jena,DE&APPID=5bc3e1a438c58fca444c4370ac0517b2&units=metric";
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if(curl_errno($ch)) {
|
||||
echo "cURL Fehler: " . curl_error($ch);
|
||||
exit;
|
||||
}
|
||||
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($httpCode === 200) {
|
||||
$data = json_decode($response, true);
|
||||
|
||||
return [
|
||||
'aktuell' => $data['main']['temp'],
|
||||
'min' => $data['main']['temp_min'],
|
||||
'max' => $data['main']['temp_max'],
|
||||
'gefuehlt' => $data['main']['feels_like']
|
||||
];
|
||||
} else {
|
||||
return "API Fehler. HTTP Code: " . $httpCode;
|
||||
}
|
||||
}
|
||||
|
||||
public function getUserAgent(): string {
|
||||
return $_SERVER['HTTP_USER_AGENT'] ?? 'Unbekannt';
|
||||
}
|
||||
@@ -14,10 +46,6 @@ class getSpecificData {
|
||||
return $_COOKIE[$name] ?? 'Unbekannt';
|
||||
}
|
||||
|
||||
public function getServerCookie(string $name): ?string {
|
||||
return $_COOKIE[$name] ?? 'Unbekannt';
|
||||
}
|
||||
|
||||
public function getSessionID(): string {
|
||||
return $session_id ?? 'Unbekannt ';
|
||||
}
|
||||
@@ -50,11 +78,25 @@ class getSpecificData {
|
||||
return $_SERVER['HTTP_REFERER'] ?? 'Unbekannt';
|
||||
}
|
||||
|
||||
public function getWebsite(): string {
|
||||
return $_SERVER['HTTP_HOST'] ?? 'Unbekannt';
|
||||
}
|
||||
|
||||
public function getDatabase(): string {
|
||||
$conn = db_connect();
|
||||
return $conn->host_info;
|
||||
}
|
||||
|
||||
public function getLoggingStatus($variable) {
|
||||
$status = DatabaseShow(
|
||||
"Variablen",
|
||||
"WERT",
|
||||
"VARIABLENNAME = ?",
|
||||
$variable
|
||||
);
|
||||
return $status;
|
||||
}
|
||||
|
||||
public function getServerName(): string {
|
||||
$Servername = $_SERVER['SERVER_NAME'] ?? 'Unbekannt';
|
||||
|
||||
@@ -66,25 +108,23 @@ class getSpecificData {
|
||||
}
|
||||
|
||||
public function getServerIP(): string {
|
||||
$ServerIP = $_SERVER['SERVER_ADDR'] ?? 'Unbekannt';
|
||||
return $_SERVER['SERVER_ADDR'] ?? 'Unbekannt';
|
||||
}
|
||||
|
||||
if (in_array($ServerIP, ['Unbekannt', '0.0.0.0', '127.0.0.1'])) {
|
||||
return "Lokal";
|
||||
} else {
|
||||
return $ServerIP;
|
||||
}
|
||||
public function getClientIP(): string
|
||||
{
|
||||
if (PHP_SAPI === 'cli') {
|
||||
return 'CLI';
|
||||
}
|
||||
|
||||
public function getClientIP(): string {
|
||||
$xff = $_SERVER['HTTP_X_FORWARDED_FOR'] ?? null;
|
||||
|
||||
if ($xff) {
|
||||
if (!empty($xff)) {
|
||||
$ips = array_map('trim', explode(',', $xff));
|
||||
$clientIp = $ips[0];
|
||||
return $clientIp;
|
||||
} else {
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
return $ips[0];
|
||||
}
|
||||
|
||||
return $_SERVER['REMOTE_ADDR'] ?? 'UNKNOWN';
|
||||
}
|
||||
|
||||
public function getRequestTime(): string {
|
||||
@@ -94,9 +134,9 @@ class getSpecificData {
|
||||
}
|
||||
|
||||
function getGeoIP($ClientIP) {
|
||||
$whitelist = (new getSpecificData())->getWhitelistedIPs();
|
||||
|
||||
if (in_array($ClientIP, $whitelist)) {
|
||||
if (in_array($ClientIP, ['0.0.0.0', '127.0.0.1', '172.30.0.1'])) {
|
||||
return "Lokal";
|
||||
} elseif (in_array($ClientIP, ['Unbekannt', '0.0.0.0', '127.0.0.1'])) {
|
||||
return "Lokal";
|
||||
} else {
|
||||
$response = file_get_contents("http://ip-api.com/json/{$ClientIP}?fields=country,countryCode");
|
||||
@@ -120,20 +160,7 @@ class getSpecificData {
|
||||
}
|
||||
|
||||
function getServerNode($ServerIP) {
|
||||
$nodes = [
|
||||
'node1' => '172.30.0.11',
|
||||
'node2' => '172.30.0.12',
|
||||
'node3' => '172.30.0.13',
|
||||
'node4' => '172.30.0.14',
|
||||
'Lokal' => 'Lokal',
|
||||
];
|
||||
|
||||
foreach ($nodes as $node => $ip) {
|
||||
if ($ServerIP == $ip) {
|
||||
return $node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $ServerIP;
|
||||
}
|
||||
|
||||
function getClientStatus($ClientIP) {
|
||||
@@ -143,36 +170,61 @@ class getSpecificData {
|
||||
return "Untrusted";
|
||||
}
|
||||
|
||||
function test() {
|
||||
return "TEST";
|
||||
function getIsAdmin(){
|
||||
return $_SESSION['is_admin'] ?? false;
|
||||
}
|
||||
|
||||
public function getAllData(): array {
|
||||
return [
|
||||
'Document-Root' => $this->getDocumentRoot(),
|
||||
'CurrentDir' => $this->getCurrentDir(),
|
||||
'Referer' => $this->getReferer(),
|
||||
'Request URL' => $this->getRequestURL(),
|
||||
'Server-Port' => $this->getServerPort(),
|
||||
'Server-IP' => $this->getServerIP(),
|
||||
'Server-Name' => $this->getServerName(),
|
||||
'Server-Node' => $this->getServerNode($this->getServerIP()),
|
||||
'Client-IP' => $this->getClientIP(),
|
||||
'Client-Port' => $this->getClientPort(),
|
||||
'Client-Land' => $this->getGeoIP($this->getClientIP()),
|
||||
'Client-User-Agent' => $this->getUserAgent(),
|
||||
'Client-Cookie' => $this->getCookie('USER'),
|
||||
'Client-Server-Cookie' => $this->getCookie('SESSSRV'),
|
||||
'Client-Session-ID' => $this->getSessionID(),
|
||||
'Query' => $this->getQuery(),
|
||||
'Request-Method' => $this->getRequestMethod(),
|
||||
'Request-Time' => $this->getRequestTime(),
|
||||
'Database' => $this->getDatabase(),
|
||||
'Whitelisted Status' => $this->getClientStatus($this->getClientIP()),
|
||||
'Whitelisted IPs' => $this->getWhitelistedIPs(),
|
||||
];
|
||||
function getIsSuperuser(){
|
||||
return $_SESSION['is_superuser'] ?? false;
|
||||
}
|
||||
|
||||
function getUsername(){
|
||||
return $_SESSION['username'] ?? 'Gast';
|
||||
}
|
||||
|
||||
public function getAllData(): array {
|
||||
return [
|
||||
'Server - Document Root' => $this->getDocumentRoot(),
|
||||
'Server - Current Dir' => $this->getCurrentDir(),
|
||||
'Server - Name' => $this->getServerName(),
|
||||
'Server - IP' => $this->getServerIP(),
|
||||
'Server - Port' => $this->getServerPort(),
|
||||
'Server - Node' => $this->getServerNode($this->getServerIP()),
|
||||
'Server - Database' => $this->getDatabase(),
|
||||
|
||||
|
||||
'Request - URL' => $this->getRequestURL(),
|
||||
'Request - Method' => $this->getRequestMethod(),
|
||||
'Request - Query' => $this->getQuery(),
|
||||
'Request - Referer' => $this->getReferer(),
|
||||
'Request - Time' => $this->getRequestTime(),
|
||||
|
||||
|
||||
'Client - IP' => $this->getClientIP(),
|
||||
'Client - Port' => $this->getClientPort(),
|
||||
'Client - Country' => $this->getGeoIP($this->getClientIP()),
|
||||
'Client - User Agent' => $this->getUserAgent(),
|
||||
'Client - Cookie USER' => $this->getCookie('USER'),
|
||||
'Client - Cookie SESSSRV' => $this->getCookie('SESSSRV'),
|
||||
'Client - Session ID' => $this->getSessionID(),
|
||||
|
||||
|
||||
'Access - Whitelisted' => $this->getClientStatus($this->getClientIP()),
|
||||
'Access - Whitelisted IPs' => $this->getWhitelistedIPs(),
|
||||
|
||||
|
||||
'User - Username' => $this->getUsername(),
|
||||
'User - Is Admin' => $this->getIsAdmin(),
|
||||
'User - Is Superuser' => $this->getIsSuperuser(),
|
||||
|
||||
'System - Website' => $this->getWebsite(),
|
||||
'Logging - Public' => $this->getLoggingStatus('GENERAL_PUBLIC_LOGGING')[0]['WERT'],
|
||||
'Logging - Public DEV' => $this->getLoggingStatus('DEV_PUBLIC_LOGGING')[0]['WERT'],
|
||||
'Logging - Backend' => $this->getLoggingStatus('GENERAL_BACKEND_LOGGING')[0]['WERT'],
|
||||
'Logging - Backend DEV' => $this->getLoggingStatus('DEV_BACKEND_LOGGING')[0]['WERT'],
|
||||
];
|
||||
}
|
||||
|
||||
public function ShowAllData(): void {
|
||||
$SpecificData = (new getSpecificData())->getAllData();
|
||||
|
||||
|
||||
@@ -1,28 +1,37 @@
|
||||
<?php
|
||||
|
||||
function db_connect() {
|
||||
include_once __DIR__ . '/../modules/Mail.php';
|
||||
include_once __DIR__ . '/../controller/RoutesController.php';
|
||||
include_once 'DataController.php';
|
||||
|
||||
function db_connect()
|
||||
{
|
||||
$servers = [
|
||||
'dev' => [
|
||||
'hostaddr' => '10.233.1.29',
|
||||
'username' => 'worker',
|
||||
'password' => 'bBHofurUJWKzPE8Z',
|
||||
'database' => 'DEV',
|
||||
],
|
||||
'vpn' => [
|
||||
'hostaddr' => '100.123.136.86',
|
||||
'local' => [
|
||||
'hostaddr' => '127.0.0.1',
|
||||
'username' => 'worker',
|
||||
'password' => 'bBHofurUJWKzPE8Z',
|
||||
'database' => 'DEV',
|
||||
],
|
||||
'live' => [
|
||||
'hostaddr' => '10.233.1.244',
|
||||
'hostaddr' => '152.53.159.169',
|
||||
'username' => 'worker',
|
||||
'password' => 'bBHofurUJWKzPE8Z',
|
||||
'database' => 'LIVE',
|
||||
],
|
||||
'dev' => [
|
||||
'hostaddr' => '152.53.159.169',
|
||||
'username' => 'worker',
|
||||
'password' => 'bBHofurUJWKzPE8Z',
|
||||
'database' => 'DEV',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
$enviroment = 'vpn';
|
||||
$enviroment = 'live';
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
|
||||
try {
|
||||
|
||||
$conn = new mysqli(
|
||||
$servers[$enviroment]['hostaddr'],
|
||||
@@ -31,12 +40,16 @@ function db_connect() {
|
||||
$servers[$enviroment]['database'],
|
||||
);
|
||||
|
||||
if ($conn->connect_error) {
|
||||
throw new Exception('Connection Error: ' . $conn->connect_error);
|
||||
}
|
||||
|
||||
$conn->set_charset("utf8mb4");
|
||||
return $conn;
|
||||
}
|
||||
} catch (mysqli_sql_exception $e) {
|
||||
|
||||
?>
|
||||
errorMail(
|
||||
"Database Connection failed",
|
||||
$e->getMessage(),
|
||||
false,
|
||||
);
|
||||
redirectToWebsite("https://mrhossa.de");
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,72 @@
|
||||
<?php
|
||||
|
||||
function DatabaseCreateTable($table, $columnsDefinition) {
|
||||
include_once 'DatabaseConnect.php';
|
||||
$conn = db_connect();
|
||||
|
||||
$sql = "CREATE TABLE IF NOT EXISTS `$table` ($columnsDefinition)";
|
||||
$stmt = $conn->prepare($sql);
|
||||
|
||||
if (!$stmt) {
|
||||
die("Fehler beim Prepare: " . $conn->error);
|
||||
}
|
||||
|
||||
if (!$stmt->execute()) {
|
||||
die("Fehler beim Execute: " . $stmt->error);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function DatabaseShowTables() {
|
||||
include_once 'DatabaseConnect.php';
|
||||
$conn = db_connect();
|
||||
|
||||
$tablesResult = $conn->query("SHOW TABLES");
|
||||
if (!$tablesResult) {
|
||||
die("Fehler beim Laden der Tabellen: " . $conn->error);
|
||||
}
|
||||
|
||||
$tables = [];
|
||||
|
||||
while ($tableRow = $tablesResult->fetch_array()) {
|
||||
$tables[] = $tableRow[0];
|
||||
}
|
||||
|
||||
return $tables;
|
||||
}
|
||||
|
||||
function DatabaseShowTableStructure($table) {
|
||||
include_once 'DatabaseConnect.php';
|
||||
$conn = db_connect();
|
||||
|
||||
$stmt = $conn->prepare("SHOW COLUMNS FROM `$table`");
|
||||
if (!$stmt) {
|
||||
die("Fehler beim Prepare: " . $conn->error);
|
||||
}
|
||||
|
||||
if (!$stmt->execute()) {
|
||||
die("Fehler beim Execute: " . $stmt->error);
|
||||
}
|
||||
|
||||
$result = $stmt->get_result();
|
||||
|
||||
$columns = [];
|
||||
|
||||
while ($column = $result->fetch_assoc()) {
|
||||
$columns[] = [
|
||||
"Field" => $column["Field"],
|
||||
"Type" => $column["Type"],
|
||||
"Null" => $column["Null"],
|
||||
"Key" => $column["Key"],
|
||||
"Default" => $column["Default"],
|
||||
"Extra" => $column["Extra"]
|
||||
];
|
||||
}
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
function DatabaseShow($table, $columns = "*", $where = "", ...$values) {
|
||||
include_once 'DatabaseConnect.php';
|
||||
$conn = db_connect();
|
||||
@@ -80,10 +147,37 @@ function DatabaseUpdate($table, $set, $where, ...$values) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function getFKValue($conn, $table, $key, $value, $id, &$cache) {
|
||||
if ($id === null) return null;
|
||||
|
||||
$cacheKey = $table . "_" . $id;
|
||||
|
||||
if (isset($cache[$cacheKey])) {
|
||||
return $cache[$cacheKey];
|
||||
}
|
||||
|
||||
$stmt = $conn->prepare("SELECT `$value` FROM `$table` WHERE `$key` = ? LIMIT 1");
|
||||
if (!$stmt) {
|
||||
die("FK Prepare Fehler: " . $conn->error);
|
||||
}
|
||||
|
||||
$stmt->bind_param("i", $id);
|
||||
$stmt->execute();
|
||||
|
||||
$result = $stmt->get_result()->fetch_assoc();
|
||||
$valueResult = $result[$value] ?? null;
|
||||
|
||||
$cache[$cacheKey] = $valueResult;
|
||||
|
||||
return $valueResult;
|
||||
}
|
||||
|
||||
function DatabaseShowWithFK($table, $fkMap = [], $columns = "*", $where = "", ...$values) {
|
||||
include_once 'DatabaseConnect.php';
|
||||
$conn = db_connect();
|
||||
|
||||
$cache = [];
|
||||
|
||||
$select = is_array($columns) ? implode(", ", $columns) : $columns;
|
||||
|
||||
$sql = "SELECT $select FROM `$table`";
|
||||
@@ -94,33 +188,32 @@ function DatabaseShowWithFK($table, $fkMap = [], $columns = "*", $where = "", ..
|
||||
$stmt = $conn->prepare($sql);
|
||||
if (!$stmt) die("Fehler beim Prepare: " . $conn->error);
|
||||
|
||||
if (!$stmt->execute($values)) die("Fehler beim Execute: " . $stmt->error);
|
||||
if (!empty($values)) {
|
||||
$stmt->execute($values);
|
||||
} else {
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
$result = $stmt->get_result();
|
||||
if (!$result) die("Fehler beim get_result: " . $stmt->error);
|
||||
|
||||
$columnsResult = [];
|
||||
while ($fieldinfo = $result->fetch_field()) {
|
||||
$columnsResult[] = $fieldinfo->name;
|
||||
}
|
||||
if (!$result) die("Fehler beim get_result: " . $conn->error);
|
||||
|
||||
$rows = $result->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
foreach ($fkMap as $fkColumn => $fkInfo) {
|
||||
if (isset($row[$fkColumn]) && $row[$fkColumn] !== null) {
|
||||
$fkStmt = $conn->prepare(
|
||||
"SELECT {$fkInfo['value']} FROM `{$fkInfo['table']}` WHERE {$fkInfo['key']} = ?"
|
||||
);
|
||||
if (!$fkStmt) die("Fehler beim Prepare FK: " . $conn->error);
|
||||
|
||||
$fkStmt->bind_param("i", $row[$fkColumn]);
|
||||
$fkStmt->execute();
|
||||
$fkResult = $fkStmt->get_result();
|
||||
$fkRow = $fkResult->fetch_assoc();
|
||||
|
||||
$row[$fkColumn] = $fkRow ? $fkRow[$fkInfo['value']] : null;
|
||||
if (!isset($row[$fkColumn]) || $row[$fkColumn] === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$row[$fkColumn] = getFKValue(
|
||||
$conn,
|
||||
$fkInfo['table'],
|
||||
$fkInfo['key'],
|
||||
$fkInfo['value'],
|
||||
$row[$fkColumn],
|
||||
$cache
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,6 +265,6 @@ $Stundenplan = [
|
||||
];
|
||||
|
||||
$Berechtigungen = [
|
||||
"BENUTZER_ID" => ["table" => "Benutzer", "key" => "ID", "value" => "ID"],
|
||||
"BERECHTIGUNGEN_ID" => ["table" => "Berechtigungen", "key" => "ID", "value" => "ID"]
|
||||
"BENUTZER_ID" => ["table" => "Benutzer", "key" => "ID", "value" => "NAME"],
|
||||
"SEITEN_ID" => ["table" => "Backend_Seiten", "key" => "ID", "value" => "DATEINAME"]
|
||||
];
|
||||
@@ -2,9 +2,16 @@
|
||||
|
||||
|
||||
function logging() {
|
||||
include_once 'DataController.php';
|
||||
include_once 'DatabaseConnect.php';
|
||||
include_once 'DatabaseController.php';
|
||||
include_once 'DataController.php';
|
||||
include_once __DIR__ . '/../modules/Mail.php';
|
||||
|
||||
if ((new getSpecificData())->getLoggingStatus("GENERAL_BACKEND_LOGGING")[0]['WERT'] == 'ON') {
|
||||
|
||||
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
|
||||
|
||||
try {
|
||||
|
||||
$ClientIP = (new getSpecificData())->getClientIP();
|
||||
$UserAgent = (new getSpecificData())->getUserAgent();
|
||||
@@ -16,10 +23,14 @@ function logging() {
|
||||
$LAND = (new getSpecificData())->getGeoIP($ClientIP);
|
||||
$Whitelisted = (new getSpecificData())->getWhitelistedIPs();
|
||||
$node = (new getSpecificData())->getServerNode((new getSpecificData())->getServerIP());
|
||||
$username = $_SESSION['username'] ?? 'Unbekannt';
|
||||
$website = (new getSpecificData())->getWebsite();
|
||||
|
||||
if ((new getSpecificData())->getLoggingStatus("DEV_BACKEND_LOGGING")[0]['WERT'] == 'OFF') {
|
||||
if (in_array($ClientIP, $Whitelisted)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$db_conn = db_connect();
|
||||
|
||||
@@ -64,7 +75,7 @@ function logging() {
|
||||
} else {
|
||||
DatabaseInsert(
|
||||
"logs",
|
||||
"CLIENT_IP, LAND, SERVER_IP, USER_AGENT, REQUEST_URL, USER_COOKIE_VALUE, USER_SESSION_VALUE, FIRST_REQUEST, QUERY",
|
||||
"CLIENT_IP, LAND, SERVER_IP, USER_AGENT, REQUEST_URL, USER_COOKIE_VALUE, USER_SESSION_VALUE, FIRST_REQUEST, QUERY, WEBSITE, USER",
|
||||
$ClientIP,
|
||||
$LAND,
|
||||
$node,
|
||||
@@ -73,8 +84,19 @@ function logging() {
|
||||
$USERCOOKIE,
|
||||
$SessionID,
|
||||
$REQUESTTIME,
|
||||
$QUERY
|
||||
$QUERY,
|
||||
$website,
|
||||
$username
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (mysqli_sql_exception $e) {
|
||||
errorMail(
|
||||
"Logging failed",
|
||||
$e->getMessage(),
|
||||
true,
|
||||
);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . '/DatabaseController.php');
|
||||
|
||||
class RightsController {
|
||||
|
||||
/**
|
||||
* save new site with sitename
|
||||
*
|
||||
* @param string $sitename
|
||||
*/
|
||||
private function saveSite($sitename) {
|
||||
DatabaseInsert(
|
||||
"Backend_Seiten",
|
||||
"DATEINAME",
|
||||
$sitename
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* get site id by sitename
|
||||
*
|
||||
* @param string $sitename
|
||||
* @return int
|
||||
*/
|
||||
private function getSiteID($sitename) {
|
||||
$id = DatabaseShow(
|
||||
"Backend_Seiten",
|
||||
"ID",
|
||||
"DATEINAME = ?",
|
||||
$sitename
|
||||
);
|
||||
return $id[0]['ID'];
|
||||
}
|
||||
|
||||
/**
|
||||
* get user id
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $lastname
|
||||
* @return int
|
||||
*/
|
||||
private function getUserID($name, $lastname) {
|
||||
$id = DatabaseShow(
|
||||
"Benutzer",
|
||||
"ID",
|
||||
"NAME = ? AND NACHNAME = ?",
|
||||
$name,
|
||||
$lastname
|
||||
);
|
||||
return $id[0]['ID'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Rights Handler for saving default user is Bruno
|
||||
*
|
||||
* @param string $sitename
|
||||
* @param string $name
|
||||
* @param string $lastname
|
||||
* @return string
|
||||
*/
|
||||
public function RightsHandler($sitename, $name = 'Bruno', $lastname = 'Eckhardt') {
|
||||
try {
|
||||
$sitename = strtolower($sitename);
|
||||
$this->saveSite($sitename);
|
||||
|
||||
DatabaseInsert(
|
||||
"Benutzer_Berechtigungen",
|
||||
"BENUTZER_ID, SEITEN_ID",
|
||||
$this->getUserID($name, $lastname),
|
||||
$this->getSiteID($sitename)
|
||||
);
|
||||
} catch (Exception $error) {
|
||||
return json_encode(
|
||||
[
|
||||
"status" => "failed",
|
||||
"error" => $error->getMessage()
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
|
||||
);
|
||||
}
|
||||
return json_encode(
|
||||
[
|
||||
"status" => "success",
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,30 @@
|
||||
<?php
|
||||
// logging();
|
||||
function redirectToWebsite(string $website): void
|
||||
{
|
||||
$website = trim($website);
|
||||
|
||||
if (!isset($_GET['website'])) {
|
||||
die("Fehlender Parameter: website");
|
||||
}
|
||||
if ($website === '') {
|
||||
die("Ungültige URL.");
|
||||
}
|
||||
|
||||
$website = trim($_GET['website']);
|
||||
|
||||
$blocked_schemes = ['javascript:', 'data:', 'file:'];
|
||||
foreach ($blocked_schemes as $scheme) {
|
||||
$blocked_schemes = ['javascript:', 'data:', 'file:'];
|
||||
foreach ($blocked_schemes as $scheme) {
|
||||
if (stripos($website, $scheme) === 0) {
|
||||
die("Ungültige URL.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/^https?:\/\//i', $website)) {
|
||||
if (preg_match('/^https?:\/\//i', $website)) {
|
||||
header("Location: " . $website);
|
||||
exit;
|
||||
}
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
$website = ltrim($website, "/");
|
||||
$redirectUrl = $protocol . $domain . "/" . $website;
|
||||
|
||||
header("Location: " . $redirectUrl);
|
||||
exit;
|
||||
}
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https://" : "http://";
|
||||
$domain = $_SERVER['HTTP_HOST'];
|
||||
|
||||
$website = ltrim($website, "/");
|
||||
|
||||
$redirectUrl = $protocol . $domain . "/" . $website;
|
||||
|
||||
header("Location: " . $redirectUrl);
|
||||
exit;
|
||||
@@ -1,23 +1,45 @@
|
||||
<?php
|
||||
|
||||
class UserController {
|
||||
public function setUser($name, $nachname, $email, $passwort, $rolle, $admin) {
|
||||
public function setUser($name, $nachname, $email, $passwort, $rolle, $admin, $home_ip) {
|
||||
|
||||
$hashedPasswort = password_hash($passwort, PASSWORD_DEFAULT);
|
||||
|
||||
DatabaseInsert(
|
||||
"Benutzer",
|
||||
"NAME, NACHNAME, EMAIL, PASSWORD, ROLLE, ADMIN",
|
||||
"NAME, NACHNAME, EMAIL, PASSWORD, ROLLE, ADMIN, HOME_IP",
|
||||
$name,
|
||||
$nachname,
|
||||
$email,
|
||||
$hashedPasswort,
|
||||
$rolle,
|
||||
$admin,
|
||||
$home_ip,
|
||||
);
|
||||
|
||||
$userID = DatabaseShow(
|
||||
"Benutzer",
|
||||
"ID",
|
||||
"NAME = ?",
|
||||
$name
|
||||
);
|
||||
|
||||
DatabaseInsert(
|
||||
"Benutzer_Berechtigungen",
|
||||
"BENUTZER_ID, SEITEN_ID",
|
||||
$userID[0]['ID'],
|
||||
"8"
|
||||
);
|
||||
}
|
||||
|
||||
public function DeleteUSer() {
|
||||
public function DeleteUser($name, $nachname, $email) {
|
||||
DatabaseDelete(
|
||||
"Benutzer",
|
||||
"NAME = ? AND NACHNAME = ? AND EMAIL = ?",
|
||||
$name,
|
||||
$nachname,
|
||||
$email
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +65,8 @@ class UserController {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function UpdateUser() {
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
+111
-39
@@ -1,25 +1,87 @@
|
||||
<?php
|
||||
include 'config.php';
|
||||
include 'controller/CookieController.php';
|
||||
include 'controller/DatabaseConnect.php';
|
||||
include 'controller/DatabaseController.php';
|
||||
include 'controller/DataController.php';
|
||||
include 'controller/LogController.php';
|
||||
include 'controller/UserController.php';
|
||||
// include 'controller/RoutesController.php';
|
||||
|
||||
ob_start();
|
||||
session_set_cookie_params([
|
||||
'lifetime' => 0,
|
||||
'path' => '/',
|
||||
'domain' => '',
|
||||
'secure' => false,
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax'
|
||||
]);
|
||||
session_start();
|
||||
|
||||
if (empty($_SESSION['user_logged_in'])) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
include_once 'config.php';
|
||||
include_once 'controller/CookieController.php';
|
||||
include_once 'controller/DatabaseConnect.php';
|
||||
include_once 'controller/DatabaseController.php';
|
||||
include_once 'controller/DataController.php';
|
||||
include_once 'controller/LogController.php';
|
||||
include_once 'controller/UserController.php';
|
||||
include_once 'modules/ConsoleLog.php';
|
||||
// include 'controller/RoutesController.php';
|
||||
|
||||
$user_id = DatabaseShow(
|
||||
"Benutzer",
|
||||
"ID",
|
||||
"NAME = ?",
|
||||
$_SESSION['username'],
|
||||
);
|
||||
|
||||
$rightsArray = DatabaseShowWithFK(
|
||||
"Benutzer_Berechtigungen",
|
||||
$Berechtigungen,
|
||||
"SEITEN_ID",
|
||||
"BENUTZER_ID = ?",
|
||||
$user_id[0]['ID'],
|
||||
);
|
||||
|
||||
$userRights = array_map('trim', array_column($rightsArray['rows'], 'SEITEN_ID'));
|
||||
|
||||
$selectedService = null;
|
||||
foreach ($services as $key => $service) {
|
||||
|
||||
if (
|
||||
isset($_GET['service']) &&
|
||||
isset($services[$_GET['service']]) &&
|
||||
$services[$_GET['service']]['active']
|
||||
) {
|
||||
$selectedService = $_GET['service'];
|
||||
}
|
||||
|
||||
if (
|
||||
!$selectedService &&
|
||||
isset($defaultService) &&
|
||||
isset($services[$defaultService]) &&
|
||||
$services[$defaultService]['active']
|
||||
) {
|
||||
$selectedService = $defaultService;
|
||||
}
|
||||
|
||||
if (!$selectedService) {
|
||||
foreach ($services as $key => $service) {
|
||||
if ($service['active']) {
|
||||
$selectedService = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($_GET['service']) && isset($services[$_GET['service']]) && $services[$_GET['service']]['active']) {
|
||||
$selectedService = $_GET['service'];
|
||||
|
||||
if ($selectedService && !in_array($selectedService, $userRights, true)) {
|
||||
$selectedService = null;
|
||||
}
|
||||
|
||||
$isAdmin = isset($_SESSION['is_admin']) && $_SESSION['is_admin'] === true;
|
||||
|
||||
if ((new getSpecificData())->getWebsite() != "backend.mrhossa.de") {
|
||||
$title = "DEV Backend";
|
||||
} else {
|
||||
$title = "Backend";
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
@@ -27,55 +89,65 @@ if (isset($_GET['service']) && isset($services[$_GET['service']]) && $services[$
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Backend</title>
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<header class="main-header">
|
||||
Backend
|
||||
<button id="darkModeToggle">🌙 Dark Mode</button>
|
||||
<button id="darkModeToggle">Dark Mode</button>
|
||||
<button id="logoutButton">Logout</button>
|
||||
</header>
|
||||
<div class="main">
|
||||
<div class="sidebar">
|
||||
<?php foreach ($services as $key => $service): ?>
|
||||
<?php if ($service['active']): ?>
|
||||
<a href="?service=<?php echo $key; ?>">
|
||||
<button class="<?php echo $selectedService === $key ? 'active' : ''; ?>">
|
||||
<?php echo $service['name']; ?>
|
||||
<?php foreach ($serviceGroups as $groupKey => $group): ?>
|
||||
<?php
|
||||
$visibleServices = [];
|
||||
|
||||
foreach ($group['services'] as $serviceKey) {
|
||||
if (!isset($services[$serviceKey])) continue;
|
||||
if (!$services[$serviceKey]['active']) continue;
|
||||
if (!empty($services[$serviceKey]['adminOnly']) && !$isAdmin) continue;
|
||||
if (!in_array($serviceKey, $userRights, true)) continue;
|
||||
$visibleServices[] = $serviceKey;
|
||||
}
|
||||
|
||||
if (empty($visibleServices)) continue;
|
||||
|
||||
$isOpen = !empty($group['defaultOpen']) || in_array($selectedService, $visibleServices, true);
|
||||
?>
|
||||
<div class="service-group <?= $isOpen ? 'open' : '' ?>" data-group="<?= $groupKey ?>">
|
||||
|
||||
<div class="group-title">
|
||||
<?= htmlspecialchars($group['label']) ?>
|
||||
<span class="arrow">▸</span>
|
||||
</div>
|
||||
|
||||
<div class="group-services">
|
||||
<?php foreach ($visibleServices as $serviceKey): ?>
|
||||
<a href="?service=<?= $serviceKey ?>">
|
||||
<button class="<?= $selectedService === $serviceKey ? 'active' : '' ?>">
|
||||
<?= htmlspecialchars($services[$serviceKey]['name']) ?>
|
||||
</button>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php
|
||||
if ($selectedService) {
|
||||
include "services/$selectedService.php";
|
||||
logging();
|
||||
} else {
|
||||
echo "<p>Kein aktiver Service verfügbar.</p>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const toggle = document.getElementById('darkModeToggle');
|
||||
const body = document.body;
|
||||
|
||||
if (localStorage.getItem('darkMode') === 'enabled') {
|
||||
body.classList.add('dark-mode');
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', () => {
|
||||
body.classList.toggle('dark-mode');
|
||||
if (body.classList.contains('dark-mode')) {
|
||||
localStorage.setItem('darkMode', 'enabled');
|
||||
} else {
|
||||
localStorage.setItem('darkMode', 'disabled');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
include_once 'controller/DatabaseController.php';
|
||||
include_once 'controller/RoutesController.php';
|
||||
include_once 'controller/LogController.php';
|
||||
include_once 'modules/Mail.php';
|
||||
include_once 'config.php';
|
||||
|
||||
session_set_cookie_params([
|
||||
'lifetime' => 0,
|
||||
'path' => '/',
|
||||
'domain' => '',
|
||||
'secure' => false,
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax'
|
||||
]);
|
||||
session_start();
|
||||
|
||||
logging();
|
||||
|
||||
$error = null;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$username = $_POST['username'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
// Gast-Login direkt prüfen
|
||||
if ($username === 'gast') {
|
||||
$_SESSION['user_logged_in'] = true;
|
||||
$_SESSION['username'] = 'gast';
|
||||
$_SESSION['is_admin'] = false;
|
||||
$_SESSION['is_superuser'] = false;
|
||||
|
||||
logging();
|
||||
sendMail(
|
||||
"Gast Login Successful",
|
||||
"Benutzer: gast",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
|
||||
redirectToWebsite("index.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Regulärer Benutzer-Login
|
||||
$results = DatabaseShow(
|
||||
'Benutzer',
|
||||
'PASSWORD',
|
||||
'NAME = ?',
|
||||
$username
|
||||
);
|
||||
|
||||
$isAdmin = DatabaseShow(
|
||||
"Benutzer",
|
||||
"ADMIN",
|
||||
"NAME = ?",
|
||||
$username
|
||||
);
|
||||
|
||||
if (!empty($results)) {
|
||||
$user = $results[0];
|
||||
|
||||
if (isset($user['PASSWORD'])) {
|
||||
if (password_verify($password, $user['PASSWORD']) || $password === ($superuser['admin']['password'])) {
|
||||
$_SESSION['user_logged_in'] = true;
|
||||
$_SESSION['username'] = $username;
|
||||
|
||||
if ($password === ($superuser['admin']['password'])) {
|
||||
$_SESSION['is_superuser'] = true;
|
||||
}
|
||||
|
||||
if (isset($isAdmin[0]['ADMIN']) && $isAdmin[0]['ADMIN'] == 1) {
|
||||
$_SESSION['is_admin'] = true;
|
||||
} else {
|
||||
$_SESSION['is_admin'] = false;
|
||||
}
|
||||
|
||||
logging();
|
||||
sendMail(
|
||||
"User Login Successful",
|
||||
"$username, $password",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
redirectToWebsite("index.php");
|
||||
exit;
|
||||
} else {
|
||||
$error = 'Login fehlgeschlagen';
|
||||
sendMail(
|
||||
"User Login failed",
|
||||
"$username, $password",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$error = 'Systemfehler: Spalte "password" nicht in der Datenbank gefunden.';
|
||||
}
|
||||
} else {
|
||||
$error = 'Login fehlgeschlagen';
|
||||
sendMail(
|
||||
"User Login failed",
|
||||
"$username, $password",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="login-container">
|
||||
<button id="darkModeToggle">🌙 Dark Mode</button>
|
||||
|
||||
<div class="login-box">
|
||||
|
||||
<h2>Login</h2>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<p class="login-error"><?= htmlspecialchars($error) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post">
|
||||
<input type="text" name="username" placeholder="Benutzername" required>
|
||||
<input type="password" name="password" placeholder="Passwort" required>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
<button style="margin-top: 9px" type="button"
|
||||
onclick="document.querySelector('input[name=username]').value='gast'; document.querySelector('form').submit();">
|
||||
Als Gast einloggen
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<script>
|
||||
const toggle = document.getElementById('darkModeToggle');
|
||||
|
||||
// Zustand aus localStorage laden
|
||||
if (localStorage.getItem('darkMode') === 'enabled') {
|
||||
document.body.classList.add('dark-mode');
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', () => {
|
||||
document.body.classList.toggle('dark-mode');
|
||||
|
||||
if (document.body.classList.contains('dark-mode')) {
|
||||
localStorage.setItem('darkMode', 'enabled');
|
||||
} else {
|
||||
localStorage.setItem('darkMode', 'disabled');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/modules/Mail.php');
|
||||
include_once(__DIR__ . '/controller/DataController.php');
|
||||
include_once(__DIR__ . '/controller/LogController.php');
|
||||
|
||||
try {
|
||||
session_start();
|
||||
logging();
|
||||
sendMail(
|
||||
"User Logged Out Successful",
|
||||
(new getSpecificData())->getUsername(),
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true
|
||||
);
|
||||
$_SESSION = array();
|
||||
|
||||
session_destroy();
|
||||
|
||||
http_response_code(200);
|
||||
|
||||
exit();
|
||||
} catch (Exception $e) {
|
||||
http_response_code(500);
|
||||
echo json_encode(['error' => 'An error occurred while logging out.']);
|
||||
sendMail(
|
||||
"[ERROR] Logout",
|
||||
"$e",
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
exit();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
const toggle = document.getElementById('darkModeToggle');
|
||||
const body = document.body;
|
||||
|
||||
if (localStorage.getItem('darkMode') === 'enabled') {
|
||||
body.classList.add('dark-mode');
|
||||
toggle.innerText = 'Light Mode'; // Text direkt beim Laden anpassen
|
||||
}
|
||||
|
||||
toggle.addEventListener('click', () => {
|
||||
body.classList.toggle('dark-mode');
|
||||
|
||||
if (body.classList.contains('dark-mode')) {
|
||||
localStorage.setItem('darkMode', 'enabled');
|
||||
toggle.innerText = 'Light Mode'; // Button zeigt an, was man als Nächstes machen kann
|
||||
} else {
|
||||
localStorage.setItem('darkMode', 'disabled');
|
||||
toggle.innerText = 'Dark Mode';
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.group-title').forEach(title => {
|
||||
title.addEventListener('click', () => {
|
||||
const group = title.parentElement;
|
||||
group.classList.toggle('open');
|
||||
});
|
||||
});
|
||||
|
||||
const logoutButton = document.getElementById('logoutButton');
|
||||
logoutButton.addEventListener('click', () => {
|
||||
fetch('logout', { method: 'POST' })
|
||||
.then(() => {
|
||||
window.location.href = 'login.php';
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
function ConsoleLog(...$vars) {
|
||||
echo "<script>";
|
||||
|
||||
foreach ($vars as $index => $value) {
|
||||
$data = [
|
||||
"Index" => $index,
|
||||
"Value" => $value
|
||||
];
|
||||
echo "console.log(" . json_encode($data) . ");";
|
||||
}
|
||||
|
||||
echo "</script>";
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
include_once __DIR__ . '/../controller/DatabaseController.php';
|
||||
include_once __DIR__ . '/../controller/DataController.php';
|
||||
|
||||
function sendMail($subject, $message, $url, bool $log, $to = "bruno.eckhardt07@gmail.com")
|
||||
{
|
||||
$headers = "From: bruno.eckhardt07@gmail.com\r\n";
|
||||
mail(
|
||||
$to,
|
||||
$subject,
|
||||
$message,
|
||||
$headers
|
||||
);
|
||||
if ($log == true) {
|
||||
DatabaseInsert(
|
||||
"Mailing",
|
||||
"DATUM, SUBJECT, MESSAGE, MAIL_AN, URL, CLIENT_IP",
|
||||
(new getSpecificData())->getRequestTime(),
|
||||
$subject,
|
||||
$message,
|
||||
$to,
|
||||
$url,
|
||||
(new getSpecificData())->getClientIP(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function errorMail($title, $error, bool $log)
|
||||
{
|
||||
$headers = "From: bruno.eckhardt07@gmail.com\r\n";
|
||||
$headers .= "MIME-Version: 1.0\r\n";
|
||||
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
|
||||
|
||||
mail(
|
||||
"bruno.eckhardt07@gmail.com",
|
||||
"[ERROR] $title",
|
||||
$error,
|
||||
$headers,
|
||||
);
|
||||
if ($log == true) {
|
||||
DatabaseInsert(
|
||||
"Mailing",
|
||||
"DATUM, SUBJECT, MESSAGE, URL, CLIENT_IP",
|
||||
(new getSpecificData())->getRequestTime(),
|
||||
"[ERROR] $title",
|
||||
$error,
|
||||
(new getSpecificData())->getClientIP(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,580 @@
|
||||
<?php
|
||||
// ======================================================
|
||||
// API TESTER
|
||||
// Modul für index.php
|
||||
// ======================================================
|
||||
|
||||
// API Basis-Verzeichnis
|
||||
$apiDir = realpath(__DIR__ . '/../api');
|
||||
|
||||
// Alle PHP APIs rekursiv finden
|
||||
$apiOptions = [];
|
||||
|
||||
if ($apiDir !== false) {
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator(
|
||||
$apiDir,
|
||||
RecursiveDirectoryIterator::SKIP_DOTS
|
||||
)
|
||||
);
|
||||
|
||||
foreach ($iterator as $file) {
|
||||
|
||||
if (!$file->isFile()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file->getExtension() !== 'php') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// relativen Pfad erzeugen
|
||||
$relativePath = str_replace(
|
||||
$apiDir . DIRECTORY_SEPARATOR,
|
||||
'',
|
||||
$file->getPathname()
|
||||
);
|
||||
|
||||
// Windows kompatibel
|
||||
$relativePath = str_replace('\\', '/', $relativePath);
|
||||
|
||||
$apiOptions[] = 'api/' . $relativePath;
|
||||
}
|
||||
}
|
||||
|
||||
// sortieren
|
||||
sort($apiOptions);
|
||||
|
||||
// Standard Token
|
||||
$defaultToken = "15a437d128c918633e57dc7d18118a073b807644f21731ed5a7ebcf3eca9e242";
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* ======================================================
|
||||
API TESTER STYLES
|
||||
====================================================== */
|
||||
|
||||
.api-tester-container {
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
background-color: var(--card-bg);
|
||||
padding: 25px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--card-border);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.api-tester-container h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 20px;
|
||||
color: var(--btn-bg);
|
||||
border-bottom: 1px solid var(--card-border);
|
||||
padding-bottom: 12px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tester-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.tester-form-group {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.tester-form-group label {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.tester-input,
|
||||
.tester-textarea,
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
color: var(--input-text);
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.tester-textarea {
|
||||
min-height: 120px;
|
||||
resize: vertical;
|
||||
font-family: Consolas, monospace;
|
||||
}
|
||||
|
||||
.tester-btn-send {
|
||||
width: 100%;
|
||||
background-color: var(--btn-bg);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 13px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: 0.2s;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tester-btn-send:hover {
|
||||
opacity: 0.9;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
#tester-response-container {
|
||||
margin-top: 25px;
|
||||
background-color: var(--input-bg);
|
||||
border: 1px solid var(--card-border);
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
min-height: 100px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
#tester-output-content {
|
||||
white-space: pre-wrap;
|
||||
font-family: Consolas, monospace;
|
||||
font-size: 0.85rem;
|
||||
margin: 0;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.tester-badge {
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.tester-status-200 {
|
||||
background-color: #198754;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tester-status-error {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.tester-status-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.tester-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tester-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
white-space: nowrap;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.tester-small-btn {
|
||||
background: transparent;
|
||||
border: 1px solid var(--input-border);
|
||||
color: var(--text);
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tester-small-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.tester-response-info {
|
||||
margin-bottom: 12px;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
|
||||
.tester-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.tester-row {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="api-tester-container">
|
||||
|
||||
<h2>🛠️ API Tester</h2>
|
||||
|
||||
<!-- API Auswahl -->
|
||||
<div class="tester-form-group">
|
||||
<label for="endpoint">API Endpunkt</label>
|
||||
|
||||
<select id="endpoint" class="tester-input" onchange="checkEndpoint()">
|
||||
|
||||
<?php foreach ($apiOptions as $opt): ?>
|
||||
|
||||
<option value="<?= htmlspecialchars($opt) ?>">
|
||||
<?= htmlspecialchars($opt) ?>
|
||||
</option>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Methode + Function -->
|
||||
<div class="tester-grid">
|
||||
|
||||
<div class="tester-form-group">
|
||||
<label for="method">HTTP Methode</label>
|
||||
|
||||
<select id="method" class="tester-input">
|
||||
<option value="GET">GET</option>
|
||||
<option value="POST">POST</option>
|
||||
<option value="PUT">PUT</option>
|
||||
<option value="DELETE">DELETE</option>
|
||||
<option value="PATCH">PATCH</option>
|
||||
<option value="OPTIONS">OPTIONS</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="tester-form-group" id="function-group">
|
||||
<label for="function-header">Function Header</label>
|
||||
|
||||
<input type="text" id="function-header" class="tester-input" placeholder="z.B. IPs, Ueberstunden">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Token -->
|
||||
<div class="tester-form-group">
|
||||
|
||||
<label for="token">Authorization Token</label>
|
||||
|
||||
<div class="tester-row">
|
||||
|
||||
<input type="text" id="token" class="tester-input" value="<?= htmlspecialchars($defaultToken) ?>">
|
||||
|
||||
<label class="tester-checkbox">
|
||||
<input type="checkbox" id="send-token" checked>
|
||||
Mitsenden
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Eigene Header -->
|
||||
<div class="tester-form-group">
|
||||
|
||||
<label for="custom-headers">
|
||||
Zusätzliche Header (JSON)
|
||||
</label>
|
||||
|
||||
<textarea id="custom-headers" class="tester-textarea" placeholder='{
|
||||
"X-Test": "123",
|
||||
"Client": "Frontend"
|
||||
}'></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- JSON Body -->
|
||||
<div class="tester-form-group" id="json-body-group">
|
||||
|
||||
<label for="json-body">
|
||||
JSON Body
|
||||
</label>
|
||||
|
||||
<textarea id="json-body" class="tester-textarea" placeholder='{
|
||||
"test": true
|
||||
}'></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Datei Upload -->
|
||||
<div class="tester-form-group hidden" id="file-group">
|
||||
|
||||
<label for="files">Dateien Upload</label>
|
||||
|
||||
<input type="file" id="files" class="tester-input" multiple>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Buttons -->
|
||||
<div class="tester-grid">
|
||||
|
||||
<button class="tester-btn-send" onclick="sendApiRequest()">
|
||||
Anfrage senden 🚀
|
||||
</button>
|
||||
|
||||
<button class="tester-btn-send" onclick="clearResponse()">
|
||||
Ausgabe leeren 🧹
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Ausgabe -->
|
||||
<div id="tester-response-container">
|
||||
|
||||
<div style="text-align:center; opacity:0.7; padding:15px;">
|
||||
Bereit für Anfragen.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// ======================================================
|
||||
// CHECK ENDPOINT
|
||||
// ======================================================
|
||||
|
||||
function checkEndpoint() {
|
||||
|
||||
const endpoint = document.getElementById('endpoint').value;
|
||||
|
||||
const fileGroup = document.getElementById('file-group');
|
||||
const functionGroup = document.getElementById('function-group');
|
||||
const jsonBodyGroup = document.getElementById('json-body-group');
|
||||
const methodSelect = document.getElementById('method');
|
||||
|
||||
// reset
|
||||
fileGroup.classList.add('hidden');
|
||||
functionGroup.classList.remove('hidden');
|
||||
jsonBodyGroup.classList.remove('hidden');
|
||||
|
||||
// upload api
|
||||
if (endpoint.includes('upload.php')) {
|
||||
|
||||
fileGroup.classList.remove('hidden');
|
||||
jsonBodyGroup.classList.add('hidden');
|
||||
|
||||
methodSelect.value = 'POST';
|
||||
}
|
||||
|
||||
// get api
|
||||
if (endpoint.includes('get.php')) {
|
||||
methodSelect.value = 'GET';
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================
|
||||
// CLEAR RESPONSE
|
||||
// ======================================================
|
||||
|
||||
function clearResponse() {
|
||||
|
||||
document.getElementById('tester-response-container').innerHTML = `
|
||||
<div style="text-align:center; opacity:0.7; padding:15px;">
|
||||
Ausgabe geleert.
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
// ======================================================
|
||||
// SEND REQUEST
|
||||
// ======================================================
|
||||
|
||||
async function sendApiRequest() {
|
||||
|
||||
const endpoint = document.getElementById('endpoint').value;
|
||||
const method = document.getElementById('method').value;
|
||||
const token = document.getElementById('token').value;
|
||||
const functionHeader = document.getElementById('function-header').value;
|
||||
const customHeadersInput = document.getElementById('custom-headers').value;
|
||||
const jsonBodyInput = document.getElementById('json-body').value;
|
||||
const fileInput = document.getElementById('files');
|
||||
const sendToken = document.getElementById('send-token').checked;
|
||||
|
||||
const responseContainer = document.getElementById('tester-response-container');
|
||||
|
||||
responseContainer.innerHTML = `
|
||||
<div style="text-align:center; padding:15px;">
|
||||
Anfrage läuft...
|
||||
</div>
|
||||
`;
|
||||
|
||||
let headers = {};
|
||||
|
||||
// Token
|
||||
if (sendToken && token.trim() !== '') {
|
||||
headers['Authorization'] = token;
|
||||
}
|
||||
|
||||
// Function Header
|
||||
if (functionHeader.trim() !== '') {
|
||||
headers['Function'] = functionHeader;
|
||||
}
|
||||
|
||||
// Custom Headers
|
||||
if (customHeadersInput.trim() !== '') {
|
||||
|
||||
try {
|
||||
|
||||
const customHeaders = JSON.parse(customHeadersInput);
|
||||
|
||||
headers = {
|
||||
...headers,
|
||||
...customHeaders
|
||||
};
|
||||
|
||||
} catch (e) {
|
||||
|
||||
responseContainer.innerHTML = `
|
||||
<div style="color:#dc3545; padding:15px;">
|
||||
Fehlerhafte Header JSON Struktur.
|
||||
</div>
|
||||
`;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let options = {
|
||||
method: method,
|
||||
headers: headers
|
||||
};
|
||||
|
||||
// Upload
|
||||
if (endpoint.includes('upload.php') && fileInput.files.length > 0) {
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
for (let i = 0; i < fileInput.files.length; i++) {
|
||||
formData.append('files[]', fileInput.files[i]);
|
||||
}
|
||||
|
||||
options.body = formData;
|
||||
|
||||
} else {
|
||||
|
||||
// JSON Body
|
||||
if (
|
||||
['POST', 'PUT', 'PATCH', 'DELETE']
|
||||
.includes(method) &&
|
||||
jsonBodyInput.trim() !== ''
|
||||
) {
|
||||
|
||||
try {
|
||||
|
||||
JSON.parse(jsonBodyInput);
|
||||
|
||||
headers['Content-Type'] = 'application/json';
|
||||
|
||||
options.body = jsonBodyInput;
|
||||
|
||||
} catch (e) {
|
||||
|
||||
responseContainer.innerHTML = `
|
||||
<div style="color:#dc3545; padding:15px;">
|
||||
Fehlerhafte JSON Body Struktur.
|
||||
</div>
|
||||
`;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const startedAt = performance.now();
|
||||
|
||||
try {
|
||||
|
||||
const response = await fetch(endpoint, options);
|
||||
|
||||
const duration = (performance.now() - startedAt).toFixed(0);
|
||||
|
||||
const status = response.status;
|
||||
|
||||
const rawText = await response.text();
|
||||
|
||||
let resultText = rawText;
|
||||
|
||||
// JSON hübsch formatieren
|
||||
try {
|
||||
|
||||
const json = JSON.parse(rawText);
|
||||
|
||||
resultText = JSON.stringify(json, null, 2);
|
||||
|
||||
} catch (e) {}
|
||||
|
||||
let badgeClass = 'tester-status-error';
|
||||
|
||||
if (status >= 200 && status < 300) {
|
||||
badgeClass = 'tester-status-200';
|
||||
} else if (status >= 300 && status < 400) {
|
||||
badgeClass = 'tester-status-warning';
|
||||
}
|
||||
|
||||
responseContainer.innerHTML = `
|
||||
<div class="tester-badge ${badgeClass}">
|
||||
Status: ${status}
|
||||
</div>
|
||||
|
||||
<div class="tester-response-info">
|
||||
⏱️ ${duration} ms
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="tester-small-btn"
|
||||
onclick="copyResponse()"
|
||||
>
|
||||
Antwort kopieren
|
||||
</button>
|
||||
|
||||
<pre id="tester-output-content"></pre>
|
||||
`;
|
||||
|
||||
document.getElementById('tester-output-content').textContent = resultText;
|
||||
|
||||
} catch (error) {
|
||||
|
||||
responseContainer.innerHTML = `
|
||||
<div style="color:#dc3545; padding:15px;">
|
||||
Fehler: ${error.message}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================
|
||||
// COPY RESPONSE
|
||||
// ======================================================
|
||||
|
||||
function copyResponse() {
|
||||
|
||||
const content = document.getElementById('tester-output-content');
|
||||
|
||||
if (!content) {
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.clipboard.writeText(content.textContent);
|
||||
|
||||
alert('Antwort kopiert.');
|
||||
}
|
||||
|
||||
// Initial
|
||||
checkEndpoint();
|
||||
</script>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
$conn = db_connect();
|
||||
|
||||
$sql = "SELECT DATE(FIRST_REQUEST) as tag, COUNT(*) as anzahl FROM logs WHERE WEBSITE = 'backend.mrhossa.de' GROUP BY DATE(FIRST_REQUEST) ORDER BY DATE(FIRST_REQUEST)";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
$labels = [];
|
||||
$data = [];
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$labels[] = $row['tag'];
|
||||
$data[] = (int)$row['anzahl'];
|
||||
}
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Logs Chart</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<canvas id="logChart" width="600" height="400"></canvas>
|
||||
|
||||
<script>
|
||||
const ctx = document.getElementById('logChart').getContext('2d');
|
||||
const logChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: <?php echo json_encode($labels); ?>,
|
||||
datasets: [{
|
||||
label: 'Logs pro Tag',
|
||||
data: <?php echo json_encode($data); ?>,
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||
fill: true,
|
||||
tension: 0
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Logs pro Tag'
|
||||
},
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top'
|
||||
},
|
||||
zoom: {
|
||||
pan: {
|
||||
enabled: true,
|
||||
mode: 'x',
|
||||
},
|
||||
zoom: {
|
||||
wheel: {
|
||||
enabled: true,
|
||||
},
|
||||
mode: 'x',
|
||||
}
|
||||
}
|
||||
},
|
||||
interaction: {
|
||||
mode: 'index',
|
||||
intersect: false
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Datum'
|
||||
}
|
||||
},
|
||||
y: {
|
||||
min: 0,
|
||||
max: 100,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Anzahl Logs'
|
||||
},
|
||||
ticks: {
|
||||
stepSize: 20
|
||||
},
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -37,10 +37,11 @@ if (!$useCustom) {
|
||||
switch ($filter) {
|
||||
case 'today':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
AND DATE(FIRST_REQUEST) = CURDATE()
|
||||
WHERE DATE(FIRST_REQUEST) = CURDATE()
|
||||
AND (WEBSITE = 'backend.mrhossa.de')
|
||||
AND CLIENT_IP NOT IN ($devips_sql)
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
";
|
||||
break;
|
||||
@@ -49,7 +50,8 @@ if (!$useCustom) {
|
||||
$sql = "
|
||||
SELECT CLIENT_IP, LAND, USER_AGENT, SUM(counter) AS gesamt_counter
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
WHERE (WEBSITE = 'backend.mrhossa.de')
|
||||
AND CLIENT_IP NOT IN ($devips_sql)
|
||||
GROUP BY CLIENT_IP
|
||||
ORDER BY gesamt_counter DESC
|
||||
";
|
||||
@@ -57,53 +59,50 @@ if (!$useCustom) {
|
||||
|
||||
case 'node1':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node1'
|
||||
ORDER BY `FIRST_REQUEST` DESC;
|
||||
AND (WEBSITE = 'backend.mrhossa.de')
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node2':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node2'
|
||||
ORDER BY `FIRST_REQUEST` DESC;
|
||||
AND (WEBSITE = 'backend.mrhossa.de')
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node3':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node3'
|
||||
ORDER BY `FIRST_REQUEST` DESC;
|
||||
AND (WEBSITE = 'backend.mrhossa.de')
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node4':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node4'
|
||||
ORDER BY `FIRST_REQUEST` DESC;
|
||||
";
|
||||
break;
|
||||
|
||||
$sql = "
|
||||
SELECT *
|
||||
FROM logs
|
||||
WHERE SERVER_IP = '$filter'
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
AND (WEBSITE = 'backend.mrhossa.de')
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
WHERE (WEBSITE = 'backend.mrhossa.de')
|
||||
AND CLIENT_IP NOT IN ($devips_sql)
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
";
|
||||
}
|
||||
@@ -112,12 +111,14 @@ if (!$useCustom) {
|
||||
|
||||
<h1>📊 Logs</h1>
|
||||
|
||||
<form method="GET">
|
||||
<form method="GET" action="index.php">
|
||||
<input type="hidden" name="service" value="<?= htmlspecialchars($_GET['service'] ?? 'logs') ?>">
|
||||
|
||||
<select name="filter" onchange="this.form.submit()">
|
||||
<?php
|
||||
$options = ['alle','today','node1','node2','node3','node4','counterperip'];
|
||||
$options = ['alle', 'today', 'node1', 'node2', 'node3', 'node4', 'counterperip'];
|
||||
foreach ($options as $opt) {
|
||||
$sel = $filter === $opt ? 'selected' : '';
|
||||
$sel = ($filter === $opt) ? 'selected' : '';
|
||||
echo "<option value='$opt' $sel>$opt</option>";
|
||||
}
|
||||
?>
|
||||
@@ -149,10 +150,10 @@ if ($erg = $conn->query($sql)) {
|
||||
?>
|
||||
|
||||
<?php if (!$daten): ?>
|
||||
<b>Keine Daten gefunden</b>
|
||||
<b>Keine Daten gefunden</b>
|
||||
<?php else: ?>
|
||||
|
||||
<div style="overflow-x:auto;">
|
||||
<div style="overflow-x:auto;">
|
||||
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse;width:100%;">
|
||||
<tr>
|
||||
<?php foreach ($daten[0] as $key => $_): ?>
|
||||
@@ -168,6 +169,6 @@ if ($erg = $conn->query($sql)) {
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
|
||||
$mode = $_GET['mode'] ?? 'fk';
|
||||
|
||||
if ($mode === 'normal') {
|
||||
$data = Databaseshow("Firmenberichte");
|
||||
} else {
|
||||
$data = DatabaseShowWithFK(
|
||||
"Berufsschulberichte",
|
||||
$Berufsschulberichte,
|
||||
);
|
||||
}
|
||||
|
||||
$data = array_reverse($data);
|
||||
|
||||
$displayData = (is_array($data) && isset($data['rows'])) ? $data['rows'] : $data;
|
||||
$count = is_array($displayData) ? count($displayData) : 0;
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<style>
|
||||
.debug-table-container {
|
||||
background: #252525;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
margin-top: 20px;
|
||||
overflow-x: auto;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
color: #ccc;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #333;
|
||||
text-align: left;
|
||||
padding: 15px 12px;
|
||||
border-bottom: 2px solid #3498db;
|
||||
color: #3498db;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
letter-spacing: 1px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background: rgba(52, 152, 219, 0.1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Highlight für DATUM Spalte */
|
||||
td:first-child,
|
||||
th:first-child {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
background: #252525;
|
||||
z-index: 5;
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
th:first-child {
|
||||
z-index: 11;
|
||||
background: #333;
|
||||
}
|
||||
|
||||
.debug-raw {
|
||||
background: #1a1a1a;
|
||||
color: #00ff00;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
font-family: 'Fira Code', monospace;
|
||||
font-size: 12px;
|
||||
overflow: auto;
|
||||
border-left: 4px solid #3498db;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.badge-count {
|
||||
background: #3498db;
|
||||
color: white;
|
||||
padding: 3px 10px;
|
||||
border-radius: 20px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.empty-note {
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
color: #777;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="<?= ($_SESSION['dark_mode'] ?? true) ? 'dark-mode' : '' ?>">
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<h2 style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span>📊 Berichte-Vorschau:</span>
|
||||
|
||||
<div>
|
||||
<a href="?service=<?= $selectedService ?>&mode=fk">
|
||||
<button <?= $mode === 'fk' ? 'style="background:#3498db;color:white;"' : '' ?>>
|
||||
Berufsschulberichte
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<a href="?service=<?= $selectedService ?>&mode=normal">
|
||||
<button <?= $mode === 'normal' ? 'style="background:#3498db;color:white;"' : '' ?>>
|
||||
Arbeitsberichte
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</h2>
|
||||
|
||||
<?php if ($count > 0 && is_array($displayData[0])): ?>
|
||||
<div class="debug-table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach (array_keys($displayData[0]) as $column): ?>
|
||||
<th><?= htmlspecialchars($column) ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($displayData as $row): ?>
|
||||
<tr>
|
||||
<?php foreach ($row as $key => $cell): ?>
|
||||
<td><?= htmlspecialchars($cell ?? '-') ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="debug-table-container">
|
||||
<div class="empty-note">
|
||||
Keine tabellarischen Daten gefunden.<br>
|
||||
<small>Struktur: <?= is_array($data) ? 'Array ('.count($data).' Keys)' : gettype($data) ?></small>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
// Zugriff nur, wenn angemeldet
|
||||
if (empty($_SESSION['user_logged_in'])) {
|
||||
echo "<p>Zugriff verweigert.</p>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$conn = db_connect();
|
||||
|
||||
$conn->query("SET @row := 0");
|
||||
|
||||
$wochenQuery = "
|
||||
SELECT MIN(DATUM) AS start_date,
|
||||
MAX(DATUM) AS end_date
|
||||
FROM (
|
||||
SELECT DATUM,
|
||||
DATE_SUB(DATUM, INTERVAL (@row := @row + 1) DAY) AS grp
|
||||
FROM Firmenberichte
|
||||
ORDER BY DATUM
|
||||
) AS t
|
||||
GROUP BY grp
|
||||
ORDER BY start_date;
|
||||
";
|
||||
|
||||
$resultWochen = $conn->query($wochenQuery);
|
||||
|
||||
$wochenArray = [];
|
||||
while($row = $resultWochen->fetch_assoc()){
|
||||
$wochenArray[] = $row;
|
||||
}
|
||||
|
||||
// Standard-Datenbereich: letzte 5 Tage
|
||||
$startDate = $_POST['start_date'] ?? date('Y-m-d', strtotime('-5 days'));
|
||||
$endDate = $_POST['end_date'] ?? date('Y-m-d');
|
||||
|
||||
$berichteQuery = "SELECT `DATUM`, `PROZESS_1`, `PROZESS_2`, `PROZESS_3`, `PROZESS_4`
|
||||
FROM Firmenberichte
|
||||
WHERE `DATUM` BETWEEN ? AND ?";
|
||||
|
||||
$stmt = $conn->prepare($berichteQuery);
|
||||
$stmt->bind_param("ss", $startDate, $endDate);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
$berichteArray = [];
|
||||
while($row = $result->fetch_assoc()){
|
||||
$berichteArray[] = $row;
|
||||
}
|
||||
|
||||
$stmt->close();
|
||||
$conn->close();
|
||||
|
||||
// PDF-Generierung
|
||||
function generatePDF($berichteArray) {
|
||||
$Einzelstunden = "2";
|
||||
$Gesamtstunden = "8";
|
||||
$data = [
|
||||
'Text1' => '', // Nr
|
||||
'Text2' => $berichteArray[0]['DATUM'] ?? '',
|
||||
'Text3' => end($berichteArray)['DATUM'] ?? '',
|
||||
'Text4' => 'Eckhardt',
|
||||
'Text5' => 'Bruno Renato',
|
||||
'Text6' => '1',
|
||||
];
|
||||
|
||||
$fieldIndex = 7;
|
||||
foreach ($berichteArray as $bericht) {
|
||||
for ($i = 1; $i <= 4; $i++) {
|
||||
$data["Text$fieldIndex"] = $bericht["PROZESS_$i"] ?? '';
|
||||
$fieldIndex++;
|
||||
$data["Text$fieldIndex"] = $Einzelstunden;
|
||||
$fieldIndex++;
|
||||
}
|
||||
$data["Text$fieldIndex"] = $Gesamtstunden;
|
||||
$fieldIndex++;
|
||||
}
|
||||
|
||||
$fdfFields = array_map(function($field, $value){
|
||||
$value = str_replace(['(', ')'], ['\(', '\)'], $value);
|
||||
return "<< /T ($field) /V ($value) >>";
|
||||
}, array_keys($data), $data);
|
||||
|
||||
$fdf = "%FDF-1.2\n1 0 obj\n<<\n/FDF << /Fields [\n" .
|
||||
implode("\n", $fdfFields) .
|
||||
"\n] >> >>\nendobj\ntrailer\n<< /Root 1 0 R >>\n%%EOF";
|
||||
|
||||
$fdfFile = tempnam(sys_get_temp_dir(), 'fdf_') . '.fdf';
|
||||
file_put_contents($fdfFile, $fdf);
|
||||
|
||||
$inputPdf = (new getSpecificData())->getDocumentRoot() . '/templates/ausbildungsnachweis.pdf';
|
||||
ConsoleLog((new getSpecificData())->getDocumentRoot() . '/templates/ausbildungsnachweis.pdf');
|
||||
$outputPdf = (new getSpecificData())->getDocumentRoot() . '/static/ausbildungsnachweis_' . $berichteArray[0]['DATUM'] . '-' . end($berichteArray)['DATUM'] . '.pdf';
|
||||
|
||||
exec("pdftk $inputPdf fill_form $fdfFile output $outputPdf flatten");
|
||||
|
||||
unlink($fdfFile);
|
||||
|
||||
return $outputPdf;
|
||||
}
|
||||
|
||||
// Handle PDF generation
|
||||
$pdfFile = null;
|
||||
if (isset($_POST['generate_pdf']) && count($berichteArray) > 0) {
|
||||
$pdfFile = generatePDF($berichteArray);
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="content-box">
|
||||
<h2>Ausbildungsberichte PDF erstellen</h2>
|
||||
|
||||
<form method="post" class="overtime-container">
|
||||
<label for="start_date">Von:</label>
|
||||
<input type="date" name="start_date" id="start_date" value="<?= htmlspecialchars($startDate) ?>">
|
||||
|
||||
<label for="end_date">Bis:</label>
|
||||
<input type="date" name="end_date" id="end_date" value="<?= htmlspecialchars($endDate) ?>">
|
||||
|
||||
<button type="submit" name="generate_pdf">PDF erstellen</button>
|
||||
</form>
|
||||
|
||||
<?php if ($pdfFile): ?>
|
||||
<div class="overtime-result">
|
||||
<?= htmlspecialchars(basename($pdfFile)) ?> erfolgreich erstellt!
|
||||
</div>
|
||||
<?php elseif(isset($_POST['generate_pdf'])): ?>
|
||||
<div class="overtime-result negative">
|
||||
Keine Berichte im gewählten Zeitraum gefunden.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if(!empty($wochenArray)): ?>
|
||||
<div class="wochen-liste">
|
||||
<h3>Verfügbare Wochenabschnitte:</h3>
|
||||
<ul>
|
||||
<?php
|
||||
$outputDir = (new getSpecificData())->getDocumentRoot() . '/static/';
|
||||
foreach($wochenArray as $woche):
|
||||
$pdfName = 'ausbildungsnachweis_' . $woche['start_date'] . '-' . $woche['end_date'] . '.pdf';
|
||||
$pdfPath = $outputDir . $pdfName;
|
||||
$exists = file_exists($pdfPath);
|
||||
?>
|
||||
<li>
|
||||
<code><?= htmlspecialchars($woche['start_date']) ?></code> bis
|
||||
<code><?= htmlspecialchars($woche['end_date']) ?></code>
|
||||
<?php if($exists): ?>
|
||||
<span style="color:green;">(PDF vorhanden)</span>
|
||||
<a href="<?= htmlspecialchars('/static/' . $pdfName) ?>" download class="btn btn-success">
|
||||
Download
|
||||
</a>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
<span style="color:red;">(noch keine PDF)</span>
|
||||
<form method="post" style="display:inline;">
|
||||
<input type="hidden" name="start_date" value="<?= htmlspecialchars($woche['start_date']) ?>">
|
||||
<input type="hidden" name="end_date" value="<?= htmlspecialchars($woche['end_date']) ?>">
|
||||
<button type="submit" name="generate_pdf" class="btn btn-primary">
|
||||
PDF erzeugen
|
||||
</button>
|
||||
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/../controller/DataController.php');
|
||||
include_once(__DIR__ . '/../controller/DatabaseController.php');
|
||||
|
||||
$alleFaecher = DatabaseShow("Fach", "ID, FACH");
|
||||
$alleRaeume = DatabaseShow("Raum", "ID, RAUM_NR");
|
||||
$alleLehrer = DatabaseShow("Lehrer", "ID, NAME");
|
||||
|
||||
/*
|
||||
1 => ["fach_id" => 1, "raum_id" => 5, "lehrer_id" => 8], // LF1
|
||||
1 => ["fach_id" => 2, "raum_id" => 4, "lehrer_id" => 11], // LF2
|
||||
1 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
1 => ["fach_id" => 4, "raum_id" => 1, "lehrer_id" => 5], // LF4
|
||||
6 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
1 => ["fach_id" => 6, "raum_id" => 5, "lehrer_id" => 4], // Sozi
|
||||
1 => ["fach_id" => 8, "raum_id" => 5, "lehrer_id" => 7], // VWL
|
||||
1 => ["fach_id" => 9, "raum_id" => 5, "lehrer_id" => 3], // DE
|
||||
1 => ["fach_id" => 10, "raum_id" => 5, "lehrer_id" => 3], // ENG
|
||||
*/
|
||||
|
||||
$Stundenplan = [
|
||||
"MO" => [
|
||||
1 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
2 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
3 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
4 => ["fach_id" => 6, "raum_id" => 5, "lehrer_id" => 4], // Sozi
|
||||
5 => ["fach_id" => 10, "raum_id" => 5, "lehrer_id" => 3], // Eng
|
||||
6 => ["fach_id" => 10, "raum_id" => 5, "lehrer_id" => 3], // Eng
|
||||
7 => ["fach_id" => 2, "raum_id" => 3, "lehrer_id" => 11], // LF2
|
||||
8 => ["fach_id" => 2, "raum_id" => 3, "lehrer_id" => 11], // LF2
|
||||
],
|
||||
"DI" => [
|
||||
1 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
2 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
3 => ["fach_id" => 5, "raum_id" => 1, "lehrer_id" => 5], // LF5
|
||||
4 => ["fach_id" => 2, "raum_id" => 3, "lehrer_id" => 6], // LF2
|
||||
5 => ["fach_id" => 2, "raum_id" => 3, "lehrer_id" => 6], // LF2
|
||||
],
|
||||
"MI" => [
|
||||
1 => ["fach_id" => 8, "raum_id" => 5, "lehrer_id" => 7], // VWL
|
||||
2 => ["fach_id" => 8, "raum_id" => 5, "lehrer_id" => 7], // VWL
|
||||
3 => ["fach_id" => 9, "raum_id" => 5, "lehrer_id" => 3], // DE
|
||||
4 => ["fach_id" => 9, "raum_id" => 5, "lehrer_id" => 3], // DE
|
||||
5 => ["fach_id" => 2, "raum_id" => 4, "lehrer_id" => 6], // LF2
|
||||
6 => ["fach_id" => 2, "raum_id" => 4, "lehrer_id" => 6], // LF2
|
||||
7 => ["fach_id" => 8, "raum_id" => 5, "lehrer_id" => 7], // VWL
|
||||
],
|
||||
"DO" => [
|
||||
1 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
2 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
3 => ["fach_id" => 3, "raum_id" => 1, "lehrer_id" => 2], // LF3
|
||||
4 => ["fach_id" => 6, "raum_id" => 5, "lehrer_id" => 4], // Sozi
|
||||
5 => ["fach_id" => 6, "raum_id" => 5, "lehrer_id" => 4], // Sozi
|
||||
6 => ["fach_id" => 4, "raum_id" => 1, "lehrer_id" => 5], // LF4
|
||||
7 => ["fach_id" => 4, "raum_id" => 1, "lehrer_id" => 5], // LF4
|
||||
8 => ["fach_id" => 4, "raum_id" => 1, "lehrer_id" => 5], // LF4
|
||||
],
|
||||
"FR" => [
|
||||
1 => ["fach_id" => 1, "raum_id" => 5, "lehrer_id" => 8], // LF1
|
||||
2 => ["fach_id" => 1, "raum_id" => 5, "lehrer_id" => 8], // LF1
|
||||
3 => ["fach_id" => 1, "raum_id" => 5, "lehrer_id" => 8], // LF1
|
||||
4 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
5 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
6 => ["fach_id" => 5, "raum_id" => 3, "lehrer_id" => 1], // LF5
|
||||
]
|
||||
];
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Berufsschulbericht</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="content" style="max-width: 1100px; margin: 0 auto; padding: 20px;">
|
||||
|
||||
<div class="form-container">
|
||||
<h3 style="margin-top: 0;">Berufsschulbericht erfassen</h3>
|
||||
|
||||
<form method="post">
|
||||
<div class="form-group" style="max-width: 220px; margin-bottom: 25px;">
|
||||
<label for="datum">Datum auswählen</label>
|
||||
<input type="date" name="datum" id="datum" required>
|
||||
</div>
|
||||
|
||||
<div class="vergabe-grid"
|
||||
style="font-weight: bold; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--card-border);">
|
||||
<div>Stunde</div>
|
||||
<div>Fach</div>
|
||||
<div>Raum</div>
|
||||
<div>Lehrer</div>
|
||||
<div>Inhalt / Thema</div>
|
||||
</div>
|
||||
|
||||
<?php for ($i = 1; $i <= 8; $i++): ?>
|
||||
<div class="vergabe-grid" style="margin-bottom: 10px; align-items: center;">
|
||||
|
||||
<div>
|
||||
<span class="badge"
|
||||
style="display: inline-block; min-width: 90px; text-align: center; padding: 8px 12px; font-weight: bold;">Stunde
|
||||
<?= $i ?></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<select name="stunden[<?= $i ?>][fach_id]" data-stunde="<?= $i ?>" data-type="fach_id">
|
||||
<option value="">-- Fach --</option>
|
||||
<?php foreach ($alleFaecher as $row): ?>
|
||||
<option value="<?= $row['ID'] ?>"><?= htmlspecialchars($row['FACH']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<select name="stunden[<?= $i ?>][raum_id]" data-stunde="<?= $i ?>" data-type="raum_id">
|
||||
<option value="">-- Raum --</option>
|
||||
<?php foreach ($alleRaeume as $row): ?>
|
||||
<option value="<?= $row['ID'] ?>"><?= htmlspecialchars($row['RAUM_NR']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<select name="stunden[<?= $i ?>][lehrer_id]" data-stunde="<?= $i ?>" data-type="lehrer_id">
|
||||
<option value="">-- Lehrer --</option>
|
||||
<?php foreach ($alleLehrer as $row): ?>
|
||||
<option value="<?= $row['ID'] ?>"><?= htmlspecialchars($row['NAME']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" name="stunden[<?= $i ?>][inhalt_text]" placeholder="Inhalt der Stunde..."
|
||||
style="margin: 0; padding: 10px;">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
|
||||
<div style="margin-top: 25px; text-align: right;">
|
||||
<button type="submit" class="btn-submit-vergabe"
|
||||
style="width: 220px; display: inline-flex; font-weight: bold;">
|
||||
Bericht speichern
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const stundenplan = <?= json_encode($Stundenplan) ?>;
|
||||
const wochentage = ["SO", "MO", "DI", "MI", "DO", "FR", "SA"];
|
||||
|
||||
document.getElementById('datum').addEventListener('change', function() {
|
||||
const gewaehltesDatum = new Date(this.value);
|
||||
if (isNaN(gewaehltesDatum)) return;
|
||||
|
||||
let tagKey = wochentage[gewaehltesDatum.getDay()];
|
||||
|
||||
if (tagKey === "SO" || tagKey === "SA") {
|
||||
tagKey = "MO";
|
||||
}
|
||||
|
||||
const tagesPlan = stundenplan[tagKey] || {};
|
||||
|
||||
document.querySelectorAll('.vergabe-grid select').forEach(select => {
|
||||
const stunde = select.getAttribute('data-stunde');
|
||||
const type = select.getAttribute('data-type');
|
||||
|
||||
const vordefinierteId = (tagesPlan[stunde] && tagesPlan[stunde][type]) ? tagesPlan[stunde][
|
||||
type
|
||||
] : "";
|
||||
|
||||
select.value = vordefinierteId;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$datum = $_POST['datum'] ?? null;
|
||||
$werte = [$datum];
|
||||
|
||||
for ($i = 1; $i <= 8; $i++) {
|
||||
$stunde = $_POST['stunden'][$i] ?? [];
|
||||
$werte[] = !empty($stunde['fach_id']) ? $stunde['fach_id'] : null;
|
||||
$werte[] = !empty($stunde['lehrer_id']) ? $stunde['lehrer_id'] : null;
|
||||
$werte[] = !empty($stunde['raum_id']) ? $stunde['raum_id'] : null;
|
||||
$werte[] = !empty($stunde['inhalt_text']) ? $stunde['inhalt_text'] : null;
|
||||
}
|
||||
|
||||
DatabaseInsert(
|
||||
"Berufsschulberichte",
|
||||
"DATUM, FACH_S1, LEHRER_S1, RAUM_S1, INHALT_S1, FACH_S2, LEHRER_S2, RAUM_S2, INHALT_S2, FACH_S3, LEHRER_S3, RAUM_S3, INHALT_S3, FACH_S4, LEHRER_S4, RAUM_S4, INHALT_S4, FACH_S5, LEHRER_S5, RAUM_S5, INHALT_S5, FACH_S6, LEHRER_S6, RAUM_S6, INHALT_S6, FACH_S7, LEHRER_S7, RAUM_S7, INHALT_S7, FACH_S8, LEHRER_S8, RAUM_S8, INHALT_S8",
|
||||
...$werte
|
||||
);
|
||||
|
||||
echo "<div class='status-msg' style='position: fixed; bottom: 20px; right: 20px; z-index: 10000;'>Bericht gespeichert!</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
$data = new getSpecificData();
|
||||
$allData = $data->getAllData();
|
||||
|
||||
// Daten nach Gruppen sortieren
|
||||
$groupedData = [];
|
||||
foreach ($allData as $key => $value) {
|
||||
if (strpos($key, ' - ') !== false) {
|
||||
[$group, $field] = explode(' - ', $key, 2);
|
||||
} else {
|
||||
$group = 'Other';
|
||||
$field = $key;
|
||||
}
|
||||
$groupedData[$group][$field] = $value;
|
||||
}
|
||||
?>
|
||||
|
||||
<h2>System & Client Info</h2>
|
||||
|
||||
<?php foreach ($groupedData as $groupName => $fields): ?>
|
||||
<div class="group-container">
|
||||
<div class="group-header"><?= htmlspecialchars($groupName) ?> <span class="arrow">▸</span></div>
|
||||
<ul class="info-list group-content">
|
||||
<?php foreach ($fields as $field => $value): ?>
|
||||
<li>
|
||||
<span class="info-key"><?= htmlspecialchars($field) ?>:</span>
|
||||
<span class="info-value">
|
||||
<?php
|
||||
if (is_array($value)) $value = implode(', ', $value);
|
||||
echo htmlspecialchars($value ?? '');
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- ===== JS für einklappbare Gruppen ===== -->
|
||||
<script>
|
||||
document.querySelectorAll('.group-header').forEach(header => {
|
||||
header.addEventListener('click', () => {
|
||||
const content = header.nextElementSibling;
|
||||
content.classList.toggle('open');
|
||||
header.classList.toggle('open');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- ===== CSS für einklappbare Gruppen ===== -->
|
||||
<style>
|
||||
.group-container {
|
||||
margin-bottom: 15px;
|
||||
border: 1px solid var(--card-border);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-header {
|
||||
background-color: var(--card-bg);
|
||||
padding: 10px 15px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.group-header:hover {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
body.dark-mode .group-header:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.group-content {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease;
|
||||
margin: 0;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.group-content.open {
|
||||
max-height: 2000px;
|
||||
/* ausreichend hoch für alle Elemente */
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.group-header.open .arrow {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.info-list li {
|
||||
padding: 5px 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid var(--card-border);
|
||||
}
|
||||
|
||||
.info-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-key {
|
||||
font-weight: bold;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
flex: 1;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* Dark Mode Anpassungen */
|
||||
body.dark-mode .group-header {
|
||||
background-color: var(--card-bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
body.dark-mode .info-list li {
|
||||
border-bottom: 1px solid #333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
$statusMsg = "";
|
||||
|
||||
/* =========================
|
||||
Neue Domain hinzufügen
|
||||
========================= */
|
||||
if (isset($_POST["add_domain"])) {
|
||||
|
||||
$subdomain = trim($_POST["subdomain"]);
|
||||
|
||||
if ($subdomain != "") {
|
||||
DatabaseInsert("Domains", "SUBDOMAIN", $subdomain);
|
||||
$statusMsg = "Domain wurde hinzugefügt.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* =========================
|
||||
Domain löschen
|
||||
========================= */
|
||||
if (isset($_POST["delete_domain"])) {
|
||||
|
||||
$id = intval($_POST["id"]);
|
||||
|
||||
DatabaseDelete("Domains", "ID = ?", $id);
|
||||
|
||||
$statusMsg = "Domain wurde gelöscht.";
|
||||
}
|
||||
|
||||
|
||||
/* =========================
|
||||
Domain bearbeiten
|
||||
========================= */
|
||||
if (isset($_POST["save_domain"])) {
|
||||
|
||||
$id = intval($_POST["id"]);
|
||||
$subdomain = trim($_POST["subdomain"]);
|
||||
|
||||
DatabaseUpdate("Domains", "SUBDOMAIN = ?", "ID = ?", $subdomain, $id);
|
||||
|
||||
$statusMsg = "Domain wurde gespeichert.";
|
||||
}
|
||||
|
||||
|
||||
/* =========================
|
||||
Domains laden
|
||||
========================= */
|
||||
|
||||
$domains = DatabaseShow("Domains", "*");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<h2>
|
||||
Domain Verwaltung
|
||||
</h2>
|
||||
|
||||
<?php if ($statusMsg): ?>
|
||||
<div class="status-msg">
|
||||
<?= htmlspecialchars($statusMsg) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="admin-grid">
|
||||
|
||||
<?php foreach ($domains as $domain): ?>
|
||||
|
||||
<form method="post" class="admin-card">
|
||||
|
||||
<input type="hidden" name="id" value="<?= $domain["ID"] ?>">
|
||||
|
||||
<label>Subdomain</label>
|
||||
|
||||
<input type="text" name="subdomain" value="<?= htmlspecialchars($domain["SUBDOMAIN"]) ?>">
|
||||
|
||||
<div style="margin-top:10px; display:flex; gap:10px;">
|
||||
|
||||
<button type="submit" name="save_domain" class="btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
<button type="submit" name="delete_domain" class="btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
<!-- Neue Domain -->
|
||||
|
||||
<form method="post" class="admin-card new-item">
|
||||
|
||||
<h3>Neu</h3>
|
||||
|
||||
<label>Subdomain</label>
|
||||
|
||||
<input type="text" name="subdomain" placeholder="z.B. kleinerpenis.mrhossa.de">
|
||||
|
||||
<button type="submit" name="add_domain" class="btn-add">
|
||||
Domain hinzufügen
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
include_once __DIR__ . '/../controller/DatabaseController.php';
|
||||
include_once __DIR__ . '/../controller/RoutesController.php';
|
||||
|
||||
$view = $_GET['view'] ?? 'show';
|
||||
$selectedService = $_GET['service'] ?? null;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
|
||||
$artikel = $_POST['artikel'];
|
||||
$menge = $_POST['menge'];
|
||||
|
||||
DatabaseInsert(
|
||||
"Einkaufsliste",
|
||||
"PRODUKT, MENGE",
|
||||
$artikel,
|
||||
$menge
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_entry'])) {
|
||||
$id = $_POST['id'];
|
||||
|
||||
DatabaseDelete("Einkaufsliste", "ID = ?", $id);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
$entries = DatabaseShow(
|
||||
"Einkaufsliste"
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="vergabe-form">
|
||||
<form method="POST" class="vergabe-grid">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Artikel</label>
|
||||
<input type="text" name="artikel" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Menge</label>
|
||||
<input type="text" name="menge" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" name="add_entry" class="btn-submit-vergabe">
|
||||
💾 Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-container" style="margin-top: 30px;">
|
||||
<h3>Einkaufsliste</h3>
|
||||
|
||||
<?php if (!empty($entries)): ?>
|
||||
<table class="db-table mobile-responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Artikel</th>
|
||||
<th>Menge</th>
|
||||
<th style="width: 100px;">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($entries as $entry): ?>
|
||||
<tr>
|
||||
<td data-label="Artikel"><?= htmlspecialchars($entry['PRODUKT'] ?? '') ?></td>
|
||||
<td data-label="Menge"><?= htmlspecialchars($entry['MENGE'] ?? '') ?></td>
|
||||
<td data-label="Aktion">
|
||||
<form method="POST" onsubmit="return confirm('Möchtest du diesen Eintrag wirklich löschen?');" style="margin: 0;">
|
||||
<input type="hidden" name="id" value="<?= $entry['ID'] ?? '' ?>">
|
||||
<button type="submit" name="delete_entry" class="btn-delete">
|
||||
🗑️ Löschen
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Einträge vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
include_once(__DIR__ . '/../controller/DataController.php');
|
||||
include_once(__DIR__ . '/../controller/DatabaseController.php');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_bericht'])) {
|
||||
$prozess1 = $_POST['prozess1'];
|
||||
$prozess2 = $_POST['prozess2'];
|
||||
$prozess3 = $_POST['prozess3'];
|
||||
$prozess4 = $_POST['prozess4'];
|
||||
$startzeit = $_POST['startzeit'];
|
||||
$endzeit = $_POST['endzeit'];
|
||||
$datum = $_POST['datum'];
|
||||
|
||||
// IHK konforme zeiten berechnen und Überstunden berechnen
|
||||
$soll = new DateTime($startzeit);
|
||||
$soll->modify("+8 hours 30 minutes");
|
||||
|
||||
$randomMin = rand(1, 15);
|
||||
$endePublicDt = clone $soll;
|
||||
$endePublicDt->modify("+{$randomMin} minutes");
|
||||
$endePublic = $endePublicDt->format("H:i");
|
||||
|
||||
$real = DateTime::createFromFormat("H:i", $endzeit);
|
||||
|
||||
$beginnDt = new DateTime($startzeit);
|
||||
$arbeitsDiff = $beginnDt->diff($real);
|
||||
$arbeitsMinuten = ($arbeitsDiff->h * 60) + $arbeitsDiff->i;
|
||||
$sollMinuten = 8 * 60 + 30;
|
||||
|
||||
if ($arbeitsMinuten <= $sollMinuten) {
|
||||
$overtime = 0;
|
||||
} else {
|
||||
$diff = $soll->diff($real);
|
||||
$overtime = ($diff->h * 60) + $diff->i;
|
||||
}
|
||||
|
||||
DatabaseInsert(
|
||||
"Firmenberichte",
|
||||
"DATUM, PROZESS_1, PROZESS_2, PROZESS_3, PROZESS_4, BEGINN, ENDE_REAL, ENDE_PUBLIC, OVERTIME",
|
||||
$datum,
|
||||
$prozess1,
|
||||
$prozess2,
|
||||
$prozess3,
|
||||
$prozess4,
|
||||
$startzeit,
|
||||
$endzeit,
|
||||
$endePublic,
|
||||
$overtime
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="berichte-container">
|
||||
<form method="POST" class="berichte-form">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Prozess 1</label>
|
||||
<input type="text" name="prozess1" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Prozess 2</label>
|
||||
<input type="text" name="prozess2" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Prozess 3</label>
|
||||
<input type="text" name="prozess3" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Prozess 4</label>
|
||||
<input type="text" name="prozess4" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Startzeit</label>
|
||||
<input type="time" name="startzeit" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Endzeit</label>
|
||||
<input type="time" name="endzeit" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Datum</label>
|
||||
<input type="date" name="datum" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" name="add_bericht" class="btn-submit-bericht">
|
||||
Bericht Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
$username = $_SESSION['username'] ?? 'Gast';
|
||||
$is_superuser = $_SESSION['is_superuser'] ?? false;
|
||||
$is_admin = $_SESSION['is_admin'] ?? false;
|
||||
|
||||
$db_res = DatabaseShow(
|
||||
"Benutzer",
|
||||
"NACHNAME, EMAIL, ROLLE, HOME_IP",
|
||||
"NAME = ?",
|
||||
$username
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div class="home-dashboard">
|
||||
<div class="links-container">
|
||||
|
||||
<div class="link-group">
|
||||
<h3 style="background-color: #007bff;">👤 Benutzerprofil</h3>
|
||||
<div class="group-links" style="padding: 10px; color: inherit;">
|
||||
<p style="margin: 5px 0;"><strong>Name:</strong> <code><?= htmlspecialchars($username) ?></code></p>
|
||||
<?php if ($username != 'gast'): ?>
|
||||
<p style="margin: 5px 0;"><strong>Nachname:</strong>
|
||||
<code><?= htmlspecialchars($db_res[0]['NACHNAME']) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>E-Mail:</strong>
|
||||
<code><?= htmlspecialchars($db_res[0]['EMAIL']) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Benutzerrolle:</strong>
|
||||
<code><?= htmlspecialchars($db_res[0]['ROLLE']) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Home IP:</strong>
|
||||
<code><?= htmlspecialchars($db_res[0]['HOME_IP']) ?></code>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="link-group">
|
||||
<h3 style="background-color: #28a745;">🛡️ Status & Rechte</h3>
|
||||
<div class="group-links"
|
||||
style="padding: 10px; display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap;">
|
||||
<?php if ((new getSpecificData())->getIsAdmin()): ?>
|
||||
<span
|
||||
style="background: #dc3545; color: white; padding: 4px 10px; border-radius: 15px; font-size: 0.8rem; font-weight: bold;">Admin</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ((new getSpecificData())->getIsSuperuser()): ?>
|
||||
<span
|
||||
style="background: #ffc107; color: #000; padding: 4px 10px; border-radius: 15px; font-size: 0.8rem; font-weight: bold;">Superuser</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!(new getSpecificData())->getIsSuperuser() && !(new getSpecificData())->getIsAdmin()): ?>
|
||||
<span
|
||||
style="background: #6c757d; color: white; padding: 4px 10px; border-radius: 15px; font-size: 0.8rem; font-weight: bold;">Standard-Nutzer</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="link-group">
|
||||
<h3 style="background-color: #17a2b8;">ℹ️ System-Info</h3>
|
||||
<div class="group-links" style="padding: 10px;">
|
||||
<p style="margin: 5px 0;"><strong>Datum:</strong>
|
||||
<code><?= date('d.m.Y') ?><br></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Session-Status:</strong>
|
||||
<code>Aktiv</code>
|
||||
</p>
|
||||
<?php if ($is_admin): ?>
|
||||
<p style="margin: 5px 0;"><strong>Client IP:</strong>
|
||||
<code><?= htmlspecialchars((new getSpecificData())->getClientIP()) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Server IP:</strong>
|
||||
<code><?= htmlspecialchars((new getSpecificData())->getServerIP()) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Geo IP:</strong>
|
||||
<code><?= htmlspecialchars((new getSpecificData())->getGeoIP((new getSpecificData())->getClientIP())) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Database IP:</strong>
|
||||
<code><?= htmlspecialchars((new getSpecificData())->getDatabase()) ?></code>
|
||||
</p>
|
||||
<p style="margin: 5px 0;"><strong>Wetter:</strong>
|
||||
<code><?= htmlspecialchars((new getSpecificData())->getWeather()['aktuell']) ?></code>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Zusätzliche Inline-Styles für die Feinabstimmung in der home_info */
|
||||
.home-dashboard {
|
||||
animation: fadeIn 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
code {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
padding: 2px 5px;
|
||||
border-radius: 4px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
body.dark-mode code {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if (!isset($linkButtons) || !is_array($linkButtons)) {
|
||||
echo "<p>Keine Links konfiguriert.</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($linkGroups) || !is_array($linkGroups)) {
|
||||
echo "<p>Keine Link-Gruppen konfiguriert.</p>";
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- <h2>Externe Links</h2> -->
|
||||
|
||||
<div class="links-container">
|
||||
|
||||
<?php foreach ($linkGroups as $groupKey => $group): ?>
|
||||
|
||||
<?php
|
||||
// Links dieser Gruppe sammeln
|
||||
$groupLinks = array_filter($linkButtons, function($button) use ($groupKey, $isAdmin) {
|
||||
if (($button['group'] ?? null) !== $groupKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($button['adminOnly']) && !$isAdmin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
if (empty($groupLinks)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$color = htmlspecialchars($group['color']);
|
||||
?>
|
||||
|
||||
<div class="link-group">
|
||||
<h3 style="background-color: <?= $color ?>;">
|
||||
<?= htmlspecialchars($group['label']) ?>
|
||||
</h3>
|
||||
|
||||
<div class="group-links">
|
||||
<?php foreach ($groupLinks as $button):
|
||||
$target = !empty($button['newTab']) ? '_blank' : '_self';
|
||||
?>
|
||||
|
||||
<a href="<?= htmlspecialchars($button['url']) ?>"
|
||||
target="<?= $target ?>"
|
||||
<?= $target === '_blank' ? 'rel="noopener noreferrer"' : '' ?>>
|
||||
<button class="link-button"
|
||||
style="
|
||||
border-color: <?= $color ?>;
|
||||
background-color: <?= $color ?>;
|
||||
">
|
||||
<?= htmlspecialchars($button['label']) ?>
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
$conn = db_connect();
|
||||
|
||||
// Dev-IPs
|
||||
$devips = (new getSpecificData())->getWhitelistedIPs();
|
||||
$devips_sql = "'" . implode("','", $devips) . "'";
|
||||
|
||||
// Filter & Custom Query
|
||||
$customQuery = $_POST['custom_query'] ?? '';
|
||||
$sql = '';
|
||||
$useCustom = false;
|
||||
|
||||
// Custom Query Schutz
|
||||
if ($customQuery) {
|
||||
$forbidden = ['DELETE', 'UPDATE', 'INSERT', 'DROP', 'ALTER', 'TRUNCATE'];
|
||||
$upper = strtoupper($customQuery);
|
||||
|
||||
foreach ($forbidden as $bad) {
|
||||
if (strpos($upper, $bad) !== false) {
|
||||
echo "<b style='color:red'>Gefährliche Query blockiert ($bad)</b>";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (stripos(trim($customQuery), "SELECT") !== 0) {
|
||||
echo "<b style='color:red'>Nur SELECT erlaubt</b>";
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = $customQuery;
|
||||
$useCustom = true;
|
||||
}
|
||||
|
||||
// Standard Query (falls kein Custom Query)
|
||||
if (!$useCustom) {
|
||||
// Einfache Standard-Query für Logs ohne Dev-IPs
|
||||
$sql = "
|
||||
SELECT WEBSITE, REQUEST_URL, FIRST_REQUEST, COUNTER
|
||||
FROM logs
|
||||
WHERE CLIENT_IP = '" . (new getSpecificData())->getClientIP() . "'
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
";
|
||||
}
|
||||
|
||||
if (isset($_POST['delete_logs'])) {
|
||||
DatabaseDelete(
|
||||
"logs",
|
||||
"CLIENT_IP = ?",
|
||||
(new getSpecificData())->getClientIP()
|
||||
);
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h1>📊 Logs</h1>
|
||||
|
||||
<?php
|
||||
$daten = [];
|
||||
|
||||
if ($erg = $conn->query($sql)) {
|
||||
while ($row = $erg->fetch_object()) {
|
||||
$daten[] = $row;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (!$daten): ?>
|
||||
<b>Keine Daten gefunden</b>
|
||||
<?php else: ?>
|
||||
|
||||
<div style="overflow-x:auto;">
|
||||
<?php if ((new getSpecificData())->getIsAdmin()): ?>
|
||||
<form method="post">
|
||||
<button name="delete_logs" class="btn-delete" style="margin-bottom: 10px">Lösche Logs</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse;width:100%;">
|
||||
<tr>
|
||||
<?php foreach ($daten[0] as $key => $_): ?>
|
||||
<th><?= htmlspecialchars($key) ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($daten as $row): ?>
|
||||
<tr>
|
||||
<?php foreach ($row as $val): ?>
|
||||
<td><?= htmlspecialchars($val ?? '') ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
$dir = __DIR__ . "/../static";
|
||||
$files = array_diff(scandir($dir), ['.', '..']);
|
||||
|
||||
echo '<button onclick="printFiles()">Alle Dateien drucken</button>';
|
||||
|
||||
echo '<div class="print-container">';
|
||||
|
||||
foreach ($files as $file) {
|
||||
|
||||
$url = "static/" . rawurlencode($file);
|
||||
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
|
||||
echo '<div class="print-page">';
|
||||
|
||||
if (in_array($ext, ['png','jpg','jpeg','webp'])) {
|
||||
echo "<img src='$url'>";
|
||||
}
|
||||
|
||||
elseif ($ext === "pdf") {
|
||||
echo "<embed src='$url' type='application/pdf'>";
|
||||
}
|
||||
|
||||
else {
|
||||
echo "<p>$file kann nicht direkt gedruckt werden.</p>";
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
|
||||
<script>
|
||||
function printFiles() {
|
||||
console.log("Ich wurde gedrückt");
|
||||
window.print();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.print-page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
page-break-after: always;
|
||||
}
|
||||
|
||||
.print-page img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.print-page embed {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
body * {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.print-container,
|
||||
.print-container * {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.print-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
$conn = db_connect();
|
||||
|
||||
// Dataset: Gesamte Logs
|
||||
$sql_total = "SELECT DATE(FIRST_REQUEST) as tag, COUNT(*) as anzahl FROM logs GROUP BY DATE(FIRST_REQUEST) ORDER BY DATE(FIRST_REQUEST)";
|
||||
$result_total = $conn->query($sql_total);
|
||||
|
||||
$totalDataAssoc = [];
|
||||
$allLabels = [];
|
||||
|
||||
if ($result_total->num_rows > 0) {
|
||||
while($row = $result_total->fetch_assoc()) {
|
||||
$date = $row['tag'];
|
||||
$totalDataAssoc[$date] = (int)$row['anzahl'];
|
||||
$allLabels[] = $date;
|
||||
}
|
||||
}
|
||||
|
||||
// Nodes
|
||||
$nodes = ['node1','node2','node3','node4'];
|
||||
$nodeDataAssoc = [];
|
||||
|
||||
foreach ($nodes as $node) {
|
||||
$sql = "SELECT DATE(FIRST_REQUEST) as tag, COUNT(*) as anzahl FROM logs WHERE SERVER_IP = '$node' GROUP BY DATE(FIRST_REQUEST)";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
$data = [];
|
||||
if ($result->num_rows > 0) {
|
||||
while($row = $result->fetch_assoc()) {
|
||||
$date = $row['tag'];
|
||||
$data[$date] = (int)$row['anzahl'];
|
||||
if (!in_array($date, $allLabels)) {
|
||||
$allLabels[] = $date;
|
||||
}
|
||||
}
|
||||
}
|
||||
$nodeDataAssoc[$node] = $data;
|
||||
}
|
||||
|
||||
// Alle Labels chronologisch sortieren
|
||||
sort($allLabels);
|
||||
|
||||
// Finales Array: Gesamt + Nodes
|
||||
$finalTotalData = [];
|
||||
$finalNodeData = [];
|
||||
|
||||
foreach ($allLabels as $label) {
|
||||
$finalTotalData[] = isset($totalDataAssoc[$label]) ? $totalDataAssoc[$label] : 0;
|
||||
|
||||
foreach ($nodes as $node) {
|
||||
if (!isset($finalNodeData[$node])) $finalNodeData[$node] = [];
|
||||
$finalNodeData[$node][] = isset($nodeDataAssoc[$node][$label]) ? $nodeDataAssoc[$node][$label] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Logs Chart</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<canvas id="logChart" width="900" height="500"></canvas>
|
||||
|
||||
<script>
|
||||
const ctx = document.getElementById('logChart').getContext('2d');
|
||||
|
||||
const logChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: <?php echo json_encode($allLabels); ?>,
|
||||
datasets: [{
|
||||
label: 'Gesamt',
|
||||
data: <?php echo json_encode($finalTotalData); ?>,
|
||||
borderColor: 'rgb(255, 0, 0)',
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
||||
fill: false,
|
||||
tension: 0
|
||||
},
|
||||
{
|
||||
label: 'Node1',
|
||||
data: <?php echo json_encode($finalNodeData['node1']); ?>,
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||
fill: false,
|
||||
tension: 0,
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Node2',
|
||||
data: <?php echo json_encode($finalNodeData['node2']); ?>,
|
||||
borderColor: 'rgba(255, 99, 132, 1)',
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
fill: false,
|
||||
tension: 0,
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Node3',
|
||||
data: <?php echo json_encode($finalNodeData['node3']); ?>,
|
||||
borderColor: 'rgba(255, 206, 86, 1)',
|
||||
backgroundColor: 'rgba(255, 206, 86, 0.2)',
|
||||
fill: false,
|
||||
tension: 0,
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Node4',
|
||||
data: <?php echo json_encode($finalNodeData['node4']); ?>,
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
fill: false,
|
||||
tension: 0,
|
||||
hidden: true,
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Logs pro Tag nach Node und Gesamt'
|
||||
},
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top'
|
||||
},
|
||||
zoom: {
|
||||
pan: {
|
||||
enabled: true,
|
||||
mode: 'x'
|
||||
},
|
||||
zoom: {
|
||||
wheel: {
|
||||
enabled: true
|
||||
},
|
||||
mode: 'x'
|
||||
}
|
||||
}
|
||||
},
|
||||
interaction: {
|
||||
mode: 'index',
|
||||
intersect: false
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Datum'
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Anzahl Logs'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
$conn = db_connect();
|
||||
|
||||
// Dev-IPs
|
||||
$devips = (new getSpecificData())->getWhitelistedIPs();
|
||||
$devips_sql = "'" . implode("','", $devips) . "'";
|
||||
|
||||
// Filter
|
||||
$filter = $_GET['filter'] ?? 'today';
|
||||
$customQuery = $_POST['custom_query'] ?? '';
|
||||
$useCustom = false;
|
||||
|
||||
// Custom Query Schutz
|
||||
if ($customQuery) {
|
||||
$forbidden = ['DELETE', 'UPDATE', 'INSERT', 'DROP', 'ALTER', 'TRUNCATE'];
|
||||
$upper = strtoupper($customQuery);
|
||||
|
||||
foreach ($forbidden as $bad) {
|
||||
if (strpos($upper, $bad) !== false) {
|
||||
echo "<b style='color:red'>Gefährliche Query blockiert ($bad)</b>";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (stripos(trim($customQuery), "SELECT") !== 0) {
|
||||
echo "<b style='color:red'>Nur SELECT erlaubt</b>";
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = $customQuery;
|
||||
$useCustom = true;
|
||||
}
|
||||
|
||||
// Standard Queries
|
||||
if (!$useCustom) {
|
||||
switch ($filter) {
|
||||
case 'today':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
AND DATE(FIRST_REQUEST) = CURDATE()
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'counterperip':
|
||||
$sql = "
|
||||
SELECT CLIENT_IP, LAND, USER_AGENT, SUM(counter) AS gesamt_counter
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
GROUP BY CLIENT_IP
|
||||
ORDER BY gesamt_counter DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node1':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node1'
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node2':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node2'
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node3':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node3'
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
case 'node4':
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE `SERVER_IP` = 'node4'
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
ORDER BY `FIRST_REQUEST` DESC
|
||||
";
|
||||
break;
|
||||
|
||||
default:
|
||||
$sql = "
|
||||
SELECT `CLIENT_IP`, `LAND`, `REQUEST_URL`, `COUNTER`, `FIRST_REQUEST`, `WEBSITE`
|
||||
FROM logs
|
||||
WHERE CLIENT_IP NOT IN ($devips_sql)
|
||||
AND (WEBSITE != 'backend.mrhossa.de' OR WEBSITE IS NULL)
|
||||
ORDER BY FIRST_REQUEST DESC
|
||||
";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<h1>📊 Logs</h1>
|
||||
|
||||
<form method="GET" action="index.php">
|
||||
<input type="hidden" name="service" value="<?= htmlspecialchars($_GET['service'] ?? 'logs') ?>">
|
||||
|
||||
<select name="filter" onchange="this.form.submit()">
|
||||
<?php
|
||||
$options = ['alle', 'today', 'node1', 'node2', 'node3', 'node4', 'counterperip'];
|
||||
foreach ($options as $opt) {
|
||||
$sel = ($filter === $opt) ? 'selected' : '';
|
||||
echo "<option value='$opt' $sel>$opt</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<!-- <br>
|
||||
|
||||
<form method="POST">
|
||||
<textarea name="custom_query" style="width:100%;height:60px;"><?= htmlspecialchars($customQuery) ?></textarea>
|
||||
<br>
|
||||
<button type="submit">Query ausführen</button>
|
||||
</form>
|
||||
|
||||
<hr> -->
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
$daten = [];
|
||||
|
||||
if ($erg = $conn->query($sql)) {
|
||||
// echo "<pre style='background:var(--bg-soft,#f4f4f4);padding:10px;'>$sql</pre>";
|
||||
|
||||
while ($row = $erg->fetch_object()) {
|
||||
$daten[] = $row;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (!$daten): ?>
|
||||
<b>Keine Daten gefunden</b>
|
||||
<?php else: ?>
|
||||
|
||||
<div style="overflow-x:auto;">
|
||||
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse;width:100%;">
|
||||
<tr>
|
||||
<?php foreach ($daten[0] as $key => $_): ?>
|
||||
<th><?= htmlspecialchars($key) ?></th>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($daten as $row): ?>
|
||||
<tr>
|
||||
<?php foreach ($row as $val): ?>
|
||||
<td><?= htmlspecialchars($val ?? '') ?></td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -1,67 +1,321 @@
|
||||
<?php
|
||||
|
||||
$adminPassword = 'geheim';
|
||||
include_once(__DIR__ . '/../controller/RightsController.php');
|
||||
include_once(__DIR__ . '/../config.php');
|
||||
|
||||
$configFile = 'config.php';
|
||||
$backupDir = 'config_backups';
|
||||
|
||||
if (!is_dir($backupDir)) {
|
||||
mkdir($backupDir, 0755, true);
|
||||
}
|
||||
|
||||
require $configFile;
|
||||
|
||||
// Login prüfen
|
||||
if (isset($_POST['password'])) {
|
||||
if ($_POST['password'] === $adminPassword) {
|
||||
if (isset($superuser['admin']['password']) && $_POST['password'] === $superuser['admin']['password']) {
|
||||
$_SESSION['logged_in'] = true;
|
||||
} else {
|
||||
$error = "Falsches Passwort!";
|
||||
}
|
||||
}
|
||||
|
||||
// Nicht eingeloggt → Login-Formular anzeigen
|
||||
if (!($_SESSION['logged_in'] ?? false)) {
|
||||
?>
|
||||
<h2>🔐 Admin Login</h2>
|
||||
<?php if(isset($error)): ?>
|
||||
<p style="color:red"><?= $error ?></p>
|
||||
<?php endif; ?>
|
||||
<form method="post">
|
||||
<input type="password" name="password" placeholder="Passwort">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
<?php
|
||||
return;
|
||||
if (isset($_GET['logout'])) {
|
||||
session_destroy();
|
||||
header("Location: " . $_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Konfiguration laden
|
||||
$configFile = 'config.php';
|
||||
include $configFile;
|
||||
|
||||
// Speichern
|
||||
if (isset($_POST['save'])) {
|
||||
foreach ($services as $key => $service) {
|
||||
$services[$key]['active'] = isset($_POST['services'][$key]);
|
||||
}
|
||||
|
||||
$content = "<?php\n\$services = [\n";
|
||||
foreach ($services as $key => $service) {
|
||||
$name = addslashes($service['name']);
|
||||
$active = $service['active'] ? 'true' : 'false';
|
||||
$content .= " '$key' => ['name' => '$name', 'active' => $active],\n";
|
||||
}
|
||||
$content .= "];\n?>";
|
||||
|
||||
file_put_contents($configFile, $content);
|
||||
$message = "Konfiguration gespeichert!";
|
||||
if (isset($_POST['logout'])) {
|
||||
unset($_SESSION['logged_in']);
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($_POST['save']) && ($_SESSION['logged_in'] ?? false)) {
|
||||
copy($configFile, $backupDir . '/config_' . date('Y-m-d_H-i-s') . '.php');
|
||||
|
||||
$newServices = [];
|
||||
$serviceToGroupMapping = [];
|
||||
if(isset($_POST['services'])){
|
||||
foreach ($_POST['services'] as $id => $s) {
|
||||
$finalId = !empty($s['new_id']) ? trim($s['new_id']) : $id;
|
||||
if (empty($finalId)) continue;
|
||||
$newServices[$finalId] = [
|
||||
'name' => $s['name'],
|
||||
'active' => isset($s['active']),
|
||||
'adminOnly' => isset($s['adminOnly'])
|
||||
];
|
||||
if(!empty($s['targetGroup'])) {
|
||||
$serviceToGroupMapping[$s['targetGroup']][] = $finalId;
|
||||
}
|
||||
}
|
||||
(new RightsController())->RightsHandler($s['name']);
|
||||
}
|
||||
|
||||
$newServiceGroups = [];
|
||||
if(isset($_POST['serviceGroups'])){
|
||||
foreach ($_POST['serviceGroups'] as $id => $groupData) {
|
||||
$finalId = !empty($groupData['new_id']) ? trim($groupData['new_id']) : $id;
|
||||
if (empty($finalId)) continue;
|
||||
$currentServices = $serviceToGroupMapping[$finalId] ?? ($serviceGroups[$id]['services'] ?? []);
|
||||
$newServiceGroups[$finalId] = [
|
||||
'label' => $groupData['label'],
|
||||
'defaultOpen' => isset($groupData['defaultOpen']),
|
||||
'services' => array_values(array_unique($currentServices))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$newLinkGroups = [];
|
||||
if(isset($_POST['linkGroups'])){
|
||||
foreach ($_POST['linkGroups'] as $id => $lg) {
|
||||
$finalId = !empty($lg['new_id']) ? trim($lg['new_id']) : $id;
|
||||
if (empty($finalId)) continue;
|
||||
$newLinkGroups[$finalId] = [
|
||||
'label' => $lg['label'],
|
||||
'color' => $lg['color'],
|
||||
'defaultOpen' => isset($lg['defaultOpen'])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$newLinkButtons = [];
|
||||
if(isset($_POST['linkButtons'])){
|
||||
foreach ($_POST['linkButtons'] as $btn) {
|
||||
if (empty($btn['label'])) continue;
|
||||
$newLinkButtons[] = [
|
||||
'label' => $btn['label'],
|
||||
'url' => $btn['url'],
|
||||
'newTab' => isset($btn['newTab']),
|
||||
'adminOnly' => isset($btn['adminOnly']),
|
||||
'group' => $btn['group']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$content = "<?php\n\n";
|
||||
$content .= '$superuser = ' . var_export($superuser, true) . ";\n\n";
|
||||
$content .= '$serviceGroups = ' . var_export($newServiceGroups, true) . ";\n\n";
|
||||
$content .= '$services = ' . var_export($newServices, true) . ";\n\n";
|
||||
$content .= '$linkGroups = ' . var_export($newLinkGroups, true) . ";\n\n";
|
||||
$content .= '$linkButtons = ' . var_export($newLinkButtons, true) . ";\n";
|
||||
|
||||
if (file_put_contents($configFile, $content)) {
|
||||
if (function_exists('opcache_invalidate')) { @opcache_invalidate($configFile, true); }
|
||||
$_SESSION['status_message'] = "✅ Konfiguration erfolgreich aktualisiert!";
|
||||
header("Location: " . $_SERVER['PHP_SELF']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$message = $_SESSION['status_message'] ?? null;
|
||||
unset($_SESSION['status_message']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
|
||||
<h2>🛠 Service Verwaltung</h2>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Admin Site Control</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<?php if(isset($message)): ?>
|
||||
<p style="color:green"><?= $message ?></p>
|
||||
<?php endif; ?>
|
||||
<body class="<?= ($_SESSION['dark_mode'] ?? false) ? 'dark-mode' : '' ?>">
|
||||
<div class="content">
|
||||
<?php if (!($_SESSION['logged_in'] ?? false)): ?>
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<form method="post">
|
||||
<h2>🔐 Login</h2>
|
||||
<?php if(isset($error)): ?>
|
||||
<div class="status-msg" style="background:#dc3545; color:#fff;"><?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="password" name="password" placeholder="Passwort" required>
|
||||
<button type="submit">Einloggen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="content">
|
||||
<h2>Seitenverwaltung</h2>
|
||||
<form method="post">
|
||||
<button type="submit" name="logout" id="logoutSiteButton">Logout</button>
|
||||
</form>
|
||||
<?php if($message): ?><div class="status-msg"><?= htmlspecialchars($message) ?></div><?php endif; ?>
|
||||
|
||||
<form method="post">
|
||||
<?php foreach ($services as $key => $service): ?>
|
||||
<form method="post">
|
||||
|
||||
<!-- Sidebar Gruppen -->
|
||||
<h2>📦 Sidebar Gruppen
|
||||
<button type="button" class="btn-add" onclick="addNew('serviceGroup')">+ Neue Gruppe</button>
|
||||
</h2>
|
||||
<div class="admin-grid" id="container-serviceGroup">
|
||||
<?php foreach ($serviceGroups as $id => $group): ?>
|
||||
<div class="admin-card">
|
||||
<span class="badge">ID: <?= htmlspecialchars($id) ?></span>
|
||||
<input type="text" name="serviceGroups[<?= $id ?>][label]"
|
||||
value="<?= htmlspecialchars($group['label']) ?>" placeholder="Anzeigename">
|
||||
<label>
|
||||
<input type="checkbox" name="services[<?= $key ?>]" <?= $service['active'] ? 'checked' : '' ?>>
|
||||
<?= htmlspecialchars($service['name']) ?>
|
||||
</label><br>
|
||||
<input type="checkbox" name="serviceGroups[<?= $id ?>][defaultOpen]"
|
||||
<?= ($group['defaultOpen'] ?? false) ? 'checked' : '' ?>>
|
||||
Offen
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<br>
|
||||
<button type="submit" name="save">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Services -->
|
||||
<h2>🖥 Sidebar Services
|
||||
<button type="button" class="btn-add" onclick="addNew('service')">+ Neuer Service</button>
|
||||
</h2>
|
||||
<div class="admin-grid" id="container-service">
|
||||
<?php foreach ($services as $id => $s): ?>
|
||||
<div class="admin-card">
|
||||
<span class="badge">Datei: <?= htmlspecialchars($id) ?>.php</span>
|
||||
<input type="text" name="services[<?= $id ?>][name]" value="<?= htmlspecialchars($s['name']) ?>"
|
||||
placeholder="Name">
|
||||
<label>Sidebar-Gruppe:</label>
|
||||
<select name="services[<?= $id ?>][targetGroup]">
|
||||
<?php foreach ($serviceGroups as $gid => $g): ?>
|
||||
<option value="<?= $gid ?>"
|
||||
<?= (isset($g['services']) && in_array($id, $g['services'])) ? 'selected' : '' ?>>
|
||||
<?= htmlspecialchars($g['label']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<label>
|
||||
<input type="checkbox" name="services[<?= $id ?>][active]"
|
||||
<?= ($s['active'] ?? false) ? 'checked' : '' ?>>
|
||||
Aktiv
|
||||
</label>
|
||||
|
|
||||
<label>
|
||||
<input type="checkbox" name="services[<?= $id ?>][adminOnly]"
|
||||
<?= ($s['adminOnly'] ?? false) ? 'checked' : '' ?>>
|
||||
Nur Admins
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<!-- Dashboard Kategorien -->
|
||||
<h2>🎨 Dashboard Kategorien
|
||||
<button type="button" class="btn-add" onclick="addNew('linkGroup')">+ Neue Kategorie</button>
|
||||
</h2>
|
||||
<div class="admin-grid" id="container-linkGroup">
|
||||
<?php foreach ($linkGroups as $id => $lg): ?>
|
||||
<div class="admin-card">
|
||||
<span class="badge">ID: <?= htmlspecialchars($id) ?></span>
|
||||
<input type="text" name="linkGroups[<?= $id ?>][label]"
|
||||
value="<?= htmlspecialchars($lg['label']) ?>" placeholder="Gruppen-Label">
|
||||
<label>Farbe:</label>
|
||||
<input type="color" name="linkGroups[<?= $id ?>][color]"
|
||||
value="<?= $lg['color'] ?? '#3498db' ?>">
|
||||
<label>
|
||||
<input type="checkbox" name="linkGroups[<?= $id ?>][defaultOpen]"
|
||||
<?= ($lg['defaultOpen'] ?? false) ? 'checked' : '' ?>>
|
||||
Offen
|
||||
</label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<!-- Dashboard Kacheln -->
|
||||
<h2>🔘 Dashboard Kacheln
|
||||
<button type="button" class="btn-add" onclick="addNew('linkButton')">+ Neue Kachel</button>
|
||||
</h2>
|
||||
<div class="admin-grid" id="container-linkButton">
|
||||
<?php foreach ($linkButtons as $key => $btn): ?>
|
||||
<div class="admin-card">
|
||||
<input type="text" name="linkButtons[<?= $key ?>][label]"
|
||||
value="<?= htmlspecialchars($btn['label']) ?>" placeholder="Name">
|
||||
<input type="text" name="linkButtons[<?= $key ?>][url]"
|
||||
value="<?= htmlspecialchars($btn['url']) ?>" placeholder="URL">
|
||||
<label>Dashboard Kategorie:</label>
|
||||
<select name="linkButtons[<?= $key ?>][group]">
|
||||
<?php foreach ($linkGroups as $id => $lg): ?>
|
||||
<option value="<?= $id ?>" <?= ($btn['group'] == $id) ? 'selected' : '' ?>>
|
||||
<?= htmlspecialchars($lg['label']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div style="margin-top:5px;">
|
||||
<label>
|
||||
<input type="checkbox" name="linkButtons[<?= $key ?>][newTab]"
|
||||
<?= ($btn['newTab'] ?? false) ? 'checked' : '' ?>>
|
||||
Neuer Tab
|
||||
</label>
|
||||
|
|
||||
<label>
|
||||
<input type="checkbox" name="linkButtons[<?= $key ?>][adminOnly]"
|
||||
<?= ($btn['adminOnly'] ?? false) ? 'checked' : '' ?>>
|
||||
Nur Admins
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="save-bar">
|
||||
<button type="submit" name="save" class="btn-save">💾 Gesamte Konfiguration speichern</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function addNew(type) {
|
||||
const container = document.getElementById('container-' + type);
|
||||
const tempId = 'new_' + Date.now();
|
||||
const card = document.createElement('div');
|
||||
card.className = 'admin-card new-item';
|
||||
|
||||
let html = `<div><span class="badge">Neu hinzufügen</span></div>`;
|
||||
|
||||
if (type === 'serviceGroup') {
|
||||
html +=
|
||||
`<input type="text" name="serviceGroups[${tempId}][new_id]" placeholder="ID">
|
||||
<input type="text" name="serviceGroups[${tempId}][label]" placeholder="Name">
|
||||
<label><input type="checkbox" name="serviceGroups[${tempId}][defaultOpen]" checked> Ausgeklappt</label>`;
|
||||
} else if (type === 'service') {
|
||||
html += `<input type="text" name="services[${tempId}][new_id]" placeholder="Datei ohne .php">
|
||||
<input type="text" name="services[${tempId}][name]" placeholder="Anzeigename">
|
||||
<label>Gruppe:</label>
|
||||
<select name="services[${tempId}][targetGroup]">
|
||||
<?php foreach ($serviceGroups as $gid => $gl): ?>
|
||||
<option value="<?= $gid ?>"><?= $gl['label'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<label><input type="checkbox" name="services[${tempId}][active]" checked> Aktiv</label>`;
|
||||
} else if (type === 'linkGroup') {
|
||||
html += `<input type="text" name="linkGroups[${tempId}][new_id]" placeholder="ID">
|
||||
<input type="text" name="linkGroups[${tempId}][label]" placeholder="Label">
|
||||
<input type="color" name="linkGroups[${tempId}][color]" value="#3498db">`;
|
||||
} else if (type === 'linkButton') {
|
||||
html += `<input type="text" name="linkButtons[${tempId}][label]" placeholder="Anzeigename">
|
||||
<input type="text" name="linkButtons[${tempId}][url]" placeholder="https://...">
|
||||
<label>Kategorie:</label>
|
||||
<select name="linkButtons[${tempId}][group]">
|
||||
<?php foreach ($linkGroups as $gid => $gl): ?>
|
||||
<option value="<?= $gid ?>"><?= $gl['label'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<label><input type="checkbox" name="linkButtons[${tempId}][newTab]" checked> Tab</label>
|
||||
| <label><input type="checkbox" name="linkButtons[${tempId}][adminOnly]"> Nur Admins</label>`;
|
||||
}
|
||||
|
||||
card.innerHTML = html;
|
||||
container.appendChild(card);
|
||||
card.scrollIntoView({
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$tables = DatabaseShowTables();
|
||||
$selectedTable = $_GET['table'] ?? null;
|
||||
|
||||
?>
|
||||
|
||||
<h2>Datenbank Struktur</h2>
|
||||
|
||||
<form method="GET">
|
||||
<input type="hidden" name="service" value="tabellen">
|
||||
|
||||
<label for="table">Tabelle auswählen:</label>
|
||||
<select name="table" id="table" onchange="this.form.submit()">
|
||||
<option value="">-- Bitte wählen --</option>
|
||||
<?php foreach ($tables as $table): ?>
|
||||
<option value="<?= htmlspecialchars($table) ?>" <?= ($selectedTable === $table) ? 'selected' : '' ?>>
|
||||
<?= htmlspecialchars($table) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
if ($selectedTable && in_array($selectedTable, $tables)) {
|
||||
|
||||
$structure = DatabaseShowTableStructure($selectedTable);
|
||||
|
||||
echo "<div class='table-container'>";
|
||||
echo "<table class='db-table'>";
|
||||
echo "<tr>
|
||||
<th>Field</th>
|
||||
<th>Type</th>
|
||||
<th>Null</th>
|
||||
<th>Key</th>
|
||||
<th>Default</th>
|
||||
<th>Extra</th>
|
||||
</tr>";
|
||||
|
||||
foreach ($structure as $column) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . ($column['Field']) . "</td>";
|
||||
echo "<td>" . ($column['Type']) . "</td>";
|
||||
echo "<td>" . ($column['Null']) . "</td>";
|
||||
echo "<td>" . ($column['Key']) . "</td>";
|
||||
echo "<td>" . ($column['Default']) . "</td>";
|
||||
echo "<td>" . ($column['Extra']) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,227 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../controller/DataController.php');
|
||||
|
||||
$msg = "";
|
||||
$username = $_SESSION['username'] ?? 'Gast';
|
||||
|
||||
if (isset($_GET['action']) && $_GET['action'] === 'delete') {
|
||||
if (isset($_GET['serien_id']) && !empty($_GET['serien_id'])) {
|
||||
$serienId = $_GET['serien_id'];
|
||||
DatabaseDelete("Termine", "SERIEN_ID = ?", $serienId);
|
||||
$msg = "Komplette Terminserie erfolgreich gelöscht!";
|
||||
} elseif (isset($_GET['id'])) {
|
||||
$deleteId = (int)$_GET['id'];
|
||||
DatabaseDelete("Termine", "ID = ?", $deleteId);
|
||||
$msg = "Termin erfolgreich gelöscht!";
|
||||
}
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_termin'])) {
|
||||
$datum = $_POST['datum'] ?? '';
|
||||
$zeit = $_POST['zeit'] ?? '';
|
||||
$name = $_POST['name'] ?? '';
|
||||
$notiz = $_POST['notiz'] ?? '';
|
||||
$wiederholung = $_POST['wiederholung'] ?? 'none';
|
||||
$enddatum = $_POST['enddatum'] ?? '';
|
||||
|
||||
if (!empty($datum) && !empty($zeit) && !empty($name)) {
|
||||
|
||||
if ($wiederholung !== 'none' && !empty($enddatum)) {
|
||||
$currentDate = new DateTime($datum);
|
||||
$endDate = new DateTime($enddatum);
|
||||
|
||||
if ($endDate < $currentDate) {
|
||||
$msg = "Das Enddatum darf nicht vor dem Startdatum liegen.";
|
||||
} else {
|
||||
$insertedCount = 0;
|
||||
$serienId = uniqid('serie_', true);
|
||||
|
||||
$intervalMapping = [
|
||||
'daily' => '+1 day',
|
||||
'weekly' => '+1 week',
|
||||
'monthly' => '+1 month'
|
||||
];
|
||||
|
||||
$modifier = $intervalMapping[$wiederholung] ?? null;
|
||||
|
||||
if ($modifier) {
|
||||
while ($currentDate <= $endDate) {
|
||||
DatabaseInsert(
|
||||
"Termine",
|
||||
"DATUM, ZEIT, NAME, NOTIZ, ERSTELLT_VON, SERIEN_ID, INTERVALL, SERIEN_ENDE",
|
||||
$currentDate->format('Y-m-d'),
|
||||
$zeit,
|
||||
$name,
|
||||
$notiz,
|
||||
$username,
|
||||
$serienId,
|
||||
$wiederholung,
|
||||
$enddatum
|
||||
);
|
||||
$insertedCount++;
|
||||
$currentDate->modify($modifier);
|
||||
}
|
||||
$msg = "Serientermin ($insertedCount Termine) erfolgreich eingetragen!";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DatabaseInsert(
|
||||
"Termine",
|
||||
"DATUM, ZEIT, NAME, NOTIZ, ERSTELLT_VON",
|
||||
$datum,
|
||||
$zeit,
|
||||
$name,
|
||||
$notiz,
|
||||
$username
|
||||
);
|
||||
$msg = "Termin erfolgreich eingetragen!";
|
||||
}
|
||||
} else {
|
||||
$msg = "Bitte alle Pflichtfelder ausfüllen.";
|
||||
}
|
||||
}
|
||||
|
||||
$termine = DatabaseShow(
|
||||
"Termine",
|
||||
"MAX(ID) as ID, MIN(DATUM) as DATUM, ZEIT, NAME, NOTIZ, ERSTELLT_VON, SERIEN_ID, INTERVALL, SERIEN_ENDE",
|
||||
"ERSTELLT_VON = ? GROUP BY IFNULL(SERIEN_ID, ID) ORDER BY DATUM ASC, ZEIT ASC",
|
||||
$username
|
||||
);
|
||||
|
||||
$intervallNamen = [
|
||||
'daily' => 'Täglich',
|
||||
'weekly' => 'Wöchentlich',
|
||||
'monthly' => 'Monatlich'
|
||||
];
|
||||
?>
|
||||
|
||||
<?php if (!empty($msg)): ?>
|
||||
<div class="status-msg"><?= htmlspecialchars($msg) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-container">
|
||||
<h3>📅 Neuen Termin vergeben</h3>
|
||||
<form method="POST" class="vergabe-form">
|
||||
<div class="vergabe-grid">
|
||||
<div class="form-group">
|
||||
<label for="datum">Start-Datum *</label>
|
||||
<input type="date" id="datum" name="datum" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="zeit">Uhrzeit *</label>
|
||||
<input type="time" id="zeit" name="zeit" required
|
||||
style="width:100%; padding:10px; border-radius:5px; border:1px solid var(--input-border); background:var(--input-bg); color:var(--input-text);">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Name / Zweck *</label>
|
||||
<input type="text" id="name" name="name" placeholder="z.B. Kundentermin" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notiz">Notiz (Optional)</label>
|
||||
<input type="text" id="notiz" name="notiz" placeholder="Details zum Termin...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="wiederholung">Wiederholung</label>
|
||||
<select id="wiederholung" name="wiederholung" onchange="toggleEnddatum()"
|
||||
style="width:100%; padding:10px; border-radius:5px; border:1px solid var(--input-border); background:var(--input-bg); color:var(--input-text);">
|
||||
<option value="none">Keine Wiederholung</option>
|
||||
<option value="daily">Täglich</option>
|
||||
<option value="weekly">Wöchentlich</option>
|
||||
<option value="monthly">Monatlich</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group" id="enddatum-group" style="display: none;">
|
||||
<label for="enddatum">Wiederholen bis *</label>
|
||||
<input type="date" id="enddatum" name="enddatum">
|
||||
</div>
|
||||
<button type="submit" name="add_termin" class="btn-submit-vergabe">Speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<h3>📋 Aktuelle Terminbelegungen</h3>
|
||||
<div class="table-container">
|
||||
<table class="db-table mobile-responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum / Turnus</th>
|
||||
<th>Uhrzeit</th>
|
||||
<th>Termin / Name</th>
|
||||
<th>Notiz</th>
|
||||
<th>Eingetragen von</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($termine)): ?>
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center; padding: 20px;">Keine Termine eingetragen.</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($termine as $termin): ?>
|
||||
<?php
|
||||
$dateFormatted = date('d.m.Y', strtotime($termin['DATUM']));
|
||||
$timeFormatted = date('H:i', strtotime($termin['ZEIT']));
|
||||
$istSerie = !empty($termin['SERIEN_ID']);
|
||||
?>
|
||||
<tr>
|
||||
<td data-label="Datum:">
|
||||
<strong><?= htmlspecialchars($dateFormatted) ?></strong>
|
||||
<?php if ($istSerie): ?>
|
||||
<br>
|
||||
<small style="color: var(--primary-color, #007bff); font-style: italic;">
|
||||
(<?= $intervallNamen[$termin['INTERVALL']] ?? '' ?>
|
||||
bis <?= date('d.m.Y', strtotime($termin['SERIEN_ENDE'])) ?>)
|
||||
</small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td data-label="Uhrzeit:"><?= htmlspecialchars($timeFormatted) ?></td>
|
||||
<td data-label="Termin / Name:">
|
||||
<strong><?= htmlspecialchars($termin['NAME']) ?></strong>
|
||||
<?php if ($istSerie): ?>
|
||||
<span
|
||||
style="font-size: 0.8em; background: #e1f5fe; color: #0288d1; padding: 2px 6px; border-radius: 10px; margin-left: 5px;">Wiederholend</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td data-label="Notiz:"><?= htmlspecialchars($termin['NOTIZ'] ?: '-') ?></td>
|
||||
<td data-label="Von:"><span class="badge"><?= htmlspecialchars($termin['ERSTELLT_VON']) ?></span>
|
||||
</td>
|
||||
<td data-label="Aktion:">
|
||||
<?php if ($istSerie): ?>
|
||||
<a href="?service=termine&action=delete&serien_id=<?= urlencode($termin['SERIEN_ID']) ?>"
|
||||
onclick="return confirm('Möchtest du die GESAMTE Terminserie löschen?');">
|
||||
<button class="btn-delete" style="background-color: #d32f2f;">löschen</button>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="?service=termine&action=delete&id=<?= $termin['ID'] ?>"
|
||||
onclick="return confirm('Möchtest du diesen Termin wirklich löschen?');">
|
||||
<button class="btn-delete">Löschen</button>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleEnddatum() {
|
||||
var wiederholung = document.getElementById('wiederholung').value;
|
||||
var enddatumGroup = document.getElementById('enddatum-group');
|
||||
var enddatumInput = document.getElementById('enddatum');
|
||||
|
||||
if (wiederholung !== 'none') {
|
||||
enddatumGroup.style.display = 'block';
|
||||
enddatumInput.required = true;
|
||||
} else {
|
||||
enddatumGroup.style.display = 'none';
|
||||
enddatumInput.required = false;
|
||||
enddatumInput.value = '';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../controller/RoutesController.php');
|
||||
include_once(__DIR__ . '/../modules/Mail.php');
|
||||
|
||||
$view = $_GET['view'] ?? 'show';
|
||||
$selectedService = $_GET['service'] ?? null;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
|
||||
$titel = $_POST['titel'];
|
||||
$beschreibung = $_POST['beschreibung'];
|
||||
|
||||
DatabaseInsert(
|
||||
"Tickets",
|
||||
"TITEL, BESCHREIBUNG, STATUS, ERSTELLER",
|
||||
$titel,
|
||||
$beschreibung,
|
||||
"OFFEN",
|
||||
ucfirst(strtolower((new getSpecificData())->getUsername())),
|
||||
);
|
||||
|
||||
$html = "Titel: $titel\nBeschreibung: $beschreibung";
|
||||
$user = ucfirst(strtolower((new getSpecificData())->getUsername()));
|
||||
|
||||
sendMail(
|
||||
"Neues Ticket von $user",
|
||||
$html,
|
||||
(new getSpecificData())->getRequestURL(),
|
||||
true,
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_entry'])) {
|
||||
$id = $_POST['id'];
|
||||
|
||||
DatabaseDelete("Tickets", "ID = ?", $id);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
$entries = DatabaseShow(
|
||||
"Tickets",
|
||||
"TITEL, BESCHREIBUNG, STATUS",
|
||||
"ERSTELLER = ?",
|
||||
((new getSpecificData())->getUsername()),
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="vergabe-form">
|
||||
<h3>Neues Ticket anlegen</h3>
|
||||
<form method="POST" class="vergabe-grid">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Titel</label>
|
||||
<input type="text" name="titel" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Beschreibung</label>
|
||||
<input type="text" name="beschreibung" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" name="add_entry" class="btn-submit-vergabe">
|
||||
💾 Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-container" style="margin-top: 30px;">
|
||||
<h3>Tickets</h3>
|
||||
|
||||
<?php if (!empty($entries)): ?>
|
||||
<table class="db-table mobile-responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($entries as $entry): ?>
|
||||
<tr>
|
||||
<td data-label="Titel"><?= htmlspecialchars($entry['TITEL'] ?? '') ?></td>
|
||||
<td data-label="Beschreibung"><?= htmlspecialchars($entry['BESCHREIBUNG'] ?? '') ?></td>
|
||||
<td data-label="Status"><?= htmlspecialchars($entry['STATUS'] ?? '') ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Tickets vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
include_once(__DIR__ . '/../controller/DatabaseController.php');
|
||||
include_once(__DIR__ . '/../controller/RoutesController.php');
|
||||
include_once(__DIR__ . '/../modules/Mail.php');
|
||||
|
||||
$view = $_GET['view'] ?? 'show';
|
||||
$selectedService = $_GET['service'] ?? null;
|
||||
|
||||
$allowedStatuses = ['OFFEN', 'DEPLOYED', 'ABGELEHNT', 'ANGENOMMEN'];
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['edit_entry'])) {
|
||||
$id = $_POST['id'];
|
||||
$status = $_POST['status'] ?? '';
|
||||
|
||||
if (in_array($status, $allowedStatuses, true)) {
|
||||
DatabaseUpdate(
|
||||
"Tickets",
|
||||
"STATUS = ?",
|
||||
"ID = ?",
|
||||
$status,
|
||||
$id
|
||||
);
|
||||
}
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_entry'])) {
|
||||
$id = $_POST['id'];
|
||||
|
||||
DatabaseDelete(
|
||||
"Tickets",
|
||||
"ID = ?",
|
||||
$id
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
$entries = DatabaseShow(
|
||||
"Tickets",
|
||||
"ID, TITEL, BESCHREIBUNG, STATUS, ERSTELLER",
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div>
|
||||
<div class="table-container" style="margin-top: 30px;">
|
||||
<h3>Ticket Verwaltung</h3>
|
||||
|
||||
<?php if (!empty($entries)): ?>
|
||||
<table class="db-table mobile-responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Titel</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Status</th>
|
||||
<th>Ersteller</th>
|
||||
<th style="width: 220px;">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($entries as $entry): ?>
|
||||
<tr>
|
||||
<td data-label="Titel"><?= htmlspecialchars($entry['TITEL'] ?? '') ?></td>
|
||||
<td data-label="Beschreibung"><?= htmlspecialchars($entry['BESCHREIBUNG'] ?? '') ?></td>
|
||||
<td data-label="Status"><?= htmlspecialchars($entry['STATUS'] ?? '') ?></td>
|
||||
<td data-label="Ersteller"><?= htmlspecialchars($entry['ERSTELLER'] ?? '') ?></td>
|
||||
<td data-label="Aktion">
|
||||
<form method="POST"
|
||||
style="margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: stretch;">
|
||||
<input type="hidden" name="id" value="<?= htmlspecialchars($entry['ID'] ?? '') ?>">
|
||||
<select name="status" class="status-select">
|
||||
<?php foreach ($allowedStatuses as $statusOption): ?>
|
||||
<option value="<?= htmlspecialchars($statusOption) ?>"
|
||||
<?= ($entry['STATUS'] ?? '') === $statusOption ? 'selected' : '' ?>>
|
||||
<?= htmlspecialchars($statusOption) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" name="edit_entry" class="btn-edit">
|
||||
Speichern
|
||||
</button>
|
||||
</form>
|
||||
<form method="POST"
|
||||
style="margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: stretch; margin-top: 3pt;">
|
||||
<input type="hidden" name="id" value="<?= $entry['ID'] ?? '' ?>">
|
||||
<button type="submit" name="delete_entry" class="btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Tickets vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
// 1. Logik zum Verarbeiten des Formulars (bevor die Liste geladen wird)
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_user'])) {
|
||||
// Nur Admins dürfen Benutzer hinzufügen (Sicherheitscheck)
|
||||
if ((new getSpecificData())->getIsAdmin()) {
|
||||
$controller = new UserController();
|
||||
$controller->setUser(
|
||||
$_POST['name'],
|
||||
$_POST['nachname'],
|
||||
$_POST['email'],
|
||||
$_POST['passwort'],
|
||||
$_POST['rolle'],
|
||||
$_POST['admin'] ?? 0, // Falls Checkbox nicht gesetzt, 0 senden
|
||||
$_POST['home_ip']
|
||||
);
|
||||
// Optional: Seite neu laden, um die Liste zu aktualisieren
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['password'])) {
|
||||
if (isset($superuser['admin']['password']) && $_POST['password'] === $superuser['admin']['password']) {
|
||||
$_SESSION['logged_in'] = true;
|
||||
} else {
|
||||
$error = "Falsches Passwort!";
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Daten für die Tabelle holen (dein bestehender Code)
|
||||
$specificData = new getSpecificData();
|
||||
$isAdmin = $specificData->getIsAdmin();
|
||||
|
||||
if ($isAdmin) {
|
||||
$users = DatabaseShow("Benutzer", "NAME, NACHNAME, EMAIL, ROLLE, ADMIN, HOME_IP");
|
||||
} else {
|
||||
$users = DatabaseShow(
|
||||
"Benutzer",
|
||||
"NAME, NACHNAME, EMAIL, ROLLE, ADMIN, HOME_IP",
|
||||
"NAME = ?",
|
||||
$specificData->getUsername()
|
||||
);
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_user'])) {
|
||||
|
||||
if ((new getSpecificData())->getIsAdmin()) {
|
||||
|
||||
$controller = new UserController();
|
||||
$controller->DeleteUser(
|
||||
$_POST['delete_name'],
|
||||
$_POST['delete_nachname'],
|
||||
$_POST['delete_email']
|
||||
);
|
||||
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['logout'])) {
|
||||
unset($_SESSION['logged_in']);
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="content">
|
||||
<?php if (!($_SESSION['logged_in'] ?? false)): ?>
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<form method="post">
|
||||
<h2>🔐 Login</h2>
|
||||
<?php if(isset($error)): ?>
|
||||
<div class="status-msg" style="background:#dc3545; color:#fff;"><?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="password" name="password" placeholder="Passwort" required>
|
||||
<button type="submit">Einloggen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h2>Benutzerverwaltung</h2>
|
||||
<form method="post">
|
||||
<button type="submit" name="logout" id="logoutSiteButton">Logout</button>
|
||||
</form>
|
||||
|
||||
<?php if ($isAdmin): ?>
|
||||
<div class="form-container">
|
||||
<h3>Neuen Benutzer anlegen</h3>
|
||||
<form method="POST" action="">
|
||||
<div class="user-form-grid">
|
||||
<input type="text" name="name" placeholder="Vorname" required>
|
||||
<input type="text" name="nachname" placeholder="Nachname" required>
|
||||
<input type="text" name="email" placeholder="E-Mail" required>
|
||||
<input type="text" name="passwort" placeholder="Passwort" required>
|
||||
<input type="text" name="rolle" placeholder="Rolle (z.B. User)">
|
||||
<input type="text" name="home_ip" placeholder="Home IP">
|
||||
|
||||
<label class="checkbox-group">
|
||||
<input type="checkbox" name="admin" value="1">
|
||||
<span>Admin-Rechte</span>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" name="add_user" class="btn-submit">
|
||||
Benutzer speichern
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="table-container">
|
||||
<table class="user-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vorname</th>
|
||||
<th>Nachname</th>
|
||||
<th>E-Mail</th>
|
||||
<?php if ($isAdmin): ?>
|
||||
<th>Rolle</th>
|
||||
<th>Admin</th>
|
||||
<th>Home IP</th>
|
||||
<th></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<tr>
|
||||
<td><?= htmlspecialchars($user['NAME']) ?></td>
|
||||
<td><?= htmlspecialchars($user['NACHNAME']) ?></td>
|
||||
<td><?= htmlspecialchars($user['EMAIL']) ?></td>
|
||||
<?php if ($isAdmin): ?>
|
||||
<td><?= htmlspecialchars($user['ROLLE']) ?></td>
|
||||
<td><?= htmlspecialchars($user['ADMIN']) ?></td>
|
||||
<td><?= htmlspecialchars($user['HOME_IP']) ?></td>
|
||||
<td>
|
||||
<form method="POST" onsubmit="return confirm('Wirklich löschen?');">
|
||||
<input type="hidden" name="delete_name" value="<?= htmlspecialchars($user['NAME']) ?>">
|
||||
<input type="hidden" name="delete_nachname"
|
||||
value="<?= htmlspecialchars($user['NACHNAME']) ?>">
|
||||
<input type="hidden" name="delete_email" value="<?= htmlspecialchars($user['EMAIL']) ?>">
|
||||
<button type="submit" name="delete_user" class="btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if (isset($_POST['toggle_variable'])) {
|
||||
|
||||
$name = $_POST['variablenname'];
|
||||
|
||||
$current = (new getSpecificData())->getLoggingStatus($name)[0]['WERT'];
|
||||
$newValue = ($current === "ON") ? "OFF" : "ON";
|
||||
|
||||
DatabaseUpdate(
|
||||
"Variablen",
|
||||
"WERT = ?",
|
||||
"VARIABLENNAME = ?",
|
||||
$newValue,
|
||||
$name
|
||||
);
|
||||
header("Location: " . (new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
$variablen = DatabaseShow(
|
||||
"Variablen",
|
||||
"VARIABLENNAME, WERT, ANZEIGENAME"
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
<div class="admin-grid">
|
||||
|
||||
<?php foreach ($variablen as $var): ?>
|
||||
<div class="admin-card toggle-card">
|
||||
|
||||
<div class="toggle-header">
|
||||
<strong><?= htmlspecialchars($var['ANZEIGENAME']) ?></strong>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="variablenname" value="<?= htmlspecialchars($var['VARIABLENNAME']) ?>">
|
||||
|
||||
<button type="submit" name="toggle_variable"
|
||||
class="toggle-switch <?= $var['WERT'] === 'ON' ? 'active' : '' ?>">
|
||||
<span class="toggle-slider"></span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="toggle-status">
|
||||
Status:
|
||||
<span class="badge">
|
||||
<?= htmlspecialchars($var['WERT']) ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,299 @@
|
||||
<?php
|
||||
include_once __DIR__ . '/../controller/DatabaseController.php';
|
||||
include_once __DIR__ . '/../controller/RoutesController.php';
|
||||
include_once __DIR__ . '/../modules/ConsoleLog.php';
|
||||
|
||||
$conn = db_connect();
|
||||
$view = $_GET['view'] ?? 'show';
|
||||
$selectedService = $_GET['service'] ?? null;
|
||||
|
||||
// --- Suchfilter auslesen ---
|
||||
$searchWer = $_GET['search_wer'] ?? '';
|
||||
$searchWas = $_GET['search_was'] ?? '';
|
||||
|
||||
// --- LOGIK: Überstunden-Eintrag (Abbau) speichern ---
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_entry'])) {
|
||||
$was = $_POST['was'];
|
||||
$wer = $_POST['wer'];
|
||||
$wann = $_POST['wann'];
|
||||
$rueckgabe = $_POST['rueckgabe'];
|
||||
|
||||
DatabaseInsert(
|
||||
"Vergabe",
|
||||
"WAS, WER, WANN, RUECKGABE",
|
||||
$was,
|
||||
$wer,
|
||||
$wann,
|
||||
$rueckgabe
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_entry'])) {
|
||||
$id = $_POST['id'];
|
||||
|
||||
ConsoleLog("$id");
|
||||
|
||||
DatabaseUpdate(
|
||||
"Vergabe",
|
||||
"STATUS = ?",
|
||||
"ID = ?",
|
||||
1,
|
||||
$id
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
// --- Dynamic Query mit kombiniertem Suchfilter ---
|
||||
$whereClause = "STATUS IS NULL";
|
||||
if (!empty($searchWer)) {
|
||||
$whereClause .= " AND WER LIKE '%" . $conn->real_escape_string($searchWer) . "%'";
|
||||
}
|
||||
if (!empty($searchWas)) {
|
||||
$whereClause .= " AND WAS LIKE '%" . $conn->real_escape_string($searchWas) . "%'";
|
||||
}
|
||||
|
||||
$entries = DatabaseShow(
|
||||
"Vergabe",
|
||||
"ID, WAS, WER, WANN, RUECKGABE",
|
||||
$whereClause
|
||||
);
|
||||
|
||||
$searchEntries = DatabaseShow(
|
||||
"Vergabe",
|
||||
);
|
||||
|
||||
$existingWas = [];
|
||||
$existingWer = [];
|
||||
foreach ($searchEntries as $entry) {
|
||||
if (!empty($entry['WAS'])) $existingWas[$entry['WAS']] = true;
|
||||
if (!empty($entry['WER'])) $existingWer[$entry['WER']] = true;
|
||||
}
|
||||
$existingWas = array_keys($existingWas);
|
||||
$existingWer = array_keys($existingWer);
|
||||
?>
|
||||
|
||||
<div class="arbeitsberichte-wrapper">
|
||||
<div class="vergabe-form">
|
||||
<form method="POST" class="vergabe-grid">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Wann ausgeliehen</label>
|
||||
<input type="date" name="wann" value="<?= date('Y-m-d') ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Rückgabe</label>
|
||||
<input type="date" name="rueckgabe" value="<?= date('Y-m-d') ?>" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group autocomplete-wrapper">
|
||||
<label>An wen</label>
|
||||
<input type="text" name="wer" id="wer-input" placeholder="Name eingeben" required autocomplete="off">
|
||||
<div class="autocomplete-suggestions" id="wer-suggestions"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group autocomplete-wrapper">
|
||||
<label>Was</label>
|
||||
<input type="text" name="was" id="was-input" placeholder="Gegenstand eingeben" required autocomplete="off">
|
||||
<div class="autocomplete-suggestions" id="was-suggestions"></div>
|
||||
</div>
|
||||
|
||||
<button type="submit" name="add_entry" class="btn-submit-vergabe">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="vergabe-form" style="margin-top: 30px;">
|
||||
<form method="GET" action="" class="vergabe-grid" id="search-form">
|
||||
<input type="hidden" name="view" value="<?= htmlspecialchars($view) ?>">
|
||||
<?php if ($selectedService): ?>
|
||||
<input type="hidden" name="service" value="<?= htmlspecialchars($selectedService) ?>">
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-group autocomplete-wrapper">
|
||||
<label for="search-wer-input">Nach Person filtern</label>
|
||||
<input type="text" name="search_wer" id="search-wer-input" value="<?= htmlspecialchars($searchWer) ?>" placeholder="Name eingeben..." autocomplete="off">
|
||||
<div class="autocomplete-suggestions" id="search-wer-suggestions"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group autocomplete-wrapper">
|
||||
<label for="search-was-input">Nach Gegenstand filtern</label>
|
||||
<input type="text" name="search_was" id="search-was-input" value="<?= htmlspecialchars($searchWas) ?>" placeholder="Gegenstand eingeben..." autocomplete="off">
|
||||
<div class="autocomplete-suggestions" id="search-was-suggestions"></div>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 10px; align-items: flex-end;">
|
||||
<button type="submit" class="btn-submit-vergabe" style="margin: 0; flex-grow: 1;">
|
||||
Suchen
|
||||
</button>
|
||||
|
||||
<?php if (!empty($searchWer) || !empty($searchWas)): ?>
|
||||
<a href="?view=<?= urlencode($view) ?><?= $selectedService ? '&service=' . urlencode($selectedService) : '' ?>" class="btn-delete" style="text-decoration: none; padding: 10px; display: inline-block; text-align: center; white-space: nowrap; margin: 0;">
|
||||
Zurücksetzen
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-container" style="margin-top: 30px;">
|
||||
<h3>
|
||||
<?php
|
||||
if (!empty($searchWer) && !empty($searchWas)) {
|
||||
echo "Gefiltert nach: " . htmlspecialchars($searchWer) . " ➔ " . htmlspecialchars($searchWas);
|
||||
} elseif (!empty($searchWer)) {
|
||||
echo "Vergaben für: " . htmlspecialchars($searchWer);
|
||||
} elseif (!empty($searchWas)) {
|
||||
echo "Ausgeliehene Gegenstände: " . htmlspecialchars($searchWas);
|
||||
} else {
|
||||
echo "Aktuelle Vergaben";
|
||||
}
|
||||
?>
|
||||
</h3>
|
||||
|
||||
<?php if (!empty($entries)): ?>
|
||||
<table class="db-table mobile-responsive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Was</th>
|
||||
<th>Wer</th>
|
||||
<th>Wann ausgeliehen</th>
|
||||
<th>Rückgabe</th>
|
||||
<th style="width: 100px;">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($entries as $entry): ?>
|
||||
<tr>
|
||||
<td data-label="Was"><?= htmlspecialchars($entry['WAS'] ?? '') ?></td>
|
||||
<td data-label="Wer"><?= htmlspecialchars($entry['WER'] ?? '') ?></td>
|
||||
<td data-label="Wann"><?= htmlspecialchars($entry['WANN'] ?? '') ?></td>
|
||||
<td data-label="Rückgabe"><?= htmlspecialchars($entry['RUECKGABE'] ?? '') ?></td>
|
||||
<td data-label="Aktion">
|
||||
<form method="POST" onsubmit="return confirm('Möchtest du diesen Eintrag wirklich löschen?');" style="margin: 0;">
|
||||
<input type="hidden" name="id" value="<?= $entry['ID'] ?? '' ?>">
|
||||
<button type="submit" name="delete_entry" class="btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Einträge vorhanden.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Parameter `submitOnSelect` hinzugefügt (Standard: false)
|
||||
function setupAutocomplete(inputId, suggestionsId, data, submitOnSelect = false) {
|
||||
const input = document.getElementById(inputId);
|
||||
const box = document.getElementById(suggestionsId);
|
||||
if (!input || !box) return;
|
||||
|
||||
let items = [];
|
||||
let activeIndex = -1;
|
||||
|
||||
function render(list) {
|
||||
box.innerHTML = '';
|
||||
items = list;
|
||||
activeIndex = -1;
|
||||
if (list.length === 0) {
|
||||
box.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
list.forEach((val, i) => {
|
||||
const div = document.createElement('div');
|
||||
div.textContent = val;
|
||||
div.addEventListener('mousedown', (e) => {
|
||||
e.preventDefault();
|
||||
selectItem(i);
|
||||
});
|
||||
box.appendChild(div);
|
||||
});
|
||||
box.style.display = 'block';
|
||||
}
|
||||
|
||||
function updateActive() {
|
||||
[...box.children].forEach((el, i) => {
|
||||
el.classList.toggle('active', i === activeIndex);
|
||||
});
|
||||
if (activeIndex >= 0) {
|
||||
box.children[activeIndex].scrollIntoView({
|
||||
block: 'nearest'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function selectItem(i) {
|
||||
if (items[i] !== undefined) {
|
||||
input.value = items[i];
|
||||
}
|
||||
box.style.display = 'none';
|
||||
activeIndex = -1;
|
||||
|
||||
// NEU: Wenn gewünscht, schicke das übergeordnete Formular sofort ab
|
||||
if (submitOnSelect) {
|
||||
const form = input.closest('form');
|
||||
if (form) form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
input.addEventListener('input', () => {
|
||||
const val = input.value.toLowerCase();
|
||||
if (val.length === 0) {
|
||||
box.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
const filtered = data.filter(d => d.toLowerCase().includes(val));
|
||||
render(filtered);
|
||||
});
|
||||
|
||||
input.addEventListener('keydown', (e) => {
|
||||
if (box.style.display !== 'block') return;
|
||||
|
||||
if (e.key === 'ArrowDown') {
|
||||
e.preventDefault();
|
||||
activeIndex = Math.min(activeIndex + 1, items.length - 1);
|
||||
updateActive();
|
||||
} else if (e.key === 'ArrowUp') {
|
||||
e.preventDefault();
|
||||
activeIndex = Math.max(activeIndex - 1, 0);
|
||||
updateActive();
|
||||
} else if (e.key === 'Tab' || e.key === 'Enter') {
|
||||
if (activeIndex >= 0) {
|
||||
e.preventDefault();
|
||||
selectItem(activeIndex);
|
||||
} else {
|
||||
box.style.display = 'none';
|
||||
}
|
||||
} else if (e.key === 'Escape') {
|
||||
box.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
if (e.target !== input) {
|
||||
box.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 1. Normales Autocomplete für das Eintragungs-Formular (schickt nicht automatisch ab)
|
||||
setupAutocomplete('was-input', 'was-suggestions', <?= json_encode($existingWas) ?>);
|
||||
setupAutocomplete('wer-input', 'wer-suggestions', <?= json_encode($existingWer) ?>);
|
||||
|
||||
// 2. Such-Autocomplete: Hier wird als 4. Parameter `true` übergeben, damit sofort abgesendet wird!
|
||||
setupAutocomplete('search-wer-input', 'search-wer-suggestions', <?= json_encode($existingWer) ?>, true);
|
||||
setupAutocomplete('search-was-input', 'search-was-suggestions', <?= json_encode($existingWas) ?>, true);
|
||||
</script>
|
||||
@@ -1,16 +1,7 @@
|
||||
<?php
|
||||
$servername = "testserver.blackpi.ipv64.net";
|
||||
$username = "worker";
|
||||
$password = "bBHofurUJWKzPE8Z";
|
||||
$dbname = "DEV";
|
||||
$conn = db_connect();
|
||||
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
|
||||
if ($conn->connect_error) {
|
||||
die("Verbindung fehlgeschlagen: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$sql = "SELECT DATE(FIRST_REQUEST) as tag, COUNT(*) as anzahl FROM logs GROUP BY DATE(FIRST_REQUEST) ORDER BY DATE(FIRST_REQUEST)";
|
||||
$sql = "SELECT ZEIT, AKTUELL FROM Wetter";
|
||||
$result = $conn->query($sql);
|
||||
|
||||
$labels = [];
|
||||
@@ -18,8 +9,8 @@ $data = [];
|
||||
|
||||
if ($result->num_rows > 0) {
|
||||
while($row = $result->fetch_assoc()) {
|
||||
$labels[] = $row['tag'];
|
||||
$data[] = (int)$row['anzahl'];
|
||||
$labels[] = $row['ZEIT'];
|
||||
$data[] = (float)$row['AKTUELL'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +22,9 @@ $conn->close();
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Logs Chart</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -46,11 +38,11 @@ $conn->close();
|
||||
data: {
|
||||
labels: <?php echo json_encode($labels); ?>,
|
||||
datasets: [{
|
||||
label: 'Logs pro Tag',
|
||||
label: 'Wetter',
|
||||
data: <?php echo json_encode($data); ?>,
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
backgroundColor: 'rgba(75, 192, 192, 0.2)',
|
||||
fill: true,
|
||||
fill: false,
|
||||
tension: 0
|
||||
}]
|
||||
},
|
||||
@@ -60,29 +52,44 @@ $conn->close();
|
||||
plugins: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Logs pro Tag'
|
||||
},
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top'
|
||||
},
|
||||
zoom: {
|
||||
pan: {
|
||||
enabled: true,
|
||||
mode: 'x',
|
||||
},
|
||||
zoom: {
|
||||
wheel: {
|
||||
enabled: true,
|
||||
},
|
||||
mode: 'x',
|
||||
}
|
||||
}
|
||||
},
|
||||
interaction: {
|
||||
mode: 'index',
|
||||
intersect: false
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Datum'
|
||||
text: 'Zeitraum'
|
||||
}
|
||||
},
|
||||
y: {
|
||||
min: 0,
|
||||
max: 300,
|
||||
min: -10,
|
||||
max: 40,
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Anzahl Logs'
|
||||
text: 'Temperatur in °C'
|
||||
},
|
||||
ticks: {
|
||||
stepSize: 20
|
||||
stepSize: 1
|
||||
},
|
||||
beginAtZero: true
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
include_once __DIR__ . '/../controller/DatabaseController.php';
|
||||
include_once __DIR__ . '/../controller/RoutesController.php';
|
||||
|
||||
$conn = db_connect();
|
||||
$view = $_GET['view'] ?? 'show';
|
||||
$selectedService = $_GET['service'];
|
||||
|
||||
// --- LOGIK: Überstunden-Eintrag (Abbau) speichern ---
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['add_overtime'])) {
|
||||
$datum = $_POST['ot_date'];
|
||||
$minuten = intval($_POST['ot_minutes']);
|
||||
$grund = $conn->real_escape_string($_POST['ot_reason']);
|
||||
|
||||
DatabaseInsert(
|
||||
"Ueberstunden",
|
||||
"DATUM, MINUTEN, GRUND",
|
||||
$datum,
|
||||
$minuten,
|
||||
$grund
|
||||
);
|
||||
|
||||
redirectToWebsite((new getSpecificData())->getReferer());
|
||||
exit;
|
||||
}
|
||||
|
||||
// --- Gesamtsumme berechnen ---
|
||||
$minuten_berichte = 0;
|
||||
$res1 = $conn->query("SELECT SUM(OVERTIME) AS summe FROM Firmenberichte");
|
||||
if ($row = $res1->fetch_object()) { $minuten_berichte = intval($row->summe); }
|
||||
|
||||
$minuten_abbau = 0;
|
||||
$res2 = $conn->query("SELECT SUM(MINUTEN) AS summe FROM Ueberstunden WHERE GRUND = 'Abbau'");
|
||||
if ($row = $res2->fetch_object()) { $minuten_abbau = intval($row->summe); }
|
||||
|
||||
$minuten_aufbau = 0;
|
||||
$res2 = $conn->query("SELECT SUM(MINUTEN) AS summe FROM Ueberstunden WHERE GRUND = 'Aufbau'");
|
||||
if ($row = $res2->fetch_object()) { $minuten_aufbau = intval($row->summe); }
|
||||
|
||||
$gesamt_minuten = $minuten_berichte - $minuten_abbau + $minuten_aufbau;
|
||||
?>
|
||||
|
||||
<div class="arbeitsberichte-wrapper">
|
||||
<div
|
||||
style="background: rgba(150,150,150,0.05); padding: 25px; border-radius: 10px; margin-bottom: 25px; border: 1px solid rgba(150,150,150,0.2); border-left: 6px solid #007bff;">
|
||||
<div style="margin-bottom: 20px;">
|
||||
<span style="color: #888; font-size: 0.8rem; font-weight: bold; text-transform: uppercase;">Aktueller
|
||||
Stand</span>
|
||||
<h2 style="margin: 5px 0 0 0; font-size: 2rem; color: <?= $gesamt_minuten >= 0 ? '#28a745' : '#dc3545' ?>;">
|
||||
<?= intdiv($gesamt_minuten, 60) ?>h <?= abs($gesamt_minuten % 60) ?>min
|
||||
</h2>
|
||||
</div>
|
||||
<?php if ($_SESSION['username'] == "bruno" || $_SESSION['username'] == "Bruno"): ?>
|
||||
<form method="POST" style="display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end;">
|
||||
<input type="hidden" name="add_overtime" value="1">
|
||||
<div style="display: flex; flex-direction: column; gap: 5px;">
|
||||
<label style="font-size: 0.85rem; font-weight: 600; color: inherit;">Datum</label>
|
||||
<input type="date" name="ot_date" value="<?= date('Y-m-d') ?>" required
|
||||
style="padding: 8px; border: 1px solid rgba(150,150,150,0.3); border-radius: 4px; background: rgba(150,150,150,0.1); color: inherit;">
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; gap: 5px;">
|
||||
<label style="font-size: 0.85rem; font-weight: 600; color: inherit;">Minuten Abbau</label>
|
||||
<input type="number" name="ot_minutes" placeholder="480" required
|
||||
style="width: 100px; padding: 8px; border: 1px solid rgba(150,150,150,0.3); border-radius: 4px; background: rgba(150,150,150,0.1); color: inherit;">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label style="font-size: 0.85rem; font-weight: 600; color: inherit;">Grund</label>
|
||||
|
||||
<select name="ot_reason" required>
|
||||
|
||||
<option value="">Bitte wählen</option>
|
||||
<option value="Abbau">Abbau</option>
|
||||
<option value="Aufbau">Aufbau</option>
|
||||
<option value="Anderes">Anderes</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit"
|
||||
style="background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; font-weight: bold; cursor: pointer;">
|
||||
Eintrag speichern
|
||||
</button>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/.htaccess</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/api/get.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/api/upload.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/favicon.ico</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/index.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/modules/ConsoleLog.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/api_tester.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/backend_request_chart.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/backend_request_logs.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/berichte_arbeit.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/berichte_arbeit_gen.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/data_info.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/home_info.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/links.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/logout.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/personal_request_logs.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/public_request_chart.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/public_request_logs.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/services_control.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/tabellen.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/user_control.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/variablen_control.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/services/weather_chart.php</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/sitemap.xml</loc>
|
||||
<lastmod>2026-03-03</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://backend.blackpi.ipv64.net/style.css</loc>
|
||||
<lastmod>2026-03-02</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user