threadr.lostcave.ddnss.de/threadr/board/index.php

47 lines
1.4 KiB
PHP
Raw Normal View History

2020-03-02 08:52:22 +01:00
<?php
session_start();
%SET_LOGIN_VARIABLE%
2020-03-02 08:52:22 +01:00
%NO_CHEAP_SESSION_STEALING%
%PLEAZE_NO_CACHE%
2020-03-02 08:52:22 +01:00
$navbar="boards";
2020-03-06 10:27:57 +01:00
$id=$_GET['id'];
2020-03-02 08:52:22 +01:00
?>
<!DOCTYPE html>
<html>
<head>
<title>ThreadR - Boards</title>
2020-03-05 04:56:06 +01:00
%STYLESHEET%
2020-03-02 08:52:22 +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">
</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");
2020-03-06 10:27:57 +01:00
$statement->execute(array("id"=>$id));
$result = $statement->fetch();
2020-03-04 10:45:05 +01:00
echo $result['name'];
}
if (!$result) {
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
}
?>
</center></h1>
2020-03-02 08:52:22 +01:00
</div>
<div class="item-2">
2020-03-07 20:04:29 +01:00
<iframe src="%CONTENT_DIR%/board/board.php?id=$id"></iframe>
2020-03-07 19:46:22 +01:00
</div>
<div class="item-3">
2020-03-07 20:04:29 +01:00
<iframe src="%CONTENT_DIR%/board/default.php?id=$id"></iframe>
</div>
2020-03-02 08:52:22 +01:00
</div>
</body>
</html>