This commit is contained in:
jakani24
2024-06-08 20:23:02 +02:00
parent 444e56d675
commit 22fc95fb70
11 changed files with 15 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ if(!isset($_SESSION["2fa_auth"])){ //so only someone who has allready confirmed
exit();
}
include "../../../api/php/notifications/sendmessage.php"; //to send user notification on login
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<!DOCTYPE html>
<html lang="en">

View File

@@ -2,6 +2,7 @@
//with db:
require_once 'WebAuthn.php';
include "../../../api/php/log/add_server_entry.php"; //to log things
// Assuming you've already established a database connection here
include "../../../config.php";
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD,$DB_DATABASE);
@@ -9,6 +10,7 @@ if ($conn->connect_error) {
$success=0;
die("Connection failed: " . $conn->connect_error);
}
try {
session_start();

View File

@@ -10,6 +10,7 @@ if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
include "../../../api/php/notifications/sendmessage.php"; //to send user notification on login
include "../../../api/php/log/add_server_entry.php"; //to log things
try {
session_start();

View File

@@ -21,6 +21,7 @@ if($perms[6]!=="1"){
//for the get_perms_str() function
include "perms_functions.php";
include "../../../config.php";
include "../../../api/php/log/add_server_entry.php"; //to log things
//create connection to db
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);

View File

@@ -26,7 +26,7 @@ $machine_id = htmlspecialchars(isset($_GET["machine_id"]) ? $_GET["machine_id"]
$time = htmlspecialchars(isset($_GET["time"]) ? $_GET["time"] : "");
$machine_location = htmlspecialchars(isset($_GET["machine_location"]) ? $_GET["machine_location"] : "");
$filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&time=$time&machine_location=$machine_location";
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<!DOCTYPE html>
<html lang="en">

View File

@@ -20,6 +20,7 @@ if($perms[0]!=="1"){
}
//for the get_perms_str() function
include "perms_functions.php";
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<!DOCTYPE html>
<html lang="en">

View File

@@ -11,6 +11,7 @@ if (!isset($_SESSION['username']) or !isset($_SESSION["login"])) {
$username = $_SESSION['username'];
$perms = $_SESSION["perms"];
$email = $_SESSION["email"];
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<!DOCTYPE html>
<html lang="en">

View File

@@ -12,6 +12,7 @@ $username = $_SESSION['username'];
$perms = $_SESSION["perms"];
$email = $_SESSION["email"];
$telegram_id=$_SESSION["telegram_id"];
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<?php
//update the info, if provided.

View File

@@ -18,8 +18,10 @@ if($perms[1]!=="1"){
}else{
$block=0;
}
//for the get_perms_str() function
include "perms_functions.php";
include "../../../api/php/log/add_server_entry.php"; //to log things
?>
<!DOCTYPE html>
<html lang="en">

View File

@@ -29,6 +29,7 @@ $machine_location = htmlspecialchars(isset($_GET["machine_location"]) ? $_GET["m
$filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&time=$time&machine_location=$machine_location";
include "../../../config.php";
include "../../../api/php/log/add_server_entry.php"; //to log things
//get data for pie chart
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
if ($conn->connect_error) {