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.

68 lines
2.7 KiB

  1. <?php require_once('./templates/admin/overall_header.tpl.php'); ?>
  2. <div id="content">
  3. <br>
  4. <a href="index.php?mode=admin&amp;submode=addcat" class="btn" style="width: 130px; float: left">New Category</a>
  5. <a href="index.php?mode=admin&amp;submode=addforum" class="btn" style="width: 130px; float: right">New Forum</a>
  6. <div style="clear: both">&nbsp;</div>
  7. <?php
  8. for ($i=0; $i<count($this->TPL['forums_list']); $i++)
  9. {
  10. if ($i > 0)
  11. {
  12. if ($this->TPL['forums_list'][$i-1]['category_id'] != $this->TPL['forums_list'][$i]['category_id'])
  13. echo '</div><br><div class="forum_table">
  14. <div class="row">
  15. <div class="hc1">'.$this->TPL['forums_list'][$i]['category_name'].'</div>
  16. <div class="hc2 hcpost" style="width: 70px">
  17. <a href="index.php?mode=admin&amp;submode=edcat&amp;id='.$this->TPL['forums_list'][$i]['category_id'].'">
  18. Edit &raquo;
  19. </a>
  20. </div>
  21. <div class="hc4 hcpost" style="width: 70px">
  22. <a href="index.php?mode=admin&amp;submode=delcat&amp;id='.$this->TPL['forums_list'][$i]['category_id'].'">
  23. Delete &raquo;
  24. </a>
  25. </div>
  26. </div>';
  27. }
  28. else
  29. {
  30. echo '<div class="forum_table">
  31. <div class="row">
  32. <div class="hc1">'.$this->TPL['forums_list'][$i]['category_name'].'</div>
  33. <div class="hc2 hcpost" style="width: 70px">
  34. <a href="index.php?mode=admin&amp;submode=edcat&amp;id='.$this->TPL['forums_list'][$i]['category_id'].'">
  35. Edit &raquo;
  36. </a>
  37. </div>
  38. <div class="hc4 hcpost" style="width: 70px">
  39. <a href="index.php?mode=admin&amp;submode=delcat&amp;id='.$this->TPL['forums_list'][$i]['category_id'].'">
  40. Delete &raquo;
  41. </a>
  42. </div>
  43. </div>';
  44. }
  45. if ($this->TPL['forums_list'][$i]['forum_id'] != null)
  46. {
  47. echo '<div class="row">'."\n";
  48. echo "\t\t\t".'<div class="tc1">
  49. <span class="sect">'.$this->TPL['forums_list'][$i]['forum_name'].'</span><br>
  50. <span class="fsmall">'.$this->TPL['forums_list'][$i]['forum_desc'].'</span></div>'."\n";
  51. echo "\t\t\t".'<div class="tc2" style="width: 70px">
  52. <a href="index.php?mode=admin&amp;submode=edforum&amp;id='.$this->TPL['forums_list'][$i]['forum_id'].'" class="btn_small">Edit</a>
  53. </div>'."\n";
  54. echo "\t\t\t".'<div class="tc4" style="width: 70px">
  55. <a href="index.php?mode=admin&amp;submode=delforum&amp;id='.$this->TPL['forums_list'][$i]['forum_id'].'" class="btn_small">Delete</a>
  56. </div>'."\n";
  57. echo "\t\t".'</div>'."\n";
  58. }
  59. else
  60. {
  61. echo '<div class="rcol">No forums in this category.</div>';
  62. }
  63. }
  64. ?>
  65. <?php if (count($this->TPL['forums_list']) > 0) echo '</div>'; ?>
  66. <br>
  67. </div>
  68. <?php require_once('./templates/overall_footer.tpl.php'); ?>