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.

129 lines
5.7 KiB

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