fix: rename DebugLog function to ConsoleLog

This commit is contained in:
Bruno Eckhardt committed 2026-01-04 20:16:51 +01:00
1 parent b5e05a8ca2
commit 57503b2c6d
3 files changed
+48 -35

No files matched your search

+8 -8
View File
@@ -11,21 +11,21 @@ $cookie = new cookieController();
$clientIP = $data->getClientIP();
$whitelist = $data->getWhitelistedIPs();
// if (in_array($clientIP, $whitelist)) {
if (in_array($clientIP, $whitelist)) {
// $cookie->SetCookie("USER", "1", 60);
$cookie->SetCookie("USER", "1", 60);
print_r($data->ShowAllData());
echo '<a href="/controller/RoutesController.php?website=/services/Dashboards/MainDashboard.php">Main Dashboard</a>';
// } else {
} else {
// $cookie->SetCookie("USER", "0", 60);
$cookie->SetCookie("USER", "0", 60);
// header("Location: /controller/RoutesController.php?website=/services/Dashboards/MainDashboard.php");
// exit;
// }
header("Location: /controller/RoutesController.php?website=/services/Dashboards/MainDashboard.php");
exit;
}
$allData = (new getSpecificData())->getAllData();
DebugLog($allData);
ConsoleLog($allData);
logging();
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
function DebugLog(...$vars) {
function ConsoleLog(...$vars) {
echo "<script>";
foreach ($vars as $index => $value) {
+39 -26
View File
@@ -1,34 +1,47 @@
<?php
include_once '../controller/DatabaseController.php';
include_once '../controller/DatabaseConnect.php';
include_once '../controller/DataController.php';
include_once '../moduls/ConsoleLog.php';
// DatabaseDelete(
// "Whitelisted",
// "id = ?",
// 5 // wert für spalte
// );
$data = new getSpecificData();
$clientIP = $data->getClientIP();
$whitelist = $data->getWhitelistedIPs();
DatabaseUpdate(
"Whitelisted",
"Grund = ?",
"id = ?",
"Localhost IP", // wert für Grund
3 // wert für id
);
ConsoleLog($whitelist);
// DatabaseInsert(
// "Whitelisted",
// "`IP-ADDRESSE`, GRUND, STATUS",
// "80.153.174.251",
// "DEVELOPER",
// "true"
// );
if (in_array($clientIP, $whitelist)) {
// DatabaseDelete(
// "Whitelisted",
// "id = ?",
// 5 // wert für spalte
// );
$data = DatabaseShow(
"Whitelisted",
"id, `IP-ADDRESSE`, GRUND, STATUS"
);
// DatabaseUpdate(
// "Whitelisted",
// "Grund = ?",
// "id = ?",
// "Localhost IP", // wert für Grund
// 3 // wert für id
// );
echo '<pre>';
print_r($data);
echo '</pre>';
// DatabaseInsert(
// "Whitelisted",
// "`IP-ADDRESSE`, GRUND, STATUS",
// "80.153.174.251",
// "DEVELOPER",
// "true"
// );
$data = DatabaseShow(
"Whitelisted",
"id, `IP-ADDRESSE`, GRUND, STATUS"
);
echo '<pre>';
print_r($data);
echo '</pre>';
} else {
header("Location: /controller/RoutesController.php?website=/static/access_denied.php");
}