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.

bigfiles.php 650B

12345678910111213141516171819202122232425
  1. <?PHP
  2. if (!defined('LIB_DATABASE')) { require_once('lib/database.php'); }
  3. if (!defined('LIB_COMMON')) { require_once('lib/common.php'); }
  4. if (!defined('ADMIN') || !ADMIN) { die('Admins only'); }
  5. ?>
  6. <div class="block" id="bigfiles">
  7. <h2>ADMIN: Large files report</h2>
  8. <table class="innerblock">
  9. <tr>
  10. <th>File</th>
  11. <th>Size</th>
  12. </tr>
  13. <?PHP
  14. $data = file('/home/utd/reports/bigfiles.txt');
  15. $i = 1;
  16. foreach ($data as $line) {
  17. list($file,$size) = explode(' ',trim($line));
  18. echo '<tr'.($i == 0 ? ' class="odd"' : ' class="even"').'><td>'.h($file).'</td><td>'.NiceSize($size).'</td></tr>';
  19. $i = 1 - $i;
  20. }
  21. ?>
  22. </table>
  23. </div>