From e100654e771f44a7751f8b70cc5c13924ac78669 Mon Sep 17 00:00:00 2001 From: szabomarton Date: Wed, 29 Jan 2025 09:15:07 +0100 Subject: [PATCH] TODO finish this shit --- SQL_20250122/index.php | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/SQL_20250122/index.php b/SQL_20250122/index.php index 1181bd2..a839f50 100644 --- a/SQL_20250122/index.php +++ b/SQL_20250122/index.php @@ -1,5 +1,23 @@ @@ -24,15 +42,30 @@ require_once('config.php'); $result = $conn->query($sql); if ($result) { - // Bejárjuk az eredményhalmazt + echo ""; + echo ""; + while ($row = $result->fetch_array(MYSQLI_NUM)) { foreach ($row as $grant) { - echo $grant . "
"; + list($permissions, $database, $table, $columns) = parseGrant($grant); + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } } + + echo "
FelhasználóJogosultságAdatbázisTáblaOszlop
" . htmlspecialchars($_POST["user"]) . "" . htmlspecialchars($permissions) . "" . htmlspecialchars($database) . "" . htmlspecialchars($table) . "" . htmlspecialchars(implode(", ", $columns)) . "
"; } else { echo "Hiba a lekérdezésben: " . $conn->error; } + + $conn->close(); + + } ?>