diff --git a/threadr/boards/index.php b/threadr/boards/index.php index 5d2a118..4aa85a6 100644 --- a/threadr/boards/index.php +++ b/threadr/boards/index.php @@ -25,6 +25,7 @@ $navbar="boards"; $pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!'); $error = false; $error_message = ""; + echo "
Public boards:
" if (!$error) { $statement = $pdo->prepare("SELECT * FROM boards ORDER BY id asc"); $statement->execute(); @@ -35,6 +36,16 @@ $navbar="boards"; if (!$result) { $error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2]; } + if ($login) { + echo "Private boards:
" + if (!$error) { + $statement = $pdo->prepare("SELECT * FROM boards WHERE public='0' ORDER BY id asc"); + $statement->execute(); + foreach($statement->fetchAll() as $ROW) { + echo "