Unsupported scripts and control panel web app for a hosting company
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.

viewcategories.php 918B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. if (count($categories) == 0) {
  3. ?>
  4. <div class="block">
  5. <h2>Categories</h2>
  6. <div class="innerblock" style="text-align: center; font-style: italic;">No Categories</div>
  7. </div>
  8. <?php
  9. return;
  10. }
  11. echo '<div class="block nobottomdiv">';
  12. echo '<h2>Categories</h2>';
  13. echo '<table class="innerblock bottomdiv">';
  14. echo '<tr>';
  15. echo '<th>ID</th><th>Name</th><th>Auto Assign</th><th>Actions</th>';
  16. echo '</tr>';
  17. foreach($categories as $id => $category) {
  18. ?>
  19. <tr>
  20. <td><?php echo h($id); ?></td>
  21. <td><?php echo h($category['name']); ?></td>
  22. <td><?php echo n((($category['assign'] == 0) ? 'None': getUserName($category['assign'])))?></td>
  23. <td><a href="<?php echo CP_PATH.'editcategory/'.$id; ?>" title="Edit">Edit</a> | <a href="<?php echo CP_PATH.'deletecategory/'.$id; ?>" title="Delete">Delete</a></td>
  24. </tr>
  25. <?php
  26. }
  27. echo '</table>';
  28. echo '</div>';
  29. ?>