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.

145 lines
5.3 KiB

  1. <? require_once('./templates/overall_header.tpl.php'); ?>
  2. <div id="content">
  3. <? if ($this->TPL['topic_info']['forum_locked'] == false && $this->TPL['topic_info']['topic_locked'] == false) { ?>
  4. <a href="index.php?mode=reply&amp;id=<?= $_GET['id']; ?>">
  5. <div class="btn">
  6. Reply
  7. </div>
  8. </a>
  9. <? } else { ?>
  10. <div class="btn">
  11. Locked
  12. </div>
  13. <? } ?>
  14. <br />
  15. <?php
  16. for ($i=0; $i<count($this->TPL['posts_list']); $i++)
  17. {
  18. echo '
  19. <div class="forum_table">
  20. <div class="row">
  21. <div class="hc1 hcpost">&nbsp;</div>
  22. <div class="hc2 hcpost">&nbsp;</div>
  23. <div id="p'.$this->TPL['posts_list'][$i]['post_id'].'" class="hc4 hcpost f_hc4 post_3c">Post <a href="index.php?mode=viewtopic&amp;id='.$_GET['id'].'#p'.$this->TPL['posts_list'][$i]['post_id'].'">#'.($i+1).'</a></div>
  24. </div>
  25. <div class="row">
  26. <div class="tc1 f_tc2" style="width: 120px">';
  27. if ($this->TPL['posts_list'][$i]['nick'] != null)
  28. echo '<a href="index.php?mode=viewprofile&amp;id='.$this->TPL['posts_list'][$i]['user_id'].'">'.$this->colorRank($this->TPL['posts_list'][$i]['nick'], $this->TPL['posts_list'][$i]['user_rank']).'</a>';
  29. else
  30. echo 'Anonymous';
  31. echo '<br>';
  32. if ($this->TPL['posts_list'][$i]['avatar'] != null)
  33. echo '<img src="'.$this->TPL['posts_list'][$i]['avatar'].'" alt="user avatar">';
  34. else
  35. echo '<img src="templates/images/no_av.gif" alt="user avatar">';
  36. echo '
  37. </div>
  38. <div class="tc3 post_content" >';
  39. echo BBCode($this->TPL['posts_list'][$i]['content']);
  40. if ($this->TPL['posts_list'][$i]['signature'] != null)
  41. echo '
  42. <br><br>
  43. <hr>
  44. <span class="fsmall">'.BBCode($this->TPL['posts_list'][$i]['signature']).'<br><br></span>';
  45. echo '
  46. </div>
  47. <div class="tc4 post_3c f_tc2">
  48. <span class="fsmall">Posted: <span style="font-weight: bold">'.$this->TPL['posts_list'][$i]['date'].'</span></span><br>
  49. <a href="index.php?mode=quote&amp;id='.$_GET['id'].'&amp;q='.$this->TPL['posts_list'][$i]['post_id'].'">
  50. <div class="btn_small">
  51. Quote
  52. </div>
  53. </a>';
  54. if ($this->TPL['my_id'] == $this->TPL['posts_list'][$i]['user_id'])
  55. echo '
  56. <a href="index.php?mode=editpost&amp;id='.$this->TPL['posts_list'][$i]['post_id'].'">
  57. <div class="btn_small">
  58. Edit
  59. </div>
  60. </a>';
  61. echo '<br>';
  62. if ($this->TPL['my_rank'] >= RANK_MOD)
  63. echo '
  64. <div class="mod_pool">
  65. <span style="font-weight: bold">Mod options</span><br>
  66. <a href="index.php?mode=editpost&amp;id='.$this->TPL['posts_list'][$i]['post_id'].'">
  67. <div class="btn_small">
  68. Edit
  69. </div>
  70. </a>
  71. <a href="index.php?mode=moderate&amp;submode=deletepost&amp;id='.$this->TPL['posts_list'][$i]['post_id'].'">
  72. <div class="btn_small" style="width: 35px">
  73. X
  74. </div>
  75. </a>
  76. </div>';
  77. echo '
  78. </div>
  79. </div>
  80. <div class="row">
  81. <div class="tc1 post_3c tc2">
  82. <span class="fsmall">Status: <img src="templates/images/'.(($this->TPL['posts_list'][$i]['user_IP']) ? 'online' : 'offline').'.gif" alt="user status"></span>
  83. </div>
  84. <div class="tc1 ut">
  85. <div class="forum_table" style="box-shadow: none">
  86. <div class="tc2 ">
  87. <span class="fsmall">Posts: <span style="font-weight: bold">'.$this->TPL['posts_list'][$i]['user_post_count'].'</span></span>
  88. </div>
  89. <div class="tc2 p_uinfo">
  90. <span class="fsmall">Joined: <span style="font-weight: bold">'.$this->TPL['posts_list'][$i]['regdate'].'</span></span>
  91. </div>
  92. <div class="tc3 p_uinfo">
  93. <span class="fsmall">Last visit: <span style="font-weight: bold">'.(($this->TPL['posts_list'][$i]['lastvisit']!= null) ? $this->TPL['posts_list'][$i]['lastvisit'] : 'Never').'</span></span>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="tc4 post_3c"><span class="fsmall">Rank: '.$this->getRankLevel($this->TPL['posts_list'][$i]['user_rank']).'</span></div>
  98. </div>
  99. </div>
  100. <br>';
  101. }
  102. ?>
  103. <? if ($this->TPL['topic_info']['forum_locked'] == false && $this->TPL['topic_info']['topic_locked'] == false) { ?>
  104. <a href="index.php?mode=reply&amp;id=<?= $_GET['id']; ?>">
  105. <div class="btn">
  106. Reply
  107. </div>
  108. </a>
  109. <? } else { ?>
  110. <div class="btn">
  111. Locked
  112. </div>
  113. <? } ?>
  114. <? if ($this->TPL['my_rank'] >= RANK_MOD) { ?>
  115. <div class="forum_table topic_mod" style="">
  116. <div class="row">
  117. <div class="hc1 hc4 hcpost" style="padding: 0px; text-align: center">Actions</div>
  118. </div>
  119. <div class="row">
  120. <div class="tc1 tc4">
  121. <a href="index.php?mode=moderate&amp;submode=deletetopic&amp;id=<?= $_GET['id']; ?>">
  122. <img src="templates/images/delete.gif" alt="delete">
  123. </a>
  124. <a href="index.php?mode=moderate&amp;submode=locktopic&amp;id=<?= $_GET['id']; ?>">
  125. <img src="templates/images/<? if ($this->TPL['topic_info']['topic_locked']) echo 'un'; ?>lock.gif" alt="lock">
  126. </a>
  127. <a href="index.php?mode=moderate&amp;submode=movetopic&amp;id=<?= $_GET['id']; ?>">
  128. <img src="templates/images/move.gif" alt="move">
  129. </a>
  130. </div>
  131. </div>
  132. </div>
  133. <? } ?>
  134. <div style="clear: both">&nbsp;</div>
  135. </div>
  136. <? require_once('./templates/overall_footer.tpl.php'); ?>