A new, object-oriented, better vesion of μForum
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.

74 lines
3.2 KiB

  1. <?php require_once('./templates/overall_header.tpl.php'); ?>
  2. <div id="content">
  3. <?php if ($this->TPL['forum_info']['locked'] == false) { ?>
  4. <a href="index.php?mode=newtopic&amp;id=<?php echo $_GET['id']; ?>" class="btn">New Topic</a>
  5. <?php } else { ?>
  6. <div class="btn">
  7. Locked
  8. </div>
  9. <?php } ?>
  10. <br />
  11. <div class="forum_table">
  12. <div class="row">
  13. <div class="hc1"><?php echo $this->TPL['f_name']; ?></div>
  14. <div class="hc2" style="width: 150px">&nbsp;</div>
  15. <div class="hc3" style="width: 80px">&nbsp;</div>
  16. <div class="hc4">&nbsp;</div>
  17. </div>
  18. <div class="row">
  19. <div class="tc1 tab_desc">Topic name</div>
  20. <div class="tc2 tab_desc" style="width: 150px">Author</div>
  21. <div class="tc3 tab_desc" style="width: 80px">Replies</div>
  22. <div class="tc4 tab_desc">Last Post</div>
  23. </div>
  24. <?php
  25. for ($i=0; $i<count($this->TPL['topics_list']); $i++)
  26. {
  27. echo '<div class="row">'."\n";
  28. $sticky = ($this->TPL['topics_list'][$i]['sticky']) ? '<span style="font-weight: bold">Sticky</span>: ' : '';
  29. echo "\t\t\t".'<div class="tc1"><a href="index.php?mode=viewtopic&amp;id='.$this->TPL['topics_list'][$i]['topic_id'].'">'.$sticky.$this->TPL['topics_list'][$i]['topic_title'].'</a></div>'."\n";
  30. echo "\t\t\t".'<div class="tc2" style="width: 150px">';
  31. if ($this->TPL['topics_list'][$i]['user_id'] != null)
  32. echo '<a href="index.php?mode=viewprofile&amp;id='.$this->TPL['topics_list'][$i]['user_id'].'">'.$this->colorRank($this->TPL['topics_list'][$i]['user_nick'], $this->TPL['topics_list'][$i]['user_rank']).'</a>';
  33. else
  34. echo 'Anonymous';
  35. echo '</div>'."\n";
  36. echo "\t\t\t".'<div class="tc3" style="width: 80px">'.($this->TPL['topics_list'][$i]['post_count']-1).'</div>'."\n";
  37. if ($this->TPL['topics_list'][$i]['lastpost_post_id'] != null)
  38. {
  39. $lastpost = '<span class="fsmall"> <span style="font-weight: bold">'.$this->TPL['topics_list'][$i]['lastpost_date'].'</span><br><a href="index.php?mode=viewtopic&amp;id='.$this->TPL['topics_list'][$i]['topic_id'].'#p'.$this->TPL['topics_list'][$i]['lastpost_post_id'].'" style="font-weight: bold">Post #'.$this->TPL['topics_list'][$i]['lastpost_post_id'].'</a>: ';
  40. if ($this->TPL['topics_list'][$i]['lastpost_user_id'] != null)
  41. $lastpost .= '<a href="index.php?mode=viewprofile&amp;id='.$this->TPL['topics_list'][$i]['lastpost_user_id'].'">'.$this->colorRank($this->TPL['topics_list'][$i]['lastpost_user_nick'], $this->TPL['topics_list'][$i]['lastpost_user_rank']).'</a>';
  42. else
  43. $lastpost .= 'Anonymous';
  44. $lastpost .= '</span>';
  45. }
  46. else
  47. {
  48. $lastpost = 'No posts.';
  49. }
  50. echo "\t\t\t".'<div class="tc4">'.$lastpost.'</div>'."\n";
  51. echo "\t\t".'</div>'."\n";
  52. }
  53. ?>
  54. <?php
  55. if (count($this->TPL['topics_list']) == 0)
  56. {
  57. echo '<div class="rcol">No topics in this forum.</div>';
  58. }
  59. ?>
  60. </div>
  61. <br>
  62. <?php if ($this->TPL['forum_info']['locked'] == false) { ?>
  63. <a href="index.php?mode=newtopic&amp;id=<?php echo $_GET['id']; ?>" class="btn">New Topic</a>
  64. <?php } else { ?>
  65. <div class="btn">
  66. Locked
  67. </div>
  68. <?php } ?>
  69. </div>
  70. <?php require_once('./templates/overall_footer.tpl.php'); ?>