fix: rename DebugLog function to ConsoleLog
This commit is contained in:
1 parent
b5e05a8ca2
commit
57503b2c6d
3 files changed
+29
-16
No files matched your search
+8
-8
@@ -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,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
function DebugLog(...$vars) {
|
||||
function ConsoleLog(...$vars) {
|
||||
echo "<script>";
|
||||
|
||||
foreach ($vars as $index => $value) {
|
||||
|
||||
@@ -1,20 +1,30 @@
|
||||
<?php
|
||||
|
||||
include_once '../controller/DatabaseController.php';
|
||||
include_once '../controller/DatabaseConnect.php';
|
||||
include_once '../controller/DataController.php';
|
||||
include_once '../moduls/ConsoleLog.php';
|
||||
|
||||
$data = new getSpecificData();
|
||||
$clientIP = $data->getClientIP();
|
||||
$whitelist = $data->getWhitelistedIPs();
|
||||
|
||||
ConsoleLog($whitelist);
|
||||
|
||||
if (in_array($clientIP, $whitelist)) {
|
||||
// DatabaseDelete(
|
||||
// "Whitelisted",
|
||||
// "id = ?",
|
||||
// 5 // wert für spalte
|
||||
// );
|
||||
|
||||
DatabaseUpdate(
|
||||
"Whitelisted",
|
||||
"Grund = ?",
|
||||
"id = ?",
|
||||
"Localhost IP", // wert für Grund
|
||||
3 // wert für id
|
||||
);
|
||||
// DatabaseUpdate(
|
||||
// "Whitelisted",
|
||||
// "Grund = ?",
|
||||
// "id = ?",
|
||||
// "Localhost IP", // wert für Grund
|
||||
// 3 // wert für id
|
||||
// );
|
||||
|
||||
// DatabaseInsert(
|
||||
// "Whitelisted",
|
||||
@@ -32,3 +42,6 @@ $data = DatabaseShow(
|
||||
echo '<pre>';
|
||||
print_r($data);
|
||||
echo '</pre>';
|
||||
} else {
|
||||
header("Location: /controller/RoutesController.php?website=/static/access_denied.php");
|
||||
}
|
||||
Reference in new issue
Block a user