You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.2 KiB

6 years ago
  1. <?php
  2. addTitle($_locale['entries']);
  3. if (isset($seo[1]) && isnum($seo[1]))
  4. $blog = new blog(null, $seo[1]);
  5. else
  6. $blog = new blog();
  7. if (theme_component('entries'))
  8. include theme_component('entries');
  9. else
  10. {
  11. if (LOGGEDIN && $user['userLevel'] > 2) echo "<a href='/admin/entry'><p class='phantom'>{locale:new_entry}</p></a>";
  12. if ($blog->entries)
  13. {
  14. while ($data = $blog->entries())
  15. echo "<article>
  16. <header>
  17. <h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($data['entryTitle'])."</a></h2>
  18. <p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a>".get_entry_admin($data)."</p>
  19. </header>
  20. <div class='content'>".entry_show_init($data['entryContent'], $data['entrySlug'])."</div>
  21. </article>\n";
  22. echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]+1)."'>{locale:next_page}</a><a href='/p/".($seo[1]-1)."'>{locale:prev_page}</a>" : "<a href='/p/2'>{locale:next_page}</a>")."</p>";
  23. } else
  24. echo "<h1>{locale:entry_not_found_title}</h1>"
  25. ."<p>{locale:entry_not_found}</p>\n";
  26. }