forked from root/threadr.lostcave.ddnss.de
43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
session_start();
|
|
%NO_CHEAP_SESSION_STEALING%
|
|
%PLEAZE_NO_CACHE%
|
|
$navbar="boards";
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>ThreadR - Boards</title>
|
|
%STYLESHEET%
|
|
<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">
|
|
</head>
|
|
<body>
|
|
%NAVBAR%
|
|
<div class="container">
|
|
<div class="item-1">
|
|
<h1><center>
|
|
<?php
|
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
|
$error = false;
|
|
$error_message = "";
|
|
if (!$error) {
|
|
$statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id");
|
|
$statement->execute(array("id"=>$_GET['id']));
|
|
$result = $statement->fetch();
|
|
echo $result['name'];
|
|
}
|
|
if (!$result) {
|
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
}
|
|
?>
|
|
</center></h1>
|
|
</div>
|
|
<div class="item-2">
|
|
<form action="%CONTENT_DIR%/boards/post.php?id=$_GET['id']" method="post">
|
|
<input type="submit" value="Post something">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|