2020-02-24 04:43:53 +01:00
|
|
|
<?php
|
|
|
|
session_start();
|
|
|
|
%NO_CHEAP_SESSION_STEALING%
|
|
|
|
?>
|
2020-02-19 22:16:27 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2020-02-19 22:26:06 +01:00
|
|
|
<head>
|
2020-02-19 22:53:56 +01:00
|
|
|
<title>ThreadR - Boards</title>
|
2020-02-19 22:26:06 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
|
2020-02-23 20:18:18 +01:00
|
|
|
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2020-02-19 22:26:06 +01:00
|
|
|
</head>
|
2020-02-19 22:16:27 +01:00
|
|
|
<body>
|
2020-02-19 22:36:46 +01:00
|
|
|
<ul class="topnav">
|
2020-02-23 01:03:04 +01:00
|
|
|
<li><a href="%CONTENT_DIR%/"><img src="%CONTENT_DIR%/img/ThreadR_Home.svg" alt="Home" /></a></li>
|
2020-02-19 22:36:46 +01:00
|
|
|
<li><a href="%CONTENT_DIR%/news/">News</a></li>
|
2020-02-24 08:38:48 +01:00
|
|
|
<!--<li><a href="%CONTENT_DIR%/boards/">Boards</a></li>-->
|
|
|
|
<div class="dropdown">
|
|
|
|
<button class="dropbtn">Boards
|
|
|
|
<i class="fa fa-caret-down"></i>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-content">
|
|
|
|
<a href="%CONTENT_DIR%/boards/">Board 1</a>
|
|
|
|
<a href="#">Board 2</a>
|
|
|
|
<a href="#">Board 3</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-19 22:53:56 +01:00
|
|
|
<li><a href="%CONTENT_DIR%/about/">About</a></li>
|
2020-02-19 22:41:54 +01:00
|
|
|
<li class="right"><a href="%CONTENT_DIR%/login/">Log In</a></li>
|
2020-02-19 22:36:46 +01:00
|
|
|
</ul>
|
2020-02-19 23:28:19 +01:00
|
|
|
<br />
|
2020-02-19 22:36:46 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="item-1">
|
|
|
|
<h1><center>ThreadR Boards</center></h1>
|
|
|
|
</div>
|
2020-02-19 22:43:26 +01:00
|
|
|
<div class="item-2">
|
2020-02-19 22:41:54 +01:00
|
|
|
<ul class="topnav">
|
2020-02-19 22:20:25 +01:00
|
|
|
<?php
|
2020-02-19 22:23:41 +01:00
|
|
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
|
|
|
$error = false;
|
|
|
|
$error_message = "";
|
2020-02-24 04:43:53 +01:00
|
|
|
|
2020-02-19 22:23:41 +01:00
|
|
|
if (!$error) {
|
2020-02-19 22:26:06 +01:00
|
|
|
$statement = $pdo->prepare("SELECT * FROM boards");
|
2020-02-19 22:20:25 +01:00
|
|
|
$statement->execute();
|
2020-02-19 22:16:27 +01:00
|
|
|
|
2020-02-19 22:20:25 +01:00
|
|
|
foreach($statement->fetchAll() as $ROW) {
|
2020-02-19 22:41:54 +01:00
|
|
|
echo "<li><a href='%CONTENT_DIR%/boards?=$ROW[id]'>$ROW[name]</a></li>";
|
2020-02-19 22:20:25 +01:00
|
|
|
}
|
|
|
|
}
|
2020-02-24 04:43:53 +01:00
|
|
|
|
2020-02-19 22:23:41 +01:00
|
|
|
if (!$result) {
|
2020-02-19 22:20:25 +01:00
|
|
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
|
|
}
|
|
|
|
?>
|
2020-02-19 22:41:54 +01:00
|
|
|
</ul>
|
2020-02-19 22:43:26 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-19 22:16:27 +01:00
|
|
|
</body>
|
|
|
|
</html>
|