forked from root/threadr.lostcave.ddnss.de
removed dead code
parent
d70cf6e3db
commit
06d085859e
|
@ -1,38 +1,24 @@
|
||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
||||||
$error = false;
|
$statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:bid ORDER BY post_time asc");
|
||||||
$error_message = "";
|
$statement->execute(array("bid"=>$id));
|
||||||
if (!$error) {
|
foreach($statement->fetchAll() as $ROW) {
|
||||||
$statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:bid ORDER BY post_time asc");
|
$statement = $pdo->prepare("SELECT * FROM users WHERE id=:uid");
|
||||||
$statement->execute(array("bid"=>$id));
|
$statement->execute(array("uid"=>$ROW[user_id]));
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
$post_user = $statement->fetch();
|
||||||
$error = false;
|
echo "<section>";
|
||||||
$error_message = "";
|
echo "<h1>$ROW[title]</h1>";
|
||||||
if (!$error) {
|
echo "<article>";
|
||||||
$statement = $pdo->prepare("SELECT * FROM users WHERE id=:uid");
|
echo "<header>";
|
||||||
$statement->execute(array("uid"=>$ROW[user_id]));
|
echo "<div>";
|
||||||
$post_user = $statement->fetch();
|
echo "<p class='beige'>$post_user[name] <time datetime='$ROW[post_time]'>$ROW[post_time]</time></p>";
|
||||||
}
|
echo "</div>";
|
||||||
if (!$result) {
|
echo "</header>";
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
echo "<div class='postcontent'>";
|
||||||
}
|
echo "<p>$ROW[content]</p>";
|
||||||
echo "<section>";
|
echo "</div>";
|
||||||
echo "<h1>$ROW[title]</h1>";
|
echo "</article>";
|
||||||
echo "<article>";
|
echo "</section>";
|
||||||
echo "<header>";
|
|
||||||
echo "<div>";
|
|
||||||
echo "<p class='beige'>$post_user[name] <time datetime='$ROW[post_time]'>$ROW[post_time]</time></p>";
|
|
||||||
echo "</div>";
|
|
||||||
echo "</header>";
|
|
||||||
echo "<div class='postcontent'>";
|
|
||||||
echo "<p>$ROW[content]</p>";
|
|
||||||
echo "</div>";
|
|
||||||
echo "</article>";
|
|
||||||
echo "</section>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue