numentities.php 699 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. // Get entity statistics
  3. $entity_stats = get_entity_statistics();
  4. $even_odd = "";
  5. ?>
  6. <table class="elgg-table-alt">
  7. <?php
  8. foreach ($entity_stats as $k => $entry) {
  9. arsort($entry);
  10. foreach ($entry as $a => $b) {
  11. //This function controls the alternating class
  12. $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
  13. if ($a == "__base__") {
  14. $a = elgg_echo("item:{$k}");
  15. if (empty($a))
  16. $a = $k;
  17. } else {
  18. if (empty($a)) {
  19. $a = elgg_echo("item:{$k}");
  20. } else {
  21. $a = elgg_echo("item:{$k}:{$a}");
  22. }
  23. if (empty($a)) {
  24. $a = "$k $a";
  25. }
  26. }
  27. echo <<< END
  28. <tr class="{$even_odd}">
  29. <td>{$a}:</td>
  30. <td>{$b}</td>
  31. </tr>
  32. END;
  33. }
  34. }
  35. ?>
  36. </table>