From b06c14dcb8a2cc2a1a1f84a0d20e65b85bbccc1b Mon Sep 17 00:00:00 2001
From: Janis Steiner
Date: Mon, 9 Dec 2024 16:27:04 +0000
Subject: [PATCH] updating all files to use darkmode
---
sys0-code/app/bugreport.php | 4 +-
sys0-code/app/cloud.php | 6 +-
sys0-code/app/create_admin.php | 4 +-
sys0-code/app/create_key.php | 4 +-
sys0-code/app/debug.php | 6 +-
sys0-code/app/delete-account.php | 2 +-
sys0-code/app/maintenance.html | 2 +-
sys0-code/app/manage_user.php | 2 +-
sys0-code/app/manage_user.php.old | 296 ------------------------------
sys0-code/app/overview.php | 6 +-
sys0-code/app/print.php | 4 +-
sys0-code/app/public_cloud.php | 4 +-
sys0-code/app/reservations.php | 2 +-
sys0-code/app/view_apikey.php | 2 +-
sys0-code/app/view_log.php | 2 +-
15 files changed, 25 insertions(+), 321 deletions(-)
delete mode 100644 sys0-code/app/manage_user.php.old
diff --git a/sys0-code/app/bugreport.php b/sys0-code/app/bugreport.php
index 82d03a8..3bdc9d2 100644
--- a/sys0-code/app/bugreport.php
+++ b/sys0-code/app/bugreport.php
@@ -1,5 +1,5 @@
-
+
Deine Email für weitere Nachfragen (optional)
">
- abschicken
+ abschicken
-
+
Datei Hochladen
- Create Account
+ Create Account
-
+
Account Einstellungen
@@ -61,7 +61,7 @@ if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true || $_SESSION[
Ein Druckschlüssel ist ein Code, welcher ein Benutzer benutzen kann, um einen Druckauftrag zu starten.
-
+
$printer_id Status auf kaputt setzen ");
+ echo("$printer_id Status auf kaputt setzen ");
else
- echo("$printer_id Status auf bereit setzen ");
+ echo("$printer_id Status auf bereit setzen ");
$cnt--;
}
echo("");
diff --git a/sys0-code/app/delete-account.php b/sys0-code/app/delete-account.php
index 85e7585..0d3602b 100644
--- a/sys0-code/app/delete-account.php
+++ b/sys0-code/app/delete-account.php
@@ -12,7 +12,7 @@ if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
?>
-
+
Account settings
diff --git a/sys0-code/app/maintenance.html b/sys0-code/app/maintenance.html
index 99202a4..f04f9d1 100644
--- a/sys0-code/app/maintenance.html
+++ b/sys0-code/app/maintenance.html
@@ -1,5 +1,5 @@
-
+
diff --git a/sys0-code/app/manage_user.php b/sys0-code/app/manage_user.php
index aefa19f..b313718 100644
--- a/sys0-code/app/manage_user.php
+++ b/sys0-code/app/manage_user.php
@@ -1,5 +1,5 @@
-
+
diff --git a/sys0-code/app/manage_user.php.old b/sys0-code/app/manage_user.php.old
deleted file mode 100644
index 2e0a0f9..0000000
--- a/sys0-code/app/manage_user.php.old
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
- Manage user
-
-
-
-
-
-
- ");?>
-
-load_user()");
- require_once "../config/config.php";
- if(isset($_GET["update_id"]) && $_GET["rid"]==$_SESSION["rid"]-1){
- $tid=$_GET["update_id"];
- $perms=get_perm_string();
- $sql="UPDATE users SET role = '$perms' WHERE id=$tid";
- $stmt = mysqli_prepare($link, $sql);
- mysqli_stmt_execute($stmt);
- }
- if(isset($_GET['username']) && isset($_GET["delete"]))
- {
- $username_td=$_GET['username'];
- $username_td=htmlspecialchars($username_td);
- $sql="DELETE FROM users WHERE username = '$username_td';";
- //echo($sql);
- $stmt = mysqli_prepare($link, $sql);
- mysqli_stmt_execute($stmt);
- deleteDirectory("/var/www/html/user_files/$username_td/");
- log_("Deleted $username_td","BAN:DELETION");
- }
- else if(isset($_GET["verify"]) && isset($_GET['username']))
- {
- $username_td=htmlspecialchars($_GET['username']);
- $sql="UPDATE users SET banned = 0 WHERE username='$username_td'";
- $stmt = mysqli_prepare($link, $sql);
- mysqli_stmt_execute($stmt);
- log_("Unanned $username_td","BAN:UNBAN");
- }
-
-
- //how many users do we have?
- $cnt=0;
- $sql="SELECT COUNT(*) FROM users";
- if($stmt = mysqli_prepare($link, $sql)){
- // Bind variables to the prepared statement as parameters
-
- // Attempt to execute the prepared statement
- if(mysqli_stmt_execute($stmt)){
- // Store result
- mysqli_stmt_store_result($stmt);
- mysqli_stmt_bind_result($stmt, $cnt);
- if(mysqli_stmt_fetch($stmt)){
-
- }
- } else{
- echo "Oops! Something went wrong. Please try again later.
";
- }
-
- // Close statement
- mysqli_stmt_close($stmt);
- }
- ?>
-
-
-
-
-
-
-
Nach Benutzer suchen, um zu verwalten
-
-
-
-
- ");
- echo("
");
- echo("");
- echo("Nutzer ");
- echo("Drucken ");
- echo("Cloud ");
- echo("Öffentliche Cloud ");
- echo("Alle Drucker abbrechen / freigeben ");
- echo("Benutzereinstellungen ändern ");
- echo("Administratoren erstellen ");
- echo("Log ansehen ");
- echo("APIkey ansehen ");
- echo("Druckschlüssel erstellen ");
- echo("Debug ");
- echo("Alle Dateien von Öffentlicher Cloud löschen ");
- echo("Aktualisieren ");
- echo("Benutzer löschen ");
- echo("Benutzer manuell verifizieren ");
- echo(" ");
- echo(" ");
- echo("
");
- echo("");
- //how many users do we have?
- $cnt=0;
- if(isset($_GET["username"]))
- $search=htmlspecialchars($_GET["username"]);
- else
- $search="user_not_found";
-
- $sql="SELECT COUNT(*) FROM users WHERE username LIKE '%$search%'";
- $stmt = mysqli_prepare($link, $sql);
- mysqli_stmt_execute($stmt);
- // Store result
- mysqli_stmt_store_result($stmt);
- mysqli_stmt_bind_result($stmt, $cnt);
- mysqli_stmt_fetch($stmt);
- mysqli_stmt_close($stmt);
- //now we know how many users we have.
- $last_id=0;
- while($cnt!=0){
- $tusername="";
- $trole="";
- $banned=0;
- $tid=0;
- $sql="select id,username,role,banned from users where id>$last_id AND username LIKE '%$search%' ORDER BY id";
- $stmt = mysqli_prepare($link, $sql);
- mysqli_stmt_execute($stmt);
- // Store result
- mysqli_stmt_store_result($stmt);
- mysqli_stmt_bind_result($stmt, $tid,$tusername,$trole,$banned);
- mysqli_stmt_fetch($stmt);
- mysqli_stmt_close($stmt);
- echo(" ");
- $last_id=$tid;
- $cnt--;
- }
- // echo("");
- echo(" ");
- echo("");
- mysqli_close($link);
- ?>
-
-
-
-
-
-
-
-
diff --git a/sys0-code/app/overview.php b/sys0-code/app/overview.php
index 84c22ef..e58a17b 100644
--- a/sys0-code/app/overview.php
+++ b/sys0-code/app/overview.php
@@ -1,5 +1,5 @@
-
+
System0 Übersicht
@@ -362,7 +362,7 @@ function updatePrinterData(data) {
Status ${printerStatus}
Filamentfarbe ${printer.filament_color}
- Drucken
+ Drucken
`;
diff --git a/sys0-code/app/print.php b/sys0-code/app/print.php
index ccee05b..7765026 100644
--- a/sys0-code/app/print.php
+++ b/sys0-code/app/print.php
@@ -88,7 +88,7 @@ function time_to_seconds($print_time) {
?>
-
+
');
+ echo(' ');
echo('');
echo('
Hochladen... ');
echo('
');
diff --git a/sys0-code/app/public_cloud.php b/sys0-code/app/public_cloud.php
index 4128306..75405fe 100644
--- a/sys0-code/app/public_cloud.php
+++ b/sys0-code/app/public_cloud.php
@@ -1,5 +1,5 @@
-
+
diff --git a/sys0-code/app/reservations.php b/sys0-code/app/reservations.php
index 3975b30..c7ef8da 100644
--- a/sys0-code/app/reservations.php
+++ b/sys0-code/app/reservations.php
@@ -1,5 +1,5 @@
-
+
-
+
-
+