crappy ui for threads
This commit is contained in:
parent
1f56e6df3c
commit
22756c834e
3 changed files with 25 additions and 4 deletions
|
@ -37,6 +37,12 @@
|
|||
</div>
|
||||
|
||||
<?php
|
||||
$stmt = $db->prepare("SELECT * FROM comment WHERE id = ? ORDER BY date DESC");
|
||||
$stmt->execute([
|
||||
$idr
|
||||
]);
|
||||
$posts1 = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
|
||||
$stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC LIMIT ? OFFSET ?");
|
||||
$stmt->execute([
|
||||
$typer,
|
||||
|
@ -45,7 +51,9 @@
|
|||
$page * 10
|
||||
]);
|
||||
|
||||
$posts = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
$posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT);
|
||||
|
||||
$posts = array_merge($posts1,$posts2);
|
||||
|
||||
foreach ($posts as $post) { ?>
|
||||
<div class='comment'>
|
||||
|
@ -58,7 +66,9 @@
|
|||
</a>
|
||||
</b></div>
|
||||
<div><b>
|
||||
<?php echo date(DATE_RFC2822,$post['date'] + $ref) ?>
|
||||
<a class='link' href='/comment.php?id=<?php echo $post['id'] ?>'>
|
||||
<?php echo date(DATE_RFC2822,$post['date'] + $ref) ?>
|
||||
</a>
|
||||
</b></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue