'Your message', 'type' => 'textarea', 'name' => 'post', 'default' => ''), array('key' => '','type' => 'hidden','name' => 'type', 'default' => $typer), array('key' => '','type' => 'hidden','name' => 'id', 'default' => $idr), array('key' => 'Attachments', 'type' => 'file', 'name' => 'file', 'default' => '') ),'/index.php'); } $qs = parse_url($_SERVER['REQUEST_URI']); if (is_null($qs)) $qs = array('query' => '?'); $qsq = $qs['query']; $qss = array(); parse_str($qsq,$qss); $qss['page'] = $page + 1; $qs_next = http_build_query($qss); $qss['page'] = $page - 1; $qs_prev = http_build_query($qss); ?>
0) { ?> Previous Next
prepare("SELECT * FROM comment WHERE id = ? ORDER BY date DESC"); $stmt->execute([ $theId ]); $posts1 = $stmt->fetchAll(PDO::FETCH_DEFAULT); if (is_null($posts1) || count($posts1) < 1) break; $theId = $posts1[0]['targetid']; $posts = array_merge($posts1,$posts); } $stmt = $db->prepare("SELECT * FROM comment WHERE targetType = ? AND targetId = ? ORDER BY date DESC LIMIT ? OFFSET ?"); $stmt->execute([ $typer, $idr, 10, $page * 10 ]); $posts2 = $stmt->fetchAll(PDO::FETCH_DEFAULT); $edge = count($posts); $posts = array_merge($posts,$posts2); foreach ($posts as $key => $post) { if ($key == $edge) { ?>

Replies

.png' class='avatar-img'>
'>
'>