* */ require_once "src/base.inc.php"; require_once "src/header.inc.php"; echo "

Recent Posts

"; // Get all recent, approved posts. $posts = new PostIterator(); $posts->filterStage('approved'); $posts->limit(5); $posts->query(); if ($posts->valid()) { foreach ($posts as $id => $post) { $title = $post->getName(); if ($post->getPrice() != 0) { $title .= ' - $' . $post->getPrice(); } printf("

%s

" . "
%s" . " %s
", $id, $title, $post->getLocation(), $post->getAge()); } } else { echo "

No recent posts.

"; } require_once "src/footer.inc.php"; ?>